: Assertion `*errp == NULL'
failed.
After fix:
qemu-system-x86_64: cannot create PID file: Cannot open pid file: Permission
denied
Signed-off-by: Zhenzhong Duan
---
softmmu/vl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 326c1e9080
Valgrind complains definitely loss in get_relocated_path(), because
GString is leaked in get_relocated_path() when returning with gchar *.
Use g_string_free(, false) to free GString while preserving gchar *.
Signed-off-by: Zhenzhong Duan
---
util/cutils.c | 2 +-
1 file changed, 1 insertion
id=scsi1,bus=pci.0
Succeed!
Because both kind of options are inserted into their own list and
break the order in QEMU command line during BDF auto assign. Fix it
by transform QemuOpts into JSON syntax and insert in JSON device
list, so the order in QEMU command line kept.
Signed-off-by: Zhenzhong Dua
t, showing
the id info in the warning.
Signed-off-by: Zhenzhong Duan
---
hw/pci/pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 5d30f9ca60e5..0103a2c36ca2 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1078,9 +1078,9 @@ static
by the
passthroughed "-device" in legacy syntax. But legacy syntax
described devices are assigned BDF first, this leads to conflict
with the pci devices in JSON syntax with fixed BDF.
Move legacy syntax described device creation after JSON syntax
described ones so we can start that
While there is already a local variable opts in main function scope,
no need to define another one with same name in smaller scope.
No functional changes.
Signed-off-by: Zhenzhong Duan
---
softmmu/vl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/softmmu/vl.c b
From: Yi Liu
/dev/vfio/devices/vfioX may not exist. In that case it is still possible
to open /dev/char/$major:$minor instead. Add helper function to abstract
the cdev open.
Suggested-by: Jason Gunthorpe
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
MAINTAINERS | 6
the /dev/iommu device may have been pre-opened by a
management tool such as libvirt. This mode is no more considered
for the legacy backend. So let's remove the "TODO" comment.
Suggested-by: Alex Williamson
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
--
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 72 +---
hw/vfio/container-base.c | 160 +
hw/vfio/container.c | 247 --
hw
functions, local to container.c.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/ccw.c | 120 --
hw/vfio/container.c | 10 +--
include/hw/vfio/vfio-common.h | 5 --
3 files changed, 33 insertions
-by: Eric Auger
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 12 +-
hw/vfio/iommufd.c | 521 ++
hw/vfio/meson.build | 3 +
hw/vfio/trace-events
share the common bus reset and system reset
path for different BEs.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.c| 224 +++
hw/vfio/trace-events | 1 +
2 files changed, 208 insertions(+), 17 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio
Commit "vfio/container-base: Introduce [attach/detach]_device container
callbacks"
add support to link to address space, we can utilize it to simplify
vfio_viommu_preset().
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 17 +
1 file changed, 1 insertion(+), 16
, saying first vfio address space created instead of the
first group.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 224 ++-
1 file changed, 122 insertions(+), 102 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 949ad6714a
...which will be used by both legacy and iommufd backend.
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 44 +++
include/hw/vfio/vfio-common.h | 3 +++
2 files changed, 32 insertions(+), 15 deletions(-)
diff --git a/hw
From: Eric Auger
Update the script to import iommufd.h
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
scripts/update-linux-headers.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/update-linux-headers.sh b/scripts/update
From: Eric Auger
Let the vfio-ap device use vfio_attach_device() and
vfio_detach_device(), hence hiding the details of the used
IOMMU backend.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/ap.c | 68
-common.h also for containter.c
usage.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
---
hw/vfio/common.c | 1085 +
hw/vfio/container.c | 1085 +
hw/vfio/meson.build
From: Yi Liu
Move low-level iommu agnostic helpers to a separate helpers.c
file. They relate to regions, interrupts and device/region
capabilities.
Signed-off-by: Eric Auger
Signed-off-by: Yi Sun
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 569
>From https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git
branch: for_next
commit id: eb501c2d96cfce6b42528e8321ea085ec605e790
Signed-off-by: Zhenzhong Duan
---
Note this is a placeholder patch.
include/standard-headers/linux/fuse.h | 3 +
linux-headers/linux/iommuf
-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/container.c | 66 +++
hw/vfio/pci.c | 50 --
hw/vfio/trace-events | 2 +-
include/hw/vfio/vfio-common.h | 3 ++
4 files changed, 76
So that it doesn't need to be moved into container.c as done
in following patch.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 51c6e7598e..fda5fc87b9 100644
-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
MAINTAINERS | 7 +
backends/Kconfig | 4 +
backends/iommufd.c | 291 +++
backends/meson.build | 3 +
backends/trace-events| 13 ++
include/sysemu
acy VFIO backend code into separate container.c
vfio: Add base container
util/char_dev: Add open_cdev()
vfio/iommufd: Implement the iommufd backend
Zhenzhong Duan (9):
Update linux-header to support iommufd cdev and hwpt alloc
vfio/common: Extract out vfio_kvm_device_[add/del]_fd
v
vfio devices.
There is no easy way to check if a device is mdev with FD passing,
so fail the x-balloon-allowed check unconditionally in this case.
There is also no easy way to get BDF as name with FD passing, so
we fake a name by VFIO_FD[fd].
Signed-off-by: Zhenzhong Duan
---
hw/vfio/helpers.c
-by: Zhenzhong Duan
---
hw/vfio/common.c | 156 +++
1 file changed, 89 insertions(+), 67 deletions(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 9ca695837f..67150e4575 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -796,6 +796,92
The way to get vfio device pointer is different between legacy
container and iommufd container, with iommufd backend support
added, it's time to add the iterator support for iommufd.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/iommufd.c | 29 +
1 file changed, 29
This adds "--enable-iommufd/--disable-iommufd" to enable or disable
iommufd support, enabled by default.
Signed-off-by: Zhenzhong Duan
---
meson.build | 6 ++
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
3 files changed, 11
From: Eric Auger
Let the vfio-platform device use vfio_attach_device() and
vfio_detach_device(), hence hiding the details of the used
IOMMU backend.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/platform.c | 43
This empty VFIOIOMMUOps named vfio_legacy_ops will hold all general
IOMMU ops of legacy container.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 2 +-
hw/vfio/container.c | 5 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/hw/vfio/vfio
.
No functional changes intended.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 4 +-
hw/vfio/container.c | 82 +--
hw/vfio/spapr.c | 81
VFIO Device is also changed to point to base container instead of
legacy container.
No fucntional change intended.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 3 +--
include/hw/vfio/vfio-container-base.h | 1 +
hw/vfio/common.c
From: Eric Auger
Move listener to base container. Also error and initialized fields
are moved at the same time.
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h
vfio_container_add/del_section_window are spapr specific functions,
so move them into spapr.c to make container.c cleaner.
No functional changes intended.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
hw/vfio/container.c | 90
With vfio_eeh_as_ok/vfio_eeh_as_op moved and made static,
vfio.h becomes empty and is deleted.
No functional changes intended.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
Acked-by: Eric Farman
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio.h | 7 ---
hw/ppc
No functional change intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 11
include/hw/vfio/vfio-container-base.h | 11
hw/vfio/common.c | 38 +--
hw/vfio/container-base.c | 1 +
hw
Previously we added support to select iommu backend for vfio pci
device. Now we added others, E.g: platform, ap and ccw.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-platform.h | 1 +
hw/vfio/ap.c| 5 +
hw/vfio/ccw.c | 5 +
hw/vfio
-by: Eric Auger
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
v4: use SPDX identifier, use iommufd_cdev_* prefix, merge with manual alloc
patch
include/hw/vfio/vfio-common.h | 23 ++
hw/vfio/common.c | 19 +-
hw/vfio/iommufd.c | 504
vfio_get_dirty_bitmap
Signed-off-by: Eric Auger
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 9
hw/vfio/common.c | 42 +++
hw/vfio/container.c | 6 ++---
hw/vfio/trace-events
.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
v4: use SPDX identifier, use const char *name parameter,
HW_VFIO_VFIO_CONTAINER_BASE_H
include/hw/vfio/vfio-common.h | 8 ++---
include/hw/vfio/vfio-container-base.h | 50
No functional changes intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 1 -
hw/vfio/spapr.c | 36 +++
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio
ci: Allow the selection of a given iommu backend
Yi Liu (2):
util/char_dev: Add open_cdev()
vfio/iommufd: Implement the iommufd backend
Zhenzhong Duan (28):
vfio/container: Move IBM EEH related functions into spapr_pci_vfio.c
vfio/container: Move vfio_container_add/del_section_window
From: Yi Liu
/dev/vfio/devices/vfioX may not exist. In that case it is still possible
to open /dev/char/$major:$minor instead. Add helper function to abstract
the cdev open.
Suggested-by: Jason Gunthorpe
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
MAINTAINERS
ved into spapr, we changed to check container->pgsizes.
Suggested-by: Alex Williamson
Signed-off-by: Zhenzhong Duan
---
v4: add vfio_find_hostwin back for VFIO_SPAPR_TCE_IOMMU
include/hw/vfio/vfio-common.h | 5 ---
hw/vfio/common.c | 70 +
hw/vfio/conta
From: Eric Auger
Move the giommu_list field in the base container and store
the base container in the VFIOGuestIOMMU.
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h
From: Eric Auger
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 2 --
include/hw/vfio/vfio-container-base.h | 2 ++
hw/vfio
From: Eric Auger
Move the space field to the base object. Also the VFIOAddressSpace
now contains a list of base containers.
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
v4: use bcontainer->sp
This adds "--enable-iommufd/--disable-iommufd" to enable or disable
iommufd support, enabled by default.
Signed-off-by: Zhenzhong Duan
---
meson.build | 6 ++
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
3 files changed, 11
From: Eric Auger
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
v4: use SPDX identifier, use assert
include/hw/vfio/vfio-common.h | 4 ---
include/hw/vfio/vfio-container-base.h | 7 +
hw
, query_dirty_bitmap will
never be called.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
hw/vfio/container-base.c | 4
hw/vfio/container.c | 4
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c
-by: Zhenzhong Duan
---
v4: fix build error in 32bit fedora
hw/vfio/iommufd.c | 47 +++
1 file changed, 47 insertions(+)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index 1bb55ca2c4..22f02f92a9 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
From: Eric Auger
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
v4: Split vrdl_list change out in a seperate patch
include/hw/vfio/vfio-common.h | 2 --
include/hw/vfio/vfio-container-base.h
No fucntional change intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 5 -
include/hw/vfio/vfio-container-base.h | 5 +
hw/vfio/common.c | 8 ++--
hw/vfio/container-base.c | 21 +
hw/vfio
y to check if a device is mdev with FD passing,
so fail the x-balloon-allowed check unconditionally in this case.
There is also no easy way to get BDF as name with FD passing, so
we fake a name by VFIO_FD[fd].
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 1 +
hw/vfio
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/platform.c | 41 +
1 file
No functional changes intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 1 -
hw/vfio/spapr.c | 24
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
From: Eric Auger
dirty_pages_supported field is also moved to the base container
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
v4: use assert
include/hw/vfio/vfio-common.h | 6
ned-off-by: Zhenzhong Duan
---
v4: remove VFIOIOMMUSpaprOps
include/hw/vfio/vfio-container-base.h | 6 ++
hw/vfio/spapr.c | 14 ++
2 files changed, 20 insertions(+)
diff --git a/include/hw/vfio/vfio-container-base.h
b/include/hw/vfio/vfio-container-base.h
in
Since PPC doesn't support IOMMUFD, make iommufd related code
compiled out.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c | 2 +-
hw/vfio/pci.c| 2 +-
hw/vfio/platform.c | 2 +-
backends/meson.build | 4 ++--
hw/vfio/meson.build | 2 +-
5 files
same changes to avoid
build error.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 12 ++
include/hw/vfio/vfio-container-base.h | 12 ++
hw/vfio/common.c | 9 +++
hw/vfio/container-base.c
This adds two helper functions vfio_container_init/destroy which will be
used by both legacy and iommufd containers to do base container specific
initialization and release.
No fucntional change intended.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio
vfio_spapr_create_window calls vfio_spapr_remove_window,
With reoder of definition of the two, we can make
vfio_spapr_create/remove_window static.
No functional changes intended.
Signed-off-by: Zhenzhong Duan
Reviewed-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 6 -
hw/vfio
Legacy vfio pci and iommufd cdev have different process to hot reset
vfio device, expand current code to abstract out pci_hot_reset callback
for legacy vfio, this same interface will also be used by iommufd
cdev vfio device.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
hw
Suggested-by: Alex Williamson
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index eb662fd086..7a6696ca55 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -42,6
-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
---
v4: add CONFIG_IOMMUFD check, document default case
MAINTAINERS | 7 ++
qapi/qom.json| 22
include/sysemu/iommufd.h | 46 +++
backends/iommufd-stub.c | 59 +
backends/iommufd.c
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.
Opportunisticly, remove some unnecessory double-cast.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/ap.c | 32
This helper will be used by both legacy and iommufd backends.
No functional changes intended.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.h | 3 +++
hw/vfio/pci.c | 54 +++
2 files changed, 40 insertions(+), 17 deletions(-)
diff --git a/hw
Add a new callback iommufd_pci_hot_reset to do iommufd specific
check and reset operation.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.h| 2 +
hw/vfio/iommufd.c| 142 +++
hw/vfio/pci.c| 4 +-
hw/vfio/trace-events | 1 +
4 files
From: Eric Auger
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
hw/vfio/common.c| 16
hw/vfio/container.c | 12 +---
2 files changed, 21 insertions(+), 7 deletions(-)
diff
Meanwhile remove the helper function vfio_free_container as it
only calls g_free now.
No functional change intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 1 -
include/hw/vfio/vfio-container-base.h | 1 +
hw/vfio/common.c | 5
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.
Opportunisticly, remove a redundant definition of TYPE_VFIO_CCW.
Signed-off-by: Zhenzhong Duan
---
hw/vfio
This empty VFIOIOMMUOps named vfio_legacy_ops will hold all general
IOMMU ops of legacy container.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 2 +-
hw/vfio/container.c | 5 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/hw/vfio/vfio
n_cdev()
vfio/iommufd: Implement the iommufd backend
Zhenzhong Duan (24):
vfio/container: Move IBM EEH related functions into spapr_pci_vfio.c
vfio/container: Move vfio_container_add/del_section_window into
spapr.c
vfio/container: Move spapr specific init/deinit into spa
vfio_spapr_create_window calls vfio_spapr_remove_window,
With reoder of definition of the two, we can make
vfio_spapr_create/remove_window static.
No functional changes intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 6 -
hw/vfio/spapr.c | 48
From: Eric Auger
dirty_pages_supported field is also moved to the base container
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h
vfio_container_add/del_section_window are spapr specific functions,
so move them into spapr.c to make container.c cleaner.
No functional changes intended.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
hw/vfio/container.c | 90
With vfio_eeh_as_ok/vfio_eeh_as_op moved and made static,
vfio.h becomes empty and is deleted.
No functional changes intended.
Suggested-by: Cédric Le Goater
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio.h | 7 ---
hw/ppc/spapr_pci_vfio.c | 100
Signed-off-by: Zhenzhong Duan
[ clg: context changes ]
Signed-off-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 9 -
include/hw/vfio/vfio-container-base.h | 13 +
hw/vfio/common.c | 17 +++--
hw/vfio/container-base.c
Only spapr supports a customed host window list, other vfio driver
assume 64bit host window. So remove the check in listener callback
and move vfio_host_win_add/del into spapr.c and make static.
Suggested-by: Alex Williamson
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 5
VFIO Device is also changed to point to base container instead of
legacy container.
No fucntional change intended.
Signed-off-by: Zhenzhong Duan
[ clg: context changes ]
Signed-off-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 3 +--
include/hw/vfio/vfio-container-base.h
From: Eric Auger
Move the space field to the base object. Also the VFIOAddressSpace
now contains a list of base containers.
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
[ clg: context changes ]
Signed-off
No functional changes intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 1 -
hw/vfio/spapr.c | 30 +-
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio
-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
MAINTAINERS | 7 +
qapi/qom.json| 20 +++
include/sysemu/iommufd.h | 46 +++
backends/iommufd-stub.c | 59 +
backends/iommufd.c | 268
From: Eric Auger
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
include/hw/vfio/vfio-common.h | 2 --
include/hw/vfio/vfio-container-base.h | 2 ++
hw/vfio
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.
Opportunisticly, remove a redundant definition of TYPE_VFIO_CCW.
Signed-off-by: Zhenzhong Duan
Signed-off
From: Yi Liu
/dev/vfio/devices/vfioX may not exist. In that case it is still possible
to open /dev/char/$major:$minor instead. Add helper function to abstract
the cdev open.
Suggested-by: Jason Gunthorpe
Signed-off-by: Yi Liu
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
From: Eric Auger
Move listener to base container. Also error and initialized fields
are moved at the same time.
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
[ clg: context changes ]
Signed-off-by: Cédric
.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 8 +---
include/hw/vfio/vfio-container-base.h | 64 +++
2 files changed, 66 insertions(+), 6 deletions(-)
create mode 100644
This helper will be used by both legacy and iommufd backends.
No functional changes intended.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.c | 54 +++
1 file changed, 37 insertions(+), 17 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
hw/vfio/platform.c | 41
This adds "--enable-iommufd/--disable-iommufd" to enable or disable
iommufd support, enabled by default.
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
meson.build | 6 ++
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh
Previously we added support to select iommu backend for vfio pci
device. Now we added others, E.g: platform, ap and ccw.
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
include/hw/vfio/vfio-platform.h | 1 +
hw/vfio/ap.c| 5 +
hw/vfio/ccw.c
share the common bus reset and system reset
path for both BEs.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/pci.c| 156 ++-
hw/vfio/trace-events | 1 +
2 files changed, 156 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
No fucntional change intended.
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 5 -
include/hw/vfio/vfio-container-base.h | 5 +
hw/vfio/common.c | 8 ++--
hw/vfio/container-base.c | 23 ++-
hw/vfio
this change.
Signed-off-by: Zhenzhong Duan
---
hw/vfio/iommufd.c | 89 +--
1 file changed, 70 insertions(+), 19 deletions(-)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index aee64d63f3..c1daaf1c39 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
y to check if a device is mdev with FD passing,
so fail the x-balloon-allowed check unconditionally in this case.
There is also no easy way to get BDF as name with FD passing, so
we fake a name by VFIO_FD[fd].
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le Goater
---
include/hw/vfio/vfio-com
-by: Zhenzhong Duan
---
hw/vfio/iommufd.c | 47 +++
1 file changed, 47 insertions(+)
diff --git a/hw/vfio/iommufd.c b/hw/vfio/iommufd.c
index c1daaf1c39..18a09d7f5a 100644
--- a/hw/vfio/iommufd.c
+++ b/hw/vfio/iommufd.c
@@ -348,6 +348,52 @@ static int
This gives management tools like libvirt a chance to open the vfio
cdev with privilege and pass FD to qemu. This way qemu never needs
to have privilege to open a VFIO or iommu cdev node.
Opportunisticly, remove some unnecessory double-cast.
Signed-off-by: Zhenzhong Duan
Signed-off-by: Cédric Le
From: Eric Auger
No fucntional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
---
include/hw/vfio/vfio-common.h | 4 ---
include/hw/vfio/vfio-container-base.h | 7
hw/vfio/common.c
From: Eric Auger
Move vrdl_list, pgsizes and dma_max_mappings to the base
container object
No functional change intended.
Signed-off-by: Eric Auger
Signed-off-by: Yi Liu
Signed-off-by: Yi Sun
Signed-off-by: Zhenzhong Duan
[ clg: context changes ]
Signed-off-by: Cédric Le Goater
1 - 100 of 614 matches
Mail list logo