]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Stuff save->dr6 at during VMSA sync, not at RESET/INIT
authorSean Christopherson <seanjc@google.com>
Tue, 13 Jul 2021 16:33:10 +0000 (09:33 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Aug 2021 15:01:56 +0000 (11:01 -0400)
commit6cfc0fc133cf41461c5ee1da66ea90098062cd3d
tree48081c2c3a2ba01afe4b1fc36699a95945788d06
parent25b76b2dcc97d330062922a0d9d588b99eea3741
KVM: SVM: Stuff save->dr6 at during VMSA sync, not at RESET/INIT

Move code to stuff vmcb->save.dr6 to its architectural init value from
svm_vcpu_reset() into sev_es_sync_vmsa().  Except for protected guests,
a.k.a. SEV-ES guests, vmcb->save.dr6 is set during VM-Enter, i.e. the
extra write is unnecessary.  For SEV-ES, stuffing save->dr6 handles a
theoretical case where the VMSA could be encrypted before the first
KVM_RUN.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210713163324.627647-33-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c