Skip to content

Commit 66f61c9

Browse files
committed
KVM: x86: fix return value for reserved EFER
Commit 1198849 ("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 <[email protected]> Fixes: 1198849 ("KVM: x86: Skip EFER vs. guest CPUID checks for host-initiated writes") Cc: Sean Christopherson <[email protected]> Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 883d25e commit 66f61c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/x86.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ static int set_efer(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
12981298
u64 efer = msr_info->data;
12991299

13001300
if (efer & efer_reserved_bits)
1301-
return false;
1301+
return 1;
13021302

13031303
if (!msr_info->host_initiated) {
13041304
if (!__kvm_valid_efer(vcpu, efer))

0 commit comments

Comments
 (0)