Skip to content
  • Radim Krčmář's avatar
    KVM: cpuid: recompute CPUID 0xD.0:EBX,ECX · e08e8336
    Radim Krčmář authored
    
    
    We reused host EBX and ECX, but KVM might not support all features;
    emulated XSAVE size should be smaller.
    
    EBX depends on unknown XCR0, so we default to ECX.
    
    SDM CPUID (EAX = 0DH, ECX = 0):
     EBX Bits 31-00: Maximum size (bytes, from the beginning of the
         XSAVE/XRSTOR save area) required by enabled features in XCR0. May
         be different than ECX if some features at the end of the XSAVE save
         area are not enabled.
    
     ECX Bit 31-00: Maximum size (bytes, from the beginning of the
         XSAVE/XRSTOR save area) of the XSAVE/XRSTOR save area required by
         all supported features in the processor, i.e all the valid bit
         fields in XCR0.
    
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    Tested-by: default avatarWanpeng Li <wanpeng.li@linux.intel.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    e08e8336