[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 4/5] qtest/xhci: Add controller and device setup and ring
From: |
Nicholas Piggin |
Subject: |
Re: [RFC PATCH 4/5] qtest/xhci: Add controller and device setup and ring tests |
Date: |
Wed, 27 Nov 2024 11:46:47 +1000 |
On Tue Nov 12, 2024 at 12:32 AM AEST, Fabiano Rosas wrote:
> Nicholas Piggin <npiggin@gmail.com> writes:
>
> > Add tests which init the host controller registers to the point
> > where command and event rings, irqs are operational. Enumerate
> > ports and set up an attached device context that enables device
> > transfer ring to be set up and tested.
> >
> > This test does a bunch of things at once and is yet well
> > librified, but it allows testing basic mechanisms and gives a
> > starting point for further work.
>
> Please give it a pass through checkpatch when you get the chance.
Hey Fabiano,
Thanks. Unfortunately there's a bunch of register macros added here
that are copied from xhci model source, which does upset checkpatch.
It did catch a few issues though, I will fix.
>
> >
> > Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> > ---
> > tests/qtest/usb-hcd-xhci-test.h | 232 +++++++++++++++
> > tests/qtest/usb-hcd-xhci-test.c | 506 +++++++++++++++++++++++++++++++-
> > 2 files changed, 732 insertions(+), 6 deletions(-)
> > create mode 100644 tests/qtest/usb-hcd-xhci-test.h
> >
>
> <snip>
>
> > +static void pci_xhci_stress_rings(void)
> > +{
> > + XHCIQState *s;
> > + uint32_t value;
> > + uint64_t input_context;
> > + XHCIEvRingSeg ev_seg;
> > + XHCITRB trb;
> > + uint32_t hcsparams1;
> > + uint32_t slotid;
> > + void *mem;
> > + int i;
> > +
> > + mem = g_malloc(0x1000);
>
> This is leaking.
Good catch, thank you.
Thanks,
Nick
- [RFC PATCH 0/5] Add XHCI TR NOOP support, plus PCI, MSIX changes, Nicholas Piggin, 2024/11/08
- [RFC PATCH 1/5] qtest/pci: Enforce balanced iomap/unmap, Nicholas Piggin, 2024/11/08
- [RFC PATCH 2/5] qtest/libqos/pci: Fix msix_enable sharing bar0, Nicholas Piggin, 2024/11/08
- [RFC PATCH 3/5] pci/msix: Implement PBA writes, Nicholas Piggin, 2024/11/08
- [RFC PATCH 4/5] qtest/xhci: Add controller and device setup and ring tests, Nicholas Piggin, 2024/11/08
- [RFC PATCH 5/5] hw/usb: Support XHCI TR NOOP commands, Nicholas Piggin, 2024/11/08