Re: [RFC PATCH v2 14.5/18] qemu: Bump the memory locking limit for mdevs as well

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 16 Feb 2017 17:49:45 +0100
Erik Skultety <eskultet@xxxxxxxxxx> wrote:

> Since mdevs are just another type of VFIO devices, we should increase
> the memory locking limit the same way we do for VFIO PCI devices.
> 
> Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
> ---
>  src/qemu/qemu_domain.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index eb86385..bdd687f 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -6222,11 +6222,12 @@ qemuDomainRequiresMemLock(virDomainDefPtr def)
>          return true;
>  
>      for (i = 0; i < def->nhostdevs; i++) {
> -        virDomainHostdevDefPtr dev = def->hostdevs[i];
> +        virDomainHostdevSubsysPtr subsys = &def->hostdevs[i]->source.subsys;
>  
> -        if (dev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
> -            dev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI &&
> -            dev->source.subsys.u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO)
> +        if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
> +            (subsys->type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_MDEV ||
> +             (subsys->type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI &&
> +              subsys->u.pci.backend == VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO)))
>              return true;
>      }
>  

Nice!  For series:

Tested-by: Alex Williamson <alex.williamson@xxxxxxxxxx>

(with KVMGT vGPU mdev)

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux