Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E838FCDB479 for ; Wed, 24 Jun 2026 10:43:48 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wcL4u-0002WT-9m; Wed, 24 Jun 2026 06:43:32 -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 1wcL4s-0002Vg-4j; Wed, 24 Jun 2026 06:43:30 -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 1wcL4q-0001Ge-NK; Wed, 24 Jun 2026 06:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=managarm.org; s=2021; t=1782297804; bh=EKygb7sxhBWYjwFoisqXQzwHZzhtOT1lv8pDE1sIlf0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OU+maVe9KX6FiYlbZlFppygiNYEJu2lPk07K1y+7rgYQm5Ckm7vl40Zr2jtooQyc6 DRSyiOcww68N39f3Wp0qKahIN/NR94GnC9Dq64mDmacN4oHkctuR7cOMvtoPQUoocb r+LWuTEQRPCLZp9XeZxdn1lzdIAbRlKcYldgSi2TjSdIgA2kWd7eDZNCAeixpjfvmc M4wf5h1B+Fnrvy5t2pina4l75H+FjTdGRDjCMVJRN7EVxJx3uqzD/1iXRDsE5SoOMK 8M6N/uPpfAmJOvT2k1IxeF9CM5Q1vu/2t/sC7840sk4GXzIOcM/GWp2+ibqdpUcVy3 3AaOd4w1x/ehQ== Received: from white.localdomain (pd9f9de93.dip0.t-ipconnect.de [217.249.222.147]) by hades.hosts.managarm.org (Postfix) with ESMTPSA id 6782540E3A; Wed, 24 Jun 2026 10:43:24 +0000 (UTC) To: clement.mathieu--drif@bull.com Cc: jasowang@redhat.com, leo@managarm.org, mst@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, qemu-stable@nongnu.org, qemu-trivial@nongnu.org, richard.henderson@linaro.org, yi.l.liu@intel.com Subject: [PATCH v3] intel_iommu: Correctly set pt bit in extended capability register Date: Wed, 24 Jun 2026 12:39:35 +0200 Message-ID: <20260624103933.1793586-3-leo@managarm.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <0e37033a142f1831c1007825bf497c8c56e80b57.camel@bull.com> References: <0e37033a142f1831c1007825bf497c8c56e80b57.camel@bull.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.201.36.94; envelope-from=leo@managarm.org; helo=hades.hosts.managarm.org X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.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, SORTED_RECIPS=2.499, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: no92 From: no92 via Errors-To: qemu-trivial-bounces+qemu-trivial=archiver.kernel.org@nongnu.org Sender: qemu-trivial-bounces+qemu-trivial=archiver.kernel.org@nongnu.org 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 --- The only changes to v1 are in the commit message phrasing, as well as adding the Reviewed-by lines. Apologies for the confusion, I'm not that well-versed in the mailing list workflow. 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 = X86_IOMMU_DEVICE(s); - s->cap = VTD_CAP_FRO | VTD_CAP_NFR | VTD_CAP_ND | VTD_ECAP_PT | + s->cap = 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 |= VTD_CAP_SAGAW_48bit; } } - s->ecap = VTD_ECAP_QI | VTD_ECAP_IRO; + s->ecap = VTD_ECAP_QI | VTD_ECAP_IRO | VTD_ECAP_PT; if (x86_iommu_ir_supported(x86_iommu)) { s->ecap |= VTD_ECAP_IR | VTD_ECAP_MHMV; -- 2.54.0