mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/ide/ahci: Decouple from PCI
In some adhoc profiling booting Linux VMs, it's observed that ahci_irq_lower() can be a hot path (10000+ triggers until login prompt appears). Even though the parent device never changes, this method re-determines whether the parent device is a PCI device or not using the rather expensive object_dynamic_cast() function. Avoid this overhead by pushing the interrupt handling to the parent device, essentially turning AHCIState into an "IP block". Note that this change also frees AHCIState from the PCI dependency which wasn't reflected in Kconfig. Reported-by: Peter Xu <peterx@redhat.com> Inspired-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Bernhard Beschow <shentey@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20241212110926.23548-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
c0179ead95
commit
8a4989f526
5 changed files with 21 additions and 42 deletions
|
@ -37,8 +37,6 @@ typedef struct AHCIControlRegs {
|
|||
} AHCIControlRegs;
|
||||
|
||||
typedef struct AHCIState {
|
||||
DeviceState *container;
|
||||
|
||||
AHCIDevice *dev;
|
||||
AHCIControlRegs control_regs;
|
||||
MemoryRegion mem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue