]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/kvm/cpuid.c
KVM: cpuid: set CPUID(EAX=0xd,ECX=1).EBX correctly
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Dec 2014 13:38:01 +0000 (14:38 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 Dec 2014 12:57:17 +0000 (13:57 +0100)
commit412a3c411e6df54179f300e8d8d6247327865a2d
treee8577d48dd317052835aaddeac35a94eb2bf45b4
parent55412b2eda2b783ef37316eb06ba91fa63ae049d
KVM: cpuid: set CPUID(EAX=0xd,ECX=1).EBX correctly

This is the size of the XSAVES area.  This starts providing guest support
for XSAVES (with no support yet for supervisor states, i.e. XSS == 0
always in guests for now).

Wanpeng Li suggested testing XSAVEC as well as XSAVES, since in practice
no real processor exists that only has one of them, and there is no
other way for userspace programs to compute the area of the XSAVEC
save area.  CPUID(EAX=0xd,ECX=1).EBX provides an upper bound.

Suggested-by: Radim Krčmář <rkrcmar@redhat.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
Tested-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c