diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-05-24 21:52:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-31 06:46:00 -0700 |
commit | 432ec4fa6cd204692ce0ce6a7bfcf0f5ec0b6633 (patch) | |
tree | 94180172734116b19d6097f1f8e6df782f466961 /arch/x86 | |
parent | 70d33cce97f01c79f2aa951684cf2116ec9ba1c5 (diff) | |
download | linux-rpi3-432ec4fa6cd204692ce0ce6a7bfcf0f5ec0b6633.tar.gz linux-rpi3-432ec4fa6cd204692ce0ce6a7bfcf0f5ec0b6633.tar.bz2 linux-rpi3-432ec4fa6cd204692ce0ce6a7bfcf0f5ec0b6633.zip |
KVM: x86: fix return value for reserved EFER
commit 66f61c92889ff3ca365161fb29dd36d6354682ba upstream.
Commit 11988499e62b ("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: 11988499e62b ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index d0eb37c069b8..be4ba0975a0f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1188,7 +1188,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)) |