]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
x86/kvm/fpu: Remove kvm_vcpu_arch.guest_supported_xcr0
authorLeonardo Bras <leobras@redhat.com>
Thu, 17 Feb 2022 05:30:30 +0000 (02:30 -0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Feb 2022 15:06:49 +0000 (10:06 -0500)
commit988896bb61827345c6d074dd5f2af1b7b008193f
tree5737b7835942397ee9b1a095498600191025ee18
parentad856280ddea3401e1f5060ef20e6de9f6122c76
x86/kvm/fpu: Remove kvm_vcpu_arch.guest_supported_xcr0

kvm_vcpu_arch currently contains the guest supported features in both
guest_supported_xcr0 and guest_fpu.fpstate->user_xfeatures field.

Currently both fields are set to the same value in
kvm_vcpu_after_set_cpuid() and are not changed anywhere else after that.

Since it's not good to keep duplicated data, remove guest_supported_xcr0.

To keep the code more readable, introduce kvm_guest_supported_xcr()
and kvm_guest_supported_xfd() to replace the previous usages of
guest_supported_xcr0.

Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220217053028.96432-3-leobras@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/cpuid.c
arch/x86/kvm/x86.c