]> xenbits.xen.org Git - xenclient/ioemu.git/commit
passthrough: pt_bar_mapping: use a better way to get the CMD value
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 8 May 2009 16:15:39 +0000 (17:15 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 8 May 2009 16:15:39 +0000 (17:15 +0100)
commit014191756b7473d2421d3d102da7f9556fb6a285
treef3aa4fa887491aeb21419b0f743ec98e18780710
parent5d767b7b3fac52336f59e5b40d8befa6b1909937
passthrough: pt_bar_mapping: use a better way to get the CMD value

The pt_pci_read_config(&ptdev->dev, PCI_COMMAND, 2) in
5d767b7b3fac52336f59e5b40d8befa6b1909937 is not proper as Yuji Shimada
points out: "pt_pci_read_config emulates access to read the registers
from guest software. Many functions which are not relevant are
executed in pt_pci_read_config. So side effects may occur"; instead,
we can "remove emu_mask from writable_mask in pt_cmd_reg_write and
then we can get the proper value from reg_entry->data".  Thanks for
Yuji's review and Simon Horman's test.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Tested-by: Simon Horman <horms@verge.net.au>
Reviewed-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
hw/pass-through.c