]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: keep DR6 synchronized with vcpu->arch.dr6
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 4 May 2020 15:28:25 +0000 (11:28 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 8 May 2020 11:43:47 +0000 (07:43 -0400)
commit6cc6780a5a2c0d3f522c46d61f23c2267a73e770
tree1cecb32b31bc5911feca9f5cef5785e7544fc31d
parent6c2fc7ac867a41b3595742e9df29187752141db0
KVM: SVM: keep DR6 synchronized with vcpu->arch.dr6

kvm_x86_ops.set_dr6 is only ever called with vcpu->arch.dr6 as the
second argument.  Ensure that the VMCB value is synchronized to
vcpu->arch.dr6 on #DB (both "normal" and nested) and nested vmentry, so
that the current value of DR6 is always available in vcpu->arch.dr6.
The get_dr6 callback can just access vcpu->arch.dr6 and becomes redundant.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/nested.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/x86.c