]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/i386/amd_iommu: Fix amdvi_write*()
authorSairaj Kodilkar <sarunkod@amd.com>
Fri, 1 Aug 2025 06:05:05 +0000 (11:35 +0530)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 1 Aug 2025 14:23:50 +0000 (10:23 -0400)
commit47d3b32d6fb1c6ec8afb78d12d2420dbbb4c3499
tree5d1cb126c8b542073bab7ecfd56797d0fbc6063e
parenta7842d94067cddc80b47ac42fb6e49e2fc02a3c5
hw/i386/amd_iommu: Fix amdvi_write*()

amdvi_write*() function do not preserve the older values of W1C bits in
the MMIO register. This results in all W1C bits set to 0, when guest
tries to reset a single bit by writing 1 to it. Fix this by preserving
W1C bits in the old value of the MMIO register.

Fixes: d29a09ca68428 ("hw/i386: Introduce AMD IOMMU")
Suggested-by: Ethan MILON <ethan.milon@eviden.com>
Signed-off-by: Sairaj Kodilkar <sarunkod@amd.com>
Message-Id: <20250801060507.3382-5-sarunkod@amd.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/amd_iommu.c