diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2023-04-04 15:40:38 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-04-05 12:07:41 +0100 |
commit | e65733b5c59a1ea20324a03494364958bef3fc68 (patch) | |
tree | 0cab1bf283e8914a637776b3427a0abfdf0a55f2 /arch/x86/include/uapi/asm/kvm.h | |
parent | e8d018dd0257f744ca50a729e3d042cf2ec9da65 (diff) | |
download | linux-e65733b5c59a1ea20324a03494364958bef3fc68.tar.gz linux-e65733b5c59a1ea20324a03494364958bef3fc68.tar.bz2 linux-e65733b5c59a1ea20324a03494364958bef3fc68.zip |
KVM: x86: Redefine 'longmode' as a flag for KVM_EXIT_HYPERCALL
The 'longmode' field is a bit annoying as it blows an entire __u32 to
represent a boolean value. Since other architectures are looking to add
support for KVM_EXIT_HYPERCALL, now is probably a good time to clean it
up.
Redefine the field (and the remaining padding) as a set of flags.
Preserve the existing ABI by using bit 0 to indicate if the guest was in
long mode and requiring that the remaining 31 bits must be zero.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230404154050.2270077-2-oliver.upton@linux.dev
Diffstat (limited to 'arch/x86/include/uapi/asm/kvm.h')
-rw-r--r-- | arch/x86/include/uapi/asm/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/kvm.h b/arch/x86/include/uapi/asm/kvm.h index 7f467fe05d42..1a6a1f987949 100644 --- a/arch/x86/include/uapi/asm/kvm.h +++ b/arch/x86/include/uapi/asm/kvm.h @@ -559,4 +559,7 @@ struct kvm_pmu_event_filter { #define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */ #define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */ +/* x86-specific KVM_EXIT_HYPERCALL flags. */ +#define KVM_EXIT_HYPERCALL_LONG_MODE BIT(0) + #endif /* _ASM_X86_KVM_H */ |