OSDN Git Service

KVM: x86: fix return value for reserved EFER
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2019 19:52:46 +0000 (21:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jun 2019 10:23:51 +0000 (12:23 +0200)
commit603212bdc59cc2b978fa15035d39393ad32c8b0b
treed7b493c2233eb582fcc7628de0e087a1569680ea
parent75d63b131b73fefd9c1ef81e2ac96661c38ebba1
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>
arch/x86/kvm/x86.c