]> xenbits.xensource.com Git - qemu-xen-4.2-testing.git/commit
passthrough: Intel GPU passthrough, fix OpRegion mapping
authorJean Guyader <jean.guyader@eu.citrix.com>
Fri, 11 May 2012 11:40:42 +0000 (12:40 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 11 May 2012 11:40:42 +0000 (12:40 +0100)
commitb7469189669c4de0a5161a869f443738d84539ec
tree57035771d9133684e61192982a82a0f6149c97b8
parent82db8de16530f016809264d3179823999d702849
passthrough: Intel GPU passthrough, fix OpRegion mapping

The OpRegion shouldn't be mapped 1:1 because the address in the host
can't be used in the guest directly.

This patch traps read and write access to the opregion of the Intel
GPU config space (offset 0xfc).

To work correctly this patch needs a change in hvmloader.

HVMloader will allocate 2 pages for the OpRegion and write this address
on the config space of the Intel GPU. Qemu will trap and map the host
OpRegion to the guest. Any write to this offset after that won't have
any effect. Any read of this config space offset will return the address
in the guest.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/pass-through.c
hw/pass-through.h
hw/pt-graphics.c