mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 13:37:10 +00:00
hv: ivshmem: map SHM BAR with PAT ignored
ACRN does not support the variable range vMTRR. The default memory type of vMTRR is UC. With this vMTRR emulation guest VM such as Linux refuses to map the MMIO address space as WB. In order to get better performance SHM BAR of ivshmem is mapped with PAT ignored and memory type of SHM BAR is fixed to WB. Tracked-On: #6389 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
2205dd393a
commit
9d650ccdf0
@ -252,7 +252,7 @@ static void ivshmem_vbar_map(struct pci_vdev *vdev, uint32_t idx)
|
||||
|
||||
if ((idx == IVSHMEM_SHM_BAR) && (vbar->base_hpa != INVALID_HPA) && (vbar->base_gpa != 0UL)) {
|
||||
ept_add_mr(vm, (uint64_t *)vm->arch_vm.nworld_eptp, vbar->base_hpa,
|
||||
vbar->base_gpa, vbar->size, EPT_RD | EPT_WR | EPT_WB);
|
||||
vbar->base_gpa, vbar->size, EPT_RD | EPT_WR | EPT_WB | EPT_IGNORE_PAT);
|
||||
} else if ((idx == IVSHMEM_MMIO_BAR) && (vbar->base_gpa != 0UL)) {
|
||||
(void)memset(&ivs_dev->mmio, 0U, sizeof(ivs_dev->mmio));
|
||||
register_mmio_emulation_handler(vm, ivshmem_mmio_handler, vbar->base_gpa,
|
||||
|
@ -104,6 +104,11 @@
|
||||
*/
|
||||
#define EPT_WB (6UL << EPT_MT_SHIFT)
|
||||
|
||||
/**
|
||||
* @brief Ignore PAT memory type.
|
||||
*/
|
||||
#define EPT_IGNORE_PAT (1UL << 6U)
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user