: Zhenzhong Duan
---
hw/vfio/pci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 1093b28df7..0455e6ce30 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -1348,9 +1348,7 @@ static void vfio_sub_page_bar_update_mapping(PCIDevice
*pdev, int bar
ned-off-by: Zhenzhong Duan
---
target/i386/kvm/tdx.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c
index e809e4b2df..370a9b6e65 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -1269,7 +1269
_as->pasid.
vtd_as_to_iommu_pasid_locked() translates from BDF+vtd_as->pasid to iommu_pasid.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 58 +++
1 file changed, 58 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu
vices to update host side bindings.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index d8b4296fe4..0a86bd47b2 100644
--- a/hw/i386/intel_iommu.c
+++ b/h
When bypass_ro is true, read only memory section is bypassed from
mapping in the container.
This is a preparing patch to workaround Intel ERRATA_772415.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/listener.c| 13 +
include/hw/vfio/vfio-container-base.h | 1 +
2
an be hotplugged under same bridge. For simplify,
just forbid passthrough device under PCI bridge no matter if there is, or will
be emulated devices under same bridge. This is acceptable because PCIE bridge
is more popular than PCI bridge now.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw
bindings after context cache invalidation
intel_iommu: Propagate PASID-based iotlb invalidation to host
intel_iommu: Replay all pasid bindings when either SRTP or TE bit is
changed
Zhenzhong Duan (17):
intel_iommu: Rename vtd_ce_get_rid2pasid_entry to
vtd_ce_get_pasid_entry
hw/pci: I
pci_device_get_viommu_cap() call pci_device_get_iommu_bus_devfn()
to get iommu_bus->iommu_ops and call get_viommu_cap() callback to
get a bitmap with each bit represents a vIOMMU exposed capability.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
MAINTAINERS | 1 +
hw/
y: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 25 +
hw/i386/intel_iommu_internal.h | 9 +
hw/i386/trace-events | 1 +
3 files changed, 35 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
Implement get_viommu_cap() callback and expose stage-1 capability for now.
VFIO uses it to create nested parent domain which is further used to create
nested domain in vIOMMU. All these will be implemented in following patches.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 42 ++
hw/i386/intel_iommu_internal.h | 2 ++
hw/i386/trace-events | 1 +
3 files changed, 45 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index c35673eb58
Introduce a new structure VTDHostIOMMUDevice which replaces
HostIOMMUDevice to be stored in hash table.
It includes a reference to HostIOMMUDevice and IntelIOMMUState,
also includes BDF information which will be used in future
patches.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Eric Auger
-present pasid entry moved to present
This handles c) by going through each passthrough device and each pasid. When
a new valid pasid entry is founded, find or create a vtd_as and cache pasid
entry in it.
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386
stage mappings."
Signed-off-by: Zhenzhong Duan
---
hw/vfio/iommufd.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index c172c177fc..a28641b5f5 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
@@ -325,6 +325,7 @@ s
OTLB_EVENTS since the MR is
switched to IOMMU MR. So it is able to support shadowing the guest IO
page table.
Co-Authored-by: Yi Liu
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 221 +++
Now that all infrastructures of supporting passthrough device running
with stage-1 translation are there, enable it now.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 0a86bd47b2
, vIOMMU supports stage-1 1GB huge page mapping, but host
does not, then this IOMMUFD backed device should fail.
Even of the checks pass, for now we willingly reject the association
because all the bits are not there yet.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c
U will cache first
level page table related mappings during DMA address translation.
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 95 +-
hw/i386/intel_iommu_internal.h | 6 +++
2 files chang
In early days vtd_ce_get_rid2pasid_entry() was used to get pasid entry
of rid2pasid, then it was extended to get any pasid entry. So a new name
vtd_ce_get_pasid_entry is better to match what it actually does.
No functional change intended.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Clément
-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 194 +++--
hw/i386/intel_iommu_internal.h | 27 -
hw/i386/trace-events | 3 +
include/hw/i386/intel_iommu.h | 6 +
4 files changed, 218 insertions
-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index cf263498db..030862fb2f 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1773,6 +1773,28 @@ sta
Returns true if PCI device is aliased or false otherwise. This will be
used in following patch to determine if a PCI device is under a PCI
bridge.
Signed-off-by: Zhenzhong Duan
---
hw/pci/pci.c | 12
include/hw/pci/pci.h | 2 ++
2 files changed, 10 insertions(+), 4
through device with x-flts=on.
Suggested-by: Nicolin Chen
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/iommufd.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index 48c590b6a9..c172c177fc 100644
--- a/hw/vfio/iommufd.c
+
re
Signed-off-by: Zhenzhong Duan
---
hw/vfio/cpr-legacy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c
index a84c3247b7..0a5d1bd480 100644
--- a/hw/vfio/cpr-legacy.c
+++ b/hw/vfio/cpr-legacy.c
@@ -180,9 +180
Steve)
- s/DMA_MAP_FUNC/dma_map_fn (Steve)
Zhenzhong Duan (2):
vfio/container: Fix potential SIGSEGV when recover from
unmap-all-vaddr failure
vfio/container: Fix vfio_container_post_load()
include/hw/vfio/vfio-cpr.h | 7 ---
hw/vfio/cpr-legacy.c | 23 +-
eless and is removed.
Fixes: 7e9f21411302 ("vfio/container: restore DMA vaddr")
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-cpr.h | 7 ---
hw/vfio/cpr-legacy.c | 23 +--
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/include/h
It's aggressive to abort a running QEMU process when hotplug a mdev
and it fails migration blocker adding.
Fix by just failing mdev hotplug itself.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/container.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw
Hi
These are trivial VFIO live update fixes in corner cases.
1) open /dev/vfio/vfio fail trigger SIGSEGV
2) mdev hotplug trigger qemu abort
3) potential SIGSEGV when unmap-all-vaddr failed
3) potential vfio_container_post_load failure
Thanks
Zhenzhong
Zhenzhong Duan (4):
vfio/container: Fix
cpr.saved_dma_map isn't initialized in source qemu which lead to vioc->dma_map
assigned a NULL value, this will trigger SIGSEGV.
Fix it by save and restore vioc->dma_map locally.
Fixes: eba1f657cbb1 ("vfio/container: recover from unmap-all-vaddr failure")
Signed-o
eless and is removed.
Fixes: 7e9f21411302 ("vfio/container: restore DMA vaddr")
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-cpr.h | 1 -
hw/vfio/cpr-legacy.c | 20 +++-
2 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/include/hw/vfio/vfio
When open /dev/vfio/vfio fails, SIGSEGV triggers because
vfio_listener_unregister() doesn't support a NULL bcontainer
pointer.
Fixes: a1f267a7d4d9 ("vfio/container: reform vfio_container_connect cleanup")
Signed-off-by: Zhenzhong Duan
---
hw/vfio/container.c | 4 +++-
1
-present pasid entry moved to present
This handles c).
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
hw/i386/intel_iommu.c | 169 -
2 files changed, 169 insertions(+), 1 deletion
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
hw/i386/intel_iommu.c | 51 --
hw/i386/trace-events | 1 +
3 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386
U will cache first
level page table related mappings during DMA address translation.
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 6 ++
hw/i386/intel_iommu.c | 113 -
2 files change
, vIOMMU supports stage-1 1GB huge page mapping, but host
does not, then this IOMMUFD backed device should be failed.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
hw/i386/intel_iommu.c | 28
2 files changed, 29
OTLB_EVENTS since the MR is
switched to IOMMU MR. So it is able to support shadowing the guest IO
page table.
Co-Authored-by: Yi Liu
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 11 ++
hw/i386/intel_iommu.c
_as->pasid.
vtd_as_to_iommu_pasid_locked() translates from BDF+vtd_as->pasid to iommu_pasid.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 58 +++
1 file changed, 58 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu
Returns true if PCI device is aliased or false otherwise. This will be
used in following patch to determine if a PCI device is under a PCI
bridge.
Signed-off-by: Zhenzhong Duan
---
include/hw/pci/pci.h | 2 ++
hw/pci/pci.c | 12
2 files changed, 10 insertions(+), 4
Now that all infrastructures of supporting passthrough device running
with stage-1 translation are there, enable it now.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 0b322078cc
-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 24
1 file changed, 24 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index ed71bb8ec7..be01f8885f 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1779,6 +1779,7 @@ static b
From: Yi Liu
When either 'Set Root Table Pointer' or 'Translation Enable' bit is changed,
the pasid bindings on host side become stale and need to be updated.
Introduce a helper function vtd_refresh_pasid_bind() for that purpose.
Signed-off-by: Yi Liu
Signed-off-by: Zhe
devid/hwpt_id to vIOMMU instead of iommufd/devid/ioas_id
- add vtd_as_[from|to]_iommu_pasid() helper to translate between vtd_as and
iommu pasid, this is important for dropping VTDPASIDAddressSpace
Yi Liu (3):
intel_iommu: Replay pasid binds after context cache invalidation
intel_iommu: Propagat
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 27
include/hw/i386/intel_iommu.h | 6 +
hw/i386/intel_iommu.c | 265 +++--
hw/i386/trace-events | 3 +
4 files changed, 291 insertions(+), 10 deletions
, Errata Details, SPR17.
https://www.intel.com/content/www/us/en/content-details/772415/content-details.html
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-container-base.h | 1 +
hw/vfio/iommufd.c | 8 +++-
hw/vfio/listener.c| 13
Introduce a new structure VTDHostIOMMUDevice which replaces
HostIOMMUDevice to be stored in hash table.
It includes a reference to HostIOMMUDevice and IntelIOMMUState,
also includes BDF information which will be used in future
patches.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Eric Auger
y: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 2 ++
hw/i386/intel_iommu.c | 28
hw/i386/trace-events | 1 +
3 files changed, 31 insertions(+)
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_inter
In early days vtd_ce_get_rid2pasid_entry() was used to get pasid entry
of rid2pasid, then it was extended to get any pasid entry. So a new name
vtd_ce_get_pasid_entry is better to match what it actually does.
No functional change intended.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Clément
Call pci_device_get_viommu_cap() to get if vIOMMU supports VIOMMU_CAP_STAGE1,
if yes, create nested parent domain which could be reused by vIOMMU to create
nested domain.
Suggested-by: Nicolin Chen
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/iommufd.c | 14 ++
1
e now.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 1c79efc1cb..9d4adc9458 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_io
pci_device_get_viommu_cap() call pci_device_get_iommu_bus_devfn()
to get iommu_bus->iommu_ops and call get_viommu_cap() callback to
get a bitmap with each bit represents a vIOMMU exposed capability.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
include/hw/pci/pci.h |
Implement get_viommu_cap() callback and expose stage-1 capability for now.
VFIO uses it to create nested parent domain which is further used to create
nested domain in vIOMMU. All these will be implemented in following patches.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
Fixes: d4e392d0a99b ("vfio: add vfio-pci-base class")
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 92562898e4..03f52a9b8f 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3478,7 +3
It's wrong to call into listener_begin callback in vfio_listener_commit().
Currently this impacts vfio-user.
Fixes: d9b7d8b6993b ("vfio/container: pass listener_begin/commit callbacks")
Signed-off-by: Zhenzhong Duan
---
hw/vfio/listener.c | 2 +-
1 file changed, 1 insertion
/msg00586.html
Suggested-by: David Hildenbrand
Signed-off-by: Zhenzhong Duan
---
hw/char/sh_serial.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 6abd80386f..8ccc2234ba 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
Introduce a new structure VTDHostIOMMUDevice which replaces
HostIOMMUDevice to be stored in hash table.
It includes a reference to HostIOMMUDevice and IntelIOMMUState,
also includes BDF information which will be used in future
patches.
Signed-off-by: Zhenzhong Duan
---
hw/i386
nt for dropping VTDPASIDAddressSpace
Yi Liu (3):
intel_iommu: Replay pasid binds after context cache invalidation
intel_iommu: Propagate PASID-based iotlb invalidation to host
intel_iommu: Refresh pasid bind when either SRTP or TE bit is changed
Zhenzhong Duan (12):
intel_iommu: Rename vt
ce |
| (iommufd0)| | (iommufd0)| | (non-CC) |
| | | | | (iommufd0) |
.---. .---. ..
Co-Authored-by: Yi Liu
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 26
include/hw/i386/intel_iommu.h | 6 +
hw/i386/intel_iommu.c | 252 +++--
hw/i386/trace-events | 3 +
4 files changed, 277 insertions(+), 10 deletions
lue.
vtd_as_from_iommu_pasid_locked() translates from BDF+iommu_pasid to vtd_as
which contains PCI's pasid vtd_as->pasid.
vtd_as_to_iommu_pasid_locked() translates from BDF+vtd_as->pasid to iommu_pasid.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 50 +++
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
hw/i386/intel_iommu.c | 51 --
hw/i386/trace-events | 1 +
3 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386
it.
So introduce a helper function vtd_as_to_context_entry() to fetch from cache
before trying with vtd_dev_to_context_entry().
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 36 +++-
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/hw/i
FORCE_RESET is different from GLOBAL_INV which updates pasid cache if
underlying pasid entry is still valid, it drops all the pasid caches.
FORCE_RESET isn't a VTD spec defined invalidation type for pasid cache,
only used internally in system level reset.
Signed-off-by: Zhenzhong Duan
--
Now that all infrastructures of supporting passthrough device running
with stage-1 translation are there, enable it now.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 165998896c
U will cache first
level page table related mappings during DMA address translation.
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 6 ++
hw/i386/intel_iommu.c | 118 -
2 files change
-present pasid entry moved to present
This handles c).
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
hw/i386/intel_iommu.c | 167 -
2 files changed, 167 insertions(+), 1 deletion
, vIOMMU supports stage-1 1GB huge page mapping, but host
does not, then this IOMMUFD backed device should be failed.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
hw/i386/intel_iommu.c | 28
2 files changed, 29
VFIO utilizes replay to setup initial shadow iommu mappings.
But when stage-1 page table is configured, it is passed to
host to construct nested page table, there is no replay needed.
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu.c | 8
1 file changed, 8 insertions(+)
diff
From: Yi Liu
When either 'Set Root Table Pointer' or 'Translation Enable' bit is changed,
the pasid bindings on host side become stale and need to be updated.
Introduce a helper function vtd_refresh_pasid_bind() for that purpose.
Signed-off-by: Yi Liu
Signed-off-by: Zhe
In early days vtd_ce_get_rid2pasid_entry() was used to get pasid entry
of rid2pasid, then it was extended to get any pasid entry. So a new name
vtd_ce_get_pasid_entry is better to match what it actually does.
No functional change intended.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Clément
0) | | (iommufd0) |
.---. .---. .. ..
Changed to pass VTDHostIOMMUDevice pointer to vtd_check_hdev() so errata
could be saved.
Suggested-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/i386/intel_iommu_internal.h | 1 +
include/hw/i386/intel_iommu.h
l/2025-06/msg00586.html
Reported-by: David Hildenbrand
Reviewed-by: David Hildenbrand
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Zhenzhong Duan
---
include/hw/virtio/virtio-pmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/virtio/virtio-pmem.h b/include/
Parent of VirtIOMEMClass is VirtioDeviceClass rather than VirtIODevice.
This isn't catastrophic only because sizeof(VirtIODevice) >
sizeof(VirtioDeviceClass).
Fixes: 910b25766b33 ("virtio-mem: Paravirtualized memory hot(un)plug")
Signed-off-by: Zhenzhong Duan
Reviewed-by:
eally necessary.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Daniel Henrique Barboza
---
include/hw/riscv/iommu.h | 6 ++
hw/riscv/riscv-iommu-pci.c | 6 --
hw/riscv/riscv-iommu-sys.c | 6 --
3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/include/hw/riscv/iommu.h b/inclu
u.org/archive/html/qemu-devel/2025-06/msg00586.html
Suggested-by: David Hildenbrand
Reviewed-by: Cédric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Zhenzhong Duan
---
include/hw/gpio/aspeed_gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/gpio/
x27;t take effect, so no Fixes tag for them.
Thanks
Zhenzhong
Changelog:
v4:
- add comments 'this isn't catastrophic only because sizeof(VirtIODevice) >
sizeof(VirtioDeviceClass).' to patch1/2/3 (Markus)
- collect RB for patch5
v3:
- s/Suggested-by/Reported-by on patch2 (David)
-
hilippe Mathieu-Daudé
Signed-off-by: Zhenzhong Duan
---
include/hw/virtio/virtio-pmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/virtio/virtio-pmem.h b/include/hw/virtio/virtio-pmem.h
index fc4fd1f7fe..9cce600d0b 100644
--- a/include/hw/virtio/virtio-pmem.h
+
eally necessary.
Signed-off-by: Zhenzhong Duan
---
include/hw/riscv/iommu.h | 6 ++
hw/riscv/riscv-iommu-pci.c | 6 --
hw/riscv/riscv-iommu-sys.c | 6 --
3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/include/hw/riscv/iommu.h b/include/hw/riscv/iommu.h
index b0333
édric Le Goater
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Zhenzhong Duan
---
include/hw/gpio/aspeed_gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/gpio/aspeed_gpio.h b/include/hw/gpio/aspeed_gpio.h
index e1e6c54333..e6b2fe71b5 100644
--- a/
Parent of VirtIOMEMClass is VirtioDeviceClass rather than VirtIODevice.
Fixes: 910b25766b33 ("virtio-mem: Paravirtualized memory hot(un)plug")
Signed-off-by: Zhenzhong Duan
Reviewed-by: David Hildenbrand
Reviewed-by: Philippe Mathieu-Daudé
---
include/hw/virtio/virtio-mem.h | 2
;t take effect.
Thanks
Zhenzhong
Changelog:
v3:
- s/Suggested-by/Reported-by on patch2 (David)
- add Closes: tag (David)
- collect RB
v2:
- add more fixes per David
Zhenzhong Duan (5):
virtio-mem: Fix definition of VirtIOMEMClass
virtio-pmem: Fix definition of VirtIOPMEMClass
hw/gpio
/msg00586.html
Suggested-by: David Hildenbrand
Signed-off-by: Zhenzhong Duan
---
hw/char/sh_serial.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 6abd80386f..8ccc2234ba 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
AspeedGPIOClass's parent is SysBusDeviceClass rather than SysBusDevice.
Fixes: 4b7f956862dc ("hw/gpio: Add basic Aspeed GPIO model for AST2400 and
AST2500")
Suggested-by: David Hildenbrand
Signed-off-by: Zhenzhong Duan
---
include/hw/gpio/aspeed_gpio.h | 2 +-
1 file chang
eally necessary.
Signed-off-by: Zhenzhong Duan
---
include/hw/riscv/iommu.h | 6 ++
hw/riscv/riscv-iommu-pci.c | 6 --
hw/riscv/riscv-iommu-sys.c | 6 --
3 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/include/hw/riscv/iommu.h b/include/hw/riscv/iommu.h
index b0333
VirtIOPMEMClass's parent is VirtioDeviceClass rather than VirtIODevice.
Fixes: 5f503cd9f388 ("virtio-pmem: add virtio device")
Suggested-by: David Hildenbrand
Signed-off-by: Zhenzhong Duan
---
include/hw/virtio/virtio-pmem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-
Parent of VirtIOMEMClass is VirtioDeviceClass rather than VirtIODevice.
Fixes: 910b25766b33 ("virtio-mem: Paravirtualized memory hot(un)plug")
Signed-off-by: Zhenzhong Duan
Reviewed-by: David Hildenbrand
Reviewed-by: Philippe Mathieu-Daudé
---
include/hw/virtio/virtio-mem.h | 2
ggested-by: David Hildenbrand
Signed-off-by: Zhenzhong Duan
---
hw/char/sh_serial.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/char/sh_serial.c b/hw/char/sh_serial.c
index 6abd80386f..8ccc2234ba 100644
--- a/hw/char/sh_serial.c
+++ b/hw/char/sh_serial.c
@@ -78,9 +78,7
print FILENAME ":" NR-1 ": " second;
print FILENAME ":" NR ": " third;
}
}' "$file"
done
Thanks
Zhenzhong
Changelog:
v2:
- add more fixes per David
Zhenzhong Duan (5):
virtio-mem: Fix definition of Vir
Parent of VirtIOMEMClass is VirtioDeviceClass rather than VirtIODevice.
Fixes: 910b25766b33 ("virtio-mem: Paravirtualized memory hot(un)plug")
Signed-off-by: Zhenzhong Duan
---
include/hw/virtio/virtio-mem.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include
sub-class instead of HostIOMMUDeviceIOMMUFD,
e.g., in HostIOMMUDeviceIOMMUFDVFIO.
Add two wrappers host_iommu_device_iommufd_[at|de]tach_hwpt to wrap the
two functions.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
Reviewed-by: Eric Auger
---
include/system/iommufd.h | 50
those
capability related structures with CONFIG_LINUX.
Suggested-by: Eric Auger
Suggested-by: Nicolin Chen
Signed-off-by: Zhenzhong Duan
Reviewed-by: Nicolin Chen
Reviewed-by: Eric Auger
---
include/system/host_iommu_device.h | 15 +++
hw/vfio/iommufd.c | 8
This helper passes cache invalidation request from guest to invalidate
stage-1 page table cache in host hardware.
Signed-off-by: Nicolin Chen
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
Reviewed-by: Eric Auger
---
include/system/iommufd.h | 4
backends/iommufd.c
Implement [at|de]tach_hwpt handlers in VFIO subsystem. vIOMMU
utilizes them to attach to or detach from hwpt on host side.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
Reviewed-by: Eric Auger
---
hw/vfio/iommufd.c | 22 ++
1 file
structure
decoding inside the backend and VFIO wouldn't need to care about types nor
what's inside the data.
Zhenzhong Duan (4):
backends/iommufd: Add a helper to invalidate user-managed HWPT
vfio/iommufd: Add properties and handlers to
TYPE_HOST_IOMMU_DEVICE_IOMMUFD
vfio/iommu
Implement [at|de]tach_hwpt handlers in VFIO subsystem. vIOMMU
utilizes them to attach to or detach from hwpt on host side.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
hw/vfio/iommufd.c | 22 ++
1 file changed, 22 insertions
d to care about types nor
what's inside the data.
Zhenzhong Duan (4):
backends/iommufd: Add a helper to invalidate user-managed HWPT
vfio/iommufd: Add properties and handlers to
TYPE_HOST_IOMMU_DEVICE_IOMMUFD
vfio/iommufd: Implement [at|de]tach_hwpt handlers
vfio/iommufd: Save ve
those
capability related structures with CONFIG_LINUX.
Suggested-by: Eric Auger
Suggested-by: Nicolin Chen
Signed-off-by: Zhenzhong Duan
---
include/system/host_iommu_device.h | 11 +++
hw/vfio/iommufd.c | 8 +++-
2 files changed, 14 insertions(+), 5 deletions
This helper passes cache invalidation request from guest to invalidate
stage-1 page table cache in host hardware.
Signed-off-by: Nicolin Chen
Signed-off-by: Zhenzhong Duan
---
include/system/iommufd.h | 4
backends/iommufd.c | 36
backends/trace
sub-class instead of HostIOMMUDeviceIOMMUFD,
e.g., in HostIOMMUDeviceIOMMUFDVFIO.
Add two wrappers host_iommu_device_iommufd_[at|de]tach_hwpt to wrap the
two functions.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
include/system/iommufd.h | 50
instead of HostIOMMUDeviceIOMMUFD,
e.g., in HostIOMMUDeviceIOMMUFDVFIO.
Add two wrappers host_iommu_device_iommufd_[at|de]tach_hwpt to
wrap the two functions.
Signed-off-by: Zhenzhong Duan
---
include/system/iommufd.h | 50
backends/iommufd.c | 22
n
keep all vendor structure decoding inside the backend and VFIO wouldn't need
to care about types nor what's inside the data.
Test done:
- VFIO devices hotplug/unplug
- build test on Windows
[1] https://lists.gnu.org/archive/html/qemu-devel/2025-05/msg05002.html
Thanks
Zhenzhon
1 - 100 of 921 matches
Mail list logo