Patch "KVM: x86: emulating RDPID failure shall return #UD rather than #GP" has been added to the 5.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: x86: emulating RDPID failure shall return #UD rather than #GP

to the 5.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-x86-emulating-rdpid-failure-shall-return-ud-rath.patch
and it can be found in the queue-5.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 67428a005dde22508783e0756569f356567bc9e6
Author: Robert Hoo <robert.hu@xxxxxxxxxxxxxxx>
Date:   Fri Aug 28 10:23:42 2020 +0800

    KVM: x86: emulating RDPID failure shall return #UD rather than #GP
    
    [ Upstream commit a9e2e0ae686094571378c72d8146b5a1a92d0652 ]
    
    Per Intel's SDM, RDPID takes a #UD if it is unsupported, which is more or
    less what KVM is emulating when MSR_TSC_AUX is not available.  In fact,
    there are no scenarios in which RDPID is supposed to #GP.
    
    Fixes: fb6d4d340e ("KVM: x86: emulate RDPID")
    Signed-off-by: Robert Hoo <robert.hu@xxxxxxxxxxxxxxx>
    Message-Id: <1598581422-76264-1-git-send-email-robert.hu@xxxxxxxxxxxxxxx>
    Reviewed-by: Jim Mattson <jmattson@xxxxxxxxxx>
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 2f6510de6b0c0..85111cd0adcd0 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3606,7 +3606,7 @@ static int em_rdpid(struct x86_emulate_ctxt *ctxt)
 	u64 tsc_aux = 0;
 
 	if (ctxt->ops->get_msr(ctxt, MSR_TSC_AUX, &tsc_aux))
-		return emulate_gp(ctxt, 0);
+		return emulate_ud(ctxt);
 	ctxt->dst.val = tsc_aux;
 	return X86EMUL_CONTINUE;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux