diff options
author | Xiong Zhang <xiong.y.zhang@intel.corp-partner.google.com> | 2019-08-28 13:27:36 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-27 09:04:26 +0000 |
commit | 3064a7164a504e1e096e6021683d6cc2282147c4 (patch) | |
tree | 4ad5b1e5b894e6d59f05e8ba9587bfd1d08dda3d /sys_util/src | |
parent | 3ea11281ebb1ed4554acaa7b513ffbe1950a03c0 (diff) | |
download | crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.tar crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.tar.gz crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.tar.bz2 crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.tar.lz crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.tar.xz crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.tar.zst crosvm-3064a7164a504e1e096e6021683d6cc2282147c4.zip |
Setup vcpu's MTRR
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>
Diffstat (limited to 'sys_util/src')
0 files changed, 0 insertions, 0 deletions