diff options
author | Jim Mattson <jmattson@google.com> | 2020-06-03 16:56:21 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-08 16:21:45 -0400 |
commit | 1aa561b1a4c0ae2a9a9b9c21a84b5ca66b4775d8 (patch) | |
tree | b862f3b9d330550b58db48e9775167cc43137667 /include/uapi/linux | |
parent | 80a1684c0161088710398d84a7cdd683c5d88228 (diff) | |
download | linux-stable-1aa561b1a4c0ae2a9a9b9c21a84b5ca66b4775d8.tar.gz linux-stable-1aa561b1a4c0ae2a9a9b9c21a84b5ca66b4775d8.tar.bz2 linux-stable-1aa561b1a4c0ae2a9a9b9c21a84b5ca66b4775d8.zip |
kvm: x86: Add "last CPU" to some KVM_EXIT information
More often than not, a failed VM-entry in an x86 production
environment is induced by a defective CPU. To help identify the bad
hardware, include the id of the last logical CPU to run a vCPU in the
information provided to userspace on a KVM exit for failed VM-entry or
for KVM internal errors not associated with emulation. The presence of
this additional information is indicated by a new capability,
KVM_CAP_LAST_CPU.
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Message-Id: <20200603235623.245638-5-jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r-- | include/uapi/linux/kvm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 4fdf30316582..ff9b335620d0 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -289,6 +289,7 @@ struct kvm_run { /* KVM_EXIT_FAIL_ENTRY */ struct { __u64 hardware_entry_failure_reason; + __u32 cpu; } fail_entry; /* KVM_EXIT_EXCEPTION */ struct { @@ -1031,6 +1032,7 @@ struct kvm_ppc_resize_hpt { #define KVM_CAP_PPC_SECURE_GUEST 181 #define KVM_CAP_HALT_POLL 182 #define KVM_CAP_ASYNC_PF_INT 183 +#define KVM_CAP_LAST_CPU 184 #ifdef KVM_CAP_IRQ_ROUTING |