WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pciback bug "secondary bus reset failed"

To: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] pciback bug "secondary bus reset failed"
From: Weidong Han <weidong.han@xxxxxxxxx>
Date: Tue, 25 May 2010 09:03:33 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 24 May 2010 18:04:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BFAAEED.3050606@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4BFAA0DD.3060900@xxxxxxxxxxxxx> <20100524163023.GZ17817@xxxxxxxxxxx> <4BFAAEED.3050606@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)
Alex Zeffertt wrote:
Pasi Kärkkäinen wrote:
On Mon, May 24, 2010 at 04:53:01PM +0100, Alex Zeffertt wrote:
Hi,

I'm trying to passthrough a PCI network card to a domU guest, but I'm hitting a bug that prevents the IRQ being unbound from dom0.

Here are the steps I am taking:

 * configure Xen to pass $pci (0000:06:00.0) through to guest VM
 * unbind from current driver in dom0 and rebind to pciback:

     echo -n $pci > /sys/bus/pci/devices/$pci/driver/unbind
     modprobe pciback
     echo -n $pci > /sys/bus/pci/drivers/pciback/new_slot
     echo -n $pci > /sys/bus/pci/drivers/pciback/bind

 * start guest VM

I then get the following on the dom0 console

  pciback 0000:06:00.0: secondary bus reset failed for device - all functions \
  need to be co-assigned - err: 6
  pciback 0000:06:00.0: FLR functionality not supported; attempts to use \
  secondary bus reset unsuccessful;
  pciback 0000:06:00.0: FLR not performed for device

Please check this wiki page:
http://wiki.xensource.com/xenwiki/XenPCIpassthrough

It has a chapter about the "all functions need to be co-assigned" error..

-- Pasi

Hi Pasi,

Thanks for your reply. I think I understand what is happening now. My card is too old to have the Function Level Reset functionality. This leaves the following options:


1. Assign all the cards that share the PCI bus (0000:06) to the same guest. This enables the FLR functionality to be replaced by the bridge's "Secondary Bus Reset" functionality

  - or -

2. Apply the patch referred to on http://wiki.xensource.com/xenwiki/XenPCIpassthrough to bypass the FLR


If I can't do number #1 because some cards are in use by dom0 then I guess #2 is the only option. But does #2 require that dom0 has never accessed the card?
No. Dom0 still can access the card. Dom0 just doesn't perform FLR on it to avoid your issue.
Also, what if you reboot the domU - does the fact that you can't do an FLR on the card mean that there will be unpredictable results the 2nd time domU tries to initialise it?
Yes. FLR is required by pci passthrough. your NIC only can be co-assigned (#1). #2 is just a temporary workaround for your try.

Regards,
Weidong
Thanks again,

Alex



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel