qemu: Expose availability of PS/2 feature in domcaps

This advertises the feature only for the architectures and
machine types where it can actually be used.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Andrea Bolognani 2024-08-28 14:26:25 +02:00
parent e0e496d90c
commit 725afb4e7b
70 changed files with 90 additions and 0 deletions

View File

@ -42,6 +42,7 @@ VIR_ENUM_IMPL(virDomainCapsFeature,
"backup",
"async-teardown",
"s390-pv",
"ps2",
);
static virClass *virDomainCapsClass;

View File

@ -265,6 +265,7 @@ typedef enum {
VIR_DOMAIN_CAPS_FEATURE_BACKUP,
VIR_DOMAIN_CAPS_FEATURE_ASYNC_TEARDOWN,
VIR_DOMAIN_CAPS_FEATURE_S390_PV,
VIR_DOMAIN_CAPS_FEATURE_PS2,
VIR_DOMAIN_CAPS_FEATURE_LAST
} virDomainCapsFeature;

View File

@ -325,6 +325,9 @@
<optional>
<ref name="s390-pv"/>
</optional>
<optional>
<ref name="ps2"/>
</optional>
<optional>
<ref name="sev"/>
</optional>
@ -383,6 +386,12 @@
</element>
</define>
<define name="ps2">
<element name="ps2">
<ref name="supported"/>
</element>
</define>
<define name="sev">
<element name="sev">
<ref name="supported"/>

View File

@ -6702,6 +6702,18 @@ virQEMUCapsFillDomainFeatureS390PVCaps(virQEMUCaps *qemuCaps,
}
}
static void
virQEMUCapsFillDomainFeaturePS2Caps(virQEMUCaps *qemuCaps,
virDomainCaps *domCaps)
{
if (virQEMUCapsSupportsI8042Toggle(qemuCaps, domCaps->machine, domCaps->arch))
domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_YES;
else
domCaps->features[VIR_DOMAIN_CAPS_FEATURE_PS2] = VIR_TRISTATE_BOOL_NO;
}
/**
* virQEMUCapsFillDomainFeatureSGXCaps:
* @qemuCaps: QEMU capabilities
@ -6786,6 +6798,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps,
virQEMUCapsFillDomainFeatureGICCaps(qemuCaps, domCaps);
virQEMUCapsFillDomainFeatureSEVCaps(qemuCaps, domCaps);
virQEMUCapsFillDomainFeatureS390PVCaps(qemuCaps, domCaps);
virQEMUCapsFillDomainFeaturePS2Caps(qemuCaps, domCaps);
virQEMUCapsFillDomainFeatureSGXCaps(qemuCaps, domCaps);
virQEMUCapsFillDomainFeatureHypervCaps(qemuCaps, domCaps);
virQEMUCapsFillDomainDeviceCryptoCaps(qemuCaps, crypto);

View File

@ -256,6 +256,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -154,6 +154,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -269,6 +269,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -212,6 +212,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -157,6 +157,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -212,6 +212,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -174,6 +174,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -275,6 +275,7 @@
<backup supported='no'/>
<async-teardown supported='no'/>
<s390-pv supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -256,6 +256,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -258,6 +258,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='yes'>
<cbitpos>47</cbitpos>
<reducedPhysBits>1</reducedPhysBits>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='yes'>
<cbitpos>47</cbitpos>
<reducedPhysBits>1</reducedPhysBits>

View File

@ -214,6 +214,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -214,6 +214,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -276,6 +276,7 @@
<backup supported='no'/>
<async-teardown supported='no'/>
<s390-pv supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='yes'>

View File

@ -258,6 +258,7 @@
<backingStoreInput supported='yes'/>
<backup supported='no'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='yes'>
<cbitpos>47</cbitpos>
<reducedPhysBits>1</reducedPhysBits>

View File

@ -259,6 +259,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -259,6 +259,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -259,6 +259,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -274,6 +274,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -221,6 +221,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -221,6 +221,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -173,6 +173,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -259,6 +259,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -175,6 +175,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -260,6 +260,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='yes'>
<flc>no</flc>

View File

@ -275,6 +275,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='yes'>
<flc>no</flc>

View File

@ -220,6 +220,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -220,6 +220,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -178,6 +178,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -260,6 +260,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='yes'>
<flc>no</flc>

View File

@ -259,6 +259,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -273,6 +273,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -171,6 +171,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -259,6 +259,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -183,6 +183,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -266,6 +266,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -264,6 +264,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -264,6 +264,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -158,6 +158,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -266,6 +266,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -267,6 +267,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -161,6 +161,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -269,6 +269,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -164,6 +164,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -267,6 +267,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='no'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -270,6 +270,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -271,6 +271,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -272,6 +272,7 @@
<backup supported='yes'/>
<async-teardown supported='yes'/>
<s390-pv supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='yes'>

View File

@ -270,6 +270,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -165,6 +165,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -271,6 +271,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -227,6 +227,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -169,6 +169,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -227,6 +227,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -175,6 +175,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -272,6 +272,7 @@
<backup supported='yes'/>
<async-teardown supported='yes'/>
<s390-pv supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='yes'>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -273,6 +273,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -137,6 +137,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='no'/>
<sev supported='no'/>
<sgx supported='no'/>
<launchSecurity supported='no'/>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -276,6 +276,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -272,6 +272,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>

View File

@ -276,6 +276,7 @@
<backingStoreInput supported='yes'/>
<backup supported='yes'/>
<async-teardown supported='yes'/>
<ps2 supported='yes'/>
<sev supported='no'/>
<sgx supported='no'/>
<hyperv supported='yes'>