[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_real
From: |
Anthony PERARD |
Subject: |
Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize() |
Date: |
Thu, 30 Mar 2023 14:00:25 +0100 |
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?
> Second, pci_bus_set_route_irq_fn() is now also called in Xen mode.
>
> Signed-off-by: Bernhard Beschow <shentey@gmail.com>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Beside the leak which I think can happen only once, patch is fine:
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
- [PATCH v3 0/6] Resolve TYPE_PIIX3_XEN_DEVICE, Bernhard Beschow, 2023/03/12
- [PATCH v3 1/6] include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq(), Bernhard Beschow, 2023/03/12
- [PATCH v3 3/6] hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3, Bernhard Beschow, 2023/03/12
- [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize(), Bernhard Beschow, 2023/03/12
- Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize(),
Anthony PERARD <=
- [PATCH v3 6/6] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE, Bernhard Beschow, 2023/03/12
- [PATCH v3 5/6] hw/isa/piix3: Resolve redundant k->config_write assignments, Bernhard Beschow, 2023/03/12
- [PATCH v3 4/6] hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config(), Bernhard Beschow, 2023/03/12