[libvirt] [PATCH v2 4/7] virpcitest: Change the stub driver to vfio from pci-stub

Michal Privoznik mprivozn at redhat.com
Fri Aug 16 12:43:57 UTC 2019


On 7/25/19 8:09 PM, Daniel Henrique Barboza wrote:
> From: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
> 
> The pci-stub is obsolete for a while now. Upcoming test cases try
> to test the VFIO hotplug/unplug cases.
> 
> Change the default test driver to vfio-pci instead of pci-stub,
> and fail bind for pci-stub instead.
> 
> Signed-off-by: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
> Signed-off-by: Daniel Henrique Barboza <danielhb413 at gmail.com>
> ---
>   tests/virhostdevtest.c |  4 ++--
>   tests/virpcimock.c     |  4 ++--
>   tests/virpcitest.c     | 12 ++++++------
>   3 files changed, 10 insertions(+), 10 deletions(-)

Huh, again, same patches ...

> 
> diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c
> index 20eaca82e0..99ee2d44ec 100644
> --- a/tests/virhostdevtest.c
> +++ b/tests/virhostdevtest.c
> @@ -93,7 +93,7 @@ myInit(void)
>           subsys.u.pci.addr.bus = 0;
>           subsys.u.pci.addr.slot = i + 1;
>           subsys.u.pci.addr.function = 0;
> -        subsys.u.pci.backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_KVM;
> +        subsys.u.pci.backend = VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO;
>           hostdevs[i]->source.subsys = subsys;
>       }
>   
> @@ -101,7 +101,7 @@ myInit(void)
>           if (!(dev[i] = virPCIDeviceNew(0, 0, i + 1, 0)))
>               goto cleanup;
>   
> -        virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_KVM);
> +        virPCIDeviceSetStubDriver(dev[i], VIR_PCI_STUB_DRIVER_VFIO);
>       }
>   
>       if (VIR_ALLOC(mgr) < 0)
> diff --git a/tests/virpcimock.c b/tests/virpcimock.c
> index 1b44ed0a44..deb802e860 100644
> --- a/tests/virpcimock.c
> +++ b/tests/virpcimock.c
> @@ -978,8 +978,8 @@ init_env(void)
>   
>       MAKE_PCI_DRIVER("iwlwifi", 0x8086, 0x0044);
>       MAKE_PCI_DRIVER("i915", 0x8086, 0x0046, 0x8086, 0x0047);
> -    MAKE_PCI_DRIVER("pci-stub", -1, -1);
> -    pci_driver_new("vfio-pci", PCI_ACTION_BIND, -1, -1);
> +    pci_driver_new("pci-stub", PCI_ACTION_BIND, -1, -1);
> +    MAKE_PCI_DRIVER("vfio-pci", -1, -1);

.. except this one. This means I can drop two patches from mine series 
if I include this change :-) Let me resping that.

Michal




More information about the libvir-list mailing list