Bug 2216690 - CPU Feature flag not passed with host-passthrough.
Summary: CPU Feature flag not passed with host-passthrough.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: CentOS Stream
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: liunana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-22 09:08 UTC by Alessandro Rossi
Modified: 2023-07-14 09:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-14 07:35:58 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-160449 0 None None None 2023-06-22 09:10:12 UTC

Description Alessandro Rossi 2023-06-22 09:08:27 UTC
Description of problem:

Capability 'flushbyasid' is present in CPU flags on host, but it doesn't reflect in the guest using host-passthrough, even if specified manually.

Version-Release number of selected component (if applicable):

CentOS9 Stream

[root@pollos log]# uname -a
Linux pollos 5.14.0-316.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 19 11:26:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

[root@pollos log]# libvirtd --version
libvirtd (libvirt) 9.3.0


Steps to Reproduce:
1. Create a VM
2. Choose host-passthrough
3. Check on guest that the capability is missing

Actual results:

2023-06-21T22:43:20.956233Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.956528Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.956824Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.957340Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.957650Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.957946Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.958489Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.958789Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.959115Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.959418Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.959952Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.960252Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]
2023-06-21T22:43:20.960548Z qemu-kvm: warning: host doesn't support requested feature: CPUID.8000000AH:EDX.flushbyasid [bit 6]

Expected results:

The VM starts and the flag is visible in guest VM.

Additional info:

[root@pollos log]# lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         43 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  48
  On-line CPU(s) list:   0-47
Vendor ID:               AuthenticAMD
  BIOS Vendor ID:        Advanced Micro Devices, Inc.
  Model name:            AMD EPYC 7401P 24-Core Processor
    BIOS Model name:     AMD EPYC 7401P 24-Core Processor               
    CPU family:          23
    Model:               1
    Thread(s) per core:  2
    Core(s) per socket:  24
    Socket(s):           1
    Stepping:            2
    Frequency boost:     enabled
    CPU max MHz:         2000.0000
    CPU min MHz:         1200.0000
    BogoMIPS:            3999.46
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc 
                         cpuid extd_apicid amd_dcm aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a m
                         isalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflus
                         hopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave
                         _vmload vgif overflow_recov succor smca sme sev sev_es
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   768 KiB (24 instances)
  L1i:                   1.5 MiB (24 instances)
  L2:                    12 MiB (24 instances)
  L3:                    64 MiB (8 instances)
NUMA:                    
  NUMA node(s):          4
  NUMA node0 CPU(s):     0-5,24-29
  NUMA node1 CPU(s):     6-11,30-35
  NUMA node2 CPU(s):     12-17,36-41
  NUMA node3 CPU(s):     18-23,42-47
Vulnerabilities:         
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Mitigation; untrained return thunk; SMT vulnerable
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected







===========================================



[root@pollos log]# virsh capabilities
<capabilities>

  <host>
    <uuid>db938000-fd74-11e7-8000-e0d55e99ab5c</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>EPYC-IBPB</model>
      <vendor>AMD</vendor>
      <microcode version='134222444'/>
      <signature family='23' model='1' stepping='2'/>
      <counter name='tsc' frequency='2000003000' scaling='yes'/>
      <topology sockets='1' dies='1' cores='6' threads='2'/>
      <maxphysaddr mode='emulate' bits='43'/>
      <feature name='ht'/>
      <feature name='monitor'/>
      <feature name='osxsave'/>
      <feature name='xsaves'/>
      <feature name='cmp_legacy'/>
      <feature name='extapic'/>
      <feature name='skinit'/>
      <feature name='wdt'/>
      <feature name='tce'/>
      <feature name='topoext'/>
      <feature name='perfctr_core'/>
      <feature name='perfctr_nb'/>
      <feature name='invtsc'/>
      <feature name='clzero'/>
      <feature name='xsaveerptr'/>
      <feature name='npt'/>
      <feature name='lbrv'/>
      <feature name='svm-lock'/>
      <feature name='nrip-save'/>
      <feature name='tsc-scale'/>
      <feature name='vmcb-clean'/>
      <feature name='flushbyasid'/>
      <feature name='decodeassists'/>
      <feature name='pause-filter'/>
      <feature name='pfthreshold'/>
      <feature name='avic'/>
      <feature name='v-vmsave-vmload'/>
      <feature name='vgif'/>
      <pages unit='KiB' size='4'/>
      <pages unit='KiB' size='2048'/>
      <pages unit='KiB' size='1048576'/>
    </cpu>
    <power_management>
      <suspend_mem/>
      <suspend_disk/>
      <suspend_hybrid/>
    </power_management>
    <iommu support='no'/>
    <migration_features>
      <live/>
      <uri_transports>
        <uri_transport>tcp</uri_transport>
        <uri_transport>rdma</uri_transport>
      </uri_transports>
    </migration_features>
    <topology>
      <cells num='4'>
        <cell id='0'>
          <memory unit='KiB'>32321396</memory>
          <pages unit='KiB' size='4'>8080349</pages>
          <pages unit='KiB' size='2048'>0</pages>
          <pages unit='KiB' size='1048576'>0</pages>
          <distances>
            <sibling id='0' value='10'/>
            <sibling id='1' value='16'/>
            <sibling id='2' value='16'/>
            <sibling id='3' value='16'/>
          </distances>
          <cpus num='12'>
            <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0,24'/>
            <cpu id='1' socket_id='0' die_id='0' core_id='1' siblings='1,25'/>
            <cpu id='2' socket_id='0' die_id='0' core_id='2' siblings='2,26'/>
            <cpu id='3' socket_id='0' die_id='0' core_id='4' siblings='3,27'/>
            <cpu id='4' socket_id='0' die_id='0' core_id='5' siblings='4,28'/>
            <cpu id='5' socket_id='0' die_id='0' core_id='6' siblings='5,29'/>
            <cpu id='24' socket_id='0' die_id='0' core_id='0' siblings='0,24'/>
            <cpu id='25' socket_id='0' die_id='0' core_id='1' siblings='1,25'/>
            <cpu id='26' socket_id='0' die_id='0' core_id='2' siblings='2,26'/>
            <cpu id='27' socket_id='0' die_id='0' core_id='4' siblings='3,27'/>
            <cpu id='28' socket_id='0' die_id='0' core_id='5' siblings='4,28'/>
            <cpu id='29' socket_id='0' die_id='0' core_id='6' siblings='5,29'/>
          </cpus>
        </cell>
        <cell id='1'>
          <memory unit='KiB'>33026508</memory>
          <pages unit='KiB' size='4'>8256627</pages>
          <pages unit='KiB' size='2048'>0</pages>
          <pages unit='KiB' size='1048576'>0</pages>
          <distances>
            <sibling id='0' value='16'/>
            <sibling id='1' value='10'/>
            <sibling id='2' value='16'/>
            <sibling id='3' value='16'/>
          </distances>
          <cpus num='12'>
            <cpu id='6' socket_id='0' die_id='1' core_id='8' siblings='6,30'/>
            <cpu id='7' socket_id='0' die_id='1' core_id='9' siblings='7,31'/>
            <cpu id='8' socket_id='0' die_id='1' core_id='10' siblings='8,32'/>
            <cpu id='9' socket_id='0' die_id='1' core_id='12' siblings='9,33'/>
            <cpu id='10' socket_id='0' die_id='1' core_id='13' siblings='10,34'/>
            <cpu id='11' socket_id='0' die_id='1' core_id='14' siblings='11,35'/>
            <cpu id='30' socket_id='0' die_id='1' core_id='8' siblings='6,30'/>
            <cpu id='31' socket_id='0' die_id='1' core_id='9' siblings='7,31'/>
            <cpu id='32' socket_id='0' die_id='1' core_id='10' siblings='8,32'/>
            <cpu id='33' socket_id='0' die_id='1' core_id='12' siblings='9,33'/>
            <cpu id='34' socket_id='0' die_id='1' core_id='13' siblings='10,34'/>
            <cpu id='35' socket_id='0' die_id='1' core_id='14' siblings='11,35'/>
          </cpus>
        </cell>
        <cell id='2'>
          <memory unit='KiB'>32986160</memory>
          <pages unit='KiB' size='4'>8246540</pages>
          <pages unit='KiB' size='2048'>0</pages>
          <pages unit='KiB' size='1048576'>0</pages>
          <distances>
            <sibling id='0' value='16'/>
            <sibling id='1' value='16'/>
            <sibling id='2' value='10'/>
            <sibling id='3' value='16'/>
          </distances>
          <cpus num='12'>
            <cpu id='12' socket_id='0' die_id='2' core_id='16' siblings='12,36'/>
            <cpu id='13' socket_id='0' die_id='2' core_id='17' siblings='13,37'/>
            <cpu id='14' socket_id='0' die_id='2' core_id='18' siblings='14,38'/>
            <cpu id='15' socket_id='0' die_id='2' core_id='20' siblings='15,39'/>
            <cpu id='16' socket_id='0' die_id='2' core_id='21' siblings='16,40'/>
            <cpu id='17' socket_id='0' die_id='2' core_id='22' siblings='17,41'/>
            <cpu id='36' socket_id='0' die_id='2' core_id='16' siblings='12,36'/>
            <cpu id='37' socket_id='0' die_id='2' core_id='17' siblings='13,37'/>
            <cpu id='38' socket_id='0' die_id='2' core_id='18' siblings='14,38'/>
            <cpu id='39' socket_id='0' die_id='2' core_id='20' siblings='15,39'/>
            <cpu id='40' socket_id='0' die_id='2' core_id='21' siblings='16,40'/>
            <cpu id='41' socket_id='0' die_id='2' core_id='22' siblings='17,41'/>
          </cpus>
        </cell>
        <cell id='3'>
          <memory unit='KiB'>33023604</memory>
          <pages unit='KiB' size='4'>8255901</pages>
          <pages unit='KiB' size='2048'>0</pages>
          <pages unit='KiB' size='1048576'>0</pages>
          <distances>
            <sibling id='0' value='16'/>
            <sibling id='1' value='16'/>
            <sibling id='2' value='16'/>
            <sibling id='3' value='10'/>
          </distances>
          <cpus num='12'>
            <cpu id='18' socket_id='0' die_id='3' core_id='24' siblings='18,42'/>
            <cpu id='19' socket_id='0' die_id='3' core_id='25' siblings='19,43'/>
            <cpu id='20' socket_id='0' die_id='3' core_id='26' siblings='20,44'/>
            <cpu id='21' socket_id='0' die_id='3' core_id='28' siblings='21,45'/>
            <cpu id='22' socket_id='0' die_id='3' core_id='29' siblings='22,46'/>
            <cpu id='23' socket_id='0' die_id='3' core_id='30' siblings='23,47'/>
            <cpu id='42' socket_id='0' die_id='3' core_id='24' siblings='18,42'/>
            <cpu id='43' socket_id='0' die_id='3' core_id='25' siblings='19,43'/>
            <cpu id='44' socket_id='0' die_id='3' core_id='26' siblings='20,44'/>
            <cpu id='45' socket_id='0' die_id='3' core_id='28' siblings='21,45'/>
            <cpu id='46' socket_id='0' die_id='3' core_id='29' siblings='22,46'/>
            <cpu id='47' socket_id='0' die_id='3' core_id='30' siblings='23,47'/>
          </cpus>
        </cell>
      </cells>
    </topology>
    <cache>
      <bank id='0' level='3' type='both' size='8' unit='MiB' cpus='0-2,24-26'/>
      <bank id='1' level='3' type='both' size='8' unit='MiB' cpus='3-5,27-29'/>
      <bank id='2' level='3' type='both' size='8' unit='MiB' cpus='6-8,30-32'/>
      <bank id='3' level='3' type='both' size='8' unit='MiB' cpus='9-11,33-35'/>
      <bank id='4' level='3' type='both' size='8' unit='MiB' cpus='12-14,36-38'/>
      <bank id='5' level='3' type='both' size='8' unit='MiB' cpus='15-17,39-41'/>
      <bank id='6' level='3' type='both' size='8' unit='MiB' cpus='18-20,42-44'/>
      <bank id='7' level='3' type='both' size='8' unit='MiB' cpus='21-23,45-47'/>
    </cache>
    <secmodel>
      <model>selinux</model>
      <doi>0</doi>
      <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
      <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
    </secmodel>
    <secmodel>
      <model>dac</model>
      <doi>0</doi>
      <baselabel type='kvm'>+107:+107</baselabel>
      <baselabel type='qemu'>+107:+107</baselabel>
    </secmodel>
  </host>

  <guest>
    <os_type>hvm</os_type>
    <arch name='i686'>
      <wordsize>32</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine maxCpus='240' deprecated='yes'>pc-i440fx-rhel7.6.0</machine>
      <machine canonical='pc-i440fx-rhel7.6.0' maxCpus='240' deprecated='yes'>pc</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.6.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.5.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.3.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel7.6.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.4.0</machine>
      <machine maxCpus='710'>pc-q35-rhel9.2.0</machine>
      <machine canonical='pc-q35-rhel9.2.0' maxCpus='710'>q35</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.2.0</machine>
      <machine maxCpus='710'>pc-q35-rhel9.0.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.0.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.1.0</machine>
      <domain type='qemu'/>
      <domain type='kvm'/>
    </arch>
    <features>
      <pae/>
      <nonpae/>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default='on' toggle='no'/>
    </features>
  </guest>

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/libexec/qemu-kvm</emulator>
      <machine maxCpus='240' deprecated='yes'>pc-i440fx-rhel7.6.0</machine>
      <machine canonical='pc-i440fx-rhel7.6.0' maxCpus='240' deprecated='yes'>pc</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.6.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.5.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.3.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel7.6.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.4.0</machine>
      <machine maxCpus='710'>pc-q35-rhel9.2.0</machine>
      <machine canonical='pc-q35-rhel9.2.0' maxCpus='710'>q35</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.2.0</machine>
      <machine maxCpus='710'>pc-q35-rhel9.0.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.0.0</machine>
      <machine maxCpus='710' deprecated='yes'>pc-q35-rhel8.1.0</machine>
      <domain type='qemu'/>
      <domain type='kvm'/>
    </arch>
    <features>
      <acpi default='on' toggle='yes'/>
      <apic default='on' toggle='no'/>
      <cpuselection/>
      <deviceboot/>
      <disksnapshot default='on' toggle='no'/>
    </features>
  </guest>

</capabilities>

Comment 2 Igor Mammedov 2023-06-30 13:20:21 UTC
Do you get warnings if you start QEMU with '-cpu host,flushbyasid=on' ?

Comment 3 Alessandro Rossi 2023-06-30 15:48:35 UTC
Yes, that was one of the first tries, unfortunately

Comment 4 liunana 2023-07-05 05:10:52 UTC
I can reproduce this issue on RHEL9.3 host with '-cpu host,enforce'.

Host:
    5.14.0-332.el9.x86_64
    qemu-kvm-8.0.0-6.el9.x86_64
    Model name:            AMD EPYC 7251 8-Core Processor
Guest:
    5.14.0-332.el9.x86_64

CPUID on host:
# cpuid -r -1 | grep -i 8000000a
   0x8000000a 0x00: eax=0x00000001 ebx=0x00008000 ecx=0x00000000 edx=0x0001bcff


CPUID inside guest:
# cpuid -r -1 | grep -i 8000000a
   0x8000000a 0x00: eax=0x00000001 ebx=0x00000010 ecx=0x00000000 edx=0x1001943b

Comment 5 Igor Mammedov 2023-07-10 11:46:06 UTC
(In reply to Alessandro Rossi from comment #3)
> Yes, that was one of the first tries, unfortunately

then what's the output of query-cpu-model-expansion command for host cpumodel?

Comment 6 Igor Mammedov 2023-07-10 11:58:56 UTC
ps:
" qemu-kvm: warning: host doesn't support requested feature: foo"
typically means that KVM doesn't support passing the flag to guest.

CCing Vitaly who might know a bit more about flushbyasid
(according to git blame on KVM backports to RHEL)

Comment 7 Alessandro Rossi 2023-07-10 12:05:28 UTC
Hi @Igor, 

That's the output, not sure if that's what you are looking for:

[kubealex@pollos tests]$ sudo virsh qemu-monitor-command idm-lab query-cpu-model-expansion
{"id":"libvirt-444","error":{"class":"GenericError","desc":"Parameter 'type' is missing"}}

The point is that 'flushbyasid' is just one of the capabilities that are present on the host and not passed to the guest, but it is actually a blocker for nested virt with ESXi (among others)

Comment 8 Vitaly Kuznetsov 2023-07-10 13:26:42 UTC
(In reply to Igor Mammedov from comment #6)
> ps:
> " qemu-kvm: warning: host doesn't support requested feature: foo"
> typically means that KVM doesn't support passing the flag to guest.
> 
> CCing Vitaly who might know a bit more about flushbyasid
> (according to git blame on KVM backports to RHEL)

I don't think KVM supports nested FLUSHBYASID, see

commit 174a921b6975ef959dd82ee9e8844067a62e3ec1
Author: Krish Sadhukhan <krish.sadhukhan>
Date:   Mon Sep 20 19:51:31 2021 -0400

    nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB

and so you won't see it in svm_set_cpu_caps().

Cc: Max who seems to know something:
https://lore.kernel.org/kvm/357d135f9ed65f4e2970c82ae4e855547db70ad1.camel@redhat.com/
:-)

Comment 10 Igor Mammedov 2023-07-10 14:19:36 UTC
So it's not supported according to comment 9.
What bothers me though is that libvirt reports it in domcaps for host CPU
which might be ok if it's description of host CPU but not if
it is applied to 'host' CPU model in the end.


Alessandro, it's QMP command, example how to use it (or google for other examples):
https://kashyapc.fedorapeople.org/virt/qemu/query-cpu-mode-expansion-QMP-output.txt
PS: put there 'host' cpu model

Comment 11 Alessandro Rossi 2023-07-11 06:00:01 UTC
Here you go Igor:

[kubealex@pollos ~]$ sudo virsh qemu-monitor-command idm-lab --pretty '{"execute": "query-cpu-model-expansion", "arguments": {"model": {"name": "host"}, "type": "full"}}'
{
  "return": {
    "model": {
      "name": "host",
      "props": {
        "vmx-entry-load-rtit-ctl": false,
        "phys-bits": 0,
        "core-id": -1,
        "svme-addr-chk": true,
        "xlevel": 2147483681,
        "cmov": true,
        "ia64": false,
        "hv-version-id-minor": 1,
        "ssb-no": false,
        "aes": true,
        "vmx-apicv-xapic": false,
        "kvm-pv-enforce-cpuid": false,
        "mmx": true,
        "arat": true,
        "rdpid": false,
        "vmx-page-walk-5": false,
        "vmx-page-walk-4": false,
        "vmx-desc-exit": false,
        "gfni": false,
        "ibrs-all": false,
        "pause-filter": true,
        "bus-lock-detect": false,
        "xsavec": true,
        "intel-pt": false,
        "vmx-tsc-scaling": false,
        "vmx-cr8-store-exit": false,
        "hv-xmm-input": false,
        "hv-frequencies": false,
        "tsc-frequency": 0,
        "vmx-rdseed-exit": false,
        "xd": true,
        "x-intel-pt-auto-level": false,
        "hv-vendor-id": "",
        "vmx-eptp-switching": false,
        "hv-syndbg": false,
        "kvm-asyncpf": true,
        "kvm_asyncpf": true,
        "perfctr-core": true,
        "perfctr_core": true,
        "mpx": false,
        "avx512cd": false,
        "pbe": false,
        "decodeassists": false,
        "vmx-exit-load-efer": false,
        "vmx-exit-clear-bndcfgs": false,
        "sse4.1": true,
        "sse4-1": true,
        "sse4_1": true,
        "family": 23,
        "legacy-cache": true,
        "intel-pt-lip": false,
        "vmx-vmwrite-vmexit-fields": false,
        "vmx-vnmi": false,
        "kvm-asyncpf-int": false,
        "vmx-true-ctls": false,
        "host-phys-bits-limit": 48,
        "vmx-ept-execonly": false,
        "vmx-exit-save-efer": false,
        "vmx-invept-all-context": false,
        "vmware-cpuid-freq": true,
        "wbnoinvd": false,
        "avx512f": false,
        "xcrypt": false,
        "hv-runtime": false,
        "hv-stimer-direct": false,
        "mce": true,
        "mca": true,
        "msr": true,
        "sgx": false,
        "thread-id": -1,
        "vmx-exit-load-pat": false,
        "vmx-intr-exit": false,
        "min-level": 13,
        "vmx-flexpriority": false,
        "xgetbv1": true,
        "cid": false,
        "hv-relaxed": false,
        "sgx-exinfo": false,
        "avx512-bf16": false,
        "avx512-fp16": false,
        "ds": false,
        "hv-crash": false,
        "fxsr": true,
        "vmx-cr8-load-exit": false,
        "hv-version-id-sbranch": 0,
        "hv-version-id-snumber": 0,
        "xsaveopt": true,
        "arch-lbr": false,
        "vmx-apicv-vid": false,
        "vmx-exit-save-pat": false,
        "tsx-ctrl": false,
        "xtpr": false,
        "vmx-ple": false,
        "hv-evmcs": false,
        "avx512-vpopcntdq": false,
        "hv-version-id-spack": 0,
        "phe": false,
        "avx512vl": false,
        "extapic": false,
        "vmx-vmfunc": false,
        "3dnowprefetch": true,
        "vmx-activity-shutdown": false,
        "sgx1": false,
        "sgx2": false,
        "avx512vbmi2": false,
        "cr8legacy": true,
        "vmx-encls-exit": false,
        "stibp": false,
        "vmx-msr-bitmap": false,
        "cpuid-0xb": true,
        "xcrypt-en": false,
        "vmx-mwait-exit": false,
        "kvm_pv_eoi": true,
        "vmx-pml": false,
        "apic-id": 4294967295,
        "vmx-nmi-exit": false,
        "vmx-invept-single-context-noglobals": false,
        "amx-tile": false,
        "pn": false,
        "rsba": false,
        "dca": false,
        "vmx-unrestricted-guest": false,
        "vendor": "AuthenticAMD",
        "hv-ipi": false,
        "vmx-cr3-store-noexit": false,
        "pku": false,
        "pks": false,
        "smx": false,
        "cmp-legacy": true,
        "cmp_legacy": true,
        "node-id": -1,
        "avx512-4fmaps": false,
        "vmcb-clean": true,
        "vmcb_clean": true,
        "hle": false,
        "amd-no-ssb": false,
        "3dnowext": false,
        "avx-vnni": false,
        "npt": true,
        "sgxlc": false,
        "rdctl-no": true,
        "vmx-invvpid": false,
        "memory": "/machine/unattached/system[0]",
        "clwb": false,
        "lbrv": true,
        "adx": true,
        "ss": false,
        "pni": true,
        "tsx-ldtrk": false,
        "host-cache-info": false,
        "svm-lock": false,
        "svm_lock": false,
        "pfthreshold": true,
        "smap": true,
        "smep": true,
        "vmx-invpcid-exit": false,
        "amx-int8": false,
        "x2apic": true,
        "sgx-edeccssa": false,
        "avx512vnni": false,
        "avx512vbmi": false,
        "vmx-apicv-x2apic": false,
        "hv-stimer": false,
        "kvm-pv-sched-yield": true,
        "vmx-invlpg-exit": false,
        "x-hv-synic-kvm-only": true,
        "vmx-invvpid-all-context": false,
        "i64": true,
        "vmx-activity-hlt": false,
        "flushbyasid": false,
        "f16c": true,
        "vmx-exit-ack-intr": false,
        "ace2-en": false,
        "pae": true,
        "pat": true,
        "sse": true,
        "die-id": -1,
        "vmx-tsc-offset": false,
        "phe-en": false,
        "kvm-nopiodelay": true,
        "kvm_nopiodelay": true,
        "tm": false,
        "hv-enforce-cpuid": false,
        "kvmclock-stable-bit": true,
        "vmx-rdtsc-exit": false,
        "hypervisor": true,
        "vmx-rdtscp-exit": false,
        "socket-id": -1,
        "mds-no": true,
        "pcommit": false,
        "vmx-vpid": false,
        "syscall": true,
        "level": 13,
        "avx512dq": false,
        "x-migrate-smi-count": false,
        "svm": true,
        "full-cpuid-auto-level": true,
        "hv-avic": false,
        "hv-reset": false,
        "invtsc": false,
        "vmx-monitor-exit": false,
        "sse2": true,
        "vmx-wbinvd-exit": false,
        "ssbd": false,
        "sse3": true,
        "est": false,
        "kvm-poll-control": true,
        "kvm_poll_control": true,
        "avx512ifma": false,
        "tm2": false,
        "start-powered-off": false,
        "kvm-pv-eoi": true,
        "kvm-pv-ipi": true,
        "hv-emsr-bitmap": false,
        "cx8": true,
        "vmx-invvpid-single-addr": false,
        "waitpkg": false,
        "sgx-tokenkey": false,
        "cldemote": false,
        "vmx-ept": false,
        "hv-tlbflush-direct": false,
        "xfd": false,
        "hv-reenlightenment": false,
        "kvm-mmu": false,
        "kvm_mmu": false,
        "sse4.2": true,
        "sse4-2": true,
        "sse4_2": true,
        "pge": true,
        "fill-mtrr-mask": true,
        "avx512bitalg": false,
        "vmx-entry-load-bndcfgs": false,
        "pdcm": false,
        "nodeid_msr": false,
        "vmx-exit-clear-rtit-ctl": false,
        "hv-apicv": false,
        "model": 1,
        "movbe": true,
        "nrip-save": true,
        "nrip_save": true,
        "vmx-pause-exit": false,
        "ssse3": true,
        "sse4a": true,
        "kvm-msi-ext-dest-id": false,
        "kvm_pv_unhalt": true,
        "sgx-debug": false,
        "invpcid": false,
        "pdpe1gb": true,
        "sgx-mode64": false,
        "tsc-deadline": true,
        "skip-l1dfl-vmentry": true,
        "vmx-exit-load-perf-global-ctrl": false,
        "fma": true,
        "cx16": true,
        "fzrm": false,
        "de": true,
        "hv-version-id-build": 7100,
        "enforce": false,
        "stepping": 2,
        "xsave": true,
        "lbr-fmt": 18446744073709551552,
        "lbr_fmt": 18446744073709551552,
        "clflush": true,
        "skinit": false,
        "tsc": true,
        "tce": false,
        "kvm_asyncpf_int": false,
        "fpu": true,
        "ds-cpl": false,
        "ibs": false,
        "ds_cpl": false,
        "fma4": false,
        "host-phys-bits": true,
        "sgx-kss": false,
        "vmx-exit-nosave-debugctl": false,
        "hv-version-id-major": 6,
        "vmx-invept": false,
        "la57": false,
        "osvw": true,
        "migratable": true,
        "check": true,
        "hv-spinlocks": 4294967295,
        "vmx-eptad": false,
        "vmx-entry-noload-debugctl": false,
        "pmu": true,
        "pmm": false,
        "apic": true,
        "spec-ctrl": false,
        "vmx-posted-intr": false,
        "vmx-apicv-register": false,
        "min-xlevel2": 0,
        "tsc-adjust": true,
        "tsc_adjust": true,
        "kvm-steal-time": true,
        "kvm_steal_time": true,
        "avx512-vp2intersect": false,
        "kvmclock": true,
        "vmx-zero-len-inject": false,
        "l3-cache": true,
        "pschange-mc-no": true,
        "v-vmsave-vmload": true,
        "sgx-provisionkey": false,
        "vmx-rdrand-exit": false,
        "lwp": false,
        "hv-passthrough": false,
        "amd-ssbd": false,
        "ibpb": true,
        "ibrs": false,
        "xop": false,
        "core-capability": false,
        "avx": true,
        "vmx-invept-single-context": false,
        "movdiri": false,
        "avx512bw": false,
        "acpi": false,
        "ace2": false,
        "fsgsbase": true,
        "hv-vapic": false,
        "vmx-ept-2mb": false,
        "vmx-ept-1gb": false,
        "ht": false,
        "vmx-io-exit": false,
        "nx": true,
        "pclmulqdq": true,
        "mmxext": true,
        "popcnt": true,
        "vaes": false,
        "serialize": false,
        "xsaves": true,
        "movdir64b": false,
        "vmx-shadow-vmcs": false,
        "tcg-cpuid": true,
        "lm": true,
        "vmx-exit-save-preemption-timer": false,
        "vmx-entry-load-pat": false,
        "fsrs": false,
        "fsrm": false,
        "fsrc": false,
        "vmx-entry-load-perf-global-ctrl": false,
        "vmx-io-bitmap": false,
        "vmx-store-lma": false,
        "umip": false,
        "vmx-movdr-exit": false,
        "avx2": true,
        "pse": true,
        "avic": false,
        "sep": true,
        "pclmuldq": true,
        "vmx-cr3-load-noexit": false,
        "virt-ssbd": true,
        "x-hv-max-vps": -1,
        "nodeid-msr": false,
        "md-clear": false,
        "split-lock-detect": false,
        "kvm": true,
        "misalignsse": true,
        "min-xlevel": 2147483681,
        "realized": false,
        "kvm-pv-unhalt": true,
        "bmi2": true,
        "bmi1": true,
        "xen-vapic": false,
        "tsc-scale": true,
        "tsc_scale": true,
        "topoext": false,
        "amd-stibp": false,
        "hv-vpindex": false,
        "hv-no-nonarch-coresharing": "off",
        "ucode-rev": 0,
        "vmx-preemption-timer": false,
        "xlevel2": 0,
        "vmx-entry-load-pkrs": false,
        "clflushopt": true,
        "vmx-vnmi-pending": false,
        "kvm-no-smi-migration": false,
        "monitor": false,
        "vmx-vintr-pending": false,
        "avx512er": false,
        "full-width-write": false,
        "pmm-en": false,
        "taa-no": false,
        "pcid": false,
        "vgif": true,
        "vmx-secondary-ctls": false,
        "vmx-xsaves": false,
        "arch-capabilities": true,
        "x-vendor-cpuid-only": false,
        "clzero": true,
        "3dnow": false,
        "erms": false,
        "x-force-features": false,
        "vmx-entry-ia32e-mode": false,
        "lahf-lm": true,
        "lahf_lm": true,
        "vmx-ins-outs": false,
        "vpclmulqdq": false,
        "xstore": false,
        "fxsr-opt": true,
        "hv-synic": false,
        "fxsr_opt": true,
        "sgx-aex-notify": false,
        "rtm": false,
        "kvm-hint-dedicated": false,
        "amx-bf16": false,
        "lmce": false,
        "hv-time": false,
        "perfctr-nb": false,
        "perfctr_nb": false,
        "hv-tlbflush": false,
        "ffxsr": true,
        "rdrand": true,
        "rdseed": true,
        "avx512-4vnniw": false,
        "vme": true,
        "vmx": false,
        "dtes64": false,
        "mtrr": true,
        "rdtscp": true,
        "xsaveerptr": true,
        "pse36": true,
        "kvm-pv-tlb-flush": true,
        "vmx-activity-wait-sipi": false,
        "tbm": false,
        "vmx-rdpmc-exit": false,
        "wdt": false,
        "vmx-entry-load-efer": false,
        "level-func7": 0,
        "vmx-mtf": false,
        "hv-tlbflush-ext": false,
        "pause_filter": true,
        "model-id": "AMD EPYC 7401P 24-Core Processor               ",
        "sha-ni": true,
        "vmx-exit-load-pkrs": false,
        "abm": true,
        "vmx-ept-advanced-exitinfo": false,
        "avx512pf": false,
        "vmx-hlt-exit": false,
        "xstore-en": false
      }
    }
  },
  "id": "libvirt-15242"
}

Comment 12 Igor Mammedov 2023-07-14 07:35:58 UTC
'host' cpu model has flushbyasid=false which is correct
considering it's not supported on kvm side.

As for 'virsh capabilities' showing flushbyasid, according to docs
it is not a description of cpu model in QEMU sense but rather a description of
host's physical CPU.

I'm closing BZ for now.
If there is a usecase that requires flushbyasid support within guest,
please reopen BZ and provide a justification why it's needed.


Note You need to log in before you can comment on or make changes to this bug.