Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp581024ybl; Tue, 7 Jan 2020 11:17:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyynK1xwHgvb6GHhf6rLcnM0rtL9BwjUG8LVa6gf0tIufWDN68TsyFrWUBtKwAa+ThRefrX X-Received: by 2002:a05:6830:1487:: with SMTP id s7mr1236159otq.269.1578424656661; Tue, 07 Jan 2020 11:17:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578424656; cv=none; d=google.com; s=arc-20160816; b=zezQ5z4Oe1g97MaA/VIqGa3B0vfMz+qrB40lGDP51kkPGp4Ar5BVAZAFljXx+KQQZM xnXiYMxokkakMsglAojgjbGQlYRDxQi9J6U9y6erPVxinl0wBf8UBJ5jAASew9Skt2UC NgfTmfJErWJisULMR0Sx2FrHXxJ/h5/6OVa1MV9JO6kOUrUYzaNeH2v4/X1talt4/9Ue mlt5prrJzAXcTATAX4iY8EtO6oR5EMTbIXNNNtd9KUYjhLa+G/10wYYXZJZ5MjwhATwn pU9MeSU69e54t5HLlfSNoB4Heb+qnr2qmy0Ri0MmsVXTIHrFvvyEnkTXoJrwJGm3acvc PA7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=sJ1qiuOaFddjvV3EMxT41XqJKgGLuuRJHE45bF9B8p8=; b=mFGzRZ0Ad2WG/hqH2uQ5L6TLQLWKy42IbdKQOSDT7kFmYwHaKF++5fSX1z/VxHK6/U +DP4NCZ8t9Cb9g2BaSwD4xrus7mOKnDb/MdHhd7C/5L76fwp9ECQ8CM7NFEEeAfzuCbJ rJq04Z1kVONYKmIqV+owRKSgVarUZVDllryzVJS0AEW5Lx4SC1poM/P2nc0PXvwHH16v z88zgkOQOexJqiY8aOk8wW9OERjYLOx04F9vYki+xihCBqy+HRyu9kGg+wtiGfmnSHQx 8TKD89vkjwq6DEtnARrktIlxxJEa7CWR1epWcD7atPlNI8C/LnPww6BbWtBdPK4Jksyh panQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pfn+eN2a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 128si491162oih.78.2020.01.07.11.17.23; Tue, 07 Jan 2020 11:17:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pfn+eN2a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728829AbgAGTQW (ORCPT + 99 others); Tue, 7 Jan 2020 14:16:22 -0500 Received: from mail-pl1-f202.google.com ([209.85.214.202]:48675 "EHLO mail-pl1-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728540AbgAGTQW (ORCPT ); Tue, 7 Jan 2020 14:16:22 -0500 Received: by mail-pl1-f202.google.com with SMTP id 2so305040plb.15 for ; Tue, 07 Jan 2020 11:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=sJ1qiuOaFddjvV3EMxT41XqJKgGLuuRJHE45bF9B8p8=; b=pfn+eN2a9Rhsgq25lRpdSPWFyexvrpgZxlkFxEffR4y2X33KinzvvzUEOliF9ZQXOa E9Zi2ic+Cfqxvy8R8Xp2NJI8gMfjf1W+jZbZoKcTdsYB7iiFZBP2EaBMbgYS5DqpzwbV oLHxtWvAaWs+zZMFzsUfQoncykLzPOePuvMA5QJ1U0XCUYcNWB/ca9CsJzVFIVBu3BI2 D2lQNHBi196qYBwh3pHdylg1lq6hQ25y/ppShxK+ARBePcb2uc6tcQVtn663/Xe38XmE obk68R+QC9jVqcBuOFHZHkcFnjomB79L+YnaU0rqjx200WEp8/+dsOA18NDtaeluiLFL ds7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=sJ1qiuOaFddjvV3EMxT41XqJKgGLuuRJHE45bF9B8p8=; b=AZYd0vXGRfccXJQFSZQOYCjiAuXMdOC8Rba972k46XA3ocSOmxzV++W5+Wl3+6n0o8 PB+nbhPbCbeVm9VN5lMnCf+Lc5RawH5+WUCoYfHq6/BuF9KaAe1aalLRUYWAAkFoApsR 9AnVp9IkZWFXyHPBJavKvw37uaWXkIHI1NyS7LSLhRBgu8TnsdwvqjjOPpu9rzKiwooe SY4T0rd7lPwYiLGDu9VQu4l8Rz0dXKqLkrx2bCk1IWdPJpwm7lW9nDncOJB1V9ex+6PE +E1/raWxsF4HD6+wcfDen57LWrykxaHOxQvHpISIc1UFzDlT2A7DDBqsWOVwBwXoGj08 kakg== X-Gm-Message-State: APjAAAWQ5+CQyxEqPG3bBYwPXnnBmTMlxV34cOiIg0xwms4YS7psaH+r 36I076rxAwJZuSn30bXDu/0nRKo0 X-Received: by 2002:a63:f403:: with SMTP id g3mr1104543pgi.62.1578424581543; Tue, 07 Jan 2020 11:16:21 -0800 (PST) Date: Tue, 7 Jan 2020 14:16:08 -0500 Message-Id: <20200107191610.178185-1-brho@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.24.1.735.g03f4e72817-goog Subject: [PATCH v2 0/2] iommu/vt-d bad RMRR workarounds From: Barret Rhoden To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , David Woodhouse , Joerg Roedel , Yian Chen , Sohil Mehta Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit f036c7fa0ab6 ("iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved") caused a machine to fail to boot for me, but only after a kexec. Buggy firmware provided an RMRR entry with base and end both == 0. That is an invalid RMRR format, and only happens to pass the RMRR sanity check. After a kexec, that entry fails the RMRR sanity check, due to a slight change in the first e820 mapping. See the v1 link for details. v1->v2: v1: https://lore.kernel.org/lkml/20191211194606.87940-1-brho@google.com/ - Added the TAINT_FIRMWARE_WORKAROUND - Dropped the commit that treated missing e820 regions as "RMRR OK" Barret Rhoden (2): iommu/vt-d: skip RMRR entries that fail the sanity check iommu/vt-d: skip invalid RMRR entries drivers/iommu/intel-iommu.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) -- 2.24.1.735.g03f4e72817-goog