Patch "KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64" has been added to the 5.11-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: Restore all 64 bits of DR6 and DR7 during RSM on x86-64

to the 5.11-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-restore-all-64-bits-of-dr6-and-dr7-during-rs.patch
and it can be found in the queue-5.11 subdirectory.

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



commit 15b1f677411c16e072133a9621adb506b446836c
Author: Sean Christopherson <seanjc@xxxxxxxxxx>
Date:   Thu Feb 4 17:24:58 2021 -0800

    KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64
    
    [ Upstream commit 2644312052d54e2e7543c7d186899a36ed22f0bf ]
    
    Restore the full 64-bit values of DR6 and DR7 when emulating RSM on
    x86-64, as defined by both Intel's SDM and AMD's APM.
    
    Note, bits 63:32 of DR6 and DR7 are reserved, so this is a glorified nop
    unless the SMM handler is poking into SMRAM, which it most definitely
    shouldn't be doing since both Intel and AMD list the DR6 and DR7 fields
    as read-only.
    
    Fixes: 660a5d517aaa ("KVM: x86: save/load state on SMM switch")
    Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
    Message-Id: <20210205012458.3872687-3-seanjc@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 66a08322988f2..1453b9b794425 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2564,12 +2564,12 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt,
 	ctxt->_eip   = GET_SMSTATE(u64, smstate, 0x7f78);
 	ctxt->eflags = GET_SMSTATE(u32, smstate, 0x7f70) | X86_EFLAGS_FIXED;
 
-	val = GET_SMSTATE(u32, smstate, 0x7f68);
+	val = GET_SMSTATE(u64, smstate, 0x7f68);
 
 	if (ctxt->ops->set_dr(ctxt, 6, (val & DR6_VOLATILE) | DR6_FIXED_1))
 		return X86EMUL_UNHANDLEABLE;
 
-	val = GET_SMSTATE(u32, smstate, 0x7f60);
+	val = GET_SMSTATE(u64, smstate, 0x7f60);
 
 	if (ctxt->ops->set_dr(ctxt, 7, (val & DR7_VOLATILE) | DR7_FIXED_1))
 		return X86EMUL_UNHANDLEABLE;



[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