qemu: capabilities: Assume QEMU_CAPS_AES_KEY_WRAP and QEMU_CAPS_DEA_KEY_WRAP for s390 only

qemu introduced these options in 2eb1cd0768 ("s390x: CPACF: Handle key
wrap machine options") released in qemu-v2.3.0 but was exposed in
query-command-line-options only in 5bcfa0c543 ("util/qemu-config: fix
missing machine command line options").

The problem is that they are exposed even for architectures which don't
actually in fact support those.

Make the two capabilities a bit more useful by assuming them only on
s390 and thus removing them from other arches.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-07-27 10:41:16 +02:00
parent e9badd8ac2
commit da20199762
33 changed files with 6 additions and 68 deletions

View File

@ -3209,8 +3209,6 @@ static struct virQEMUCapsCommandLineProps virQEMUCapsCommandLine[] = {
{ "fsdev", "multidevs", QEMU_CAPS_FSDEV_MULTIDEVS },
{ "fsdev", "fmode", QEMU_CAPS_FSDEV_CREATEMODE }, /* Could have also checked fsdev->dmode */
{ "fw_cfg", "file", QEMU_CAPS_FW_CFG },
{ "machine", "aes-key-wrap", QEMU_CAPS_AES_KEY_WRAP },
{ "machine", "dea-key-wrap", QEMU_CAPS_DEA_KEY_WRAP },
{ "machine", "kernel_irqchip", QEMU_CAPS_MACHINE_KERNEL_IRQCHIP },
{ "machine", "loadparm", QEMU_CAPS_LOADPARM },
{ "numa", NULL, QEMU_CAPS_NUMA }, /* not needed after qemuCaps->version < 3000000 */
@ -5002,6 +5000,12 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
break;
case VIR_ARCH_S390:
case VIR_ARCH_S390X:
virQEMUCapsSet(qemuCaps, QEMU_CAPS_AES_KEY_WRAP);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEA_KEY_WRAP);
break;
case VIR_ARCH_ALPHA:
case VIR_ARCH_PPC:
case VIR_ARCH_PPCEMB:
@ -5009,8 +5013,6 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps)
case VIR_ARCH_SH4EB:
case VIR_ARCH_RISCV32:
case VIR_ARCH_RISCV64:
case VIR_ARCH_S390:
case VIR_ARCH_S390X:
case VIR_ARCH_SPARC:
case VIR_ARCH_SPARC64:
case VIR_ARCH_ARMV6L:

View File

@ -82,8 +82,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -59,8 +59,6 @@
<flag name='migrate-rdma'/>
<flag name='ivshmem'/>
<flag name='VGA.vgamem_mb'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='aarch64-off'/>
<flag name='migration-event'/>

View File

@ -59,8 +59,6 @@
<flag name='ivshmem'/>
<flag name='VGA.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='rtl8139'/>

View File

@ -82,8 +82,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -58,8 +58,6 @@
<flag name='ivshmem'/>
<flag name='VGA.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='rtl8139'/>

View File

@ -26,8 +26,6 @@
<flag name='memory-backend-file'/>
<flag name='iothread'/>
<flag name='migrate-rdma'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='migration-event'/>
<flag name='virtio-net'/>
<flag name='incoming-defer'/>

View File

@ -26,8 +26,6 @@
<flag name='memory-backend-file'/>
<flag name='iothread'/>
<flag name='migrate-rdma'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='migration-event'/>
<flag name='virtio-net'/>
<flag name='incoming-defer'/>

View File

@ -81,8 +81,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -59,8 +59,6 @@
<flag name='ivshmem'/>
<flag name='VGA.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='rtl8139'/>

View File

@ -81,8 +81,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -61,8 +61,6 @@
<flag name='migrate-rdma'/>
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='aarch64-off'/>
<flag name='migration-event'/>

View File

@ -61,8 +61,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -65,8 +65,6 @@
<flag name='migrate-rdma'/>
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>

View File

@ -65,8 +65,6 @@
<flag name='migrate-rdma'/>
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>

View File

@ -80,8 +80,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -80,8 +80,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -62,8 +62,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='aarch64-off'/>
<flag name='migration-event'/>

View File

@ -61,8 +61,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -81,8 +81,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -64,8 +64,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='aarch64-off'/>
<flag name='migration-event'/>

View File

@ -62,8 +62,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -65,8 +65,6 @@
<flag name='migrate-rdma'/>
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>

View File

@ -81,8 +81,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -26,8 +26,6 @@
<flag name='memory-backend-file'/>
<flag name='iothread'/>
<flag name='migrate-rdma'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='migration-event'/>
<flag name='incoming-defer'/>
<flag name='chardev-file-append'/>

View File

@ -81,8 +81,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -63,8 +63,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='aarch64-off'/>
<flag name='migration-event'/>

View File

@ -61,8 +61,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='ioh3420'/>

View File

@ -64,8 +64,6 @@
<flag name='migrate-rdma'/>
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>

View File

@ -80,8 +80,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>

View File

@ -62,8 +62,6 @@
<flag name='VGA.vgamem_mb'/>
<flag name='vmware-svga.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='aarch64-off'/>
<flag name='migration-event'/>

View File

@ -79,8 +79,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>

View File

@ -79,8 +79,6 @@
<flag name='qxl.vgamem_mb'/>
<flag name='pc-dimm'/>
<flag name='machine-vmport-opt'/>
<flag name='aes-key-wrap'/>
<flag name='dea-key-wrap'/>
<flag name='pci-serial'/>
<flag name='migration-event'/>
<flag name='gpex-pcihost'/>