1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

qemu: Introduce QEMU_CAPS_TCG

Since QEMU 2.10 it is possible to disable TCG when building
QEMU. Introduce a capability that reflects this.

Signed-off-by: Tobin Feldman-Fitzthum <tobin@linux.vnet.ibm.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tobin Feldman-Fitzthum 2020-04-28 11:04:14 +02:00 committed by Michal Privoznik
parent c1165f70c2
commit 5ffff9b9e2
50 changed files with 55 additions and 0 deletions

View File

@ -579,6 +579,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 365 */
"machine.pseries.cap-sbbc",
"machine.pseries.cap-ibs",
"tcg",
);
@ -1296,6 +1297,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "rng-builtin", QEMU_CAPS_OBJECT_RNG_BUILTIN },
{ "tpm-spapr", QEMU_CAPS_DEVICE_TPM_SPAPR },
{ "vhost-user-fs-device", QEMU_CAPS_DEVICE_VHOST_USER_FS },
{ "tcg-accel", QEMU_CAPS_TCG },
};
static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsVirtioBalloon[] = {
@ -4869,6 +4871,10 @@ virQEMUCapsInitQMPVersionCaps(virQEMUCapsPtr qemuCaps)
ARCH_IS_PPC64(qemuCaps->arch)) {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_PSERIES_MAX_CPU_COMPAT);
}
/* TCG couldn't be disabled nor queried until QEMU 2.10 */
if (qemuCaps->version < 2010000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_TCG);
}

View File

@ -560,6 +560,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 365 */
QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC, /* -machine pseries.cap-sbbc */
QEMU_CAPS_MACHINE_PSERIES_CAP_IBS, /* -machine pseries.cap-ibs */
QEMU_CAPS_TCG, /* QEMU does support TCG */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

View File

@ -85,6 +85,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>1005003</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100245</microcodeVersion>

View File

@ -90,6 +90,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>1006000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100243</microcodeVersion>

View File

@ -92,6 +92,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>1007000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100244</microcodeVersion>

View File

@ -108,6 +108,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2001001</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100240</microcodeVersion>

View File

@ -140,6 +140,7 @@
<flag name='vhost-vsock'/>
<flag name='egl-headless'/>
<flag name='iothread.poll-max-ns'/>
<flag name='tcg'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700287</microcodeVersion>

View File

@ -140,6 +140,7 @@
<flag name='egl-headless'/>
<flag name='iothread.poll-max-ns'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900287</microcodeVersion>

View File

@ -107,6 +107,7 @@
<flag name='query-cpu-model-baseline'/>
<flag name='query-cpu-model-comparison'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100287</microcodeVersion>

View File

@ -183,6 +183,7 @@
<flag name='iothread.poll-max-ns'/>
<flag name='x86-max-cpu'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2010000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100287</microcodeVersion>

View File

@ -114,6 +114,7 @@
<flag name='query-cpu-model-baseline'/>
<flag name='query-cpu-model-comparison'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>2011000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100288</microcodeVersion>

View File

@ -189,6 +189,7 @@
<flag name='iothread.poll-max-ns'/>
<flag name='x86-max-cpu'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2011000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100288</microcodeVersion>

View File

@ -156,6 +156,7 @@
<flag name='memory-backend-file.align'/>
<flag name='arm-max-cpu'/>
<flag name='drive-nvme'/>
<flag name='tcg'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700289</microcodeVersion>

View File

@ -157,6 +157,7 @@
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
<flag name='machine.pseries.cap-ibs'/>
<flag name='tcg'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900289</microcodeVersion>

View File

@ -126,6 +126,7 @@
<flag name='query-cpu-model-comparison'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>2012000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100289</microcodeVersion>

View File

@ -198,6 +198,7 @@
<flag name='x86-max-cpu'/>
<flag name='drive-nvme'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2011090</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100289</microcodeVersion>

View File

@ -134,6 +134,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2004000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>

View File

@ -140,6 +140,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2005000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100243</microcodeVersion>

View File

@ -123,6 +123,7 @@
<flag name='nbd-tls'/>
<flag name='sdl-gl'/>
<flag name='hda-output'/>
<flag name='tcg'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700244</microcodeVersion>

View File

@ -119,6 +119,7 @@
<flag name='sdl-gl'/>
<flag name='hda-output'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900244</microcodeVersion>

View File

@ -152,6 +152,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2006000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100244</microcodeVersion>

View File

@ -91,6 +91,7 @@
<flag name='sdl-gl'/>
<flag name='zpci'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100245</microcodeVersion>

View File

@ -157,6 +157,7 @@
<flag name='hda-output'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2007000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100245</microcodeVersion>

View File

@ -96,6 +96,7 @@
<flag name='query-cpu-model-baseline'/>
<flag name='query-cpu-model-comparison'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>2007093</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100246</microcodeVersion>

View File

@ -160,6 +160,7 @@
<flag name='vhost-vsock'/>
<flag name='mch'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2008000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100246</microcodeVersion>

View File

@ -132,6 +132,7 @@
<flag name='vhost-vsock'/>
<flag name='iothread.poll-max-ns'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900247</microcodeVersion>

View File

@ -101,6 +101,7 @@
<flag name='query-cpu-model-baseline'/>
<flag name='query-cpu-model-comparison'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100247</microcodeVersion>

View File

@ -177,6 +177,7 @@
<flag name='iothread.poll-max-ns'/>
<flag name='x86-max-cpu'/>
<flag name='i8042'/>
<flag name='tcg'/>
<version>2009000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100247</microcodeVersion>

View File

@ -159,6 +159,7 @@
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
<flag name='machine.pseries.cap-ibs'/>
<flag name='tcg'/>
<version>2012050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900239</microcodeVersion>

View File

@ -96,6 +96,7 @@
<flag name='ramfb'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -96,6 +96,7 @@
<flag name='ramfb'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -129,6 +129,7 @@
<flag name='ramfb'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100239</microcodeVersion>

View File

@ -204,6 +204,7 @@
<flag name='drive-nvme'/>
<flag name='i8042'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>3000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100239</microcodeVersion>

View File

@ -164,6 +164,7 @@
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
<flag name='machine.pseries.cap-ibs'/>
<flag name='tcg'/>
<version>3000091</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900240</microcodeVersion>

View File

@ -207,6 +207,7 @@
<flag name='drive-nvme'/>
<flag name='i8042'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>3000092</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100240</microcodeVersion>

View File

@ -170,6 +170,7 @@
<flag name='arm-max-cpu'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700240</microcodeVersion>

View File

@ -178,6 +178,7 @@
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
<flag name='machine.pseries.cap-ibs'/>
<flag name='tcg'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900240</microcodeVersion>

View File

@ -171,6 +171,7 @@
<flag name='migration-file-drop-cache'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -171,6 +171,7 @@
<flag name='migration-file-drop-cache'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>0</microcodeVersion>

View File

@ -137,6 +137,7 @@
<flag name='query-cpu-model-comparison'/>
<flag name='drive-nvme'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100240</microcodeVersion>

View File

@ -212,6 +212,7 @@
<flag name='drive-nvme'/>
<flag name='i8042'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>4000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100240</microcodeVersion>

View File

@ -218,6 +218,7 @@
<flag name='smp-dies'/>
<flag name='i8042'/>
<flag name='storage.werror'/>
<flag name='tcg'/>
<version>4001000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100241</microcodeVersion>

View File

@ -182,6 +182,7 @@
<flag name='storage.werror'/>
<flag name='fsdev.multidevs'/>
<flag name='virtio.packed'/>
<flag name='tcg'/>
<version>4001050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700242</microcodeVersion>

View File

@ -183,6 +183,7 @@
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
<flag name='machine.pseries.cap-ibs'/>
<flag name='tcg'/>
<version>4001050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900242</microcodeVersion>

View File

@ -147,6 +147,7 @@
<flag name='storage.werror'/>
<flag name='fsdev.multidevs'/>
<flag name='virtio.packed'/>
<flag name='tcg'/>
<version>4002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>39100242</microcodeVersion>

View File

@ -226,6 +226,7 @@
<flag name='storage.werror'/>
<flag name='fsdev.multidevs'/>
<flag name='virtio.packed'/>
<flag name='tcg'/>
<version>4002000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>

View File

@ -184,6 +184,7 @@
<flag name='storage.werror'/>
<flag name='fsdev.multidevs'/>
<flag name='virtio.packed'/>
<flag name='tcg'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700241</microcodeVersion>

View File

@ -195,6 +195,7 @@
<flag name='machine.pseries.cap-cfpc'/>
<flag name='machine.pseries.cap-sbbc'/>
<flag name='machine.pseries.cap-ibs'/>
<flag name='tcg'/>
<version>4002050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900241</microcodeVersion>

View File

@ -231,6 +231,7 @@
<flag name='virtio.packed'/>
<flag name='pcie-root-port.hotplug'/>
<flag name='aio.io_uring'/>
<flag name='tcg'/>
<version>4002093</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100241</microcodeVersion>

View File

@ -345,6 +345,7 @@ int qemuTestCapsCacheInsert(virFileCachePtr cache,
0,
false,
false);
virQEMUCapsSet(tmpCaps, QEMU_CAPS_TCG);
}
for (j = 0; kvm_machines[i][j] != NULL; j++) {
virQEMUCapsAddMachine(tmpCaps,