mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
KVM: x86: fix return value for reserved EFER
Commit11988499e6
("KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes", 2019-04-02) introduced a "return false" in a function returning int, and anyway set_efer has a "nonzero on error" conventon so it should be returning 1. Reported-by: Pavel Machek <pavel@denx.de> Fixes:11988499e6
("KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes") Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
883d25e70b
commit
66f61c9288
@ -1298,7 +1298,7 @@ static int set_efer(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
u64 efer = msr_info->data;
|
||||
|
||||
if (efer & efer_reserved_bits)
|
||||
return false;
|
||||
return 1;
|
||||
|
||||
if (!msr_info->host_initiated) {
|
||||
if (!__kvm_valid_efer(vcpu, efer))
|
||||
|
Loading…
Reference in New Issue
Block a user