mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
3064a7164a
When vfio pass-through is enabled, guest will be very slow. The root casue is gfn is uncachable in EPT. From the comments in kernel vmx_get_mt_mask(vcpu, gfn, is_mmio) function, EPT memory type with VT-d, VT-d without snooping control feature: can't guarantee the result, try to trust guest through kvm_mtrr_get_guest_memory_type(vcpu, gfn). But crosvm doesn't set mtrr, so host kernel will set uncachable for all gfn in ept. This patch set the default cache type as WB, and set mmio cache type as UC, so the guest ram is WB. BUG=chromium:992270 TEST=crosvm --vfio /sys/devices/pci0000:00/0000:00:02.0, pass through host igd into linux guest, the guest runs smoothly and guest desktop could be shown on physical local display. Change-Id: I151aae7835910cfbc9e38464ee901e5da281de1e Signed-off-by: Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1813458 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> |
||
---|---|---|
.. | ||
src | ||
build.rs | ||
Cargo.toml | ||
host_cpuid.c |