diff options
author | Oliver Upton <oupton@google.com> | 2020-02-07 13:36:06 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-02-12 14:34:10 +0300 |
commit | a06230b62b898e51cfb1de256b2042a09a691f58 (patch) | |
tree | 0e93155a12a1ab62d71ec6a3dad55576bc621ddb /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 684c0422da71da0cd81319c90b8099b563b13da4 (diff) | |
download | linux-a06230b62b898e51cfb1de256b2042a09a691f58.tar.xz |
KVM: x86: Deliver exception payload on KVM_GET_VCPU_EVENTS
KVM allows the deferral of exception payloads when a vCPU is in guest
mode to allow the L1 hypervisor to intercept certain events (#PF, #DB)
before register state has been modified. However, this behavior is
incompatible with the KVM_{GET,SET}_VCPU_EVENTS ABI, as userspace
expects register state to have been immediately modified. Userspace may
opt-in for the payload deferral behavior with the
KVM_CAP_EXCEPTION_PAYLOAD per-VM capability. As such,
kvm_multiple_exception() will immediately manipulate guest registers if
the capability hasn't been requested.
Since the deferral is only necessary if a userspace ioctl were to be
serviced at the same as a payload bearing exception is recognized, this
behavior can be relaxed. Instead, opportunistically defer the payload
from kvm_multiple_exception() and deliver the payload before completing
a KVM_GET_VCPU_EVENTS ioctl.
Signed-off-by: Oliver Upton <oupton@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions