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

Re: [Xen-devel] qemu-xen-dir + PCI passthrough = BOOM



On Wed, Dec 04, 2013 at 02:51:48PM -0500, Konrad Rzeszutek Wilk wrote:
> Hey,
> 
> I just started noticing it today - with qemu-xen (tip is
> commit b97307ecaad98360f41ea36cd9674ef810c4f8cf
>     xen_disk: mark ioreq as mapped before unmapping in error case)
> 
> when I try to pass in a PCI device at bootup it blows up with:
> 
> char device redirected to /dev/pts/2 (label serial0)
> qemu: hardware error: xen: failed to populate ram at 40050000

There is a good chance that the issue is in QEMU.

By default, qemu-xen is not very verbose, so a
#define XEN_PT_LOGGING_ENABLED
can help identifying what is missing.

The error is reported by xen_ram_alloc(), so it might help to enable
trace for it. It's easy:
sh$ cat > /tmp/trace-to-enable << EOF
xen_ram_alloc
EOF

then
device_model_args_hvm = [ '-trace', 'events=/tmp/trace-to-enable' ]

There is more of those trace events in qemu.git/trace-events

Does it works if you `xl pci-attach` after the guest has booted ?

> ...
> -bash-4.1# xl dmesg | tail
> [ 2788.038463] xen_pciback: vpci(d3) [2013-12-04 19:43:40] System
> requested SeaBIOS
> : 0000:01:00.1: (d3) [2013-12-04 19:43:40] CPU speed is 3093 MHz
> assign to virtua(d3) [2013-12-04 19:43:40] Relocating guest memory for
> lowmem MMIO space disabled
> l slot 0
> [ 2788.076396] device vif3.0 entered promiscuous mode
> 
> If I don't have 'pci=' stanze in my guest config it boots just fine.
> 
> -bash-4.1# more /vm.cfg 
> builder='hvm'
> disk = [ 'file:/mnt/lab/latest/root_image.iso,hdc:cdrom,r']
> memory=1024
> boot="d"
> vcpus=2
> serial="pty"
> vnclisten="0.0.0.0"
> name="latest"
> vif = [ 'mac=00:0F:4B:00:00:68, bridge=switch' ]
> on_crash="preserve"
> pci=["01:00.0"]
> 
> Any ideas?
> 
> This is with today's Xen and 3.13-rc2. The device in question is
> -bash-4.1# lspci -s 01:00.0 -v
> 01:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network
> Connection (rev 01)
>         Subsystem: Intel Corporation Gigabit ET Dual Port Server Adapter
>         Flags: fast devsel, IRQ 16
>         Memory at fbc20000 (32-bit, non-prefetchable) [disabled]
> [size=128K]
>         Memory at fb800000 (32-bit, non-prefetchable) [disabled]
> [size=4M]
>         I/O ports at e020 [disabled] [size=32]
>         Memory at fbc44000 (32-bit, non-prefetchable) [disabled]
> [size=16K]
>         Expansion ROM at fb400000 [disabled] [size=4M]
>         Capabilities: [40] Power Management version 3
>         Capabilities: [50] MSI: Enable- Count=1/1 Maskable+ 64bit+
>         Capabilities: [70] MSI-X: Enable- Count=10 Masked-
>         Capabilities: [a0] Express Endpoint, MSI 00
>         Capabilities: [100] Advanced Error Reporting
>         Capabilities: [140] Device Serial Number 00-1b-21-ff-ff-45-d9-ac
>         Capabilities: [150] Alternative Routing-ID Interpretation (ARI)
>         Capabilities: [160] Single Root I/O Virtualization (SR-IOV)
>         Kernel driver in use: pciback
>         Kernel modules: igb
> 
> 
> Oh and of course it boots with the traditional QEMU.

-- 
Anthony PERARD

_______________________________________________
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®.