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/
Home Products Support Community News


Re: [Xen-devel] PCI hotplug problem

On Mon, Sep 27, 2010 at 01:07:05PM -0400, Konrad Rzeszutek Wilk wrote:

> > The idea of using PCI hotplug is nice, however, PCI hotplug does not seem to
> > work with the used setup (xen-3.4.3, all 64bit). Hot-unplug works, however 
> > the 
> > following hotplug makes the driver domain kernel spit out the following:
> > Sep 24 09:46:15 localhost kernel: [  126.846523] iwlagn 0000:00:01.0: device
> > not available (can't reserve [mem 0xf8000000-0xf8001fff 64bit])
> > Others seem to experience similar problems (e.g.
> > http://permalink.gmane.org/gmane.comp.emulators.xen.devel/80766). Does
> > anyone know the solution ?
> I had an off-mailing list conversation with that fellow and I spun out
> a bunch of patches to fix his issue.
> You need these patches:
> Konrad Rzeszutek Wilk (3):
>       xen-pcifront: Enforce scanning of device functions on initial execution.
>       xen-pcifront: Claim PCI resources before going live.
>       xen-pcifront: Don't race with udev when discovering new devices.
> I think they are in Jeremy's upstream tree.. ah, right you guys aren't using
> Jeremy's tree.
> Get them from: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git
> pv/pcifront-2.6.34

Indeed these patches help, thank you.
There is one more problem with the linux-2.6.18-xen.hg pcifront (that affect
derived code, e.g. OpenSUSE kernel, too). unbind_from_irqhandler() is
mistakenly passed evtchn, instead of irq. Compare line 68 of
with pvops equivalent

The following patch helps.
Rafal Wojtczuk

unbind_from_irqhandler takes irq, not evtchn, as its first argument.

Signed-off-by: Rafal Wojtczuk <rafal@xxxxxxxxxxxxxxxxxxxxxx>
--- linux-   2010-09-29 
16:47:39.961674359 +0200
+++ linux-        2010-09-29 
16:47:49.458675391 +0200
@@ -61,7 +61,7 @@ static void free_pdev(struct pcifront_de

        /*For PCIE_AER error handling job*/
-       unbind_from_irqhandler(pdev->evtchn, pdev);
+       unbind_from_irqhandler(irq_from_evtchn(pdev->evtchn), pdev);

        if (pdev->evtchn != INVALID_EVTCHN)
                xenbus_free_evtchn(pdev->xdev, pdev->evtchn);

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>