diff options
author | David Edmondson <david.edmondson@oracle.com> | 2021-09-20 11:37:36 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-25 06:48:24 -0400 |
commit | e615e355894e619785af81479ad6f5a05a8a2e3f (patch) | |
tree | 0d24a255c3fa70878b612df777f07dd602c40d43 /include/uapi/linux/kvm.h | |
parent | 0a62a0319abb92c89a4f91c2dbfcaee4e47f37ca (diff) | |
download | lwn-e615e355894e619785af81479ad6f5a05a8a2e3f.tar.gz lwn-e615e355894e619785af81479ad6f5a05a8a2e3f.zip |
KVM: x86: On emulation failure, convey the exit reason, etc. to userspace
Should instruction emulation fail, include the VM exit reason, etc. in
the emulation_failure data passed to userspace, in order that the VMM
can report it as a debugging aid when describing the failure.
Suggested-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: David Edmondson <david.edmondson@oracle.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210920103737.2696756-4-david.edmondson@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/uapi/linux/kvm.h')
-rw-r--r-- | include/uapi/linux/kvm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 2c8aa8d4dac1..78f0719cc2a3 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -398,6 +398,11 @@ struct kvm_run { * "ndata" is correct, that new fields are enumerated in "flags", * and that each flag enumerates fields that are 64-bit aligned * and sized (so that ndata+internal.data[] is valid/accurate). + * + * Space beyond the defined fields may be used to store arbitrary + * debug information relating to the emulation failure. It is + * accounted for in "ndata" but the format is unspecified and is + * not represented in "flags". Any such information is *not* ABI! */ struct { __u32 suberror; @@ -409,6 +414,7 @@ struct kvm_run { __u8 insn_bytes[15]; }; }; + /* Arbitrary debug data may follow. */ } emulation_failure; /* KVM_EXIT_OSI */ struct { |