Commit a9d496d8 authored by David Edmondson's avatar David Edmondson Committed by Paolo Bonzini

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: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarDavid Edmondson <david.edmondson@oracle.com>
Reviewed-by: default avatarSean Christopherson <seanjc@google.com>
Message-Id: <20210920103737.2696756-2-david.edmondson@oracle.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ed290e1c
...@@ -403,8 +403,12 @@ struct kvm_run { ...@@ -403,8 +403,12 @@ struct kvm_run {
__u32 suberror; __u32 suberror;
__u32 ndata; __u32 ndata;
__u64 flags; __u64 flags;
union {
struct {
__u8 insn_size; __u8 insn_size;
__u8 insn_bytes[15]; __u8 insn_bytes[15];
};
};
} emulation_failure; } emulation_failure;
/* KVM_EXIT_OSI */ /* KVM_EXIT_OSI */
struct { struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment