4 #include "qemu-common.h"
5 #include "exec/memory.h"
7 #include "hw/isa/isa.h"
8 #include "hw/block/fdc.h"
10 #include "hw/i386/ioapic.h"
12 #include "qemu/range.h"
13 #include "qemu/bitmap.h"
14 #include "sysemu/sysemu.h"
15 #include "hw/pci/pci.h"
16 #include "hw/compat.h"
17 #include "hw/mem/pc-dimm.h"
18 #include "hw/mem/nvdimm.h"
19 #include "hw/acpi/acpi_dev_interface.h"
21 #define HPET_INTCAP "hpet-intcap"
25 * @acpi_dev: link to ACPI PM device that performs ACPI hotplug handling
26 * @boot_cpus: number of present VCPUs
28 struct PCMachineState
{
30 MachineState parent_obj
;
34 /* State for other subsystems/APIs: */
35 Notifier machine_done
;
37 /* Pointers to devices and objects: */
38 HotplugHandler
*acpi_dev
;
44 /* Configuration options: */
45 uint64_t max_ram_below_4g
;
49 AcpiNVDIMMState acpi_nvdimm_state
;
51 bool acpi_build_enabled
;
56 /* RAM information (sizes, addresses, configuration): */
57 ram_addr_t below_4g_mem_size
, above_4g_mem_size
;
59 /* CPU and apic information: */
60 bool apic_xrupt_override
;
61 unsigned apic_id_limit
;
64 /* NUMA information: */
68 /* Address space used by IOAPIC device. All IOAPIC interrupts
69 * will be translated to MSI messages in the address space. */
70 AddressSpace
*ioapic_as
;
73 #define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device"
74 #define PC_MACHINE_DEVMEM_REGION_SIZE "device-memory-region-size"
75 #define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g"
76 #define PC_MACHINE_VMPORT "vmport"
77 #define PC_MACHINE_SMM "smm"
78 #define PC_MACHINE_NVDIMM "nvdimm"
79 #define PC_MACHINE_NVDIMM_PERSIST "nvdimm-persistence"
80 #define PC_MACHINE_SMBUS "smbus"
81 #define PC_MACHINE_SATA "sata"
82 #define PC_MACHINE_PIT "pit"
89 * @enforce_aligned_dimm: check that DIMM's address/size is aligned by
90 * backend's alignment value if provided
91 * @acpi_data_size: Size of the chunk of memory at the top of RAM
92 * for the BIOS ACPI tables and other BIOS
94 * @gigabyte_align: Make sure that guest addresses aligned at
95 * 1Gbyte boundaries get mapped to host
96 * addresses aligned at 1Gbyte boundaries. This
97 * way we can use 1GByte pages in the host.
100 struct PCMachineClass
{
102 MachineClass parent_class
;
106 /* Device configuration: */
108 bool kvmclock_enabled
;
109 const char *default_nic_model
;
111 /* Compat options: */
116 int legacy_acpi_table_size
;
117 unsigned acpi_data_size
;
120 bool smbios_defaults
;
121 bool smbios_legacy_mode
;
122 bool smbios_uuid_encoded
;
124 /* RAM / address space compat: */
126 bool has_reserved_memory
;
127 bool enforce_aligned_dimm
;
128 bool broken_reserved_end
;
130 /* TSC rate migration: */
132 /* generate legacy CPU hotplug AML */
133 bool legacy_cpu_hotplug
;
135 /* use DMA capable linuxboot option rom */
136 bool linuxboot_dma_enabled
;
139 #define TYPE_PC_MACHINE "generic-pc-machine"
140 #define PC_MACHINE(obj) \
141 OBJECT_CHECK(PCMachineState, (obj), TYPE_PC_MACHINE)
142 #define PC_MACHINE_GET_CLASS(obj) \
143 OBJECT_GET_CLASS(PCMachineClass, (obj), TYPE_PC_MACHINE)
144 #define PC_MACHINE_CLASS(klass) \
145 OBJECT_CLASS_CHECK(PCMachineClass, (klass), TYPE_PC_MACHINE)
149 extern DeviceState
*isa_pic
;
150 qemu_irq
*i8259_init(ISABus
*bus
, qemu_irq parent_irq
);
151 qemu_irq
*kvm_i8259_init(ISABus
*bus
);
152 int pic_read_irq(DeviceState
*d
);
153 int pic_get_output(DeviceState
*d
);
157 /* Global System Interrupts */
159 #define GSI_NUM_PINS IOAPIC_NUM_PINS
161 typedef struct GSIState
{
162 qemu_irq i8259_irq
[ISA_NUM_IRQS
];
163 qemu_irq ioapic_irq
[IOAPIC_NUM_PINS
];
166 void gsi_handler(void *opaque
, int n
, int level
);
169 #define TYPE_VMPORT "vmport"
170 typedef uint32_t (VMPortReadFunc
)(void *opaque
, uint32_t address
);
172 static inline void vmport_init(ISABus
*bus
)
174 isa_create_simple(bus
, TYPE_VMPORT
);
177 void vmport_register(unsigned char command
, VMPortReadFunc
*func
, void *opaque
);
178 void vmmouse_get_data(uint32_t *data
);
179 void vmmouse_set_data(const uint32_t *data
);
182 extern int fd_bootchk
;
184 bool pc_machine_is_smm_enabled(PCMachineState
*pcms
);
185 void pc_register_ferr_irq(qemu_irq irq
);
186 void pc_acpi_smi_interrupt(void *opaque
, int irq
, int level
);
188 void pc_cpus_init(PCMachineState
*pcms
);
189 void pc_hot_add_cpu(const int64_t id
, Error
**errp
);
190 void pc_acpi_init(const char *default_dsdt
);
192 void pc_guest_info_init(PCMachineState
*pcms
);
194 #define PCI_HOST_PROP_PCI_HOLE_START "pci-hole-start"
195 #define PCI_HOST_PROP_PCI_HOLE_END "pci-hole-end"
196 #define PCI_HOST_PROP_PCI_HOLE64_START "pci-hole64-start"
197 #define PCI_HOST_PROP_PCI_HOLE64_END "pci-hole64-end"
198 #define PCI_HOST_PROP_PCI_HOLE64_SIZE "pci-hole64-size"
199 #define PCI_HOST_BELOW_4G_MEM_SIZE "below-4g-mem-size"
200 #define PCI_HOST_ABOVE_4G_MEM_SIZE "above-4g-mem-size"
203 void pc_pci_as_mapping_init(Object
*owner
, MemoryRegion
*system_memory
,
204 MemoryRegion
*pci_address_space
);
206 void xen_load_linux(PCMachineState
*pcms
);
207 void pc_memory_init(PCMachineState
*pcms
,
208 MemoryRegion
*system_memory
,
209 MemoryRegion
*rom_memory
,
210 MemoryRegion
**ram_memory
);
211 uint64_t pc_pci_hole64_start(void);
212 qemu_irq
pc_allocate_cpu_irq(void);
213 DeviceState
*pc_vga_init(ISABus
*isa_bus
, PCIBus
*pci_bus
);
214 void pc_basic_device_init(ISABus
*isa_bus
, qemu_irq
*gsi
,
215 ISADevice
**rtc_state
,
220 void pc_init_ne2k_isa(ISABus
*bus
, NICInfo
*nd
);
221 void pc_cmos_init(PCMachineState
*pcms
,
222 BusState
*ide0
, BusState
*ide1
,
224 void pc_nic_init(PCMachineClass
*pcmc
, ISABus
*isa_bus
, PCIBus
*pci_bus
);
225 void pc_pci_device_init(PCIBus
*pci_bus
);
227 typedef void (*cpu_set_smm_t
)(int smm
, void *arg
);
229 void ioapic_init_gsi(GSIState
*gsi_state
, const char *parent_name
);
231 ISADevice
*pc_find_fdc0(void);
232 int cmos_get_fd_drive_type(FloppyDriveType fd0
);
234 #define FW_CFG_IO_BASE 0x510
236 #define PORT92_A20_LINE "a20"
240 I2CBus
*piix4_pm_init(PCIBus
*bus
, int devfn
, uint32_t smb_io_base
,
241 qemu_irq sci_irq
, qemu_irq smi_irq
,
242 int smm_enabled
, DeviceState
**piix4_pm
);
248 struct PCII440FXState
;
249 typedef struct PCII440FXState PCII440FXState
;
251 #define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost"
252 #define TYPE_I440FX_PCI_DEVICE "i440FX"
254 #define TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE "igd-passthrough-i440FX"
257 * Reset Control Register: PCI-accessible ISA-Compatible Register at address
258 * 0xcf9, provided by the PCI/ISA bridge (PIIX3 PCI function 0, 8086:7000).
260 #define RCR_IOPORT 0xcf9
262 PCIBus
*i440fx_init(const char *host_type
, const char *pci_type
,
263 PCII440FXState
**pi440fx_state
, int *piix_devfn
,
264 ISABus
**isa_bus
, qemu_irq
*pic
,
265 MemoryRegion
*address_space_mem
,
266 MemoryRegion
*address_space_io
,
268 ram_addr_t below_4g_mem_size
,
269 ram_addr_t above_4g_mem_size
,
270 MemoryRegion
*pci_memory
,
271 MemoryRegion
*ram_memory
);
273 PCIBus
*find_i440fx(void);
275 extern PCIDevice
*piix4_dev
;
276 int piix4_init(PCIBus
*bus
, ISABus
**isa_bus
, int devfn
);
279 void pc_system_firmware_init(MemoryRegion
*rom_memory
,
283 void pc_madt_cpu_entry(AcpiDeviceIf
*adev
, int uid
,
284 const CPUArchIdList
*apic_ids
, GArray
*entry
);
288 #define E820_RESERVED 2
291 #define E820_UNUSABLE 5
293 int e820_add_entry(uint64_t, uint64_t, uint32_t);
294 int e820_get_num_entries(void);
295 bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
297 #define PC_COMPAT_2_12 \
300 .driver = TYPE_X86_CPU,\
301 .property = "legacy-cache",\
304 .driver = TYPE_X86_CPU,\
305 .property = "topoext",\
308 .driver = "EPYC-" TYPE_X86_CPU,\
309 .property = "xlevel",\
310 .value = stringify(0x8000000a),\
312 .driver = "EPYC-IBPB-" TYPE_X86_CPU,\
313 .property = "xlevel",\
314 .value = stringify(0x8000000a),\
317 #define PC_COMPAT_2_11 \
320 .driver = TYPE_X86_CPU,\
321 .property = "x-migrate-smi-count",\
324 .driver = "Skylake-Server" "-" TYPE_X86_CPU,\
325 .property = "clflushopt",\
329 #define PC_COMPAT_2_10 \
332 .driver = TYPE_X86_CPU,\
333 .property = "x-hv-max-vps",\
336 .driver = "i440FX-pcihost",\
337 .property = "x-pci-hole64-fix",\
340 .driver = "q35-pcihost",\
341 .property = "x-pci-hole64-fix",\
345 #define PC_COMPAT_2_9 \
349 .property = "extended-tseg-mbytes",\
350 .value = stringify(0),\
353 #define PC_COMPAT_2_8 \
356 .driver = TYPE_X86_CPU,\
357 .property = "tcg-cpuid",\
361 .driver = "kvmclock",\
362 .property = "x-mach-use-reliable-get-clock",\
366 .driver = "ICH9-LPC",\
367 .property = "x-smi-broadcast",\
371 .driver = TYPE_X86_CPU,\
372 .property = "vmware-cpuid-freq",\
376 .driver = "Haswell-" TYPE_X86_CPU,\
377 .property = "stepping",\
381 #define PC_COMPAT_2_7 \
384 .driver = TYPE_X86_CPU,\
385 .property = "l3-cache",\
389 .driver = TYPE_X86_CPU,\
390 .property = "full-cpuid-auto-level",\
394 .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
395 .property = "family",\
399 .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
400 .property = "model",\
404 .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
405 .property = "stepping",\
409 .driver = "isa-pcspk",\
410 .property = "migrate",\
414 #define PC_COMPAT_2_6 \
417 .driver = TYPE_X86_CPU,\
418 .property = "cpuid-0xb",\
421 .driver = "vmxnet3",\
422 .property = "romfile",\
426 .driver = TYPE_X86_CPU,\
427 .property = "fill-mtrr-mask",\
431 .driver = "apic-common",\
432 .property = "legacy-instance-id",\
436 #define PC_COMPAT_2_5 \
439 /* Helper for setting model-id for CPU models that changed model-id
440 * depending on QEMU versions up to QEMU 2.4.
442 #define PC_CPU_MODEL_IDS(v) \
444 .driver = "qemu32-" TYPE_X86_CPU,\
445 .property = "model-id",\
446 .value = "QEMU Virtual CPU version " v,\
449 .driver = "qemu64-" TYPE_X86_CPU,\
450 .property = "model-id",\
451 .value = "QEMU Virtual CPU version " v,\
454 .driver = "athlon-" TYPE_X86_CPU,\
455 .property = "model-id",\
456 .value = "QEMU Virtual CPU version " v,\
459 #define PC_COMPAT_2_4 \
461 PC_CPU_MODEL_IDS("2.4.0") \
463 .driver = "Haswell-" TYPE_X86_CPU,\
468 .driver = "Haswell-noTSX-" TYPE_X86_CPU,\
473 .driver = "Broadwell-" TYPE_X86_CPU,\
478 .driver = "Broadwell-noTSX-" TYPE_X86_CPU,\
483 .driver = "host" "-" TYPE_X86_CPU,\
484 .property = "host-cache-info",\
488 .driver = TYPE_X86_CPU,\
489 .property = "check",\
493 .driver = "qemu64" "-" TYPE_X86_CPU,\
494 .property = "sse4a",\
498 .driver = "qemu64" "-" TYPE_X86_CPU,\
503 .driver = "qemu64" "-" TYPE_X86_CPU,\
504 .property = "popcnt",\
508 .driver = "qemu32" "-" TYPE_X86_CPU,\
509 .property = "popcnt",\
512 .driver = "Opteron_G2" "-" TYPE_X86_CPU,\
513 .property = "rdtscp",\
516 .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
517 .property = "rdtscp",\
520 .driver = "Opteron_G4" "-" TYPE_X86_CPU,\
521 .property = "rdtscp",\
524 .driver = "Opteron_G5" "-" TYPE_X86_CPU,\
525 .property = "rdtscp",\
530 #define PC_COMPAT_2_3 \
532 PC_CPU_MODEL_IDS("2.3.0") \
534 .driver = TYPE_X86_CPU,\
538 .driver = "qemu64" "-" TYPE_X86_CPU,\
539 .property = "min-level",\
540 .value = stringify(4),\
542 .driver = "kvm64" "-" TYPE_X86_CPU,\
543 .property = "min-level",\
544 .value = stringify(5),\
546 .driver = "pentium3" "-" TYPE_X86_CPU,\
547 .property = "min-level",\
548 .value = stringify(2),\
550 .driver = "n270" "-" TYPE_X86_CPU,\
551 .property = "min-level",\
552 .value = stringify(5),\
554 .driver = "Conroe" "-" TYPE_X86_CPU,\
555 .property = "min-level",\
556 .value = stringify(4),\
558 .driver = "Penryn" "-" TYPE_X86_CPU,\
559 .property = "min-level",\
560 .value = stringify(4),\
562 .driver = "Nehalem" "-" TYPE_X86_CPU,\
563 .property = "min-level",\
564 .value = stringify(4),\
566 .driver = "n270" "-" TYPE_X86_CPU,\
567 .property = "min-xlevel",\
568 .value = stringify(0x8000000a),\
570 .driver = "Penryn" "-" TYPE_X86_CPU,\
571 .property = "min-xlevel",\
572 .value = stringify(0x8000000a),\
574 .driver = "Conroe" "-" TYPE_X86_CPU,\
575 .property = "min-xlevel",\
576 .value = stringify(0x8000000a),\
578 .driver = "Nehalem" "-" TYPE_X86_CPU,\
579 .property = "min-xlevel",\
580 .value = stringify(0x8000000a),\
582 .driver = "Westmere" "-" TYPE_X86_CPU,\
583 .property = "min-xlevel",\
584 .value = stringify(0x8000000a),\
586 .driver = "SandyBridge" "-" TYPE_X86_CPU,\
587 .property = "min-xlevel",\
588 .value = stringify(0x8000000a),\
590 .driver = "IvyBridge" "-" TYPE_X86_CPU,\
591 .property = "min-xlevel",\
592 .value = stringify(0x8000000a),\
594 .driver = "Haswell" "-" TYPE_X86_CPU,\
595 .property = "min-xlevel",\
596 .value = stringify(0x8000000a),\
598 .driver = "Haswell-noTSX" "-" TYPE_X86_CPU,\
599 .property = "min-xlevel",\
600 .value = stringify(0x8000000a),\
602 .driver = "Broadwell" "-" TYPE_X86_CPU,\
603 .property = "min-xlevel",\
604 .value = stringify(0x8000000a),\
606 .driver = "Broadwell-noTSX" "-" TYPE_X86_CPU,\
607 .property = "min-xlevel",\
608 .value = stringify(0x8000000a),\
610 .driver = TYPE_X86_CPU,\
611 .property = "kvm-no-smi-migration",\
615 #define PC_COMPAT_2_2 \
617 PC_CPU_MODEL_IDS("2.2.0") \
619 .driver = "kvm64" "-" TYPE_X86_CPU,\
624 .driver = "kvm32" "-" TYPE_X86_CPU,\
629 .driver = "Conroe" "-" TYPE_X86_CPU,\
634 .driver = "Penryn" "-" TYPE_X86_CPU,\
639 .driver = "Nehalem" "-" TYPE_X86_CPU,\
644 .driver = "Westmere" "-" TYPE_X86_CPU,\
649 .driver = "SandyBridge" "-" TYPE_X86_CPU,\
654 .driver = "Haswell" "-" TYPE_X86_CPU,\
659 .driver = "Broadwell" "-" TYPE_X86_CPU,\
664 .driver = "Opteron_G1" "-" TYPE_X86_CPU,\
669 .driver = "Opteron_G2" "-" TYPE_X86_CPU,\
674 .driver = "Opteron_G3" "-" TYPE_X86_CPU,\
679 .driver = "Opteron_G4" "-" TYPE_X86_CPU,\
684 .driver = "Opteron_G5" "-" TYPE_X86_CPU,\
689 .driver = "Haswell" "-" TYPE_X86_CPU,\
694 .driver = "Haswell" "-" TYPE_X86_CPU,\
695 .property = "rdrand",\
699 .driver = "Broadwell" "-" TYPE_X86_CPU,\
704 .driver = "Broadwell" "-" TYPE_X86_CPU,\
705 .property = "rdrand",\
709 #define PC_COMPAT_2_1 \
711 PC_CPU_MODEL_IDS("2.1.0") \
713 .driver = "coreduo" "-" TYPE_X86_CPU,\
718 .driver = "core2duo" "-" TYPE_X86_CPU,\
723 #define PC_COMPAT_2_0 \
724 PC_CPU_MODEL_IDS("2.0.0") \
726 .driver = "virtio-scsi-pci",\
727 .property = "any_layout",\
730 .driver = "PIIX4_PM",\
731 .property = "memory-hotplug-support",\
736 .property = "version",\
737 .value = stringify(0x11),\
740 .driver = "nec-usb-xhci",\
741 .property = "superspeed-ports-first",\
745 .driver = "nec-usb-xhci",\
746 .property = "force-pcie-endcap",\
750 .driver = "pci-serial",\
751 .property = "prog_if",\
752 .value = stringify(0),\
755 .driver = "pci-serial-2x",\
756 .property = "prog_if",\
757 .value = stringify(0),\
760 .driver = "pci-serial-4x",\
761 .property = "prog_if",\
762 .value = stringify(0),\
765 .driver = "virtio-net-pci",\
766 .property = "guest_announce",\
770 .driver = "ICH9-LPC",\
771 .property = "memory-hotplug-support",\
774 .driver = "xio3130-downstream",\
775 .property = COMPAT_PROP_PCP,\
778 .driver = "ioh3420",\
779 .property = COMPAT_PROP_PCP,\
783 #define PC_COMPAT_1_7 \
784 PC_CPU_MODEL_IDS("1.7.0") \
786 .driver = TYPE_USB_DEVICE,\
787 .property = "msos-desc",\
791 .driver = "PIIX4_PM",\
792 .property = "acpi-pci-hotplug-with-bridge-support",\
797 .property = HPET_INTCAP,\
798 .value = stringify(4),\
801 #define PC_COMPAT_1_6 \
802 PC_CPU_MODEL_IDS("1.6.0") \
805 .property = "mitigation",\
808 .driver = "qemu64-" TYPE_X86_CPU,\
809 .property = "model",\
810 .value = stringify(2),\
812 .driver = "qemu32-" TYPE_X86_CPU,\
813 .property = "model",\
814 .value = stringify(3),\
816 .driver = "i440FX-pcihost",\
817 .property = "short_root_bus",\
818 .value = stringify(1),\
820 .driver = "q35-pcihost",\
821 .property = "short_root_bus",\
822 .value = stringify(1),\
825 #define PC_COMPAT_1_5 \
826 PC_CPU_MODEL_IDS("1.5.0") \
828 .driver = "Conroe-" TYPE_X86_CPU,\
829 .property = "model",\
830 .value = stringify(2),\
832 .driver = "Conroe-" TYPE_X86_CPU,\
833 .property = "min-level",\
834 .value = stringify(2),\
836 .driver = "Penryn-" TYPE_X86_CPU,\
837 .property = "model",\
838 .value = stringify(2),\
840 .driver = "Penryn-" TYPE_X86_CPU,\
841 .property = "min-level",\
842 .value = stringify(2),\
844 .driver = "Nehalem-" TYPE_X86_CPU,\
845 .property = "model",\
846 .value = stringify(2),\
848 .driver = "Nehalem-" TYPE_X86_CPU,\
849 .property = "min-level",\
850 .value = stringify(2),\
852 .driver = "virtio-net-pci",\
853 .property = "any_layout",\
856 .driver = TYPE_X86_CPU,\
860 .driver = "i440FX-pcihost",\
861 .property = "short_root_bus",\
862 .value = stringify(0),\
864 .driver = "q35-pcihost",\
865 .property = "short_root_bus",\
866 .value = stringify(0),\
869 #define PC_COMPAT_1_4 \
870 PC_CPU_MODEL_IDS("1.4.0") \
872 .driver = "scsi-hd",\
873 .property = "discard_granularity",\
874 .value = stringify(0),\
876 .driver = "scsi-cd",\
877 .property = "discard_granularity",\
878 .value = stringify(0),\
880 .driver = "scsi-disk",\
881 .property = "discard_granularity",\
882 .value = stringify(0),\
885 .property = "discard_granularity",\
886 .value = stringify(0),\
889 .property = "discard_granularity",\
890 .value = stringify(0),\
892 .driver = "ide-drive",\
893 .property = "discard_granularity",\
894 .value = stringify(0),\
896 .driver = "virtio-blk-pci",\
897 .property = "discard_granularity",\
898 .value = stringify(0),\
900 .driver = "virtio-serial-pci",\
901 .property = "vectors",\
902 /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string */\
903 .value = stringify(0xFFFFFFFF),\
905 .driver = "virtio-net-pci", \
906 .property = "ctrl_guest_offloads", \
910 .property = "romfile",\
911 .value = "pxe-e1000.rom",\
913 .driver = "ne2k_pci",\
914 .property = "romfile",\
915 .value = "pxe-ne2k_pci.rom",\
918 .property = "romfile",\
919 .value = "pxe-pcnet.rom",\
921 .driver = "rtl8139",\
922 .property = "romfile",\
923 .value = "pxe-rtl8139.rom",\
925 .driver = "virtio-net-pci",\
926 .property = "romfile",\
927 .value = "pxe-virtio.rom",\
929 .driver = "486-" TYPE_X86_CPU,\
930 .property = "model",\
931 .value = stringify(0),\
934 .driver = "n270" "-" TYPE_X86_CPU,\
935 .property = "movbe",\
939 .driver = "Westmere" "-" TYPE_X86_CPU,\
940 .property = "pclmulqdq",\
944 #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
945 static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
947 MachineClass *mc = MACHINE_CLASS(oc); \
951 static const TypeInfo pc_machine_type_##suffix = { \
952 .name = namestr TYPE_MACHINE_SUFFIX, \
953 .parent = TYPE_PC_MACHINE, \
954 .class_init = pc_machine_##suffix##_class_init, \
956 static void pc_machine_init_##suffix(void) \
958 type_register(&pc_machine_type_##suffix); \
960 type_init(pc_machine_init_##suffix)
962 extern void igd_passthrough_isa_bridge_create(PCIBus
*bus
, uint16_t gpu_dev_id
);