[Intel-gfx] Accelerated read from WC mem (i915_memcpy_from_wc()) may not work in virtualization world

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 21 10:56:38 UTC 2017


Quoting Du, Changbin (2017-12-21 09:52:16)
> Hi Chris,
> Our QA reported a problem caused by movntdqa instructions. Currently, the KVM
> hypervisor doesn't support VEX-prefix instructions emulation. If users passthrough
> a GPU to guest with vfio option 'x-no-mmap=on', then all access to the BARs will
> be trapped and emulated. The KVM hypervisor would raise an inertal error to qemu
> which cause the guest killed. (Since 'movntdqa' ins is not supported.)
> 
> One possible solution is that disable this optimization at i915_memcpy_init_early.
> This require us to identify the CPUID to check if it is running in guest mode.

Is this mode not detected by intel_vgpu_active() ?

If we need to disable movntdqa, we need to disable it. But not by
directly checking CPUID, it should be already decoded into a cpu feature
flag -- assuming we need more than intel_vgpu_active and possibly
rearranging the init order.
-Chris


More information about the Intel-gfx mailing list