Re: [PATCH] xen-pcifront: Handle missed Connected state

From: Jason Andryuk
Date: Thu Sep 01 2022 - 08:56:00 EST


On Wed, Aug 31, 2022 at 10:35 PM Rich Persaud <persaur@xxxxxxxxx> wrote:
>
> On Aug 29, 2022, at 11:16 AM, Jason Andryuk <jandryuk@xxxxxxxxx> wrote:
> >
> > An HVM guest with linux stubdom and 2 PCI devices failed to start as
> > 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
>
> Is there a state machine doc/flowchart for LibXL and Xen PCI device passthrough to Linux? This would be a valuable addition to Xen's developer docs, even as a whiteboard photo in this thread.

I am not aware of one.

-Jason