]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu_map: Drop vmx-ept-{uc,wb} features from CPU models
authorJiri Denemark <jdenemar@redhat.com>
Tue, 8 Oct 2024 10:26:45 +0000 (12:26 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 9 Oct 2024 12:46:51 +0000 (14:46 +0200)
Although QEMU knows and enables the corresponding MSR bits, it does not
allow users to configure them (there are no names attached to them).
They should have never been added to the CPU map and definitely not to
CPU models as the features will always be considered disabled regardless
on their actual state as QEMU will not report them.

While we cannot drop them completely for backward compatibility, we can
at least remove them from all CPU models.

This is effectively no change for CPU models where the features were
marked with added='yes' because migration source would always remove the
features from domain XML so not adding them to the live XML does not
hurt. On the other side the destination could not ever be surprised by
the features being suddenly enabled as QEMU never reports them, which
means libvirt considers them disabled all the time.

GraniteRapids CPU model is the only one which contains the feature ever
since it was introduced in libvirt, but it was never possible to migrate
a domain with such CPU. The source would always mark vmx-ept-wb as
disabled and the destination without the fixes in this series would drop
the feature from the XML completely as it is unsupported by QEMU and
disabled, but when probing for the actual CPU created by QEMU libvirt
would expect the feature to be enabled (as it is included in the CPU
model and not explicitly mentioned in the domain definition) and fail
the migration. There's nothing the source could do to workaround the
behavior on the destination and migration to older libvirt will still be
broken. But it's possible to migrate a domain with GraniteRapids to a
destination with this series applied from both old and new source.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
33 files changed:
src/cpu_map/sync_qemu_features_i386.py
src/cpu_map/sync_qemu_models_i386.py
src/cpu_map/x86_Broadwell-IBRS.xml
src/cpu_map/x86_Broadwell-noTSX-IBRS.xml
src/cpu_map/x86_Broadwell-noTSX.xml
src/cpu_map/x86_Broadwell.xml
src/cpu_map/x86_Cascadelake-Server-noTSX.xml
src/cpu_map/x86_Cascadelake-Server.xml
src/cpu_map/x86_Cooperlake.xml
src/cpu_map/x86_GraniteRapids.xml
src/cpu_map/x86_Haswell-IBRS.xml
src/cpu_map/x86_Haswell-noTSX-IBRS.xml
src/cpu_map/x86_Haswell-noTSX.xml
src/cpu_map/x86_Haswell.xml
src/cpu_map/x86_Icelake-Server-noTSX.xml
src/cpu_map/x86_Icelake-Server.xml
src/cpu_map/x86_IvyBridge-IBRS.xml
src/cpu_map/x86_IvyBridge.xml
src/cpu_map/x86_Nehalem-IBRS.xml
src/cpu_map/x86_Nehalem.xml
src/cpu_map/x86_SandyBridge-IBRS.xml
src/cpu_map/x86_SandyBridge.xml
src/cpu_map/x86_SapphireRapids.xml
src/cpu_map/x86_Skylake-Client-IBRS.xml
src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml
src/cpu_map/x86_Skylake-Client.xml
src/cpu_map/x86_Skylake-Server-IBRS.xml
src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml
src/cpu_map/x86_Skylake-Server.xml
src/cpu_map/x86_Snowridge.xml
src/cpu_map/x86_Westmere-IBRS.xml
src/cpu_map/x86_Westmere.xml
src/qemu/qemu_capabilities.c

index 21df37e9d67015d28e9d4edb41e69f1a0658d51f..c78c0b2ac91304e705316b5ad0a87d357488e63c 100755 (executable)
@@ -70,8 +70,6 @@ FEATURES_EXTRA = {
         18: "cvt16",
     },
     (0x0000048c,): {
-        8: "vmx-ept-uc",
-        14: "vmx-ept-wb",
         41: "vmx-invvpid-single-context",               # wrong name in qemu
         43: "vmx-invvpid-single-context-noglobals",     # wrong name in qemu
     }
index 06a8837b0a41d5900d6ee50ddaff4ec41cd19a8b..408e07911ea7ee4d93a45696697389eae416f7e4 100755 (executable)
@@ -278,8 +278,6 @@ def translate_feature(name):
         "MSR_VMX_EPT_EXECONLY": "vmx-ept-execonly",
         "MSR_VMX_EPT_PAGE_WALK_LENGTH_4": "vmx-page-walk-4",
         "MSR_VMX_EPT_PAGE_WALK_LENGTH_5": "vmx-page-walk-5",
-        "MSR_VMX_EPT_UC": "vmx-ept-uc",
-        "MSR_VMX_EPT_WB": "vmx-ept-wb",
         "MSR_VMX_EPT_2MB": "vmx-ept-2mb",
         "MSR_VMX_EPT_1GB": "vmx-ept-1gb",
         "MSR_VMX_EPT_INVEPT": "vmx-invept",
@@ -307,6 +305,7 @@ def translate_feature(name):
         name in ("CPUID_EXT_MONITOR", "monitor"),
         name in ("MSR_VMX_BASIC_DUAL_MONITOR", "dual-monitor"),
         name in ("CPUID_EXT3_TOPOEXT", "topoext"),
+        name in ("MSR_VMX_EPT_UC", "MSR_VMX_EPT_WB"),
     ])
 
     if ignore:
index 1484903298116f743f86759971b873ec061533c7..e87f54a102e20c7e3147780634c9cfbcb28b750b 100644 (file)
@@ -78,7 +78,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 13f08435b768f78a21ac3666ab01787aa32248a2..59c2c08937125c6fb0877402ce5b83b8c528e7eb 100644 (file)
@@ -76,7 +76,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 4293b3aeee345513f12cda96b86f9cc554827f95..b9b25d6b6c93e7263fa9a4d982739719448f8627 100644 (file)
@@ -75,7 +75,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 37dd1dabcfbe9148fdd62c7aff7a48059d0e53d0..2845a620ac0effe0d2cd7771ca5bc9aebe828e8b 100644 (file)
@@ -77,7 +77,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 8c4cbf9c9ae72d24dfcf0ad71867163d4ec33cc1..a3b332c9c16324a27e65def8c21f862a93ba711b 100644 (file)
@@ -89,7 +89,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index c7c4f6412f3df336f49c5f2e8c8434df829d9a3d..9faad320e695aece0a0e9e0278acdd642b6c44e1 100644 (file)
@@ -91,7 +91,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
index af428f2781cc8b3ec215aef71112382da8a12fc4..caccfc048c8f5f7e5557f2997bed4931cecbbc39 100644 (file)
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 6f7030ce3951ca45670b8615560329bf023f577f..6dab7d7b09cf4d72044174e2572f13b8d7adda57 100644 (file)
     <feature name='vmx-ept-1gb'/>
     <feature name='vmx-ept-2mb'/>
     <feature name='vmx-ept-execonly'/>
-    <feature name='vmx-ept-wb'/>
     <feature name='vmx-eptad'/>
     <feature name='vmx-eptp-switching'/>
     <feature name='vmx-exit-ack-intr'/>
index 57b980d14fe5d148e55c8dedf91df2d5ce2ba37e..e2e3ce6b51263b8e9172ffe93c8e35373f3b0dc7 100644 (file)
@@ -74,7 +74,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index fcae023ffb5ea2191a0cc4e2d55502d39abb1ebe..c8d050b8d3ccadab3b4ea941783d3fdc74d08a1e 100644 (file)
@@ -72,7 +72,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 7404052065aa3021ef6e3e883c9ada93052de1de..d714ce58583d99ce65c89553e1776d3f03ae50d9 100644 (file)
@@ -71,7 +71,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 99986c5c45cd88890254959b0f04c4cc0c71ce4b..583649dbabf0abc853f54deb871683011005c6a9 100644 (file)
@@ -73,7 +73,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index caba24ab3516590ab684cc4e22ee65051e9fe988..8515b6518c711fa493a71440f564ef18dd1967d4 100644 (file)
@@ -99,7 +99,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 5a864b2fad5964ab9e66e7cf5b95244705cb6c02..9d0cc254c02ae51f3b8255a8ce37f5aeb967f262 100644 (file)
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
index 27d85d86c4e1a7fcb68bd9c7c07e9afc0e50d203..4822b546e9085a9c3ea17aabb25a6075eaad957c 100644 (file)
@@ -66,7 +66,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 72031cfdc62b4454ec51e4af54194a4dfb67f994..93edca17ca8102a40ca7831cac9b034e7f54c36a 100644 (file)
@@ -65,7 +65,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 0cfee14c0f74586bf6ff152b12c932f5fe417553..a6510aa99f3faeed4ea773150c12b1af79aa6df7 100644 (file)
@@ -55,7 +55,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 74ee64ce1c31e1e2b06085be200d837b22b770a7..6c0dfba45126342d33cc7e553fb25360bf5ff35f 100644 (file)
@@ -54,7 +54,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 297eea8e8821647ddaa5620cea81ea8c05e8bbb3..6d2b5028eeca3a9cee3d92a89886630ddb0ac3cd 100644 (file)
@@ -58,7 +58,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 20ea378c471e6022a8af4aeafe02e89b41376ee3..de3ad60e3dd8dca7592bee0288cef14c45003e02 100644 (file)
@@ -57,7 +57,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 40164a47e2a9828edcc81fc78f2b0196b7594a6d..6321dd36d9634112563e72a7b698b8057aef13b6 100644 (file)
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index f36a8bd21043b2c65173e0800d76f1d0bf803014..7d0d3c7114297b6661646078b458cfe6b18954ec 100644 (file)
@@ -83,7 +83,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 5150117db4aa8fd8530d91e456d998419dc98bde..383270f5f99b2090b00533275906f5c60a6edbc5 100644 (file)
@@ -81,7 +81,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 061c0dfaec8b0e9324280ad63296f866d03ade13..84789d642a1cf239c8c8261d9e8ca1c56f76a234 100644 (file)
@@ -82,7 +82,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index bbd3c8998e3edb01706e398182394af24e8daf70..8cd25a2df4dbeb8e5280a8b954f2a733214e0cbf 100644 (file)
@@ -88,7 +88,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
index ee0d2a2fa3de0a49fdb9fcd64604d6d31627c34b..f3877bfbecc44d6ffe6c9ab36ed1010a885b3e0e 100644 (file)
@@ -86,7 +86,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index 9d9d112d406a0e627e2e5e70b39db63ed872b998..78bd727357c127eeecb4517bfc130ba2529deb88 100644 (file)
@@ -87,7 +87,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
index bc410bd8f8046afad8761ae78672579588f31f1c..b31ce6f9f5a6808327907809f75a186dac8b5aba 100644 (file)
@@ -81,7 +81,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-eptad' added='yes'/>
     <feature name='vmx-eptp-switching' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
index a5abe8a1e18d645a62d2390a3725d3b3d8ef71c9..534c752ed9126b2dd9a20a658bec21ebc033f7e6 100644 (file)
@@ -53,7 +53,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index 161f1a078e305a6fa255906bca91781cad05d0e3..4edc5b383900a6bfa97bf25e48402dddb798a353 100644 (file)
@@ -54,7 +54,6 @@
     <feature name='vmx-ept-1gb' added='yes'/>
     <feature name='vmx-ept-2mb' added='yes'/>
     <feature name='vmx-ept-execonly' added='yes'/>
-    <feature name='vmx-ept-wb' added='yes'/>
     <feature name='vmx-exit-ack-intr' added='yes'/>
     <feature name='vmx-exit-load-efer' added='yes'/>
     <feature name='vmx-exit-load-pat' added='yes'/>
index f930ad2acf1b464fae76856ec6ff9c3c85220ec4..45565326a5f0b1735a36df11cc6f50a47c3444e4 100644 (file)
@@ -3534,6 +3534,7 @@ virQEMUCapsProbeQMPSGXCapabilities(virQEMUCaps *qemuCaps,
 const char *ignoredFeatures[] = {
     "cmt", "mbm_total", "mbm_local", /* never supported by QEMU */
     "osxsave", "ospke",              /* dropped from QEMU */
+    "vmx-ept-uc", "vmx-ept-wb",      /* never supported by QEMU */
 };
 
 bool