Commit e65733b
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.dev1 parent e8d018d commit e65733b
5 files changed
Lines changed: 23 additions & 5 deletions
File tree
- Documentation/virt/kvm
- arch/x86
- include
- asm
- uapi/asm
- kvm
- include/uapi/linux
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6218 | 6218 | | |
6219 | 6219 | | |
6220 | 6220 | | |
6221 | | - | |
6222 | | - | |
| 6221 | + | |
6223 | 6222 | | |
6224 | 6223 | | |
6225 | 6224 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2204 | 2204 | | |
2205 | 2205 | | |
2206 | 2206 | | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
2207 | 2214 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
562 | 565 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9803 | 9803 | | |
9804 | 9804 | | |
9805 | 9805 | | |
9806 | | - | |
| 9806 | + | |
| 9807 | + | |
| 9808 | + | |
| 9809 | + | |
| 9810 | + | |
9807 | 9811 | | |
9808 | 9812 | | |
9809 | 9813 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
345 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
346 | 351 | | |
347 | 352 | | |
348 | 353 | | |
| |||
0 commit comments