From: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
To: qemu-devel@nongnu.org
Cc: ethan.milon@eviden.com, 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, philmd@linaro.org
Subject: [PATCH v4 1/8] amd_iommu: Fix Miscellaneous Information Register 0 encoding
Date: Tue, 17 Jun 2025 15:04:20 +0000 [thread overview]
Message-ID: <20250617150427.20585-2-alejandro.j.jimenez@oracle.com> (raw)
In-Reply-To: <20250617150427.20585-1-alejandro.j.jimenez@oracle.com>
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. The value in the GVAsize field is
also modified, since it was incorrectly encoded.
Cc: qemu-stable@nongnu.org
Fixes: d29a09ca6842 ("hw/i386: Introduce AMD IOMMU")
Co-developed-by: Ethan MILON <ethan.milon@eviden.com>
Signed-off-by: Ethan MILON <ethan.milon@eviden.com>
Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
---
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..3b1d2e9da5347 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))
-#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 (2UL << 5)
+#define AMDVI_MAX_PH_ADDR (40UL << 8)
+#define AMDVI_MAX_VA_ADDR (48UL << 15)
/* Completion Wait data size */
#define AMDVI_COMPLETION_DATA_SIZE 8
--
2.43.5
next prev parent reply other threads:[~2025-06-17 15:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 15:04 [PATCH v4 0/8] amd_iommu: Fixes to align with AMDVi specification Alejandro Jimenez
2025-06-17 15:04 ` Alejandro Jimenez [this message]
2025-06-26 17:53 ` [PATCH v4 1/8] amd_iommu: Fix Miscellaneous Information Register 0 encoding Vasant Hegde
2025-06-17 15:04 ` [PATCH v4 2/8] amd_iommu: Fix Device ID decoding for INVALIDATE_IOTLB_PAGES command Alejandro Jimenez
2025-06-17 15:04 ` [PATCH v4 3/8] amd_iommu: Update bitmasks representing DTE reserved fields Alejandro Jimenez
2025-06-17 15:04 ` [PATCH v4 4/8] amd_iommu: Fix masks for various IOMMU MMIO Registers Alejandro Jimenez
2025-06-17 15:04 ` [PATCH v4 5/8] amd_iommu: Fix mask to retrieve Interrupt Table Root Pointer from DTE Alejandro Jimenez
2025-06-17 15:04 ` [PATCH v4 6/8] amd_iommu: Fix the calculation for Device Table size Alejandro Jimenez
2025-06-17 15:04 ` [PATCH v4 7/8] amd_iommu: Remove duplicated definitions Alejandro Jimenez
2025-06-17 15:04 ` [PATCH v4 8/8] amd_iommu: Fix truncation of oldval in amdvi_writeq Alejandro Jimenez
2025-06-26 12:36 ` Vasant Hegde
2025-06-26 17:55 ` [PATCH v4 0/8] amd_iommu: Fixes to align with AMDVi specification Vasant Hegde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250617150427.20585-2-alejandro.j.jimenez@oracle.com \
--to=alejandro.j.jimenez@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=brijesh.singh@amd.com \
--cc=eduardo@habkost.net \
--cc=ethan.milon@eviden.com \
--cc=joao.m.martins@oracle.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mjt@tls.msk.ru \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=santosh.shukla@amd.com \
--cc=sarunkod@amd.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=vasant.hegde@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).