On 10/07/2025 11:38, Philippe Mathieu-Daudé wrote:
On 4/7/25 16:09, Mark Cave-Ayland wrote:
This is to prepare for splitting the isapc machine into its own
separate file.
Signed-off-by: Mark Cave-Ayland <mark.caveayl...@nutanix.com>
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
hw/i386/pc_piix.c | 261 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 260 insertions(+), 1 deletion(-)
Further possible cleanup:
-- >8 --
hw/i386/pc_piix: Inline pc_xen_hvm_init_pci()
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ede7b68946b..4cec4f44764 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -362,14 +362,6 @@ static void pc_set_south_bridge(Object *obj, int
value, Error **errp)
}
#ifdef CONFIG_XEN
-static void pc_xen_hvm_init_pci(MachineState *machine)
-{
- const char *pci_type = xen_igd_gfx_pt_enabled() ?
- TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE :
TYPE_I440FX_PCI_DEVICE;
-
- pc_init1(machine, pci_type);
-}
-
static void pc_xen_hvm_init(MachineState *machine)
{
PCMachineState *pcms = PC_MACHINE(machine);
@@ -379,7 +371,9 @@ static void pc_xen_hvm_init(MachineState *machine)
exit(1);
}
- pc_xen_hvm_init_pci(machine);
+ pc_init1(machine, xen_igd_gfx_pt_enabled()
+ ? TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE
+ : TYPE_I440FX_PCI_DEVICE);
xen_igd_reserve_slot(pcms->pcibus);
pci_create_simple(pcms->pcibus, -1, "xen-platform");
}
Looks reasonable to me: I'll add this into v5.
ATB,
Mark.