qemu: Probe for "unavailable-features" CPU property

It is similar to "filtered-features" property, which reports CPUID bits
corresponding to disabled features, but more general. The
"unavailable-features" property supports both CPUID and MSR features by
listing their names.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Jiri Denemark 2019-06-10 16:49:22 +02:00
parent 2a4c232106
commit 0d254bce4e
8 changed files with 5604 additions and 132 deletions

View File

@ -531,6 +531,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
"bitmap-merge",
"nbd-bitmap",
"x86-max-cpu",
"cpu-unavailable-features",
);
@ -1398,6 +1399,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMemoryBackendMemfd[]
{ "hugetlb", QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsMaxX86CPU[] = {
{ "unavailable-features", QEMU_CAPS_CPU_UNAVAILABLE_FEATURES },
};
static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
{ "memory-backend-file", virQEMUCapsObjectPropsMemoryBackendFile,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsMemoryBackendFile),
@ -1405,6 +1410,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsObjectProps[] = {
{ "memory-backend-memfd", virQEMUCapsObjectPropsMemoryBackendMemfd,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsMemoryBackendMemfd),
QEMU_CAPS_OBJECT_MEMORY_MEMFD },
{ "max-x86_64-cpu", virQEMUCapsObjectPropsMaxX86CPU,
ARRAY_CARDINALITY(virQEMUCapsObjectPropsMaxX86CPU),
QEMU_CAPS_X86_MAX_CPU },
};
static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsPSeries[] = {

View File

@ -512,6 +512,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
QEMU_CAPS_BITMAP_MERGE, /* block-dirty-bitmap-merge */
QEMU_CAPS_NBD_BITMAP, /* nbd-server-add supports bitmap */
QEMU_CAPS_X86_MAX_CPU, /* max-x86_64-cpu type exists */
QEMU_CAPS_CPU_UNAVAILABLE_FEATURES, /* "unavailable-features" CPU property */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -205,6 +205,7 @@
<flag name='bitmap-merge'/>
<flag name='nbd-bitmap'/>
<flag name='x86-max-cpu'/>
<flag name='cpu-unavailable-features'/>
<version>4000050</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100759</microcodeVersion>