diff options
author | Sean Christopherson <sean.j.christopherson@intel.com> | 2020-10-07 03:44:16 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-11-15 15:49:08 +0100 |
commit | ee69c92bac61f4379e97f40b259a1c1257e5987f (patch) | |
tree | d7f198368666d947be1c8f16a6f9233dc1739ded /arch/x86/kvm/x86.h | |
parent | KVM: x86: Move vendor CR4 validity check to dedicated kvm_x86_ops hook (diff) | |
download | linux-ee69c92bac61f4379e97f40b259a1c1257e5987f.tar.xz linux-ee69c92bac61f4379e97f40b259a1c1257e5987f.zip |
KVM: x86: Return bool instead of int for CR4 and SREGS validity checks
Rework the common CR4 and SREGS checks to return a bool instead of an
int, i.e. true/false instead of 0/-EINVAL, and add "is" to the name to
clarify the polarity of the return value (which is effectively inverted
by this change).
No functional changed intended.
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20201007014417.29276-6-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.h')
-rw-r--r-- | arch/x86/kvm/x86.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index e7ca622a468f..764c967a1993 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -369,7 +369,7 @@ static inline bool kvm_dr6_valid(u64 data) void kvm_load_guest_xsave_state(struct kvm_vcpu *vcpu); void kvm_load_host_xsave_state(struct kvm_vcpu *vcpu); int kvm_spec_ctrl_test_value(u64 value); -int kvm_valid_cr4(struct kvm_vcpu *vcpu, unsigned long cr4); +bool kvm_is_valid_cr4(struct kvm_vcpu *vcpu, unsigned long cr4); bool kvm_vcpu_exit_request(struct kvm_vcpu *vcpu); int kvm_handle_memory_failure(struct kvm_vcpu *vcpu, int r, struct x86_exception *e); |