From: "Jan Beulich" Subject: Re: Problems accessing passthrough PCI device Date: Thu, 13 Nov 2014 15:52:41 +0000 Message-ID: <5464E1D9020000780004746B@mail.emea.novell.com> References: <198478230.20141113102921@gmail.com> <5464C971020000780004739B@mail.emea.novell.com> <196307380.20141113120732@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <196307380.20141113120732@gmail.com> Content-Disposition: inline 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: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 13.11.14 at 16:07, wrote: > Thanks Jan, > > Thursday, November 13, 2014, 11:08:33 AM, you wrote: > >>>>> On 13.11.14 at 14:29, wrote: >>> I am having 2 major problems at the moment. >>> >>> 1.- Access to the PCI device from the PV will fail the second time I >>> create it UNLESS I call xl pci-assignable-remove/pci-assignable-add >>> between each creation. If I don't do this then all PCI accesses return >>> -1. I get the same if I disable memory access in the PCI configuration >>> register. >>> >>> 1.1.- Is this expected behaviour? > >> No. But did you verify the driver properly enables the device (i.e. >> doesn't make assumptions on its state)? Also iirc some kernel >> versions weren't properly resetting the device when coming back >> from guest use, but without you stating the software versions >> you're using that's just a remote possibility. > > Yes, the first thing I do in the driver is set the PCI configuration > access bits to 7 that should enable IO space, Memory Space and Master > BUS access. > > As a test I disabled this and all reads to the PCI device return -1, > even the first one. I implied your earlier statement to mean that. But - did you also verify that the three flags actually end up set (ideally from both DomU and Dom0 perspective)? The PCI backend may be screwing up things... > I agree, this looks more than a hang than a crash. I've just found a > link to the USB debug cable. I've ordered one but it will take a while And I hope you first verified that your system meets the criteria for this to work in the first place? Jan