]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: Add payload operands to kvm_multiple_exception
authorJim Mattson <jmattson@google.com>
Tue, 16 Oct 2018 21:29:21 +0000 (14:29 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Oct 2018 17:07:42 +0000 (19:07 +0200)
commit96f93cb7a20329c6bd692169e07d8bf78265fb34
tree5ea3217f5093514061ef42d6cf8557a2ed50ad96
parentdc77f5a59a9550dde97e691e65ea1b0aa9bb8b3f
kvm: x86: Add payload operands to kvm_multiple_exception

kvm_multiple_exception now takes two additional operands: has_payload
and payload, so that updates to CR2 (and DR6 under VMX) can be delayed
until the exception is delivered. This is necessary to properly
emulate VMX or SVM hardware behavior for nested virtualization.

The new behavior is triggered by
vcpu->kvm->arch.exception_payload_enabled, which will (later) be set
by a new per-VM capability, KVM_CAP_EXCEPTION_PAYLOAD.

Reported-by: Jim Mattson <jmattson@google.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c