Re: [PATCH v2 09/21] hw/vfio/pci: Convert CONFIG_KVM check to runtime one

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

 



On Mon, 10 Mar 2025, Eric Auger wrote:
Hi Philippe,

On 3/9/25 12:09 AM, Philippe Mathieu-Daudé wrote:
Use the runtime kvm_enabled() helper to check whether
KVM is available or not.

Miss the "why" of this patch.

By the way I fail to remember/see where kvm_allowed is set.

It's in include/system/kvm.h

I am also confused because we still have some code, like in
vfio/common.c which does both checks:
#ifdef CONFIG_KVM
        if (kvm_enabled()) {
            max_memslots = kvm_get_max_memslots();
        }
#endif

I think this is because if KVM is not available the if cannot be true so it can be left out altogether. This may make sense on platforms like Windows and macOS where QEMU is compiled without KVM so basically everywhere except Linux.

Regards,
BALATON Zoltan

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux