From nobody Sun Jul 26 12:42:15 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1782203080; cv=none; d=zohomail.com; s=zohoarc; b=YXw1j2jrhLM8GNKDUKcD+UQX4MIqyOZ2d0OfJu85LYa9eGVvAJ1yll65K/TsJJe3D3xcXAz8QpEtMNtJ+I6CLhQ/nAUei/DAu5RDVsr1aXpRLLxoQI/HCXzR562wvs45JyO7B6GawpfvQ/F+hbkXd01ORzCu+Mwpf+5poefOyvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1782203080; 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:Reply-To:Reply-To:Sender:Subject:Subject:To:To:Message-Id; bh=BH63WPreaeonJhEC8xJKce85x2tVi20mo1wCX1pHqTU=; b=gaB+cfEg5vFGdxd/QT4u6rNY7OZinRxb6JfFIP3NtHL40OlzDNcZvW4UTwyxQiB/ACHDiKTZiZNzHefRu6QZyitXMc23mJV/ZomU/mF4MS+1jAnlx6WKCmcVYV3AjNXLH3V4jwNdpRscy4C1PcAO/MZMBpIOdi+qheQEXwIWWKk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1782203080320141.3364104938545; Tue, 23 Jun 2026 01:24:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wbwQ4-0007TQ-Gi; Tue, 23 Jun 2026 04:23:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wbwQ2-0007SY-I1; Tue, 23 Jun 2026 04:23:42 -0400 Received: from hades.hosts.managarm.org ([195.201.36.94]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wbwQ0-0006wi-Rb; Tue, 23 Jun 2026 04:23:42 -0400 Received: from white.localdomain (pd9f9de93.dip0.t-ipconnect.de [217.249.222.147]) by hades.hosts.managarm.org (Postfix) with ESMTPSA id 26DF440E2E; Tue, 23 Jun 2026 08:23:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=managarm.org; s=2021; t=1782203018; bh=S1XJi+zB/1DqrNjbZ/iq4hE+cM7kDPhIH5i+disLAlw=; h=From:To:Cc:Subject:Date:From; b=twjVA1u8qDUDv3y7zNJtiFYxDpAmQTqUozxxx6T4Dseocrpas7iXhxcCa5/6fbnvc ukqNXulnkJiYk02vpeMNrw5kjTFFD0CXowYJROwkuDInO8HlFtva75WboJYHuqrqOq uoqWlsCq27QG14A2t2qfBSfydKmJdCV3bd9/3LHyciDfUBUtOpocrlHFkIbvbHx+W9 uH8BAyxnPXwSdy9UbBajt92fAzDMJAkddOIhBlo22DLDJJZi4OuG6c9p4d5meOdHLA 0U6O3CWwYk5HgDXJClQq/4hNBrq3mY1KgZesvH6bBgvpfjawN1rzSz7o1RSyH+AF2v otC1oFZLeeXZw== To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, qemu-stable@nongnu.org, clement.mathieu--drif@bull.com, yi.l.liu@intel.com, mst@redhat.com, no92 , Jason Wang , Paolo Bonzini , Richard Henderson Subject: [PATCH v2] hw/i386/x86-iommu: Correctly set pt bit in extended capability register Date: Tue, 23 Jun 2026 10:22:23 +0200 Message-ID: <20260623082223.1431499-1-leo@managarm.org> X-Mailer: git-send-email 2.54.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=lists1p.gnu.org; Received-SPF: pass client-ip=195.201.36.94; envelope-from=leo@managarm.org; helo=hades.hosts.managarm.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=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: , Reply-to: no92 From: no92 via qemu development Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1782203082112158500 Content-Type: text/plain; charset="utf-8" With the changes in c7b2e22bd957, the `pt` bit was set in the (wrong) capability register, instead of the (correct) extended capability register. Fixes: c7b2e22bd957 ("hw/i386/x86-iommu: Remove X86IOMMUState::pt_supported= field") Signed-off-by: no92 Reviewed-by: Clement Mathieu--Drif Reviewed-by: Yi Liu --- v1: https://lore.kernel.org/qemu-devel/20260622162138.1045170-1-leo@managar= m.org/ hw/i386/intel_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 744cdfd2e6..d1af7a3135 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -4988,7 +4988,7 @@ static void vtd_cap_init(IntelIOMMUState *s) { X86IOMMUState *x86_iommu =3D X86_IOMMU_DEVICE(s); - s->cap =3D VTD_CAP_FRO | VTD_CAP_NFR | VTD_CAP_ND | VTD_ECAP_PT | + s->cap =3D VTD_CAP_FRO | VTD_CAP_NFR | VTD_CAP_ND | VTD_CAP_MAMV | VTD_CAP_PSI | VTD_CAP_SSLPS | VTD_CAP_DRAIN | VTD_CAP_ESRTPS | VTD_CAP_MGAW(s->aw_bits); if (x86_iommu->dma_translation) { @@ -4999,7 +4999,7 @@ static void vtd_cap_init(IntelIOMMUState *s) s->cap |=3D VTD_CAP_SAGAW_48bit; } } - s->ecap =3D VTD_ECAP_QI | VTD_ECAP_IRO; + s->ecap =3D VTD_ECAP_QI | VTD_ECAP_IRO | VTD_ECAP_PT; if (x86_iommu_ir_supported(x86_iommu)) { s->ecap |=3D VTD_ECAP_IR | VTD_ECAP_MHMV; -- 2.54.0