]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Route non-canonical checks in emulator through emulate_ops
authorMaxim Levitsky <mlevitsk@redhat.com>
Fri, 6 Sep 2024 22:18:22 +0000 (18:18 -0400)
committerSean Christopherson <seanjc@google.com>
Fri, 1 Nov 2024 16:22:25 +0000 (09:22 -0700)
commit16ccadefa295af434ca296e566f078223ecd79ca
treebac54666a09fc3b0921d8557d13782a367986040
parente52ad1ddd0a3b07777141ec9406d5dc2c9a0de17
KVM: x86: Route non-canonical checks in emulator through emulate_ops

Add emulate_ops.is_canonical_addr() to perform (non-)canonical checks in
the emulator, which will allow extending is_noncanonical_address() to
support different flavors of canonical checks, e.g. for descriptor table
bases vs. MSRs, without needing duplicate logic in the emulator.

No functional change is intended.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20240906221824.491834-3-mlevitsk@redhat.com
[sean: separate from additional of flags, massage changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/kvm_emulate.h
arch/x86/kvm/x86.c