mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-17 08:51:42 +00:00
hv: ept: set snp control when modify
Current, SNP control bit is only set in ept_mr_add for cacheable memory. However, memory type for VM0 is added as uncacheable type. So SNP control is not set for VM0. Add code to set SNP control bit for cacheable memory when ept modification. Tracked-On: #1762 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Reviewed-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
66f133bf45
commit
5a1f24473d
@ -212,6 +212,10 @@ void ept_mr_modify(struct acrn_vm *vm, uint64_t *pml4_page,
|
||||
|
||||
dev_dbg(ACRN_DBG_EPT, "%s,vm[%d] gpa 0x%llx size 0x%llx\n", __func__, vm->vm_id, gpa, size);
|
||||
|
||||
if ((prot_set & EPT_MT_MASK) != EPT_UNCACHED) {
|
||||
prot_set |= EPT_SNOOP_CTRL;
|
||||
}
|
||||
|
||||
mmu_modify_or_del(pml4_page, gpa, size, prot_set, prot_clr, &vm->arch_vm.ept_mem_ops, MR_MODIFY);
|
||||
|
||||
foreach_vcpu(i, vm, vcpu) {
|
||||
|
Loading…
Reference in New Issue
Block a user