+1
−1
+10
−0
Loading
mainline inclusion from mainline-v6.8-rc1 commit 37a41847b770c722e98ace72f3851fb49b360c08 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I94GWL CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=37a41847b770c722e98ace72f3851fb49b360c08 -------------------------------- Introduce a new interface get_untagged_addr() to kvm_x86_ops to untag the metadata from linear address. Call the interface in linearization of instruction emulator for 64-bit mode. When enabled feature like Intel Linear Address Masking (LAM) or AMD Upper Address Ignore (UAI), linear addresses may be tagged with metadata that needs to be dropped prior to canonicality checks, i.e. the metadata is ignored. Introduce get_untagged_addr() to kvm_x86_ops to hide the vendor specific code, as sadly LAM and UAI have different semantics. Pass the emulator flags to allow vendor specific implementation to precisely identify the access type (LAM doesn't untag certain accesses). Intel-SIG: commit 37a41847b770 KVM: x86: Introduce get_untagged_addr() in kvm_x86_ops and call it in emulator Backport KVM Linear Address Masking (LAM) support. Signed-off-by:Binbin Wu <binbin.wu@linux.intel.com> Reviewed-by:
Chao Gao <chao.gao@intel.com> Tested-by:
Xuelian Guo <xuelian.guo@intel.com> Link: https://lore.kernel.org/r/20230913124227.12574-9-binbin.wu@linux.intel.com [sean: massage changelog] Signed-off-by:
Sean Christopherson <seanjc@google.com> [ Zhiquan Li: amend commit log ] Signed-off-by:
Zhiquan Li <zhiquan1.li@intel.com>