]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64
authorSean Christopherson <seanjc@google.com>
Fri, 5 Feb 2021 01:24:58 +0000 (17:24 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Feb 2021 13:17:05 +0000 (08:17 -0500)
commit472da95903f3926d93921f5bfab71f2ee6b71c4c
tree6267b36d60289f36b696f5e88738a480a4ef4b8c
parent4950fa66e341be7cec2d2deecc085edd002c079d
KVM: x86: Restore all 64 bits of DR6 and DR7 during RSM on x86-64

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: 2b1d512e33b9 ("KVM: x86: save/load state on SMM switch")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210205012458.3872687-3-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/emulate.c