KVM: x86: Remove a redundant guest cpuid check in kvm_set_cr4()
authorRobert Hoo <robert.hu@linux.intel.com>
Wed, 8 Mar 2023 07:29:36 +0000 (15:29 +0800)
committerSean Christopherson <seanjc@google.com>
Thu, 23 Mar 2023 23:08:29 +0000 (16:08 -0700)
commit99b30869804ea59d9596cdbefa5cc3aabd588521
tree16e728c6abcbdc94e4e28a0b3cea7a14484e0c06
parent65966aaca18a5cbf42ac22234cb9cbbf60a4d33c
KVM: x86: Remove a redundant guest cpuid check in kvm_set_cr4()

If !guest_cpuid_has(vcpu, X86_FEATURE_PCID), CR4.PCIDE would have been in
vcpu->arch.cr4_guest_rsvd_bits and failed earlier kvm_is_valid_cr4() check.
Remove this meaningless check.

Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Fixes: 4683d758f48e ("KVM: x86: Supplement __cr4_reserved_bits() with X86_FEATURE_PCID check")
Link: https://lore.kernel.org/r/20230308072936.1293101-1-robert.hu@intel.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c