From: Simon Horman Subject: Re: [PATCH][ioemu] fix PCI bar mapping Date: Fri, 8 May 2009 12:05:32 +1000 Message-ID: <20090508020532.GB23312@verge.net.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Cui, Dexuan" Cc: Yuji Shimada , "Zhao, Yu" , xen-devel , Ian Jackson , "Ke, Liping" List-Id: xen-devel@lists.xenproject.org On Tue, May 05, 2009 at 08:37:56PM +0800, Cui, Dexuan wrote: > dbb8aafa702b8b4f5568e08641d98471fd04e0f8 has a bug: > The virtual CMD value we get from reg_entry->data is not the proper value because reg_entry->data only holds the emulated bits and the PCI_COMMAND_IO/PCI_COMMAND_MEMORY bits are not in it. > Instead, we can use pt_pci_read_config(&ptdev->dev, PCI_COMMAND, 2) to get the proper value. > > We should only update the mapping of the related BAR, NOT the mappings of ALL BARs. > > In pt_exp_rom_bar_reg_write(), we should also update the mapping. And for PCI_ROM_SLOT, when the PCI_ROM_ADDRESS_ENABLE bit is 0, we should not have the mapping. > > Signed-off-by: Dexuan Cui Hi, this patch also seems to resolve the problem that I was seeing where Intel NICs were not usable. Tested-by: Simon Horman -- Simon Horman VA Linux Systems Japan K.K. Satellite Lab in Sydney, Australia H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en