Re: [PATCH 6/6] virpci: Allow greater PCI domain value in virPCIDeviceAddressIsValid

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

 



On Wed, Jul 31, 2019 at 10:32:24AM +0200, Michal Privoznik wrote:
There is no restriction on maximum value of PCI domain. In fact,
Linux kernel uses plain atomic inc when assigning PCI domains:

drivers/pci/pci.c:static int pci_get_new_domain_nr(void)
drivers/pci/pci.c-{
drivers/pci/pci.c-      return atomic_inc_return(&__domain_nr);
drivers/pci/pci.c-}

Of course, this function is called only if kernel was compiled
without PCI domain support or ACPI did not provide PCI domain.

However, QEMU still has the same restriction as us: in
set_pci_host_devaddr() QEMU checks if domain isn't greater than
0xffff. But one can argue that that's a QEMU limitation. We still
want to be able to cope with other hypervisors that don't have
this limitation (possibly).


I would argue that by lifting this check we fail to report the error
early for QEMU that (still) lacks the support for it.

But I doubt that the QEMU fix will be detectable in our capability
probing code, so:

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
docs/schemas/basictypes.rng                   | 2 +-
src/util/virpci.c                             | 2 +-
tests/qemuxml2argvdata/pci-domain-invalid.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature

--
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