kvm: x86: Add has_payload and payload to kvm_queued_exception
authorJim Mattson <jmattson@google.com>
Tue, 16 Oct 2018 21:29:19 +0000 (14:29 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Oct 2018 22:30:22 +0000 (00:30 +0200)
commitc851436a34cad09388f1303e11ccb6b9420e5692
treeda3852939ce2812d4294f36d9ab369d59a04310a
parentbba9ce58d9cb7ba9e121627108eca986760ad0e8
kvm: x86: Add has_payload and payload to kvm_queued_exception

The payload associated with a #PF exception is the linear address of
the fault to be loaded into CR2 when the fault is delivered. The
payload associated with a #DB exception is a mask of the DR6 bits to
be set (or in the case of DR6.RTM, cleared) when the fault is
delivered. Add fields has_payload and payload to kvm_queued_exception
to track payloads for pending exceptions.

The new fields are introduced here, but for now, they are just cleared.

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/include/asm/kvm_host.h
arch/x86/kvm/x86.c