From: Vitaly Kuznetsov Date: Fri, 21 May 2021 09:51:52 +0000 (+0200) Subject: KVM: x86: hyper-v: Inverse the default in hv_check_msr_access() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d66bfa36f9edc5ca8c83206ab39d09091623104e;p=linux.git KVM: x86: hyper-v: Inverse the default in hv_check_msr_access() Access to all MSRs is now properly checked. To avoid 'forgetting' to properly check access to new MSRs in the future change the default to 'false' meaning 'no access'. No functional change intended. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini Message-Id: <20210521095204.2161214-19-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 3bf00a9299dde..db735692fc62c 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -1274,7 +1274,7 @@ static bool hv_check_msr_access(struct kvm_vcpu_hv *hv_vcpu, u32 msr) break; } - return true; + return false; } static int kvm_hv_set_msr_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data,