From: Alexander Graf Date: Fri, 25 Sep 2020 14:34:15 +0000 (+0200) Subject: KVM: x86: Return -ENOENT on unimplemented MSRs X-Git-Tag: v5.10-rc1~21^2~63 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=90218e434c4118fd7bba7ea7b073e6c6454140a2;p=linux-block.git KVM: x86: Return -ENOENT on unimplemented MSRs When we find an MSR that we can not handle, bubble up that error code as MSR error return code. Follow up patches will use that to expose the fact that an MSR is not handled by KVM to user space. Suggested-by: Aaron Lewis Signed-off-by: Alexander Graf Message-Id: <20200925143422.21718-2-graf@amazon.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a547b0052396..43173382f02f 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -272,7 +272,7 @@ static int kvm_msr_ignored_check(struct kvm_vcpu *vcpu, u32 msr, } else { vcpu_debug_ratelimited(vcpu, "unhandled %s: 0x%x data 0x%llx\n", op, msr, data); - return 1; + return -ENOENT; } }