On 06/22/2015 04:21 AM, Peter Krempa wrote: > On Sun, Jun 21, 2015 at 16:10:47 -0400, Cole Robinson wrote: >> On 06/11/2015 02:40 AM, Pavel Fedin wrote: >>> This capability specifies that "virt" machine on ARM has PCI controller. Enabled when version is at least 2.3.0. >>> >>> Signed-off-by: Pavel Fedin <p.fedin@xxxxxxxxxxx> >>> --- >>> src/qemu/qemu_capabilities.c | 5 +++++ >>> src/qemu/qemu_capabilities.h | 1 + >>> 2 files changed, 6 insertions(+) >>> >>> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c >>> index ca7a7c2..2eccc97 100644 >>> --- a/src/qemu/qemu_capabilities.c >>> +++ b/src/qemu/qemu_capabilities.c >>> @@ -285,6 +285,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, >>> "dea-key-wrap", >>> "pci-serial", >>> "aarch64-off", >>> + "arm-virt-pci", >>> ); >>> >>> >>> @@ -1330,6 +1331,10 @@ virQEMUCapsComputeCmdFlags(const char *help, >>> virQEMUCapsSet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY); >>> } >>> >>> + if (version >= 2003000) { >>> + virQEMUCapsSet(qemuCaps, QEMU_CAPS_ARM_VIRT_PCI); >>> + } >>> + >>> return 0; >>> } >>> >>> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h >>> index b5a7770..3c1a8b9 100644 >>> --- a/src/qemu/qemu_capabilities.h >>> +++ b/src/qemu/qemu_capabilities.h >>> @@ -229,6 +229,7 @@ typedef enum { >>> QEMU_CAPS_DEA_KEY_WRAP = 187, /* -machine dea_key_wrap */ >>> QEMU_CAPS_DEVICE_PCI_SERIAL = 188, /* -device pci-serial */ >>> QEMU_CAPS_CPU_AARCH64_OFF = 189, /* -cpu ...,aarch64=off */ >>> + QEMU_CAPS_ARM_VIRT_PCI = 190, /* ARM 'virt' machine has PCI bus */ >>> >>> QEMU_CAPS_LAST, /* this must always be the last item */ >>> } virQEMUCapsFlags; >>> >> >> ACK and pushed, tweaked to avoid the conflict with .git (since additions to >> qemu_capabilities are always conflicting, it's better to get this in early) > > It breaks syntax-check since the 'if' has a single line body with braces > around it. > > Also pushing a capabiltity without the code that will actually use it is > not exactly a good idea since it might never be used if the next patch > gets abandoned and since they are considered public we might be stuck > with it forever. > hmm sorry, I suck with syntax-check... but WRT to this specific capability, I don't know how we won't end up using it, so in this case I think it's pretty safe. But I won't push a check again without it's accompanying usage. - Cole -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list