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

Re: [libvirt] [PATCH 2/2] qemu: Add Default PCI Device for arm guests



On Sun, 2018-11-25 at 21:09 +0000, infos nafets de wrote:
[...]
> @@ -3267,6 +3267,15 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
>          addDefaultMemballoon = false;
>          if (qemuDomainIsARMVirt(def))
>              addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX);
> +
> +        if (!ARCH_IS_RISCV(def->os.arch) ||
> +                    STREQ(def->os.machine, "versatilepb"))
> +            addPCIRoot = true;
> +
> +        if (qemuDomainIsARMVirt(def) &&
> +                    virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX))
> +            addPCIRoot = true;
> +

This is not indented properly; more importantly, the logic doesn't
make a whole lot of sense to me.

You're checking whether the arch is RISC-V in a case that you'll
only hit for ARM architectures, and (with the second if) causing
aarch64 virt guests to have both a pcie-root and a pci-root, which
helpfully breaks the test suite.

Please ensure 'make check' and 'make syntax-check' pass after each
one of your patches before posting.

-- 
Andrea Bolognani / Red Hat / Virtualization


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