xref: /qemu/hw/i386/pc_q35.c (revision bcf2b7d2af7c54bb42be1229df9e78ba7d08d2a7)
1df2d8b3eSIsaku Yamahata /*
2df2d8b3eSIsaku Yamahata  * Q35 chipset based pc system emulator
3df2d8b3eSIsaku Yamahata  *
4df2d8b3eSIsaku Yamahata  * Copyright (c) 2003-2004 Fabrice Bellard
5df2d8b3eSIsaku Yamahata  * Copyright (c) 2009, 2010
6df2d8b3eSIsaku Yamahata  *               Isaku Yamahata <yamahata at valinux co jp>
7df2d8b3eSIsaku Yamahata  *               VA Linux Systems Japan K.K.
8df2d8b3eSIsaku Yamahata  * Copyright (C) 2012 Jason Baron <jbaron@redhat.com>
9df2d8b3eSIsaku Yamahata  *
10df2d8b3eSIsaku Yamahata  * This is based on pc.c, but heavily modified.
11df2d8b3eSIsaku Yamahata  *
12df2d8b3eSIsaku Yamahata  * Permission is hereby granted, free of charge, to any person obtaining a copy
13df2d8b3eSIsaku Yamahata  * of this software and associated documentation files (the "Software"), to deal
14df2d8b3eSIsaku Yamahata  * in the Software without restriction, including without limitation the rights
15df2d8b3eSIsaku Yamahata  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16df2d8b3eSIsaku Yamahata  * copies of the Software, and to permit persons to whom the Software is
17df2d8b3eSIsaku Yamahata  * furnished to do so, subject to the following conditions:
18df2d8b3eSIsaku Yamahata  *
19df2d8b3eSIsaku Yamahata  * The above copyright notice and this permission notice shall be included in
20df2d8b3eSIsaku Yamahata  * all copies or substantial portions of the Software.
21df2d8b3eSIsaku Yamahata  *
22df2d8b3eSIsaku Yamahata  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23df2d8b3eSIsaku Yamahata  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24df2d8b3eSIsaku Yamahata  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25df2d8b3eSIsaku Yamahata  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26df2d8b3eSIsaku Yamahata  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27df2d8b3eSIsaku Yamahata  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28df2d8b3eSIsaku Yamahata  * THE SOFTWARE.
29df2d8b3eSIsaku Yamahata  */
3083c9f4caSPaolo Bonzini #include "hw/hw.h"
3104920fc0SMichael S. Tsirkin #include "hw/loader.h"
329c17d615SPaolo Bonzini #include "sysemu/arch_init.h"
330d09e41aSPaolo Bonzini #include "hw/i2c/smbus.h"
3483c9f4caSPaolo Bonzini #include "hw/boards.h"
350d09e41aSPaolo Bonzini #include "hw/timer/mc146818rtc.h"
360d09e41aSPaolo Bonzini #include "hw/xen/xen.h"
379c17d615SPaolo Bonzini #include "sysemu/kvm.h"
3883c9f4caSPaolo Bonzini #include "hw/kvm/clock.h"
390d09e41aSPaolo Bonzini #include "hw/pci-host/q35.h"
40022c62cbSPaolo Bonzini #include "exec/address-spaces.h"
410d09e41aSPaolo Bonzini #include "hw/i386/ich9.h"
42df2d8b3eSIsaku Yamahata #include "hw/ide/pci.h"
43df2d8b3eSIsaku Yamahata #include "hw/ide/ahci.h"
44df2d8b3eSIsaku Yamahata #include "hw/usb.h"
45f0513d2cSIgor Mammedov #include "hw/cpu/icc_bus.h"
46df2d8b3eSIsaku Yamahata 
47df2d8b3eSIsaku Yamahata /* ICH9 AHCI has 6 ports */
48df2d8b3eSIsaku Yamahata #define MAX_SATA_PORTS     6
49df2d8b3eSIsaku Yamahata 
507f1bb742SIgor Mammedov static bool has_pci_info;
5172c194f7SMichael S. Tsirkin static bool has_acpi_build = true;
523ab135f3SHu Tao 
53df2d8b3eSIsaku Yamahata /* PC hardware initialisation */
54df2d8b3eSIsaku Yamahata static void pc_q35_init(QEMUMachineInitArgs *args)
55df2d8b3eSIsaku Yamahata {
56df2d8b3eSIsaku Yamahata     ram_addr_t below_4g_mem_size, above_4g_mem_size;
57df2d8b3eSIsaku Yamahata     Q35PCIHost *q35_host;
58ce88812fSHu Tao     PCIHostState *phb;
59df2d8b3eSIsaku Yamahata     PCIBus *host_bus;
60df2d8b3eSIsaku Yamahata     PCIDevice *lpc;
61df2d8b3eSIsaku Yamahata     BusState *idebus[MAX_SATA_PORTS];
62df2d8b3eSIsaku Yamahata     ISADevice *rtc_state;
63df2d8b3eSIsaku Yamahata     ISADevice *floppy;
64df2d8b3eSIsaku Yamahata     MemoryRegion *pci_memory;
65df2d8b3eSIsaku Yamahata     MemoryRegion *rom_memory;
66df2d8b3eSIsaku Yamahata     MemoryRegion *ram_memory;
67df2d8b3eSIsaku Yamahata     GSIState *gsi_state;
68df2d8b3eSIsaku Yamahata     ISABus *isa_bus;
69df2d8b3eSIsaku Yamahata     int pci_enabled = 1;
70df2d8b3eSIsaku Yamahata     qemu_irq *cpu_irq;
71df2d8b3eSIsaku Yamahata     qemu_irq *gsi;
72df2d8b3eSIsaku Yamahata     qemu_irq *i8259;
73df2d8b3eSIsaku Yamahata     int i;
74df2d8b3eSIsaku Yamahata     ICH9LPCState *ich9_lpc;
75df2d8b3eSIsaku Yamahata     PCIDevice *ahci;
76f0513d2cSIgor Mammedov     DeviceState *icc_bridge;
773459a625SMichael S. Tsirkin     PcGuestInfo *guest_info;
78f0513d2cSIgor Mammedov 
79254c1282SAnthony PERARD     if (xen_enabled() && xen_hvm_init(&ram_memory) != 0) {
80254c1282SAnthony PERARD         fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
81254c1282SAnthony PERARD         exit(1);
82254c1282SAnthony PERARD     }
83254c1282SAnthony PERARD 
84f0513d2cSIgor Mammedov     icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
85f0513d2cSIgor Mammedov     object_property_add_child(qdev_get_machine(), "icc-bridge",
86f0513d2cSIgor Mammedov                               OBJECT(icc_bridge), NULL);
87df2d8b3eSIsaku Yamahata 
883b6fb9caSMarkus Armbruster     pc_cpus_init(args->cpu_model, icc_bridge);
89f7e4dd6cSGerd Hoffmann     pc_acpi_init("q35-acpi-dsdt.aml");
90df2d8b3eSIsaku Yamahata 
9121022c92SJan Kiszka     kvmclock_create();
9221022c92SJan Kiszka 
933b6fb9caSMarkus Armbruster     if (args->ram_size >= 0xb0000000) {
943b6fb9caSMarkus Armbruster         above_4g_mem_size = args->ram_size - 0xb0000000;
95df2d8b3eSIsaku Yamahata         below_4g_mem_size = 0xb0000000;
96df2d8b3eSIsaku Yamahata     } else {
97df2d8b3eSIsaku Yamahata         above_4g_mem_size = 0;
983b6fb9caSMarkus Armbruster         below_4g_mem_size = args->ram_size;
99df2d8b3eSIsaku Yamahata     }
100df2d8b3eSIsaku Yamahata 
101df2d8b3eSIsaku Yamahata     /* pci enabled */
102df2d8b3eSIsaku Yamahata     if (pci_enabled) {
103df2d8b3eSIsaku Yamahata         pci_memory = g_new(MemoryRegion, 1);
1042c9b15caSPaolo Bonzini         memory_region_init(pci_memory, NULL, "pci", INT64_MAX);
105df2d8b3eSIsaku Yamahata         rom_memory = pci_memory;
106df2d8b3eSIsaku Yamahata     } else {
107df2d8b3eSIsaku Yamahata         pci_memory = NULL;
108df2d8b3eSIsaku Yamahata         rom_memory = get_system_memory();
109df2d8b3eSIsaku Yamahata     }
110df2d8b3eSIsaku Yamahata 
1113459a625SMichael S. Tsirkin     guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
112f8c457b8SMichael S. Tsirkin     guest_info->has_pci_info = has_pci_info;
1136dd2a5c9SPaolo Bonzini     guest_info->isapc_ram_fw = false;
11472c194f7SMichael S. Tsirkin     guest_info->has_acpi_build = has_acpi_build;
1153459a625SMichael S. Tsirkin 
116df2d8b3eSIsaku Yamahata     /* allocate ram and load rom/bios */
117df2d8b3eSIsaku Yamahata     if (!xen_enabled()) {
1183b6fb9caSMarkus Armbruster         pc_memory_init(get_system_memory(),
1193b6fb9caSMarkus Armbruster                        args->kernel_filename, args->kernel_cmdline,
1203b6fb9caSMarkus Armbruster                        args->initrd_filename,
1213b6fb9caSMarkus Armbruster                        below_4g_mem_size, above_4g_mem_size,
1223459a625SMichael S. Tsirkin                        rom_memory, &ram_memory, guest_info);
123df2d8b3eSIsaku Yamahata     }
124df2d8b3eSIsaku Yamahata 
125df2d8b3eSIsaku Yamahata     /* irq lines */
126df2d8b3eSIsaku Yamahata     gsi_state = g_malloc0(sizeof(*gsi_state));
127df2d8b3eSIsaku Yamahata     if (kvm_irqchip_in_kernel()) {
128df2d8b3eSIsaku Yamahata         kvm_pc_setup_irq_routing(pci_enabled);
129df2d8b3eSIsaku Yamahata         gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state,
130df2d8b3eSIsaku Yamahata                                  GSI_NUM_PINS);
131df2d8b3eSIsaku Yamahata     } else {
132df2d8b3eSIsaku Yamahata         gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
133df2d8b3eSIsaku Yamahata     }
134df2d8b3eSIsaku Yamahata 
135df2d8b3eSIsaku Yamahata     /* create pci host bus */
136df2d8b3eSIsaku Yamahata     q35_host = Q35_HOST_DEVICE(qdev_create(NULL, TYPE_Q35_HOST_DEVICE));
137df2d8b3eSIsaku Yamahata 
138c52dc697SIgor Mammedov     object_property_add_child(qdev_get_machine(), "q35", OBJECT(q35_host), NULL);
139df2d8b3eSIsaku Yamahata     q35_host->mch.ram_memory = ram_memory;
140df2d8b3eSIsaku Yamahata     q35_host->mch.pci_address_space = pci_memory;
141df2d8b3eSIsaku Yamahata     q35_host->mch.system_memory = get_system_memory();
142c7e775e4SDong Xu Wang     q35_host->mch.address_space_io = get_system_io();
143df2d8b3eSIsaku Yamahata     q35_host->mch.below_4g_mem_size = below_4g_mem_size;
144df2d8b3eSIsaku Yamahata     q35_host->mch.above_4g_mem_size = above_4g_mem_size;
1453459a625SMichael S. Tsirkin     q35_host->mch.guest_info = guest_info;
146df2d8b3eSIsaku Yamahata     /* pci */
147df2d8b3eSIsaku Yamahata     qdev_init_nofail(DEVICE(q35_host));
148ce88812fSHu Tao     phb = PCI_HOST_BRIDGE(q35_host);
149ce88812fSHu Tao     host_bus = phb->bus;
150df2d8b3eSIsaku Yamahata     /* create ISA bus */
151df2d8b3eSIsaku Yamahata     lpc = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_LPC_DEV,
152df2d8b3eSIsaku Yamahata                                           ICH9_LPC_FUNC), true,
153df2d8b3eSIsaku Yamahata                                           TYPE_ICH9_LPC_DEVICE);
154df2d8b3eSIsaku Yamahata     ich9_lpc = ICH9_LPC_DEVICE(lpc);
155df2d8b3eSIsaku Yamahata     ich9_lpc->pic = gsi;
156df2d8b3eSIsaku Yamahata     ich9_lpc->ioapic = gsi_state->ioapic_irq;
157df2d8b3eSIsaku Yamahata     pci_bus_irqs(host_bus, ich9_lpc_set_irq, ich9_lpc_map_irq, ich9_lpc,
158df2d8b3eSIsaku Yamahata                  ICH9_LPC_NB_PIRQS);
15991c3f2f0SJason Baron     pci_bus_set_route_irq_fn(host_bus, ich9_route_intx_pin_to_irq);
160df2d8b3eSIsaku Yamahata     isa_bus = ich9_lpc->isa_bus;
161df2d8b3eSIsaku Yamahata 
162df2d8b3eSIsaku Yamahata     /*end early*/
163df2d8b3eSIsaku Yamahata     isa_bus_irqs(isa_bus, gsi);
164df2d8b3eSIsaku Yamahata 
165df2d8b3eSIsaku Yamahata     if (kvm_irqchip_in_kernel()) {
166df2d8b3eSIsaku Yamahata         i8259 = kvm_i8259_init(isa_bus);
167df2d8b3eSIsaku Yamahata     } else if (xen_enabled()) {
168df2d8b3eSIsaku Yamahata         i8259 = xen_interrupt_controller_init();
169df2d8b3eSIsaku Yamahata     } else {
170df2d8b3eSIsaku Yamahata         cpu_irq = pc_allocate_cpu_irq();
171df2d8b3eSIsaku Yamahata         i8259 = i8259_init(isa_bus, cpu_irq[0]);
172df2d8b3eSIsaku Yamahata     }
173df2d8b3eSIsaku Yamahata 
174df2d8b3eSIsaku Yamahata     for (i = 0; i < ISA_NUM_IRQS; i++) {
175df2d8b3eSIsaku Yamahata         gsi_state->i8259_irq[i] = i8259[i];
176df2d8b3eSIsaku Yamahata     }
177df2d8b3eSIsaku Yamahata     if (pci_enabled) {
178df2d8b3eSIsaku Yamahata         ioapic_init_gsi(gsi_state, NULL);
179df2d8b3eSIsaku Yamahata     }
180f0513d2cSIgor Mammedov     qdev_init_nofail(icc_bridge);
181df2d8b3eSIsaku Yamahata 
182df2d8b3eSIsaku Yamahata     pc_register_ferr_irq(gsi[13]);
183df2d8b3eSIsaku Yamahata 
184df2d8b3eSIsaku Yamahata     /* init basic PC hardware */
185df2d8b3eSIsaku Yamahata     pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, false);
186df2d8b3eSIsaku Yamahata 
187df2d8b3eSIsaku Yamahata     /* connect pm stuff to lpc */
188a3ac6b53SHu Tao     ich9_lpc_pm_init(lpc);
189df2d8b3eSIsaku Yamahata 
190df2d8b3eSIsaku Yamahata     /* ahci and SATA device, for q35 1 ahci controller is built-in */
191df2d8b3eSIsaku Yamahata     ahci = pci_create_simple_multifunction(host_bus,
192df2d8b3eSIsaku Yamahata                                            PCI_DEVFN(ICH9_SATA1_DEV,
193df2d8b3eSIsaku Yamahata                                                      ICH9_SATA1_FUNC),
194df2d8b3eSIsaku Yamahata                                            true, "ich9-ahci");
195df2d8b3eSIsaku Yamahata     idebus[0] = qdev_get_child_bus(&ahci->qdev, "ide.0");
196df2d8b3eSIsaku Yamahata     idebus[1] = qdev_get_child_bus(&ahci->qdev, "ide.1");
197df2d8b3eSIsaku Yamahata 
198df2d8b3eSIsaku Yamahata     if (usb_enabled(false)) {
199df2d8b3eSIsaku Yamahata         /* Should we create 6 UHCI according to ich9 spec? */
200df2d8b3eSIsaku Yamahata         ehci_create_ich9_with_companions(host_bus, 0x1d);
201df2d8b3eSIsaku Yamahata     }
202df2d8b3eSIsaku Yamahata 
203df2d8b3eSIsaku Yamahata     /* TODO: Populate SPD eeprom data.  */
204df2d8b3eSIsaku Yamahata     smbus_eeprom_init(ich9_smb_init(host_bus,
205df2d8b3eSIsaku Yamahata                                     PCI_DEVFN(ICH9_SMB_DEV, ICH9_SMB_FUNC),
206df2d8b3eSIsaku Yamahata                                     0xb100),
207df2d8b3eSIsaku Yamahata                       8, NULL, 0);
208df2d8b3eSIsaku Yamahata 
209c1654732SMarkus Armbruster     pc_cmos_init(below_4g_mem_size, above_4g_mem_size, args->boot_order,
210df2d8b3eSIsaku Yamahata                  floppy, idebus[0], idebus[1], rtc_state);
211df2d8b3eSIsaku Yamahata 
212df2d8b3eSIsaku Yamahata     /* the rest devices to which pci devfn is automatically assigned */
213df2d8b3eSIsaku Yamahata     pc_vga_init(isa_bus, host_bus);
214df2d8b3eSIsaku Yamahata     pc_nic_init(isa_bus, host_bus);
215df2d8b3eSIsaku Yamahata     if (pci_enabled) {
216df2d8b3eSIsaku Yamahata         pc_pci_device_init(host_bus);
217df2d8b3eSIsaku Yamahata     }
218df2d8b3eSIsaku Yamahata }
219df2d8b3eSIsaku Yamahata 
22089b439f3SEduardo Habkost static void pc_compat_1_6(QEMUMachineInitArgs *args)
221f8c457b8SMichael S. Tsirkin {
222f8c457b8SMichael S. Tsirkin     has_pci_info = false;
22304920fc0SMichael S. Tsirkin     rom_file_in_ram = false;
22472c194f7SMichael S. Tsirkin     has_acpi_build = false;
22589b439f3SEduardo Habkost }
22689b439f3SEduardo Habkost 
22789b439f3SEduardo Habkost static void pc_compat_1_5(QEMUMachineInitArgs *args)
22889b439f3SEduardo Habkost {
22989b439f3SEduardo Habkost     pc_compat_1_6(args);
23089b439f3SEduardo Habkost }
23189b439f3SEduardo Habkost 
23289b439f3SEduardo Habkost static void pc_compat_1_4(QEMUMachineInitArgs *args)
23389b439f3SEduardo Habkost {
234396f79f4SEduardo Habkost     pc_compat_1_5(args);
23589b439f3SEduardo Habkost     x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
23689b439f3SEduardo Habkost     x86_cpu_compat_set_features("Westmere", FEAT_1_ECX, 0, CPUID_EXT_PCLMULQDQ);
23789b439f3SEduardo Habkost }
23889b439f3SEduardo Habkost 
23989b439f3SEduardo Habkost static void pc_q35_init_1_6(QEMUMachineInitArgs *args)
24089b439f3SEduardo Habkost {
24189b439f3SEduardo Habkost     pc_compat_1_6(args);
242f8c457b8SMichael S. Tsirkin     pc_q35_init(args);
243f8c457b8SMichael S. Tsirkin }
244f8c457b8SMichael S. Tsirkin 
2459604f70fSMichael S. Tsirkin static void pc_q35_init_1_5(QEMUMachineInitArgs *args)
2469604f70fSMichael S. Tsirkin {
24789b439f3SEduardo Habkost     pc_compat_1_5(args);
24889b439f3SEduardo Habkost     pc_q35_init(args);
2499604f70fSMichael S. Tsirkin }
2509604f70fSMichael S. Tsirkin 
2519953f882SMarkus Armbruster static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
2529953f882SMarkus Armbruster {
25389b439f3SEduardo Habkost     pc_compat_1_4(args);
25489b439f3SEduardo Habkost     pc_q35_init(args);
2559953f882SMarkus Armbruster }
2569953f882SMarkus Armbruster 
257a0dba644SMichael S. Tsirkin #define PC_Q35_MACHINE_OPTIONS \
258a0dba644SMichael S. Tsirkin     PC_DEFAULT_MACHINE_OPTIONS, \
259a0dba644SMichael S. Tsirkin     .desc = "Standard PC (Q35 + ICH9, 2009)", \
260a0dba644SMichael S. Tsirkin     .hot_add_cpu = pc_hot_add_cpu
261a0dba644SMichael S. Tsirkin 
262*bcf2b7d2SGerd Hoffmann #define PC_Q35_2_0_MACHINE_OPTIONS                      \
263*bcf2b7d2SGerd Hoffmann     PC_Q35_MACHINE_OPTIONS,                             \
264*bcf2b7d2SGerd Hoffmann     .default_machine_opts = "firmware=bios-256k.bin"
265aeca6e8dSGerd Hoffmann 
266aeca6e8dSGerd Hoffmann static QEMUMachine pc_q35_machine_v2_0 = {
267aeca6e8dSGerd Hoffmann     PC_Q35_2_0_MACHINE_OPTIONS,
268aeca6e8dSGerd Hoffmann     .name = "pc-q35-2.0",
269aeca6e8dSGerd Hoffmann     .alias = "q35",
270aeca6e8dSGerd Hoffmann     .init = pc_q35_init,
271aeca6e8dSGerd Hoffmann };
272aeca6e8dSGerd Hoffmann 
273e9845f09SVincenzo Maffione #define PC_Q35_1_7_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
274e9845f09SVincenzo Maffione 
275e9845f09SVincenzo Maffione static QEMUMachine pc_q35_machine_v1_7 = {
276e9845f09SVincenzo Maffione     PC_Q35_1_7_MACHINE_OPTIONS,
277e9845f09SVincenzo Maffione     .name = "pc-q35-1.7",
278e9845f09SVincenzo Maffione     .init = pc_q35_init,
279e9845f09SVincenzo Maffione };
280e9845f09SVincenzo Maffione 
281a0dba644SMichael S. Tsirkin #define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
282a0dba644SMichael S. Tsirkin 
28345053fdeSEduardo Habkost static QEMUMachine pc_q35_machine_v1_6 = {
284a0dba644SMichael S. Tsirkin     PC_Q35_1_6_MACHINE_OPTIONS,
28545053fdeSEduardo Habkost     .name = "pc-q35-1.6",
2869604f70fSMichael S. Tsirkin     .init = pc_q35_init_1_6,
287e9845f09SVincenzo Maffione     .compat_props = (GlobalProperty[]) {
288e9845f09SVincenzo Maffione         PC_COMPAT_1_6,
289e9845f09SVincenzo Maffione         { /* end of list */ }
290e9845f09SVincenzo Maffione     },
29145053fdeSEduardo Habkost };
29245053fdeSEduardo Habkost 
293bf3caa3dSPaolo Bonzini static QEMUMachine pc_q35_machine_v1_5 = {
294a0dba644SMichael S. Tsirkin     PC_Q35_1_6_MACHINE_OPTIONS,
295bf3caa3dSPaolo Bonzini     .name = "pc-q35-1.5",
296f8c457b8SMichael S. Tsirkin     .init = pc_q35_init_1_5,
297ffce9ebbSEduardo Habkost     .compat_props = (GlobalProperty[]) {
298ffce9ebbSEduardo Habkost         PC_COMPAT_1_5,
299ffce9ebbSEduardo Habkost         { /* end of list */ }
300ffce9ebbSEduardo Habkost     },
301df2d8b3eSIsaku Yamahata };
302df2d8b3eSIsaku Yamahata 
303a0dba644SMichael S. Tsirkin #define PC_Q35_1_4_MACHINE_OPTIONS \
304a0dba644SMichael S. Tsirkin     PC_Q35_1_6_MACHINE_OPTIONS, \
305a0dba644SMichael S. Tsirkin     .hot_add_cpu = NULL
306a0dba644SMichael S. Tsirkin 
307bf3caa3dSPaolo Bonzini static QEMUMachine pc_q35_machine_v1_4 = {
308a0dba644SMichael S. Tsirkin     PC_Q35_1_4_MACHINE_OPTIONS,
309bf3caa3dSPaolo Bonzini     .name = "pc-q35-1.4",
3109953f882SMarkus Armbruster     .init = pc_q35_init_1_4,
311bf3caa3dSPaolo Bonzini     .compat_props = (GlobalProperty[]) {
312bf3caa3dSPaolo Bonzini         PC_COMPAT_1_4,
313bf3caa3dSPaolo Bonzini         { /* end of list */ }
314bf3caa3dSPaolo Bonzini     },
315bf3caa3dSPaolo Bonzini };
316bf3caa3dSPaolo Bonzini 
317df2d8b3eSIsaku Yamahata static void pc_q35_machine_init(void)
318df2d8b3eSIsaku Yamahata {
319aeca6e8dSGerd Hoffmann     qemu_register_machine(&pc_q35_machine_v2_0);
320e9845f09SVincenzo Maffione     qemu_register_machine(&pc_q35_machine_v1_7);
32145053fdeSEduardo Habkost     qemu_register_machine(&pc_q35_machine_v1_6);
322bf3caa3dSPaolo Bonzini     qemu_register_machine(&pc_q35_machine_v1_5);
323bf3caa3dSPaolo Bonzini     qemu_register_machine(&pc_q35_machine_v1_4);
324df2d8b3eSIsaku Yamahata }
325df2d8b3eSIsaku Yamahata 
326df2d8b3eSIsaku Yamahata machine_init(pc_q35_machine_init);
327