diff options
| author | Sean Christopherson <seanjc@google.com> | 2025-12-31 00:13:44 +0300 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-01-14 04:37:03 +0300 |
| commit | d7507a94a07202234236d7f94bed6015ca645ae6 (patch) | |
| tree | 316e0eb84500ad961ef747f6c590ef9725f5af65 /include | |
| parent | 405fce694bd1589082a7ffd500b5a4b841c22f0d (diff) | |
| download | linux-d7507a94a07202234236d7f94bed6015ca645ae6.tar.xz | |
KVM: SVM: Treat exit_code as an unsigned 64-bit value through all of KVM
Fix KVM's long-standing buggy handling of SVM's exit_code as a 32-bit
value. Per the APM and Xen commit d1bd157fbc ("Big merge the HVM
full-virtualisation abstractions.") (which is arguably more trustworthy
than KVM), offset 0x70 is a single 64-bit value:
070h 63:0 EXITCODE
Track exit_code as a single u64 to prevent reintroducing bugs where KVM
neglects to correctly set bits 63:32.
Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface")
Cc: Jim Mattson <jmattson@google.com>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Reviewed-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20251230211347.4099600-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/hyperv/hvgdk.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hyperv/hvgdk.h b/include/hyperv/hvgdk.h index dd6d4939ea29..384c3f3ff4a5 100644 --- a/include/hyperv/hvgdk.h +++ b/include/hyperv/hvgdk.h @@ -281,7 +281,7 @@ struct hv_vmcb_enlightenments { #define HV_VMCB_NESTED_ENLIGHTENMENTS 31 /* Synthetic VM-Exit */ -#define HV_SVM_EXITCODE_ENL 0xf0000000 +#define HV_SVM_EXITCODE_ENL 0xf0000000ull #define HV_SVM_ENL_EXITCODE_TRAP_AFTER_FLUSH (1) /* VM_PARTITION_ASSIST_PAGE */ |
