[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220902165921.GA354189@bhelgaas>
Date: Fri, 2 Sep 2022 11:59:21 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Jason Andryuk <jandryuk@...il.com>
Cc: Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
xen-devel@...ts.xenproject.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xen-pcifront: Handle missed Connected state
The conventional style for subject (from "git log --oneline") is:
xen/pcifront: Handle ...
On Mon, Aug 29, 2022 at 11:15:36AM -0400, Jason Andryuk wrote:
> An HVM guest with linux stubdom and 2 PCI devices failed to start as
"stubdom" might be handy shorthand in the Xen world, but I think
it would be nice to consistently spell out "stubdomain" since you use
both forms randomly in this commit log and newbies like me have to
wonder whether they're the same or different.
> libxl timed out waiting for the PCI devices to be added. It happens
> intermittently but with some regularity. libxl wrote the two xenstore
> entries for the devices, but then timed out waiting for backend state 4
> (Connected) - the state stayed at 7 (Reconfiguring). (PCI passthrough
> to an HVM with stubdomain is PV passthrough to the stubdomain and then
> HVM passthrough with the QEMU inside the stubdomain.)
>
> The stubdom kernel never printed "pcifront pci-0: Installing PCI
> frontend", so it seems to have missed state 4 which would have
> called pcifront_try_connect -> pcifront_connect_and_init_dma
Add "()" after function names for clarity.
> Have pcifront_detach_devices special-case state Initialised and call
> pcifront_connect_and_init_dma. Don't use pcifront_try_connect because
> that sets the xenbus state which may throw off the backend. After
> connecting, skip the remainder of detach_devices since none have been
> initialized yet. When the backend switches to Reconfigured,
> pcifront_attach_devices will pick them up again.
Bjorn
Powered by blists - more mailing lists