]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Widen x86_exception's error_code to 64 bits
authorKevin Cheng <chengkev@google.com>
Fri, 22 May 2026 23:26:57 +0000 (16:26 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 26 May 2026 19:31:11 +0000 (12:31 -0700)
commitbb24edbb673f6f3d72ad347cfc107e03d1c6792a
tree04f959b5f7f316c47289d7e1637ddc90222fedea
parent66472e86703f10cda1a6a220f682841b200af87d
KVM: x86: Widen x86_exception's error_code to 64 bits

Widen the error_code field in struct x86_exception from u16 to u64 to
accommodate AMD's NPF error code, which defines information bits above
bit 31, e.g. PFERR_GUEST_FINAL_MASK (bit 32), and PFERR_GUEST_PAGE_MASK
(bit 33).

Retain the u16 type for the local errcode variable in walk_addr_generic
as the walker synthesizes conventional #PF error codes that are
architecturally limited to bits 15:0.

Signed-off-by: Kevin Cheng <chengkev@google.com>
Link: https://patch.msgid.link/20260522232701.3671446-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/kvm_emulate.h
arch/x86/kvm/mmu/paging_tmpl.h