From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Problems accessing passthrough PCI device Date: Fri, 21 Nov 2014 12:26:03 -0500 Message-ID: <20141121172602.GE8314@laptop.dumpdata.com> References: <5464C971020000780004739B@mail.emea.novell.com> <196307380.20141113120732@gmail.com> <5464E1D9020000780004746B@mail.emea.novell.com> <429773295.20141113144907@gmail.com> <5465CB080200007800047845@mail.emea.novell.com> <19872515.20141118132405@gmail.com> <546B86990200007800048DBF@mail.emea.novell.com> <6916092.20141119121209@gmail.com> <20141119205335.GB19961@laptop.dumpdata.com> <11981298.20141121135332@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <11981298.20141121135332@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Simon Martin Cc: Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, Nov 21, 2014 at 01:53:32PM -0300, Simon Martin wrote: > Hello Konrad and Jan, > > > > There was a bug in Xen pcibackend that I thought I upstreamed which could > > be releated. It was not restoring the right registers to the PCI-device. > > > They are attached. > > Thanks for the patches, however I have been finding some very > interesting things. > > I decided to keep Xen out of the equation and booted into plain > vanilla Linux. I then ran the FLR and got the same problem in the PCI > configuration, all BARs were set to 0 and all reads to the PCI memory > returned ff. I then manually wrote the correct values into the > PCI BAR registers, and hey presto, reads to the PCI memory started > working again! > > Looks like my workaround for moment will be to store the PCI > configuration registers before and resetting them after. Not cool, but > something really strange is going on... Right. Which is what the pciback does now (minus the bugs that the two patches fix). Look for pci_restore_config and pci_save_config > > Thanks for your help. > > Regards. > > > -- > Best regards, > Simon mailto:furryfuttock@gmail.com >