[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()
- To: Bernhard Beschow <shentey@xxxxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Mon, 3 Apr 2023 10:32:37 +0100
- Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: <qemu-devel@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, David Woodhouse <dwmw@xxxxxxxxxxxx>, Hervé Poussineau <hpoussin@xxxxxxxxxxx>, Aurelien Jarno <aurelien@xxxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Chuck Zmudzinski <brchuckz@xxxxxxx>
- Delivery-date: Mon, 03 Apr 2023 09:33:01 +0000
- Ironport-data: A9a23:l8VL2aqdlaonzn1/kayP8Vs8ttleBmILYhIvgKrLsJaIsI4StFCzt garIBmAOPvcZ2OmL4t3YI6x8kIE6sXTz9MyQFFk/CFnEC8Qo5uZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WNwUmAWP6gR5weCzyJNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun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0hylVg1RiSVNQ3zUtuN4BCuhKFyi0GE/ZcB0SPeZ 65F0oMy1WmhUC89LGMsGQ==
- Ironport-hdrordr: A9a23:MrQ0wais0fnonQkgXQQkTigvOnBQXisji2hC6mlwRA09TyXPrb HJoB17726XtN91YhpLpTnuAtj5fZqiz+8P3WB8B9qftUzd2FdAT7sSiLcKoQeAJ8SWzIc06U 4jSdkcNDSXNzRHZK3BjjVQfexO/DCPytHTuc7ui01pRQtpL41m8gtjEx2aCEEzZCQuP+tcKL OsovBDrzCjPVAadN6yCHVAf8WrnayzqLvWJSQCDxQkrDSDhTftyJOSKWn+4isj
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sat, Apr 01, 2023 at 10:36:45PM +0000, Bernhard Beschow wrote:
>
>
> Am 30. März 2023 13:00:25 UTC schrieb Anthony PERARD
> <anthony.perard@xxxxxxxxxx>:
> >On Sun, Mar 12, 2023 at 01:02:17PM +0100, Bernhard Beschow wrote:
> >> This is a preparational patch for the next one to make the following
> >> more obvious:
> >>
> >> First, pci_bus_irqs() is now called twice in case of Xen where the
> >> second call overrides the pci_set_irq_fn with the Xen variant.
> >
> >pci_bus_irqs() does allocates pci_bus->irq_count, so the second call in
> >piix3_xen_realize() will leak `pci_bus->irq_count`. Could you look if
> >pci_bus_irqs_cleanup() can be called before the second pci_bus_irqs()
> >call, or maybe some other way to avoid the leak?
>
> Thanks for catching this! I'll post a v4.
>
> I think the most fool-proof way to fix this is to free irq_count just before
> the assignment. pci_bus_irqs_cleanup() would then have to NULL the attribute
> such that pci_bus_irqs() can be called afterwards.
>
> BTW: I tried running qemu-system-x86_64 with PIIX4 rather than PIIX3 as Xen
> guest with my pc-piix4 branch without success. This branch essentially just
> provides slightly different PCI IDs for PIIX. Does xl or something else in
> Xen check these? If not then this means I'm still missing something. Under
> KVM this branch works just fine. Any idea?
Maybe the ACPI tables provided by libxl needs to be updated.
Or maybe something in the firmware (SeaBIOS or OVMF/OvmfXen) check the
id (I know that the PCI id of the root bus is checked, but I don't know
if that's the one that's been changed).
Thanks,
--
Anthony PERARD
|