[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] PCI passthrough (pci-attach) to HVM guests bug (BAR64 addresses are bogus)



On Mon, Nov 10, 2014 at 01:07:20PM -0500, Konrad Rzeszutek Wilk wrote:
> On Mon, Nov 10, 2014 at 05:42:32PM +0000, David Vrabel wrote:
> > On 10/11/14 17:32, Konrad Rzeszutek Wilk wrote:
> > > Hey,
> > > 
> > > With Xen 4.5 (today's staging), when I boot a guest and then do pci-attach
> > > the BARs values are corrupt.

I can reproduce this with Xen 4.4, Xen 4.3 and Xen 4.1.

A bit digging in and I realized that:

(XEN) memory_map:add: dom1 gfn=f4000 mfn=d8000 nr=4000 [64M]
(XEN) AMD-Vi: update_paging_mode Try to access pdev_list without aquiring 
pcidevs_lock.
(XEN) memory_map:add: dom1 gfn=f8000 mfn=fc000 nr=2000 [32M]
(XEN) ioport_map:add: dom1 gport=1000 mport=c000 nr=80
(XEN) AMD-Vi: Disable: device id = 0x500, domain = 0, paging mode = 3
(XEN) AMD-Vi: Setup I/O page table: device id = 0x500, type = 0x1, root table = 
0x228b02000, domain = 1, paging mode = 3

The sizes are my own editing. This means QEMU is putting the
devices in the MMIO region - and doing it succesfully. But then:

> > 
> > 
> > > [  152.572965] pci 0000:00:04.0: BAR 1: no space for [mem size 0x08000000 
> > > 64bit  pref]
> [  152.518320] pci 0000:00:04.0: reg 0x14: [mem 0x00000000-0x07ffffff 64bit 
> pref]

.. The guest computes the right size for them, but reads the wrong BAR value
that was set by QEMU and also created in the hypervisor.

Perhaps this is Linux kernel being on fritz. Will try another kernel.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.