From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547151; cv=none; d=zohomail.com; s=zohoarc; b=SZizqcfuSSomFpWB31G0XiYpl+vhVDgTd9PE6Rb6bBE2bbaGkmYRKlmWNxKpOoSfRxoXvq/pa95qmFW5V5FlqFAMwgX1TziQqoaT41ybO5VupkaqzA+UmS3NBy6PSr9grm+H43/YXPfbZgb//ku0Hv9FOG8TLRmxz7GthkG8C70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547151; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=+IzyZWe4Dth+7UIPZZsjEeVCKcuiOXMbHTkTOc62ePE=; b=hC4hwGsHhjPmXesyf4WlIf2dQzeeIZNFAsK9kXHoxs8NPXHOMOWRmFCU+i+Ac4tVELnKwKYuBsPO4sEg1BKiWcOCtnX1YLG7ZZBZ84jZFm4PENREaVkZpR2VjFlXAD0MrwFPGugHQMg+r2YoFzEPlBNGfHp73PEpOKkDSQVjGxg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 174854715112817.594915829262504; Thu, 29 May 2025 12:32:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKixd-0001VG-V5; Thu, 29 May 2025 15:30:42 -0400 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 1uKixZ-0001Nk-S3 for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:38 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixV-0001F1-Bf for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:34 -0400 Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGftHF009747; Thu, 29 May 2025 19:30:27 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46v46u105s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:27 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54TJLtB3019193; Thu, 29 May 2025 19:30:25 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccryq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:25 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOV7005039; Thu, 29 May 2025 19:30:25 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-2; Thu, 29 May 2025 19:30:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=+IzyZ We4Dth+7UIPZZsjEeVCKcuiOXMbHTkTOc62ePE=; b=gBPiM9yikeh8joGmq7AT2 AXU62bNvMBduEwpZwgl8m3LWufumlvuyfr0qlb/+mDaBPP2nzbMaDUzSKAL1Jcfv ykMMEvjYtjmZLSDiDyO48wYVJK3IC+ouE+9j9/9P7Qut2hzC3/y7Y7LxqdRBpK1a qHGYxUeRlTHfIHueKgmWu63GKlrBUp2jlwUQK3CNkfLbPG6S3wKdDuLoluMyJXRn NmS2w4y5sby/0fMvbOtpJqbD92PqrmPNSjdC5FYfH4XWXml4k5JeH6cwPA3AX2uS Nxb0s0cxXVXOIwWeC2brwoNBc30f2rsU5FqL0nxonMqqwzP2rReqkJdw3TLGanS7 Q== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 1/7] amd_iommu: Fix Miscellaneous Information Register 0 offsets Date: Thu, 29 May 2025 19:30:17 +0000 Message-ID: <20250529193023.3590780-2-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-GUID: UiCQWzVts88gES5hyksAcODjlhHOfx5S X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfX9hGCxTMGzR2j Q0HV9BBFgtKsM14aaqqOdIZF/x+y6H4ybeb5+U/2w33iu7w9jjn0hum3Yq+PkI0xaH4hfujMPKu 5WqjABgtIl5504nd5OWIctKpGNb60U7by79ucnsb+/0hYdJ6WQvOUkLbTdouYHYXAEKMPpBKsDi sctKE3G+b5uZnh5KM3dJtVX0SH3NCOq0bdN8NSX1e1vtibMPPRCf88AOoPQXJ8kTw6vz29/t1w6 +pm9wiNGEvopQjXb2r+xkY5haMA6+56cEghaTCuMIBSm/gq9A9q5rM2MdJovSDFK8F/sHv8/6uZ hHrzVW/hH+VUFUP94s4zQhK2F/xzr2hOyuTTiu31WIf9QBrFUseRwP50PoaDZf3k7j2IeEZoSY2 yPhoK3JFhTMTbZ8//U3oCPuPvJEni9v3wKIv4LfMx3JR478Afhg3dNt/L58FNfjB/Ay/glTK X-Authority-Analysis: v=2.4 cv=VskjA/2n c=1 sm=1 tr=0 ts=6838b5d3 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=69wJf7TsAAAA:8 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=wxXrq957UH6JcMcBEt4A:9 a=Fg1AiH1G6rFz08G2ETeA:22 cc=ntf awl=host:13206 X-Proofpoint-ORIG-GUID: UiCQWzVts88gES5hyksAcODjlhHOfx5S 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=205.220.165.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547151501116600 Content-Type: text/plain; charset="utf-8" The definitions encoding the maximum Virtual, Physical, and Guest Virtual Address sizes supported by the IOMMU are using incorrect offsets i.e. the VASize and GVASize offsets are switched. Cc: qemu-stable@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index 5672bdef89071..75a01eff468f5 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -196,9 +196,9 @@ #define AMDVI_PAGE_SHIFT_4K 12 #define AMDVI_PAGE_MASK_4K (~((1ULL << AMDVI_PAGE_SHIFT_4K) - 1)) =20 -#define AMDVI_MAX_VA_ADDR (48UL << 5) -#define AMDVI_MAX_PH_ADDR (40UL << 8) -#define AMDVI_MAX_GVA_ADDR (48UL << 15) +#define AMDVI_MAX_GVA_ADDR (48UL << 5) +#define AMDVI_MAX_PH_ADDR (40UL << 8) +#define AMDVI_MAX_VA_ADDR (48UL << 15) =20 /* Completion Wait data size */ #define AMDVI_COMPLETION_DATA_SIZE 8 --=20 2.43.5 From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547118; cv=none; d=zohomail.com; s=zohoarc; b=LGFJgnpSqsbOIRX+g5wAomDKT5g7jjaVKAE2yj1amDBZUOiQUiPyCLqX7Lon0nCaWVDcyYQa7bc3DWADN8xdqcZ1myRFcqFWMdiMAi72NB46eeM9KWx9e/g4pXbsPm8vxuT7nvBDF1ZHJkBE1Um2Oh+I9vGjREzDu30T5T37AXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547118; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6w8lc8uwVkcsZ44yUBLqPwjDfl/iXA+3yeIb/VWXrIo=; b=dB19sEdcsBeLwZ46HnvVVbZ7J2NO9C1OkUZuaFpqfjikOGDufdbVqUmm1k5q09eAUqKnK22YAl6GW36eIVodkKBGdgjahW//qciJeTEolXDdgLjHyB0VoDKzfOPDqcaw0RBBg5VxqEu0WmUJIKms4X3X6W1C7dr1O49wSX8YNPM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1748547117978491.98219972441257; Thu, 29 May 2025 12:31:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKixm-0001rT-PG; Thu, 29 May 2025 15:30:50 -0400 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 1uKixZ-0001Mv-NP for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:38 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixU-0001Ei-ES for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:35 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGfx59003915; Thu, 29 May 2025 19:30:27 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46v2pf0nbu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:27 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54THeh1G019225; Thu, 29 May 2025 19:30:26 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccs0d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:26 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOV9005039; Thu, 29 May 2025 19:30:25 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-3; Thu, 29 May 2025 19:30:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=6w8lc 8uwVkcsZ44yUBLqPwjDfl/iXA+3yeIb/VWXrIo=; b=STDhsQi8rw+sMZgGylA/3 nhjT6tSMWDJqnhITszTRn/hMrT+E+9Syyajio6U6Ai/WaKbDaNZmei+M9ZKCxJL7 1Jt6sOXZnUst7d2+VvwD/fTcYJWb2vFg1pv5dFLQPF6pBB22Xcq7wjcWItUxSKtJ kXajEGIKabWiBF6ofUgRoFAUyC1KK6edrLA912jP+ctG96nTZRSxT9JJ/2itPVfb bMmwaU0PIlxhGQ4D3WFY3Qb2zIzmMZpCaX9TGuiaOTFFDCeWpVJsaH/mAYK8bNfY mbKgYfU6ik6ggckvWdDDtO1O1d+kF/zc25ydcCoZqIPY6SUSYjzD71s7X7LB1LCs g== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 2/7] amd_iommu: Fix Device ID decoding for INVALIDATE_IOTLB_PAGES command Date: Thu, 29 May 2025 19:30:18 +0000 Message-ID: <20250529193023.3590780-3-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-ORIG-GUID: cNGxpxmsXuo-A7v9nCfPLGS1q_TvxGXG X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfX9/YThrV3Lxaa Om8r5wGIZ1H1DwD+gmOWvTU5tiaXkFsj4bu5rA8sLe3gwf+OFeMrNK8egl/8b8+V7NBQtVRg1w9 L6kEriO5z3vrDGNk2H8KAi3ETZCuXdv0bTrl9K3ZAJitsvfJGNm1IOgntKhCoH9FttAW5OnuNhd 5ZbMYX/OHhZc9CA+Fi1mDZZlj6m2yJslt9ssT9899e2qDsuVCZUg/4QXWdYOUp9gYndeVn3zIqU obRhWDVphsg57UZwlI+ewgN8QFMaEG453okDtRx73gFXX3IDQ+Jxonx0xdRnQbHkVOCvIo0Uy39 pRxNH5ZGSvK9LkhovkwT5FYuAGi1K7xmJuPhQfD2RUTnHFBrdLniRzirIqX/A55wsjOKg9spnNe 1Nl3KZe5VeXUlwPX97Edgza9F/szn3pKT/MTKv0mTvd7RsOs57RWYjmPVB/L0zKued2up4fg X-Proofpoint-GUID: cNGxpxmsXuo-A7v9nCfPLGS1q_TvxGXG X-Authority-Analysis: v=2.4 cv=TdeWtQQh c=1 sm=1 tr=0 ts=6838b5d3 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=69wJf7TsAAAA:8 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=r9zmrm_j51NoiylAmAIA:9 a=Fg1AiH1G6rFz08G2ETeA:22 cc=ntf awl=host:13206 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=205.220.177.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547119148116600 Content-Type: text/plain; charset="utf-8" The DeviceID bits are extracted using an incorrect offset in the call to amdvi_iotlb_remove_page(). This field is read (correctly) earlier, so use the value already retrieved for devid. Cc: qemu-stable@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 0775c8f3bba8f..55202eb9ef7d6 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -508,7 +508,7 @@ static void amdvi_inval_inttable(AMDVIState *s, uint64_= t *cmd) static void iommu_inval_iotlb(AMDVIState *s, uint64_t *cmd) { =20 - uint16_t devid =3D extract64(cmd[0], 0, 16); + uint16_t devid =3D cpu_to_le16(extract64(cmd[0], 0, 16)); if (extract64(cmd[1], 1, 1) || extract64(cmd[1], 3, 1) || extract64(cmd[1], 6, 6)) { amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), @@ -521,7 +521,7 @@ static void iommu_inval_iotlb(AMDVIState *s, uint64_t *= cmd) &devid); } else { amdvi_iotlb_remove_page(s, cpu_to_le64(extract64(cmd[1], 12, 52)) = << 12, - cpu_to_le16(extract64(cmd[1], 0, 16))); + devid); } trace_amdvi_iotlb_inval(); } --=20 2.43.5 From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547137; cv=none; d=zohomail.com; s=zohoarc; b=NM6W+Ozbv3pPD7X/9rlFr5kM1atQA42xhWXmV6wtJKX3DaPIe7jvVIos0SkAzIoXusgHl0pm+vKgddRMAt/aZUPcNtzoSmZkoXLoajHefZQqh9mb7KHBeuBwrFZEAj9lzdUNTkL4T32TB/v/MM9H/gc37QyV8n3h5JMSik6fI4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547137; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1vbh1uDB13yiD152yJ62wuX9AEeqoGKtdJ12LOns2iY=; b=l21x4Jx6oz68SDGVbdE7rk/oUO+hH1pwD43y0jEsLJbcQy5S0PwSy8FUCLtSoaPsOKhNaF3lKVGdmlJiiVTVXxVpHjULzyJJJ3CKKKdhsPu+/7lSwnNqc7+uBxrtXpjAtTLsxx4Y7aH7QYoXlqZaViBG7VC78yvSZta/FKEDMkY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1748547137430293.5304243117272; Thu, 29 May 2025 12:32:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKixh-0001gU-F8; Thu, 29 May 2025 15:30:46 -0400 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 1uKixZ-0001Nx-TD for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:38 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixV-0001FA-TJ for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:35 -0400 Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGfsUR031396; Thu, 29 May 2025 19:30:28 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46v33n0ypp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:28 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54TJO1VW019272; Thu, 29 May 2025 19:30:27 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccs0q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:27 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOVB005039; Thu, 29 May 2025 19:30:26 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-4; Thu, 29 May 2025 19:30:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=1vbh1 uDB13yiD152yJ62wuX9AEeqoGKtdJ12LOns2iY=; b=pISBjBmwWF0wq9HZIoEhU iICvQXQXv3H8l2bBQCBDzK67V1B6wjiN6Vsb+OyGJAugvrXfoiEAX1gy/QnSnVXK Zh9ulCOg/tTEU0jT7MN2JynJRfXhcO6PL/eE8WDNo8YkcpIygL+lxdYqzODiHvd8 e4VIl5z+5vyHtd/s3+ZAIQN6cZdBvqoIbM6dnbkCP5QZ/25VaivRKWjdolTx5uJ6 NRw7RL6JTMOSBaFXH9VIGLDLZDr7nU2hfOkxDVTnXRNycVV9QVTbPwD43vNh1DBI mkUCIzK+J3afN4ouWxmu6Jzs44FFHRdAPS1Z2wpC4cpmubFJKn5Ppe7420uAKW2Q Q== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 3/7] amd_iommu: Update bitmasks representing DTE reserved fields Date: Thu, 29 May 2025 19:30:19 +0000 Message-ID: <20250529193023.3590780-4-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfX12frAUbUhcAt YUfJCubxxJYxlWwyxEepz7nL8t+SspdW9X0+/ftiuGaLm6ZYXoSo3D+rsKkD4wIUDNUoyxF6xDf 3PCuLM1M9g3seCG00iVqwwBZnAdqQWXrjrN4EkGtE1Td4RRGIdqEaeLCcGas0onMHQ8erkeT7Iz 93XISuMSxxIR6EnPeYJt7sC5wi+UlIl+Tz8bnCV0mJ9Ib1YIWUDmNBeWzvhkzk4Wo+8HFapxjB/ jM75nSFaGa22mbj08y5FnJLThtAJFZb2AyCKZL/gyNn9FAiTHW7SNzKS1HZZzfbD3wFG0LA/+b9 koqnRUGfyGhAhpdKfSh+qVmJ7bzDqM2byATEsXdIILux4aaOdamRyjtNwlPADTrSDB9ZYkbAbej lADuZ9Tn4Q5bfwFOAx/+JgXXtqPhyEqDeWxNFMAeKz6LVXYG7KllQxE1lTzCeA2FfDorfiJi X-Proofpoint-GUID: _id8dPMMUfYizwNjdpat4MzmhRuM_nUg X-Authority-Analysis: v=2.4 cv=aO/wqa9m c=1 sm=1 tr=0 ts=6838b5d4 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=69wJf7TsAAAA:8 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=4jmliWysXe4-JJ31YZsA:9 a=Fg1AiH1G6rFz08G2ETeA:22 cc=ntf awl=host:13206 X-Proofpoint-ORIG-GUID: _id8dPMMUfYizwNjdpat4MzmhRuM_nUg 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=205.220.165.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547139364116600 Content-Type: text/plain; charset="utf-8" The DTE validation method verifies that all bits in reserved DTE fields are unset. Update them according to the latest definition available in AMD I/O Virtualization Technology (IOMMU) Specification - Section 2.2.2.1 Device Table Entry Format. Remove the magic numbers and use a macro helper to generate bitmasks covering the specified ranges for better legibility. Note that some reserved fields specify that events are generated when they contain non-zero bits, or checks are skipped under certain configurations. This change only updates the reserved masks, checks for special conditions are not yet implemented. Cc: qemu-stable@nongnu.org Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.c | 7 ++++--- hw/i386/amd_iommu.h | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 55202eb9ef7d6..cc47ba9249990 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -848,9 +848,10 @@ static inline uint64_t amdvi_get_perms(uint64_t entry) static bool amdvi_validate_dte(AMDVIState *s, uint16_t devid, uint64_t *dte) { - if ((dte[0] & AMDVI_DTE_LOWER_QUAD_RESERVED) - || (dte[1] & AMDVI_DTE_MIDDLE_QUAD_RESERVED) - || (dte[2] & AMDVI_DTE_UPPER_QUAD_RESERVED) || dte[3]) { + if ((dte[0] & AMDVI_DTE_QUAD0_RESERVED) || + (dte[1] & AMDVI_DTE_QUAD1_RESERVED) || + (dte[2] & AMDVI_DTE_QUAD2_RESERVED) || + (dte[3] & AMDVI_DTE_QUAD3_RESERVED)) { amdvi_log_illegaldevtab_error(s, devid, s->devtab + devid * AMDVI_DEVTAB_ENTRY_SIZE, 0); diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index 75a01eff468f5..45a997af861e6 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -25,6 +25,8 @@ #include "hw/i386/x86-iommu.h" #include "qom/object.h" =20 +#define GENMASK64(h, l) (((~0ULL) >> (63 - (h) + (l))) << (l)) + /* Capability registers */ #define AMDVI_CAPAB_BAR_LOW 0x04 #define AMDVI_CAPAB_BAR_HIGH 0x08 @@ -162,9 +164,10 @@ #define AMDVI_FEATURE_PC (1ULL << 9) /* Perf counters = */ =20 /* reserved DTE bits */ -#define AMDVI_DTE_LOWER_QUAD_RESERVED 0x80300000000000fc -#define AMDVI_DTE_MIDDLE_QUAD_RESERVED 0x0000000000000100 -#define AMDVI_DTE_UPPER_QUAD_RESERVED 0x08f0000000000000 +#define AMDVI_DTE_QUAD0_RESERVED (GENMASK64(6, 2) | GENMASK64(63, 6= 3)) +#define AMDVI_DTE_QUAD1_RESERVED 0 +#define AMDVI_DTE_QUAD2_RESERVED GENMASK64(53, 52) +#define AMDVI_DTE_QUAD3_RESERVED (GENMASK64(14, 0) | GENMASK64(53, = 48)) =20 /* AMDVI paging mode */ #define AMDVI_GATS_MODE (2ULL << 12) --=20 2.43.5 From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547117; cv=none; d=zohomail.com; s=zohoarc; b=VGVC3reGoj0VYTFUACTGaWKYjOhVHyMyHUVX1ZHqxv9hkKPg2Tt3XOFGfzEapwaNIp5c37upiW9w54Qjx2lhVVB2L7+H2iquVKfR9p0hU6wyyQpOjEcSWHMT692uS53dpnW0v3e0dRzDXB/SXr2onebhDjUPs9DLP8YoD7JaQBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547117; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yft2OAAbN0h+Wi7N2z2MfgGmj8WFSPzF83vw+HBtBNA=; b=L3X7l2GAp/YLqNv5/CEyedCnpU6fH3g0vebSiU3x0yl0ETyYkji7v+9sj765RGaDO+2BxCdtnjH9O4QIhcbbv3Ft+IrrWL/G+G+ycgEBwyGdH/8z/ugXWMUBhLPs6jKo44nEKP7l8OdO1NXuM4Xov3lJz6gkJ6gGXV4b7QRFEzo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1748547117727779.3580320534861; Thu, 29 May 2025 12:31:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKixs-000215-2O; Thu, 29 May 2025 15:30:56 -0400 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 1uKixZ-0001O5-Up for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:38 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixX-0001FS-CV for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:36 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGftlo028823; Thu, 29 May 2025 19:30:29 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46v3pd8r7p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:28 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54TJRCCV019218; Thu, 29 May 2025 19:30:27 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccs17-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:27 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOVD005039; Thu, 29 May 2025 19:30:26 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-5; Thu, 29 May 2025 19:30:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=yft2O AAbN0h+Wi7N2z2MfgGmj8WFSPzF83vw+HBtBNA=; b=KAAkQiZgClhvcB49YJkhG 6BBvI6yWVRcjjCBEAujOZNTLUFWGdw2LIj28mGfAsV/c2/fSQoE+UmGvnTXqy4Bc e1jmdDOT4KDsQ5eFJqIguDhB3iYn+Acoy5TJWjk44sLnUvJP48JjMFEy+O+EKNHZ VgXORDJCE+WcPPWlXpP0qVn9nsBU/iZKwzLMVptsot0IqUxKgSDWVwDsUDd7w943 eLRAHdSuQTK/v7H9g3QFeHbSBw3C1+dVN9+/KhCrAqd6s2G7K2gE1AC9syULJkoz mVOScKSnTIKuH66jQa91iDU2Knah2d3IOPUlFWQt21WxPYu7H9M0zEDdVvoXWqzg Q== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 4/7] amd_iommu: Fix masks for various IOMMU MMIO Registers Date: Thu, 29 May 2025 19:30:20 +0000 Message-ID: <20250529193023.3590780-5-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-ORIG-GUID: mdqHzNLOpRMtJG8az4PbPSoR0ykIjb5d X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfX+IacEksABG20 38X01rplU8uhL8FSQz46VEz21GCo3AtOKfqTPMLjm9VbefU6k5bz/2/qDX+2DLauow9Xdeoxduv EdrJK6HHKs9HGp6uIt7JfU1PPL7Rl/4W9k28nxXEcJIi6hT2taBa7ArQkEVwLV5fFIx7KXBJ0Ed BVbSAfH+rU0F5MGBNOqr9lxfCg8MWMZEoYCdGwg14RfEbZST9rqludIBhiQEimp8LMuzXn0iIMT QniY1AjE/xYhDE+XHt+G02s6eJIgf0hv8cnVK5tTmU+pjeZcLDXj+xsOckzrpRqOVGP7sIAnX7P YaKpEyVB/LRkughFJOorO5j1m7vgLAgRpRN3nlRoiOMoEH1ZZuvy9XKxA+ubKUZYNeSigH0vYV5 MyUGEJxxZKj3UZ1VNaYHMxSXfz7mmNFt7QnynIfrSmYmQbE8PBER1LVqZVMOdT9O007LjekG X-Authority-Analysis: v=2.4 cv=UZNRSLSN c=1 sm=1 tr=0 ts=6838b5d5 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=69wJf7TsAAAA:8 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=x93to4iw_sD-aHtwAakA:9 a=Fg1AiH1G6rFz08G2ETeA:22 cc=ntf awl=host:13206 X-Proofpoint-GUID: mdqHzNLOpRMtJG8az4PbPSoR0ykIjb5d 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=205.220.165.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UPPERCASE_50_75=0.008 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547119090116600 Content-Type: text/plain; charset="utf-8" Address various issues with definitions of the MMIO registers e.g. for the Device Table Address Register, the size mask currently encompasses reserved bits [11:9], so change it to only extract the bits [8:0] encoding size. Convert masks to use GENMASK64 for consistency, and make unrelated definitions independent. Cc: qemu-stable@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index 45a997af861e6..09352672bdcc2 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -68,34 +68,34 @@ =20 #define AMDVI_MMIO_SIZE 0x4000 =20 -#define AMDVI_MMIO_DEVTAB_SIZE_MASK ((1ULL << 12) - 1) -#define AMDVI_MMIO_DEVTAB_BASE_MASK (((1ULL << 52) - 1) & ~ \ - AMDVI_MMIO_DEVTAB_SIZE_MASK) +#define AMDVI_MMIO_DEVTAB_SIZE_MASK GENMASK64(8, 0) +#define AMDVI_MMIO_DEVTAB_BASE_MASK GENMASK64(51, 12) + #define AMDVI_MMIO_DEVTAB_ENTRY_SIZE 32 #define AMDVI_MMIO_DEVTAB_SIZE_UNIT 4096 =20 /* some of this are similar but just for readability */ #define AMDVI_MMIO_CMDBUF_SIZE_BYTE (AMDVI_MMIO_COMMAND_BASE + 7) #define AMDVI_MMIO_CMDBUF_SIZE_MASK 0x0f -#define AMDVI_MMIO_CMDBUF_BASE_MASK AMDVI_MMIO_DEVTAB_BASE_MASK -#define AMDVI_MMIO_CMDBUF_HEAD_MASK (((1ULL << 19) - 1) & ~0x0f) -#define AMDVI_MMIO_CMDBUF_TAIL_MASK AMDVI_MMIO_EVTLOG_HEAD_MASK +#define AMDVI_MMIO_CMDBUF_BASE_MASK GENMASK64(51, 12) +#define AMDVI_MMIO_CMDBUF_HEAD_MASK GENMASK64(18, 4) +#define AMDVI_MMIO_CMDBUF_TAIL_MASK GENMASK64(18, 4) =20 #define AMDVI_MMIO_EVTLOG_SIZE_BYTE (AMDVI_MMIO_EVENT_BASE + 7) -#define AMDVI_MMIO_EVTLOG_SIZE_MASK AMDVI_MMIO_CMDBUF_SIZE_MASK -#define AMDVI_MMIO_EVTLOG_BASE_MASK AMDVI_MMIO_CMDBUF_BASE_MASK -#define AMDVI_MMIO_EVTLOG_HEAD_MASK (((1ULL << 19) - 1) & ~0x0f) -#define AMDVI_MMIO_EVTLOG_TAIL_MASK AMDVI_MMIO_EVTLOG_HEAD_MASK +#define AMDVI_MMIO_EVTLOG_SIZE_MASK 0x0f +#define AMDVI_MMIO_EVTLOG_BASE_MASK GENMASK64(51, 12) +#define AMDVI_MMIO_EVTLOG_HEAD_MASK GENMASK64(18, 4) +#define AMDVI_MMIO_EVTLOG_TAIL_MASK GENMASK64(18, 4) =20 -#define AMDVI_MMIO_PPRLOG_SIZE_BYTE (AMDVI_MMIO_EVENT_BASE + 7) -#define AMDVI_MMIO_PPRLOG_HEAD_MASK AMDVI_MMIO_EVTLOG_HEAD_MASK -#define AMDVI_MMIO_PPRLOG_TAIL_MASK AMDVI_MMIO_EVTLOG_HEAD_MASK -#define AMDVI_MMIO_PPRLOG_BASE_MASK AMDVI_MMIO_EVTLOG_BASE_MASK -#define AMDVI_MMIO_PPRLOG_SIZE_MASK AMDVI_MMIO_EVTLOG_SIZE_MASK +#define AMDVI_MMIO_PPRLOG_SIZE_BYTE (AMDVI_MMIO_PPR_BASE + 7) +#define AMDVI_MMIO_PPRLOG_SIZE_MASK 0x0f +#define AMDVI_MMIO_PPRLOG_BASE_MASK GENMASK64(51, 12) +#define AMDVI_MMIO_PPRLOG_HEAD_MASK GENMASK64(18, 4) +#define AMDVI_MMIO_PPRLOG_TAIL_MASK GENMASK64(18, 4) =20 #define AMDVI_MMIO_EXCL_ENABLED_MASK (1ULL << 0) #define AMDVI_MMIO_EXCL_ALLOW_MASK (1ULL << 1) -#define AMDVI_MMIO_EXCL_LIMIT_MASK AMDVI_MMIO_DEVTAB_BASE_MASK +#define AMDVI_MMIO_EXCL_LIMIT_MASK GENMASK64(51, 12) #define AMDVI_MMIO_EXCL_LIMIT_LOW 0xfff =20 /* mmio control register flags */ @@ -132,14 +132,14 @@ #define AMDVI_DEV_TRANSLATION_VALID (1ULL << 1) #define AMDVI_DEV_MODE_MASK 0x7 #define AMDVI_DEV_MODE_RSHIFT 9 -#define AMDVI_DEV_PT_ROOT_MASK 0xffffffffff000 +#define AMDVI_DEV_PT_ROOT_MASK GENMASK64(51, 12) #define AMDVI_DEV_PT_ROOT_RSHIFT 12 #define AMDVI_DEV_PERM_SHIFT 61 #define AMDVI_DEV_PERM_READ (1ULL << 61) #define AMDVI_DEV_PERM_WRITE (1ULL << 62) =20 /* Device table entry bits 64:127 */ -#define AMDVI_DEV_DOMID_ID_MASK ((1ULL << 16) - 1) +#define AMDVI_DEV_DOMID_ID_MASK GENMASK64(15, 0) =20 /* Event codes and flags, as stored in the info field */ #define AMDVI_EVENT_ILLEGAL_DEVTAB_ENTRY (0x1U << 12) @@ -197,7 +197,7 @@ #define AMDVI_PAGE_SIZE (1ULL << AMDVI_PAGE_SHIFT) =20 #define AMDVI_PAGE_SHIFT_4K 12 -#define AMDVI_PAGE_MASK_4K (~((1ULL << AMDVI_PAGE_SHIFT_4K) - 1)) +#define AMDVI_PAGE_MASK_4K GENMASK64(63, 12) =20 #define AMDVI_MAX_GVA_ADDR (48UL << 5) #define AMDVI_MAX_PH_ADDR (40UL << 8) --=20 2.43.5 From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547054; cv=none; d=zohomail.com; s=zohoarc; b=Zp1PsWcqVfRDy0YT6HVKWW+Fc4qk/bGnQZ9tuGay56wWmO1OO4vpWm1pj/Ehpvo5pSItx1vDPjT5uB77yxcP57HBJYOhYO7V/IXGJ6w7/koDWhAWc8jlAae9aPt3dIthF5wX9j00BSL8yDJq+zSVkJuGqYQuLsGDiYXGtKosOLE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547054; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=1ddmy7BlvHA/fNZ2qMHqGnIPgWgsX2CZXKk2KXkuGcI=; b=miUcgGkXM12ZUOQiDeLq54WoQDN/HmOW2d9DIPQUw3VP8yvMyFk87XBZNgLiiPtMN13I95nhqRM8dHuvriasxrY0sWhpTlYGCmoLj3edhfZ3AKeK3pru7out9c1FwmtczehFmmPakh6Q8AnTW9ZGxjIeSFclf3uJRaJ+ppM8nT0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1748547054003808.3018527618761; Thu, 29 May 2025 12:30:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKixh-0001fZ-6J; Thu, 29 May 2025 15:30:45 -0400 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 1uKixW-0001MM-VP for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:35 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixU-0001El-Dd for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:34 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGfqDT014955; Thu, 29 May 2025 19:30:29 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46v21s8tm6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:28 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54TJPFnY019186; Thu, 29 May 2025 19:30:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccs1n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:28 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOVF005039; Thu, 29 May 2025 19:30:27 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-6; Thu, 29 May 2025 19:30:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=1ddmy 7BlvHA/fNZ2qMHqGnIPgWgsX2CZXKk2KXkuGcI=; b=EvB+dOJb1mSCKOUI0pRzd /BXHETts6aWQBIh+mq5CIw2EH/a39FzDv882Dh0lVbE3g6QdVMkmgif9c3yRy8iF c0oI39mEiggpeZKHrq7UzyBNSxvYU3LGdP2pCWa6JP9wtDU6holfIIe2btv5d2oC 3xlEhB98KV5SAdGZ5PWXqxsGNOsO9BtHWi9hG+mwoXg9g7F9fUYh1whm7YoSd+vd dflsHkvy2e9hOtsVuijVC+ZyKql7E/6M+setxYwzRtMDak6GEnr9QkIG8xcO8Uni yhDcJ2SnJuTcDAwz4doU8V96Vg6NA9ipS7IPv/mCtGB14UgI12GDpsu8xYDjsjU3 w== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 5/7] amd_iommu: Fix mask to retrieve Interrupt Table Root Pointer from DTE Date: Thu, 29 May 2025 19:30:21 +0000 Message-ID: <20250529193023.3590780-6-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfXx/+b3ZDQuSz0 q74spNMiWwVkMV1Po+SxCfSDwyz19zFmSu+nRXAaImzbHWDmIQW/B/n/+lho54/QhtMw6pUSwkv M5VIqUrIZACmGt7Rks+9fehf1SMl9yLjHGfSaLlaK7kf0hfQ9F41I52BxsHoM4eQkozNn4Toxcr Ttt9j7uRf2U7qMSIe5inqO5S9Y8kw3svoJk7p7N++JKxvqpzL/tiLhIhGpdlcwlFoyh5OjP4YBy 3+38E+q1oP4+IlGiU4yEdEmswvBSlrxRJg81t0bH3muhpqa42YZtkdsDTFP459pR6Zhq53mbV3K WflTRntmbxLXpkk2ozH07sK352Sn5r64b8REDk4yxq5jiHXdDaRc1LNQ/9mDjRP+pNOBdB+XdOF 1gXdLOGROeq4gwjnjr16ucQwmKq6uFtaoi47GzUSrogb9mg6GG/Q9PU/ZfQRxtePbV6+JodF X-Proofpoint-GUID: ocWV9EOKnEkSBYHkLvoM-C674qOa6p_1 X-Authority-Analysis: v=2.4 cv=UvhjN/wB c=1 sm=1 tr=0 ts=6838b5d4 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=69wJf7TsAAAA:8 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=VXbWx-IoamzKqho_xYMA:9 a=Fg1AiH1G6rFz08G2ETeA:22 cc=ntf awl=host:13206 X-Proofpoint-ORIG-GUID: ocWV9EOKnEkSBYHkLvoM-C674qOa6p_1 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=205.220.177.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547056425116600 Content-Type: text/plain; charset="utf-8" Fix an off-by-one error in the definition of AMDVI_IR_PHYS_ADDR_MASK. The current definition masks off the most significant bit of the Interrupt Table Root ptr i.e. it only generates a mask with bits [50:6] set. See the AMD I/O Virtualization Technology (IOMMU) Specification for the Interrupt Table Root Pointer[51:6] field in the Device Table Entry format. Cc: qemu-stable@nongnu.org Fixes: b44159fe0078 ("x86_iommu/amd: Add interrupt remap support when VAPIC= is not enabled") Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index 09352672bdcc2..1836b7061d848 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -231,7 +231,7 @@ #define AMDVI_IR_INTCTL_PASS 1 #define AMDVI_IR_INTCTL_REMAP 2 =20 -#define AMDVI_IR_PHYS_ADDR_MASK (((1ULL << 45) - 1) << 6) +#define AMDVI_IR_PHYS_ADDR_MASK GENMASK64(51, 6) =20 /* MSI data 10:0 bits (section 2.2.5.1 Fig 14) */ #define AMDVI_IRTE_OFFSET 0x7ff --=20 2.43.5 From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547120; cv=none; d=zohomail.com; s=zohoarc; b=cXrVm7QvrEWpxWWA0sjfKkynV+MJ5Dt++BS34eQhyHUf+kAS1JI7UV+hb+9dlddBIYdj9ai0MZXrTP0HCqB8Nw0QSMMbt8r6nm5SODX58BDgfUgkfgnn7KPKL8zN8ov+QBAcvZmjfQmvT8zEvdNsCFywdjAfikkRJVDaZbaz3sY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547120; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5xLy6sphNSR3sEGiWhHFRd/mLRl+6eUEjK379NlJVlg=; b=Zzr3sKqp0gfcd7+u8X4RPFaF9eG9ZRtxVwmUaEWcfqfq3frQVQALRjTjjfENOZKWDPqyJFlfqzU6g8eUU3tUMpBS5xJyYsgPCD4GZIb7H+jbRxV7wD+usV5g8R6Z33exkLSnHr072QNXLqAJUnKa89LdJF8OgYIAi2lCXNgdTaU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1748547120288138.85779157660943; Thu, 29 May 2025 12:32:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKiyR-0002RY-Er; Thu, 29 May 2025 15:31:31 -0400 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 1uKixZ-0001O6-U8 for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:38 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixX-0001Fe-O0 for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:37 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGfu4m028838; Thu, 29 May 2025 19:30:30 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46v3pd8r7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:30 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54TJJgDc019337; Thu, 29 May 2025 19:30:28 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccs2b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:28 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOVH005039; Thu, 29 May 2025 19:30:28 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-7; Thu, 29 May 2025 19:30:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=5xLy6 sphNSR3sEGiWhHFRd/mLRl+6eUEjK379NlJVlg=; b=AJLgcz2w7JVpyzETXNbpm 0GlI1F3J2Jc4t8MDPY61fQrS38Q9OkfyFT/g+ZmQ15T4/asVCTw8GDI/8YPLMOkD eqW/XoC/5h68G8lPfoiYaMi6HSfQoAEVmaxHTIp5TqJfcp/I8BdP4MTmRScTEBAm 0B3U3d3wABAwXDN5zuNII/3O69WwVIT7M4DBehkGEmPb1vLDLvRm1fzjFpFvMvHc o7G7YtCYSCpTqldTRDP1BGnMqBPKPEp+b+vUil1VUmn4a+GDKGwW13UIjfoVfUz5 k0H21TOS/kah6oQLNhk0E4WquOhV7I0m+m4RSzS6atztIR2uKsv6MzJ0VkN8YqPS w== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 6/7] amd_iommu: Fix the calculation for Device Table size Date: Thu, 29 May 2025 19:30:22 +0000 Message-ID: <20250529193023.3590780-7-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-ORIG-GUID: LD870zN0inw0ZUvunVaxtghFihNT_arI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfX3/gyrY3ewfBD TvQ++4HBUr4TX9t4keEXWNLSirJF99bVjQ7cbfFfdrG/f5j/e+q98fVA+Ulc2VRzT7GCnMBaySr rrCoDEeLhF5OkKyE1XX8OheBCaR6mwteQEHV/Hzf0ztQdc2gnL7dlMfhh4kRfbFYX6BJ+gwmZtu BYtgNqMTCab0QfhLB1iNZEuxQQn2TZ8dOpBFZhgOkBtQzphAqt+SgtFVS8pmgNDvRoak3Y4Z2ew v8g1xlFqE2UeKOUf6g+PdVdfU48FXIrly+fQHvMBSPNR0c/FyfCHxz4DT2qWc00CJov3vdck2Ob yICacIswhzjwI6PqoqemfET1W7Q3X6Zh0insh498+bNM0Y8yLGk7WVTP1ol9aGz6/Zp17B7mywz 2UNTvqJyu7niB2venTvNu3xyW9MmmJylAWca8JMndUimsGmNP/e9ASPnid2+6Lz3/ONuGNBl X-Authority-Analysis: v=2.4 cv=UZNRSLSN c=1 sm=1 tr=0 ts=6838b5d6 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=69wJf7TsAAAA:8 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=r9zmrm_j51NoiylAmAIA:9 a=Fg1AiH1G6rFz08G2ETeA:22 cc=ntf awl=host:13206 X-Proofpoint-GUID: LD870zN0inw0ZUvunVaxtghFihNT_arI 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=205.220.165.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0a-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547121070116600 Content-Type: text/plain; charset="utf-8" Correctly calculate the Device Table size using the format encoded in the Device Table Base Address Register (MMIO Offset 0000h). Cc: qemu-stable@nongnu.org Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU") Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index cc47ba9249990..6a68f0f6068a0 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -665,8 +665,8 @@ static inline void amdvi_handle_devtab_write(AMDVIState= *s) uint64_t val =3D amdvi_readq(s, AMDVI_MMIO_DEVICE_TABLE); s->devtab =3D (val & AMDVI_MMIO_DEVTAB_BASE_MASK); =20 - /* set device table length */ - s->devtab_len =3D ((val & AMDVI_MMIO_DEVTAB_SIZE_MASK) + 1 * + /* set device table length (i.e. number of entries table can hold) */ + s->devtab_len =3D (((val & AMDVI_MMIO_DEVTAB_SIZE_MASK) + 1) * (AMDVI_MMIO_DEVTAB_SIZE_UNIT / AMDVI_MMIO_DEVTAB_ENTRY_SIZE)); } --=20 2.43.5 From nobody Sat Nov 15 17:45:27 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1748547149; cv=none; d=zohomail.com; s=zohoarc; b=dZkJD443EN9JEcrI4PVjLYgbxHg11arJUtWU9TN3J/0SDLXZGVNo1du4DBaEG7rLLho7DY0MEUr2afit1vHzALOLsCwIRuEGY+/cEBKCwxZRyXhrwjwVLOykwggw8isQFau0Frr1w4bU8aDaUSdVJaH5bTSpcgpKwzijM3zLrbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1748547149; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ntEFO93N8wrcKDEMr4ZnQ7O4S1mRGt3UAzbpiqpqRTs=; b=aoNpvcR2wWcm959QsTkNKx6rVXIurtJW15MCgmSMV1sjoNk4aenfDWlVNRHYUu2Y+r7hVKXdq5VWHl/NfNkxGdqCluIXFY9DQ3/adSj2HkHjijp6L7Gu/Dc3Q6esi9Zd2eQNFbN7x3zUwMKxxV0CoAehAkFuMh13mzGfHM4pg90= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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 1748547149539801.1731187792351; Thu, 29 May 2025 12:32:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uKiyI-0002G3-2e; Thu, 29 May 2025 15:31:23 -0400 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 1uKixZ-0001O3-Ud for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:38 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uKixX-0001FU-4D for qemu-devel@nongnu.org; Thu, 29 May 2025 15:30:36 -0400 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54TGfqEk020744; Thu, 29 May 2025 19:30:30 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 46wjbcmx8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:29 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 54TJQgBF019271; Thu, 29 May 2025 19:30:29 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46u4jccs2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 29 May 2025 19:30:29 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 54TJUOVJ005039; Thu, 29 May 2025 19:30:28 GMT Received: from alaljimee5bm-ol9-20250405.osdevelopmeniad.oraclevcn.com (alaljimee5bm-ol9-20250405.allregionaliads.osdevelopmeniad.oraclevcn.com [100.100.254.235]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 46u4jccrx6-8; Thu, 29 May 2025 19:30:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=corp-2025-04-25; bh=ntEFO 93N8wrcKDEMr4ZnQ7O4S1mRGt3UAzbpiqpqRTs=; b=h00o/Lno2Enj7GoHObuer /mtv8+2EIhS1AjHQ1Z/qTbAgLFT4jlrLzISh5Tkphjxjiq9sQPBjf9QbmZTIeAZB TQYTaEPoJoiq7120/FyEWzE1BZaHAjETdLVsYQemq8CTm+ayh8nQKs5lAUveJeUp JKhIoYfrf8ULQszESrefDF5e1/PaBD1mHXvV1Sxk3XObp+bmg954OHnPp10kBxHp HLXvgp/lIU8L5WsRGwUJRrRKaCUJ6azp+u0eMpmxsGXrs/YNN2fmgJkec5n1XNgt SrJMAPbkAze/d5OXhm9j9C2a7QpuWQhmiR18Xx4qxAUXMCJGwzaeTlVRBJcIRscL w== From: Alejandro Jimenez To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, mjt@tls.msk.ru, marcel.apfelbaum@gmail.com, richard.henderson@linaro.org, eduardo@habkost.net, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, santosh.shukla@amd.com, sarunkod@amd.com, brijesh.singh@amd.com, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, alejandro.j.jimenez@oracle.com Subject: [PATCH v3 7/7] amd_iommu: Remove duplicated definitions Date: Thu, 29 May 2025 19:30:23 +0000 Message-ID: <20250529193023.3590780-8-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> References: <20250529193023.3590780-1-alejandro.j.jimenez@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-29_09,2025-05-29_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000 definitions=main-2505290190 X-Proofpoint-GUID: -_mRZglMsFltSOsRc1dnqKk4joF--OaV X-Proofpoint-ORIG-GUID: -_mRZglMsFltSOsRc1dnqKk4joF--OaV X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI5MDE5MCBTYWx0ZWRfX7o5ZNeeUZ1qK xt0Xx0ARxRx5WJXRUYRza3UsQ2MPlO5v1DRWgTbkcMW6xFFXeIFQIkVlqt7Me8JHkdv/JAlgZ1K 0O1gHw41ayslieJdNaDYyN0Ty6DckTwtHcURgrSWzCA/cys7Ysn/s7Qd6dodvNEFoCHpELV96cZ hs8wvCWrgw/3/2ZpVnbpFS/BvxjfwdWdihDqRwkDzGKpAXOu0TGpiPRdpinIZpOeC6tXHiy4gmX zSgro5iVqMuupzz95mG/oBwl0PLWNQD6ZHywO9zMqItFdmR2wr86zJB5gFd2M7MUkYfRCaccuHF iVPyp59m0fQN0/z/Yi04WYM/CQMxIIKXGcnMm8IA1XFCG2BDxRXK3xXjnVMM50HBDsIbEw66Zm0 8VkOY1jBkm6+QV7zLpfeOwvAtKWnfOeq1Qk8T+rqMJiwmTCbdYiLC7h1yHArK8LaMM1Pd+Z7 X-Authority-Analysis: v=2.4 cv=c8qrQQ9l c=1 sm=1 tr=0 ts=6838b5d5 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=dt9VzEwgFbYA:10 a=yPCof4ZbAAAA:8 a=zd2uoN0lAAAA:8 a=LyhGpKROpydgPnGzpJcA:9 cc=ntf awl=host:13206 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=205.220.177.32; envelope-from=alejandro.j.jimenez@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.499, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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: 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 @oracle.com) X-ZM-MESSAGEID: 1748547151452116600 Content-Type: text/plain; charset="utf-8" No functional change. Signed-off-by: Alejandro Jimenez Reviewed-by: Vasant Hegde --- hw/i386/amd_iommu.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index 1836b7061d848..31e473924fa20 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -206,10 +206,6 @@ /* Completion Wait data size */ #define AMDVI_COMPLETION_DATA_SIZE 8 =20 -#define AMDVI_COMMAND_SIZE 16 -/* Completion Wait data size */ -#define AMDVI_COMPLETION_DATA_SIZE 8 - #define AMDVI_COMMAND_SIZE 16 =20 #define AMDVI_INT_ADDR_FIRST 0xfee00000 --=20 2.43.5