]> 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)
commit38a8b1754d3dfbc3f86d7b251412b99a923e5f2e
tree5ea3217f5093514061ef42d6cf8557a2ed50ad96
parentb13bcc8b21c160edb2fe16dbb92ba1f068737323
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