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:44:44 -0700 |
commit | 312de8445d968d1010ff81ea708fe1762db60ffc (patch) | |
tree | 26391d08210bc8a3b4e271f0070c6661c4a6f7cf /arch | |
parent | 41667c1c6f6a26d86b4d018ad72cea46184fa594 (diff) | |
download | linux-stable-312de8445d968d1010ff81ea708fe1762db60ffc.tar.gz linux-stable-312de8445d968d1010ff81ea708fe1762db60ffc.tar.bz2 linux-stable-312de8445d968d1010ff81ea708fe1762db60ffc.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')
-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 0bbb21a49082..03b5c5803b5c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -1288,7 +1288,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)) |