+1
−0
+7
−0
+2
−0
+4
−0
Loading
mainline inclusion from mainline-v6.8-rc1 commit b39bd520a60c667a339e315ce7a3de2f7178f6e3 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=b39bd520a60c667a339e315ce7a3de2f7178f6e3 -------------------------------- Stub in vmx_get_untagged_addr() and wire up calls from the emulator (via get_untagged_addr()) and "direct" calls from various VM-Exit handlers in VMX where LAM untagging is supposed to be applied. Defer implementing the guts of vmx_get_untagged_addr() to future patches purely to make the changes easier to consume. LAM is active only for 64-bit linear addresses and several types of accesses are exempted. - Cases need to untag address (handled in get_vmx_mem_address()) Operand(s) of VMX instructions and INVPCID. Operand(s) of SGX ENCLS. - Cases LAM doesn't apply to (no change needed) Operand of INVLPG. Linear address in INVPCID descriptor. Linear address in INVVPID descriptor. BASEADDR specified in SECS of ECREATE. Note: - LAM doesn't apply to write to control registers or MSRs - LAM masking is applied before walking page tables, i.e. the faulting linear address in CR2 doesn't contain the metadata. - The guest linear address saved in VMCS doesn't contain metadata. Intel-SIG: commit b39bd520a60c KVM: x86: Untag addresses for LAM emulation where applicable 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-10-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>