On Wed, Jan 17, 2024 at 10:54:42 +0100, Andrea Bolognani wrote:
For all versions of QEMU that we support, this is guaranteed to
be compiled in both on aarch64 and on riscv64, so we can stop
checking whether the capability is present and just use the
device unconditionally.
It's guaranteed for the 'virt' machine ...
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_domain.c | 12 +++++-------
src/qemu/qemu_domain.h | 3 +--
src/qemu/qemu_domain_address.c | 2 +-
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e2a1bf2c13..7c87cd6453 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4168,7 +4168,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
addDefaultUSB = false;
addDefaultMemballoon = false;
if (qemuDomainIsARMVirt(def))
- addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX);
+ addPCIeRoot = true;
break;
case VIR_ARCH_PPC64:
@@ -4195,7 +4195,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
case VIR_ARCH_RISCV64:
addDefaultUSB = false;
if (qemuDomainIsRISCVVirt(def))
- addPCIeRoot = virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_GPEX);
+ addPCIeRoot = true;
So these actually make sense.
break;
As long as you clarify the commit message:
Reviewed-by: Peter Krempa <pkrempa(a)redhat.com>