From nobody Mon Feb 9 12:09:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=eviden.com ARC-Seal: i=1; a=rsa-sha256; t=1770539196; cv=none; d=zohomail.com; s=zohoarc; b=jhO7r1VE22Wzl6gFLkcBC7a/SiQyWpsQCp44kxBTWBVrPD4eYklbDKuqBXjqTcPRI811+RZbKN1X6yu7YA2gqtesrZS2c4tG8qYjisIEZD3DUTnilmm14G/rQuFNYZ6XOpBnR98xX3atyofpE1Jh+8lnUG1zFff5hWC9PufwQ/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770539196; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=anK91LCWXRP4jR7wyzf1aGK8M6XyuR3pblhi7bNrgKc=; b=YQLFOjnjRZ5ZOVrJDBCFjq7+0QfulzLesXiTn5nNk+wu3Ma5pOwBmv/ErPPpyFm53qdGHVqlfyDs35gBrQnsmtPuQ4n/yWsVDJkUu8KJTzTE4+FU2WRLe2xozPgyGLdLh6V22irJKXuONtNJJWyALvTIAy+eLtDwC05kvm2Ah4A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@eviden.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1770539195480792.2226222997689; Sun, 8 Feb 2026 00:26:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vp07H-0000ky-Q6; Sun, 08 Feb 2026 03:26:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vp07G-0000kp-SI for qemu-devel@nongnu.org; Sun, 08 Feb 2026 03:26:02 -0500 Received: from smtppost.atos.net ([193.56.114.177] helo=smarthost4.atos.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vp07C-0003zm-N9 for qemu-devel@nongnu.org; Sun, 08 Feb 2026 03:26:02 -0500 Received: from smtp0.atos-infogerance.fr ([193.56.241.18]) by smarthost4.atos.net with ESMTP/TLS/TLS_AES_256_GCM_SHA384; 08 Feb 2026 09:25:54 +0100 Received: from smtp-hub.atos-infogerance.fr (smtp-hub.atos-infogerance.fr [193.56.47.18]) by smtp0.atos-infogerance.fr (8.15.2/8.15.2) with ESMTPS id 6188PrKL044134 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 8 Feb 2026 09:25:53 +0100 Received: from rocky.hd2c.dom ([129.181.244.14]) by smtp-hub.atos-infogerance.fr (envelope-from clement.mathieu--drif@eviden.com) (8.15.2/8.15.2) with ESMTP id 6188Prfv035233; Sun, 8 Feb 2026 09:25:53 +0100 Received: from openbmc (unknown [10.22.85.22]) by rocky.hd2c.dom (Postfix) with ESMTP id 0A8BA256CA5; Sun, 8 Feb 2026 09:25:53 +0100 (CET) Received: by openbmc (Postfix, from userid 0) id 05EE9812AF4D; Sun, 08 Feb 2026 08:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eviden.com; i=@eviden.com; q=dns/txt; s=mail; t=1770539158; x=1802075158; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=C5hjxpopGC8KhVf5BeBDT3IdeMMhGZqqRh9FeUo9hBA=; b=Rftj/wntkVVu15vIPERJPmpV4sr2crnXDDX7N+yT7sExW9TO3eESDbd8 G3ODvzK5ebfh25yWkA7LIHcb7ixNqZGJoe8wtPRewn7/LQFA50zwOIj5z pKvD8JFWHvqFqGSQbyWFnyqwWvT8aZnk93Xih4apdLQVXehqdmfncypd3 euUcqleE+ihc+93EPJQi8utAPAYc21vm6dnYl0/gqNXVLxpVzOgFB4Yyf 76jEqJiRgxd5rMezwlV3JDLHErK6RRMj58gZNUQTn8D8pdCB4rDs/aJ3k zT/EE9gmTsY2AuNoUXFnZCSC/hor1swgCER4EbTXAms3yX6d3dlsZwOeu g==; X-CSE-ConnectionGUID: AJX8+2OOSDC5kbzRIu7laQ== X-CSE-MsgGUID: EK2SX1IlSYWbAlN+xNPbhQ== X-IronPort-AV: E=Sophos;i="6.21,279,1763420400"; d="scan'208";a="824682994" X-MGA-submission: =?us-ascii?q?MDHWJ/EG4BFs71hpbiILMefWnWs77FPrQWkCGM?= =?us-ascii?q?xDrwjF6AAhB0QtRtKJsmSyRXjQXtalWqpB3afNumnk3XCQqv7dVtbGbc?= =?us-ascii?q?RBKtEv+LwfgSc3Dhxw/J9N5QxJkwJfR8qLwlX7egv4925zfSNzBmWk+m?= =?us-ascii?q?kk?= From: Clement Mathieu--Drif To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, peterx@redhat.com, david@redhat.com, mst@redhat.com, jasowang@redhat.com, zhenzhong.duan@intel.com, kevin.tian@intel.com, yi.l.liu@intel.com, joao.m.martins@oracle.com, Clement Mathieu--Drif Subject: [PATCH] intel_iommu: Do not report recoverable faults to host Date: Sun, 8 Feb 2026 08:22:52 +0000 Message-ID: <20260208082252.288-1-clement.mathieu--drif@eviden.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=193.56.114.177; envelope-from=clement.mathieu--drif@eviden.com; helo=smarthost4.atos.net X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @eviden.com) X-ZM-MESSAGEID: 1770539200874154100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Clement Mathieu--Drif --- hw/i386/intel_iommu.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index dd00079a40..0735b24ac0 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -1857,6 +1857,21 @@ static const bool vtd_qualified_faults[] =3D { [VTD_FR_MAX] =3D false, }; =20 +static const bool vtd_recoverable_faults[] =3D { + [VTD_FR_WRITE] =3D true, + [VTD_FR_READ] =3D true, + [VTD_FR_PASID_DIR_ENTRY_P] =3D true, + [VTD_FR_PASID_ENTRY_P] =3D true, + [VTD_FR_FS_PAGING_ENTRY_INV] =3D true, + [VTD_FR_FS_PAGING_ENTRY_P] =3D true, + [VTD_FR_FS_PAGING_ENTRY_RSVD] =3D true, + [VTD_FR_PASID_ENTRY_FSPTPTR_INV] =3D true, + [VTD_FR_FS_NON_CANONICAL] =3D true, + [VTD_FR_FS_PAGING_ENTRY_US] =3D true, + [VTD_FR_SM_WRITE] =3D true, + [VTD_FR_MAX] =3D false, +}; + /* To see if a fault condition is "qualified", which is reported to softwa= re * only if the FPD field in the context-entry used to process the faulting * request is 0. @@ -1866,6 +1881,11 @@ static inline bool vtd_is_qualified_fault(VTDFaultRe= ason fault) return vtd_qualified_faults[fault]; } =20 +static inline bool vtd_is_recoverable_fault(VTDFaultReason fault, int iomm= u_idx) +{ + return iommu_idx =3D=3D VTD_IDX_ATS && vtd_recoverable_faults[fault]; +} + static inline bool vtd_is_interrupt_addr(hwaddr addr) { return VTD_INTERRUPT_ADDR_FIRST <=3D addr && addr <=3D VTD_INTERRUPT_A= DDR_LAST; @@ -2237,8 +2257,10 @@ static bool vtd_do_iommu_translate(VTDAddressSpace *= vtd_as, PCIBus *bus, } =20 if (ret_fr) { - vtd_report_fault(s, -ret_fr, is_fpd_set, source_id, - addr, is_write, pasid !=3D PCI_NO_PASID, pasid); + if (!vtd_is_recoverable_fault(-ret_fr, iommu_idx)) { + vtd_report_fault(s, -ret_fr, is_fpd_set, source_id, + addr, is_write, pasid !=3D PCI_NO_PASID, pasid= ); + } goto error; } =20 --=20 2.53.0