aboutsummaryrefslogtreecommitdiff
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorDavid Edmondson <[email protected]>2021-09-20 11:37:34 +0100
committerPaolo Bonzini <[email protected]>2021-10-25 06:48:24 -0400
commita9d496d8e08ca1eb43d14cb734839b24ab0e8083 (patch)
tree006b7cc131512bef2d43149ecaf869c6cac2635a /include/uapi/linux
parented290e1c20da19fa100a3e0f421aa31b65984960 (diff)
KVM: x86: Clarify the kvm_run.emulation_failure structure layout
Until more flags for kvm_run.emulation_failure flags are defined, it is undetermined whether new payload elements corresponding to those flags will be additive or alternative. As a hint to userspace that an alternative is possible, wrap the current payload elements in a union. Suggested-by: Sean Christopherson <[email protected]> Signed-off-by: David Edmondson <[email protected]> Reviewed-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/kvm.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 5ca5ffe16cb4..2c8aa8d4dac1 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -403,8 +403,12 @@ struct kvm_run {
__u32 suberror;
__u32 ndata;
__u64 flags;
- __u8 insn_size;
- __u8 insn_bytes[15];
+ union {
+ struct {
+ __u8 insn_size;
+ __u8 insn_bytes[15];
+ };
+ };
} emulation_failure;
/* KVM_EXIT_OSI */
struct {