1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-28 11:21:44 +03:00

cpu_map: Add missing vmx features from MSR 0x48C

Differences from qemu:

* "vmx-ept-uc" (bit 8) and "vmx-ept-wb" (bit 14) are not added to
qemu's list of named features yet, but used in several qemu cpu
models never the less. Add to libvirt regardless.

* "vmx-invvpid-single-context" (bit 41) is erroneously called
"vmx-invept-single-context" in qemu. This is the name of the
feature associated with bit 25 in both libvirt and qemu.

* "vmx-invvpid-single-context-noglobals" (bit 43) is erroneously
called "vmx-invept-single-context-noglobals". Use the correct name.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Tim Wiederhake 2023-11-09 14:37:19 +01:00
parent 94eacd5a5f
commit 102f6335b9
16 changed files with 158 additions and 2 deletions

View File

@ -879,4 +879,57 @@
<feature name='vmx-enable-user-wait-pause'>
<msr index='0x48b' edx='0x00000000' eax='0x04000000'/>
</feature>
<feature name='vmx-invvpid'>
<msr index='0x48c' edx='0x00000001' eax='0x00000000'/>
</feature>
<feature name='vmx-invvpid-single-addr'>
<msr index='0x48c' edx='0x00000100' eax='0x00000000'/>
</feature>
<feature name='vmx-invvpid-single-context'>
<msr index='0x48c' edx='0x00000200' eax='0x00000000'/>
</feature>
<feature name='vmx-invvpid-all-context'>
<msr index='0x48c' edx='0x00000400' eax='0x00000000'/>
</feature>
<feature name='vmx-invvpid-single-context-noglobals'>
<alias name='vmx-invept-single-context-noglobals' source='qemu'/>
<msr index='0x48c' edx='0x00000800' eax='0x00000000'/>
</feature>
<feature name='vmx-ept-execonly'>
<msr index='0x48c' edx='0x00000000' eax='0x00000001'/>
</feature>
<feature name='vmx-page-walk-4'>
<msr index='0x48c' edx='0x00000000' eax='0x00000040'/>
</feature>
<feature name='vmx-page-walk-5'>
<msr index='0x48c' edx='0x00000000' eax='0x00000080'/>
</feature>
<feature name='vmx-ept-uc'>
<msr index='0x48c' edx='0x00000000' eax='0x00000100'/>
</feature>
<feature name='vmx-ept-wb'>
<msr index='0x48c' edx='0x00000000' eax='0x00004000'/>
</feature>
<feature name='vmx-ept-2mb'>
<msr index='0x48c' edx='0x00000000' eax='0x00010000'/>
</feature>
<feature name='vmx-ept-1gb'>
<msr index='0x48c' edx='0x00000000' eax='0x00020000'/>
</feature>
<feature name='vmx-invept'>
<msr index='0x48c' edx='0x00000000' eax='0x00100000'/>
</feature>
<feature name='vmx-eptad'>
<msr index='0x48c' edx='0x00000000' eax='0x00200000'/>
</feature>
<feature name='vmx-ept-advanced-exitinfo'>
<msr index='0x48c' edx='0x00000000' eax='0x00400000'/>
</feature>
<feature name='vmx-invept-single-context'>
<msr index='0x48c' edx='0x00000000' eax='0x02000000'/>
</feature>
<feature name='vmx-invept-all-context'>
<msr index='0x48c' edx='0x00000000' eax='0x04000000'/>
</feature>
</cpus>

View File

@ -10,4 +10,5 @@
<msr index='0x480' edx='0x00c00000' eax='0x00000000'/>
<msr index='0x485' edx='0x00000000' eax='0x20000060'/>
<msr index='0x48b' edx='0x00000000' eax='0x00136bff'/>
<msr index='0x48c' edx='0x00000501' eax='0x06330041'/>
</cpudata>

View File

@ -39,6 +39,17 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
<feature policy='disable' name='mpx'/>
<feature policy='disable' name='core-capability'/>
<feature policy='disable' name='pdpe1gb'/>

View File

@ -11,4 +11,5 @@
<msr index='0x480' edx='0x00c00000' eax='0x00000000'/>
<msr index='0x485' edx='0x00000000' eax='0x20000060'/>
<msr index='0x48b' edx='0x00000000' eax='0x00137bff'/>
<msr index='0x48c' edx='0x00000501' eax='0x06330041'/>
</cpudata>

View File

@ -35,4 +35,15 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</cpu>

View File

@ -9,4 +9,5 @@
<msr index='0x480' edx='0x00c00000' eax='0x00000000'/>
<msr index='0x485' edx='0x00000000' eax='0x20000060'/>
<msr index='0x48b' edx='0x00000000' eax='0x001378ff'/>
<msr index='0x48c' edx='0x00000501' eax='0x06330041'/>
</cpudata>

View File

@ -35,6 +35,17 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
<feature policy='disable' name='hle'/>
<feature policy='disable' name='rtm'/>
</cpu>

View File

@ -10,4 +10,5 @@
<msr index='0x480' edx='0x00c00000' eax='0x00000000'/>
<msr index='0x485' edx='0x00000000' eax='0x20000060'/>
<msr index='0x48b' edx='0x00000000' eax='0x00137bff'/>
<msr index='0x48c' edx='0x00000501' eax='0x06330041'/>
</cpudata>

View File

@ -41,4 +41,15 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</cpu>

View File

@ -41,4 +41,15 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</cpu>

View File

@ -79,6 +79,17 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes' vendor='unknown'>qemu64</model>

View File

@ -78,6 +78,17 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes' vendor='unknown'>qemu64</model>

View File

@ -79,6 +79,17 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes' vendor='unknown'>qemu64</model>

View File

@ -78,6 +78,17 @@
<feature policy='require' name='vmx-rdseed-exit'/>
<feature policy='require' name='vmx-pml'/>
<feature policy='require' name='vmx-xsaves'/>
<feature policy='require' name='vmx-invvpid'/>
<feature policy='require' name='vmx-invvpid-single-addr'/>
<feature policy='require' name='vmx-invvpid-all-context'/>
<feature policy='require' name='vmx-ept-execonly'/>
<feature policy='require' name='vmx-page-walk-4'/>
<feature policy='require' name='vmx-ept-2mb'/>
<feature policy='require' name='vmx-ept-1gb'/>
<feature policy='require' name='vmx-invept'/>
<feature policy='require' name='vmx-eptad'/>
<feature policy='require' name='vmx-invept-single-context'/>
<feature policy='require' name='vmx-invept-all-context'/>
</mode>
<mode name='custom' supported='yes'>
<model usable='yes' vendor='unknown'>qemu64</model>

View File

@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-4.2,usb=off,dump-guest-core=off \
-accel kvm \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,vmx-ins-outs=on,vmx-true-ctls=on,vmx-store-lma=on,vmx-activity-hlt=on,vmx-vmwrite-vmexit-fields=on,vmx-apicv-xapic=on,vmx-ept=on,vmx-desc-exit=on,vmx-rdtscp-exit=on,vmx-apicv-x2apic=on,vmx-vpid=on,vmx-wbinvd-exit=on,vmx-unrestricted-guest=on,vmx-rdrand-exit=on,vmx-invpcid-exit=on,vmx-vmfunc=on,vmx-shadow-vmcs=on,vmx-rdseed-exit=on,vmx-pml=on,vmx-xsaves=on \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,vmx-ins-outs=on,vmx-true-ctls=on,vmx-store-lma=on,vmx-activity-hlt=on,vmx-vmwrite-vmexit-fields=on,vmx-apicv-xapic=on,vmx-ept=on,vmx-desc-exit=on,vmx-rdtscp-exit=on,vmx-apicv-x2apic=on,vmx-vpid=on,vmx-wbinvd-exit=on,vmx-unrestricted-guest=on,vmx-rdrand-exit=on,vmx-invpcid-exit=on,vmx-vmfunc=on,vmx-shadow-vmcs=on,vmx-rdseed-exit=on,vmx-pml=on,vmx-xsaves=on,vmx-invvpid=on,vmx-invvpid-single-addr=on,vmx-invvpid-all-context=on,vmx-ept-execonly=on,vmx-page-walk-4=on,vmx-ept-2mb=on,vmx-ept-1gb=on,vmx-invept=on,vmx-eptad=on,vmx-invept-single-context=on,vmx-invept-all-context=on \
-m size=219136k \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \

View File

@ -12,7 +12,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes \
-machine pc-q35-5.0,usb=off,dump-guest-core=off \
-accel kvm \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,vmx-ins-outs=on,vmx-true-ctls=on,vmx-store-lma=on,vmx-activity-hlt=on,vmx-vmwrite-vmexit-fields=on,vmx-apicv-xapic=on,vmx-ept=on,vmx-desc-exit=on,vmx-rdtscp-exit=on,vmx-apicv-x2apic=on,vmx-vpid=on,vmx-wbinvd-exit=on,vmx-unrestricted-guest=on,vmx-rdrand-exit=on,vmx-invpcid-exit=on,vmx-vmfunc=on,vmx-shadow-vmcs=on,vmx-rdseed-exit=on,vmx-pml=on,vmx-xsaves=on \
-cpu Skylake-Client-IBRS,ss=on,vmx=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on,vmx-ins-outs=on,vmx-true-ctls=on,vmx-store-lma=on,vmx-activity-hlt=on,vmx-vmwrite-vmexit-fields=on,vmx-apicv-xapic=on,vmx-ept=on,vmx-desc-exit=on,vmx-rdtscp-exit=on,vmx-apicv-x2apic=on,vmx-vpid=on,vmx-wbinvd-exit=on,vmx-unrestricted-guest=on,vmx-rdrand-exit=on,vmx-invpcid-exit=on,vmx-vmfunc=on,vmx-shadow-vmcs=on,vmx-rdseed-exit=on,vmx-pml=on,vmx-xsaves=on,vmx-invvpid=on,vmx-invvpid-single-addr=on,vmx-invvpid-all-context=on,vmx-ept-execonly=on,vmx-page-walk-4=on,vmx-ept-2mb=on,vmx-ept-1gb=on,vmx-invept=on,vmx-eptad=on,vmx-invept-single-context=on,vmx-invept-all-context=on \
-m size=219136k \
-overcommit mem-lock=off \
-smp 1,sockets=1,cores=1,threads=1 \