acrn-hypervisor/hypervisor/include/arch/x86
Binbin Wu 2abd8b34ef hv: vtd: export iommu_flush_cache
VT-d shares the EPT tables as the second level translation tables.
For the IOMMUs that don't support page-walk coherecy, cpu cache should
be flushed for the IOMMU EPT entries that are modified.

For the current implementation, EPT tables for translating from GPA to HPA
for EPT/IOMMU are not modified after VM is created, so cpu cache invlidation is
done once per VM before starting execution of VM.
However, this may be changed, runtime EPT modification is possible.

When cpu cache of EPT entries is invalidated when modification, there is no need
invalidate cpu cache globally per VM.

This patch exports iommu_flush_cache for EPT entry cache invlidation operations.
- IOMMUs share the same copy of EPT table, cpu cache should be flushed if any of
  the IOMMU active doesn't support page-walk coherency.
- In the context of ACRN, GPA to HPA mapping relationship is not changed after
  VM created, skip flushing iotlb to avoid potential performance penalty.

Tracked-On: #3607
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
2019-08-26 10:47:17 +08:00
..
boot hv:Move severl variable declaration for boot code 2019-01-25 21:32:21 +08:00
guest hv: cleanup vmcs.h 2019-08-22 14:13:15 +08:00
lib hv: atomic: remove atomic load/store and set/clear 2019-07-17 09:20:54 +08:00
apicreg.h HV: fix violations touched type conversion 2019-07-11 09:16:09 +08:00
board.h HV: add board specific cpu state table to support Px Cx 2019-07-29 20:25:16 +08:00
cat.h HV: CAT: support config CAT from acrn_vm_config 2019-02-28 11:22:29 +08:00
cpu_caps.h hv: vmsr: handle guest msr ia32_misc_enable read/write 2019-05-09 16:35:15 +08:00
cpu.h hv: cleanup vmcs.h 2019-08-22 14:13:15 +08:00
cpufeatures.h HV: check security mitigation support for SSBD 2019-07-10 10:55:34 +08:00
cpuid.h hv: vcpuid: present sgx capabilities to guest 2019-05-29 11:24:13 +08:00
default_acpi_info.h hv: emulate ACPI reset register for Service OS guest 2019-05-15 11:20:12 +08:00
e820.h hv: remove CONFIG_PARTITION_MODE for pre-launched VM vE820 creation 2019-03-19 14:28:43 +08:00
gdt.h hv: coding style: remove no real declaration for external variable 2018-12-20 20:20:08 +08:00
host_pm.h hv:move some APIs related host reset to pm.c 2019-08-22 14:09:18 +08:00
idt.h hv:cleanup header files for arch folder 2019-02-22 13:14:36 +08:00
init.h HV: Add prefix 'p' before 'cpu' to physical cpu related functions 2019-04-24 10:50:28 +08:00
io.h hv:modulization for IO Emulation 2019-01-21 13:49:54 +08:00
ioapic.h hv: Avoid run-time buffer overflows with IOAPIC data structures 2019-06-24 11:41:10 +08:00
irq.h hv: remove unnecessary cancel_event_injection related stuff 2019-07-09 09:23:12 +08:00
lapic.h doc: remove hard-coded interfaces in .rst files 2019-05-22 12:40:52 -07:00
mmu.h hv: vtd: export iommu_flush_cache 2019-08-26 10:47:17 +08:00
msr.h hv: cleanup vmcs.h 2019-08-22 14:13:15 +08:00
multiboot.h restruct boot and bsp dir for firmware stuff 2019-05-09 16:33:44 +08:00
page.h hv: add support of EPT mapping of high MMIO 2019-02-28 18:33:11 +08:00
pci_dev.h hv: vpci: add emulated PCI device configure for SOS 2019-08-09 14:19:49 +08:00
per_cpu.h hv: fix Violations touched ACRN Coding Guidelines 2019-08-15 09:47:11 +08:00
pgtable.h hv: mmu: add hpa2hva_early API for earlt boot 2019-07-26 09:10:06 +08:00
security.h hv: Mitigation for CPU MDS vulnerabilities. 2019-07-05 15:17:27 +08:00
seed.h hv: seed: refine header file 2019-03-15 14:09:56 +08:00
sgx.h hv: sgx: add basic support to init sgx resource for vm 2019-05-29 11:24:13 +08:00
timer.h hv:move 'udelay' to timer.c 2019-03-22 08:38:13 +08:00
trampoline.h hv:Move severl variable declaration for boot code 2019-01-25 21:32:21 +08:00
vm_config.h hv: vpci: add each vdev_ops for each emulated PCI device 2019-08-09 14:19:49 +08:00
vmx.h hv: allocate vpid based on vm_id and vcpu_id mapping 2019-04-22 19:57:28 +08:00
vtd.h hv: vtd: export iommu_flush_cache 2019-08-26 10:47:17 +08:00
zeropage.h hv:remove common header files 2019-05-07 09:10:13 +08:00