]> git.proxmox.com Git - mirror_qemu.git/commit
xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 29 Jun 2015 18:01:13 +0000 (14:01 -0400)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Thu, 10 Sep 2015 16:46:25 +0000 (16:46 +0000)
commit6aa07b1494d2725f24af097ca19c750ac25a7c11
tree73d13fed3f3f27e66399dea307b4615e3d2e4189
parent54fd08136e4ac8b88b88b15c397010e3b0de379f
xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config

During init time we treat the dev.config area as a cache
of the host view. However during execution time we treat it
as guest view (by the generic PCI API). We need to sync Xen's
code to the generic PCI API view. This is the first step
by replacing all of the code that uses dev.config or
pci_get_[byte|word] to get host value to actually use the
xen_host_pci_get_[byte|word] functions.

Interestingly in 'xen_pt_ptr_reg_init' we also needed to swap
reg_field from uint32_t to uint8_t - since the access is only
for one byte not four bytes. We can split this as a seperate
patch however we would have to use a cast to thwart compiler
warnings in the meantime.

We also truncated 'flags' to 'flag' to make the code fit within
the 80 characters.

Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/xen/xen_pt.c
hw/xen/xen_pt_config_init.c