diff options
author | Sairaj Kodilkar <sarunkod@amd.com> | 2025-08-01 11:35:03 +0530 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2025-08-01 10:23:02 -0400 |
commit | 47d50cc421b832650822d73431d920bb8a80bc38 (patch) | |
tree | 96d47f50830e55a49f4ee66659a960fbc622fb93 | |
parent | 96c75abc872c1a90c8e1f4a4d2ed35e89a1befe9 (diff) | |
download | qemu-47d50cc421b832650822d73431d920bb8a80bc38.zip qemu-47d50cc421b832650822d73431d920bb8a80bc38.tar.gz qemu-47d50cc421b832650822d73431d920bb8a80bc38.tar.bz2 |
hw/i386/amd_iommu: Remove unused and wrongly set ats_enabled field
The ats_enabled field is set using HTTUNEN, which is wrong.
Fix this by removing the field as it is never used.
MST: includes a tweak suggested by Philippe
Fixes: d29a09ca68428 ("hw/i386: Introduce AMD IOMMU")
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Message-Id: <20250801060507.3382-3-sarunkod@amd.com>
Message-ID: <948a6ac3-ded9-475b-8c45-9d36220b442b@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | hw/i386/amd_iommu.c | 5 | ||||
-rw-r--r-- | hw/i386/amd_iommu.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 7fb0bb6..037e780 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -646,7 +646,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); @@ -1555,7 +1554,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 */ @@ -1626,7 +1624,8 @@ static const VMStateDescription vmstate_amdvi_sysbus_migratable = { /* Updated in amdvi_handle_control_write() */ VMSTATE_BOOL(enabled, AMDVIState), VMSTATE_BOOL(ga_enabled, AMDVIState), - VMSTATE_BOOL(ats_enabled, AMDVIState), + /* bool ats_enabled is obsolete */ + VMSTATE_UNUSED(1), /* was ats_enabled */ VMSTATE_BOOL(cmdbuf_enabled, AMDVIState), VMSTATE_BOOL(completion_wait_intr, AMDVIState), VMSTATE_BOOL(evtlog_enabled, AMDVIState), diff --git a/hw/i386/amd_iommu.h b/hw/i386/amd_iommu.h index 8b42913..67078c6 100644 --- a/hw/i386/amd_iommu.h +++ b/hw/i386/amd_iommu.h @@ -322,7 +322,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; |