From: Sairaj Kodilkar <sarunkod@amd.com>
To: <qemu-devel@nongnu.org>
Cc: <mst@redhat.com>, <marcel.apfelbaum@gmail.com>,
<pbonzini@redhat.com>, <eduardo@habkost.net>,
<richard.henderson@linaro.org>, <alejandro.j.jimenez@oracle.com>,
Sairaj Kodilkar <sarunkod@amd.com>,
"Vasant Hegde" <vasant.hegde@amd.com>
Subject: [PATCH 2/7] hw/i386/amd_iommu: Remove unused and wrongly set ats_enabled field
Date: Wed, 16 Jul 2025 13:01:40 +0530 [thread overview]
Message-ID: <20250716073145.915-3-sarunkod@amd.com> (raw)
In-Reply-To: <20250716073145.915-1-sarunkod@amd.com>
The ats_enabled field is set using HTTUNEN, which is wrong.
Fix this by removing the field as it is never used.
Fixes: d29a09ca68428 ("hw/i386: Introduce AMD IOMMU")
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
---
hw/i386/amd_iommu.c | 2 --
hw/i386/amd_iommu.h | 1 -
2 files changed, 3 deletions(-)
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
index 7a9d90f00bee..c8fa98142940 100644
--- a/hw/i386/amd_iommu.c
+++ b/hw/i386/amd_iommu.c
@@ -1412,7 +1412,6 @@ static void amdvi_handle_control_write(AMDVIState *s)
unsigned long control = amdvi_readq(s, AMDVI_MMIO_CONTROL);
s->enabled = !!(control & AMDVI_MMIO_CONTROL_AMDVIEN);
- s->ats_enabled = !!(control & AMDVI_MMIO_CONTROL_HTTUNEN);
s->evtlog_enabled = s->enabled && !!(control &
AMDVI_MMIO_CONTROL_EVENTLOGEN);
@@ -2263,7 +2262,6 @@ static void amdvi_init(AMDVIState *s)
s->excl_allow = false;
s->mmio_enabled = false;
s->enabled = false;
- s->ats_enabled = false;
s->cmdbuf_enabled = false;
/* reset MMIO */
diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h
index fc4d2f7a4575..62641b779ca3 100644
--- a/hw/i386/amd_iommu.h
+++ b/hw/i386/amd_iommu.h
@@ -368,7 +368,6 @@ struct AMDVIState {
uint64_t mmio_addr;
bool enabled; /* IOMMU enabled */
- bool ats_enabled; /* address translation enabled */
bool cmdbuf_enabled; /* command buffer enabled */
bool evtlog_enabled; /* event log enabled */
bool excl_enabled;
--
2.34.1
next prev parent reply other threads:[~2025-07-16 7:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 7:31 [PATCH 0/7] hw/i386/amd_iommu: Cleanups and fixes Sairaj Kodilkar
2025-07-16 7:31 ` [PATCH 1/7] hw/i386/amd_iommu: Fix MMIO register write tracing Sairaj Kodilkar
2025-07-16 12:31 ` Philippe Mathieu-Daudé
2025-07-16 7:31 ` Sairaj Kodilkar [this message]
2025-07-16 12:35 ` [PATCH 2/7] hw/i386/amd_iommu: Remove unused and wrongly set ats_enabled field Philippe Mathieu-Daudé
2025-07-16 7:31 ` [PATCH 3/7] hw/i386/amd_iommu: Move IOAPIC memory region initialization to the end Sairaj Kodilkar
2025-07-16 7:31 ` [PATCH 4/7] hw/i386/amd_iommu: Support MMIO writes to the status register Sairaj Kodilkar
2025-07-16 14:27 ` Ethan MILON
2025-07-17 6:41 ` Sairaj Kodilkar
2025-07-16 7:31 ` [PATCH 5/7] hw/i386/amd_iommu: Fix event log generation Sairaj Kodilkar
2025-07-16 14:50 ` Ethan MILON
2025-07-21 10:44 ` Sairaj Kodilkar
2025-07-16 7:31 ` [PATCH 6/7] hw/i386/amd_iommu: Fix handling device on buses != 0 Sairaj Kodilkar
2025-07-16 15:18 ` Ethan MILON
2025-07-17 6:47 ` Sairaj Kodilkar
2025-07-16 7:31 ` [PATCH 7/7] hw/i386/amd_iommu: Support 64 bit address for IOTLB lookup Sairaj Kodilkar
2025-07-16 12:37 ` [PATCH 0/7] hw/i386/amd_iommu: Cleanups and fixes Philippe Mathieu-Daudé
2025-07-16 12:56 ` Sairaj Kodilkar
2025-07-16 13:29 ` Michael S. Tsirkin
2025-07-17 5:47 ` Sairaj Kodilkar
2025-07-17 6:07 ` Michael S. Tsirkin
2025-07-17 13:48 ` Alejandro Jimenez
2025-07-18 13:28 ` Vasant Hegde
2025-07-18 14:30 ` Alejandro Jimenez
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=20250716073145.915-3-sarunkod@amd.com \
--to=sarunkod@amd.com \
--cc=alejandro.j.jimenez@oracle.com \
--cc=eduardo@habkost.net \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.