]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/pci: Extract mdev check into an helper
authorJoao Martins <joao.m.martins@oracle.com>
Fri, 19 Jul 2024 12:04:49 +0000 (13:04 +0100)
committerCédric Le Goater <clg@redhat.com>
Tue, 23 Jul 2024 15:14:52 +0000 (17:14 +0200)
commit13e522f644e2b15fa857028a33e6a3b75e45158d
tree07e92ff3a1cd8a241c7866d2bc8b03dc4466001a
parent07321a6d087d4ec9866cfb0c8b53692a59758976
vfio/pci: Extract mdev check into an helper

In preparation to skip initialization of the HostIOMMUDevice for mdev,
extract the checks that validate if a device is an mdev into helpers.

A vfio_device_is_mdev() is created, and subsystems consult VFIODevice::mdev
to check if it's mdev or not.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
hw/vfio/helpers.c
hw/vfio/pci.c
include/hw/vfio/vfio-common.h