mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
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]>
This commit is contained in:
1 parent
ed290e1c20
commit
a9d496d8e0
1 file changed
+6
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user