[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v8 3/7] usb/hcd-xhci: Split pci wrapper for xhci base model
From: |
Sai Pavan Boddu |
Subject: |
RE: [PATCH v8 3/7] usb/hcd-xhci: Split pci wrapper for xhci base model |
Date: |
Wed, 23 Sep 2020 17:45:26 +0000 |
Hi Gerd,
> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: Wednesday, September 23, 2020 3:44 PM
> To: Sai Pavan Boddu <saipava@xilinx.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>; Markus Armbruster
> <armbru@redhat.com>; 'Marc-André Lureau'
> <marcandre.lureau@redhat.com>; Paolo Bonzini <pbonzini@redhat.com>;
> Edgar Iglesias <edgari@xilinx.com>; Francisco Eduardo Iglesias
> <figlesia@xilinx.com>; qemu-devel@nongnu.org; Alistair Francis
> <alistair.francis@wdc.com>; Eduardo Habkost <ehabkost@redhat.com>;
> Ying Fang <fangying1@huawei.com>; 'Philippe Mathieu-Daudé'
> <philmd@redhat.com>; Vikram Garhwal <fnuv@xilinx.com>; Paul
> Zimmerman <pauldzim@gmail.com>; Sai Pavan Boddu
> <saipava@xilinx.com>
> Subject: Re: [PATCH v8 3/7] usb/hcd-xhci: Split pci wrapper for xhci base
> model
>
> Hi,
>
> > This patch sets the base to use xhci as sysbus model, for which pci
> > specific hooks are moved to hcd-xhci-pci.c. As a part of this
> > requirment msi/msix interrupts handling is moved under XHCIPCIState.
> > Made required changes for qemu-xhci-nec.
>
> Progress. vmstate loads fine ;)
>
> Does not work though. usb-tablet stops working after migration :(
>
> > @@ -3561,11 +3458,7 @@ static int usb_xhci_post_load(void *opaque, int
> version_id)
> > }
> >
> > for (intr = 0; intr < xhci->numintrs; intr++) {
> > - if (xhci->intr[intr].msix_used) {
> > - msix_vector_use(pci_dev, intr);
> > - } else {
> > - msix_vector_unuse(pci_dev, intr);
> > - }
> > + xhci_intr_update(xhci, intr);
> > }
> >
> > return 0;
>
> I suspect this is the problem. I guess we should add usb_xhci_post_load_pci
> + usb_xhci_post_load_sysbus and move irq handling to these functions.
[Sai Pavan Boddu] I would create vmstate_post_load callbacks in xhci-core,
which could implement post_load functionality in their respective files.
I will be sending V9 now.
Can you also provide any steps to test vmstate migration ?
Regards,
Sai Pavan
>
> take care,
> Gerd
[PATCH v8 4/7] usb: hcd-xhci-sysbus: Attach xhci to sysbus device, Sai Pavan Boddu, 2020/09/22
[PATCH v8 5/7] misc: Add versal-usb2-ctrl-regs module, Sai Pavan Boddu, 2020/09/22
[PATCH v8 6/7] usb: Add DWC3 model, Sai Pavan Boddu, 2020/09/22
[PATCH v8 1/7] usb/hcd-xhci: Make dma read/writes hooks pci free, Sai Pavan Boddu, 2020/09/22