]> git.proxmox.com Git - mirror_qemu.git/blob - hw/i386/pc_piix.c
pc: Split pc_init_pci_1_0() off pc_init_pci_1_2()
[mirror_qemu.git] / hw / i386 / pc_piix.c
1 /*
2 * QEMU PC System Emulator
3 *
4 * Copyright (c) 2003-2004 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25 #include <glib.h>
26
27 #include "hw/hw.h"
28 #include "hw/i386/pc.h"
29 #include "hw/i386/apic.h"
30 #include "hw/pci/pci.h"
31 #include "hw/pci/pci_ids.h"
32 #include "hw/usb.h"
33 #include "net/net.h"
34 #include "hw/boards.h"
35 #include "hw/ide.h"
36 #include "sysemu/kvm.h"
37 #include "hw/kvm/clock.h"
38 #include "sysemu/sysemu.h"
39 #include "hw/sysbus.h"
40 #include "sysemu/arch_init.h"
41 #include "sysemu/blockdev.h"
42 #include "hw/i2c/smbus.h"
43 #include "hw/xen/xen.h"
44 #include "exec/memory.h"
45 #include "exec/address-spaces.h"
46 #include "hw/acpi/acpi.h"
47 #include "cpu.h"
48 #ifdef CONFIG_XEN
49 # include <xen/hvm/hvm_info_table.h>
50 #endif
51
52 #define MAX_IDE_BUS 2
53
54 static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
55 static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
56 static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
57
58 /* PC hardware initialisation */
59 static void pc_init1(MemoryRegion *system_memory,
60 MemoryRegion *system_io,
61 ram_addr_t ram_size,
62 const char *boot_device,
63 const char *kernel_filename,
64 const char *kernel_cmdline,
65 const char *initrd_filename,
66 const char *cpu_model,
67 int pci_enabled,
68 int kvmclock_enabled)
69 {
70 int i;
71 ram_addr_t below_4g_mem_size, above_4g_mem_size;
72 PCIBus *pci_bus;
73 ISABus *isa_bus;
74 PCII440FXState *i440fx_state;
75 int piix3_devfn = -1;
76 qemu_irq *cpu_irq;
77 qemu_irq *gsi;
78 qemu_irq *i8259;
79 qemu_irq *smi_irq;
80 GSIState *gsi_state;
81 DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
82 BusState *idebus[MAX_IDE_BUS];
83 ISADevice *rtc_state;
84 ISADevice *floppy;
85 MemoryRegion *ram_memory;
86 MemoryRegion *pci_memory;
87 MemoryRegion *rom_memory;
88 void *fw_cfg = NULL;
89
90 pc_cpus_init(cpu_model);
91 pc_acpi_init("acpi-dsdt.aml");
92
93 if (kvmclock_enabled) {
94 kvmclock_create();
95 }
96
97 if (ram_size >= 0xe0000000 ) {
98 above_4g_mem_size = ram_size - 0xe0000000;
99 below_4g_mem_size = 0xe0000000;
100 } else {
101 above_4g_mem_size = 0;
102 below_4g_mem_size = ram_size;
103 }
104
105 if (pci_enabled) {
106 pci_memory = g_new(MemoryRegion, 1);
107 memory_region_init(pci_memory, "pci", INT64_MAX);
108 rom_memory = pci_memory;
109 } else {
110 pci_memory = NULL;
111 rom_memory = system_memory;
112 }
113
114 /* allocate ram and load rom/bios */
115 if (!xen_enabled()) {
116 fw_cfg = pc_memory_init(system_memory,
117 kernel_filename, kernel_cmdline, initrd_filename,
118 below_4g_mem_size, above_4g_mem_size,
119 rom_memory, &ram_memory);
120 }
121
122 gsi_state = g_malloc0(sizeof(*gsi_state));
123 if (kvm_irqchip_in_kernel()) {
124 kvm_pc_setup_irq_routing(pci_enabled);
125 gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state,
126 GSI_NUM_PINS);
127 } else {
128 gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
129 }
130
131 if (pci_enabled) {
132 pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, gsi,
133 system_memory, system_io, ram_size,
134 below_4g_mem_size,
135 0x100000000ULL - below_4g_mem_size,
136 0x100000000ULL + above_4g_mem_size,
137 (sizeof(hwaddr) == 4
138 ? 0
139 : ((uint64_t)1 << 62)),
140 pci_memory, ram_memory);
141 } else {
142 pci_bus = NULL;
143 i440fx_state = NULL;
144 isa_bus = isa_bus_new(NULL, system_io);
145 no_hpet = 1;
146 }
147 isa_bus_irqs(isa_bus, gsi);
148
149 if (kvm_irqchip_in_kernel()) {
150 i8259 = kvm_i8259_init(isa_bus);
151 } else if (xen_enabled()) {
152 i8259 = xen_interrupt_controller_init();
153 } else {
154 cpu_irq = pc_allocate_cpu_irq();
155 i8259 = i8259_init(isa_bus, cpu_irq[0]);
156 }
157
158 for (i = 0; i < ISA_NUM_IRQS; i++) {
159 gsi_state->i8259_irq[i] = i8259[i];
160 }
161 if (pci_enabled) {
162 ioapic_init_gsi(gsi_state, "i440fx");
163 }
164
165 pc_register_ferr_irq(gsi[13]);
166
167 pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
168 if (xen_enabled()) {
169 pci_create_simple(pci_bus, -1, "xen-platform");
170 }
171
172 /* init basic PC hardware */
173 pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled());
174
175 pc_nic_init(isa_bus, pci_bus);
176
177 ide_drive_get(hd, MAX_IDE_BUS);
178 if (pci_enabled) {
179 PCIDevice *dev;
180 if (xen_enabled()) {
181 dev = pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1);
182 } else {
183 dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
184 }
185 idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
186 idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
187 } else {
188 for(i = 0; i < MAX_IDE_BUS; i++) {
189 ISADevice *dev;
190 dev = isa_ide_init(isa_bus, ide_iobase[i], ide_iobase2[i],
191 ide_irq[i],
192 hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]);
193 idebus[i] = qdev_get_child_bus(&dev->qdev, "ide.0");
194 }
195 }
196
197 audio_init(isa_bus, pci_enabled ? pci_bus : NULL);
198
199 pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device,
200 floppy, idebus[0], idebus[1], rtc_state);
201
202 if (pci_enabled && usb_enabled(false)) {
203 pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci");
204 }
205
206 if (pci_enabled && acpi_enabled) {
207 i2c_bus *smbus;
208
209 smi_irq = qemu_allocate_irqs(pc_acpi_smi_interrupt,
210 x86_env_get_cpu(first_cpu), 1);
211 /* TODO: Populate SPD eeprom data. */
212 smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
213 gsi[9], *smi_irq,
214 kvm_enabled(), fw_cfg);
215 smbus_eeprom_init(smbus, 8, NULL, 0);
216 }
217
218 if (pci_enabled) {
219 pc_pci_device_init(pci_bus);
220 }
221 }
222
223 static void pc_init_pci(QEMUMachineInitArgs *args)
224 {
225 ram_addr_t ram_size = args->ram_size;
226 const char *cpu_model = args->cpu_model;
227 const char *kernel_filename = args->kernel_filename;
228 const char *kernel_cmdline = args->kernel_cmdline;
229 const char *initrd_filename = args->initrd_filename;
230 const char *boot_device = args->boot_device;
231 pc_init1(get_system_memory(),
232 get_system_io(),
233 ram_size, boot_device,
234 kernel_filename, kernel_cmdline,
235 initrd_filename, cpu_model, 1, 1);
236 }
237
238 static void pc_init_pci_1_3(QEMUMachineInitArgs *args)
239 {
240 enable_compat_apic_id_mode();
241 pc_init_pci(args);
242 }
243
244 /* PC machine init function for pc-1.1 to pc-1.2 */
245 static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
246 {
247 disable_kvm_pv_eoi();
248 enable_compat_apic_id_mode();
249 pc_init_pci(args);
250 }
251
252 /* PC machine init function for pc-0.14 to pc-1.0 */
253 static void pc_init_pci_1_0(QEMUMachineInitArgs *args)
254 {
255 disable_kvm_pv_eoi();
256 enable_compat_apic_id_mode();
257 pc_init_pci(args);
258 }
259
260 /* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */
261 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
262 {
263 ram_addr_t ram_size = args->ram_size;
264 const char *cpu_model = args->cpu_model;
265 const char *kernel_filename = args->kernel_filename;
266 const char *kernel_cmdline = args->kernel_cmdline;
267 const char *initrd_filename = args->initrd_filename;
268 const char *boot_device = args->boot_device;
269 disable_kvm_pv_eoi();
270 enable_compat_apic_id_mode();
271 pc_init1(get_system_memory(),
272 get_system_io(),
273 ram_size, boot_device,
274 kernel_filename, kernel_cmdline,
275 initrd_filename, cpu_model, 1, 0);
276 }
277
278 static void pc_init_isa(QEMUMachineInitArgs *args)
279 {
280 ram_addr_t ram_size = args->ram_size;
281 const char *cpu_model = args->cpu_model;
282 const char *kernel_filename = args->kernel_filename;
283 const char *kernel_cmdline = args->kernel_cmdline;
284 const char *initrd_filename = args->initrd_filename;
285 const char *boot_device = args->boot_device;
286 if (cpu_model == NULL)
287 cpu_model = "486";
288 disable_kvm_pv_eoi();
289 enable_compat_apic_id_mode();
290 pc_init1(get_system_memory(),
291 get_system_io(),
292 ram_size, boot_device,
293 kernel_filename, kernel_cmdline,
294 initrd_filename, cpu_model, 0, 1);
295 }
296
297 #ifdef CONFIG_XEN
298 static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
299 {
300 if (xen_hvm_init() != 0) {
301 hw_error("xen hardware virtual machine initialisation failed");
302 }
303 pc_init_pci_no_kvmclock(args);
304 xen_vcpu_init();
305 }
306 #endif
307
308 static QEMUMachine pc_i440fx_machine_v1_5 = {
309 .name = "pc-i440fx-1.5",
310 .alias = "pc",
311 .desc = "Standard PC (i440FX + PIIX, 1996)",
312 .init = pc_init_pci,
313 .max_cpus = 255,
314 .is_default = 1,
315 DEFAULT_MACHINE_OPTIONS,
316 };
317
318 static QEMUMachine pc_i440fx_machine_v1_4 = {
319 .name = "pc-i440fx-1.4",
320 .desc = "Standard PC (i440FX + PIIX, 1996)",
321 .init = pc_init_pci,
322 .max_cpus = 255,
323 .compat_props = (GlobalProperty[]) {
324 PC_COMPAT_1_4,
325 { /* end of list */ }
326 },
327 DEFAULT_MACHINE_OPTIONS,
328 };
329
330 #define PC_COMPAT_1_3 \
331 PC_COMPAT_1_4, \
332 {\
333 .driver = "usb-tablet",\
334 .property = "usb_version",\
335 .value = stringify(1),\
336 },{\
337 .driver = "virtio-net-pci",\
338 .property = "ctrl_mac_addr",\
339 .value = "off", \
340 },{ \
341 .driver = "virtio-net-pci", \
342 .property = "mq", \
343 .value = "off", \
344 }, {\
345 .driver = "e1000",\
346 .property = "autonegotiation",\
347 .value = "off",\
348 }
349
350 static QEMUMachine pc_machine_v1_3 = {
351 .name = "pc-1.3",
352 .desc = "Standard PC",
353 .init = pc_init_pci_1_3,
354 .max_cpus = 255,
355 .compat_props = (GlobalProperty[]) {
356 PC_COMPAT_1_3,
357 { /* end of list */ }
358 },
359 DEFAULT_MACHINE_OPTIONS,
360 };
361
362 #define PC_COMPAT_1_2 \
363 PC_COMPAT_1_3,\
364 {\
365 .driver = "nec-usb-xhci",\
366 .property = "msi",\
367 .value = "off",\
368 },{\
369 .driver = "nec-usb-xhci",\
370 .property = "msix",\
371 .value = "off",\
372 },{\
373 .driver = "ivshmem",\
374 .property = "use64",\
375 .value = "0",\
376 },{\
377 .driver = "qxl",\
378 .property = "revision",\
379 .value = stringify(3),\
380 },{\
381 .driver = "qxl-vga",\
382 .property = "revision",\
383 .value = stringify(3),\
384 },{\
385 .driver = "VGA",\
386 .property = "mmio",\
387 .value = "off",\
388 }
389
390 static QEMUMachine pc_machine_v1_2 = {
391 .name = "pc-1.2",
392 .desc = "Standard PC",
393 .init = pc_init_pci_1_2,
394 .max_cpus = 255,
395 .compat_props = (GlobalProperty[]) {
396 PC_COMPAT_1_2,
397 { /* end of list */ }
398 },
399 DEFAULT_MACHINE_OPTIONS,
400 };
401
402 #define PC_COMPAT_1_1 \
403 PC_COMPAT_1_2,\
404 {\
405 .driver = "virtio-scsi-pci",\
406 .property = "hotplug",\
407 .value = "off",\
408 },{\
409 .driver = "virtio-scsi-pci",\
410 .property = "param_change",\
411 .value = "off",\
412 },{\
413 .driver = "VGA",\
414 .property = "vgamem_mb",\
415 .value = stringify(8),\
416 },{\
417 .driver = "vmware-svga",\
418 .property = "vgamem_mb",\
419 .value = stringify(8),\
420 },{\
421 .driver = "qxl-vga",\
422 .property = "vgamem_mb",\
423 .value = stringify(8),\
424 },{\
425 .driver = "qxl",\
426 .property = "vgamem_mb",\
427 .value = stringify(8),\
428 },{\
429 .driver = "virtio-blk-pci",\
430 .property = "config-wce",\
431 .value = "off",\
432 }
433
434 static QEMUMachine pc_machine_v1_1 = {
435 .name = "pc-1.1",
436 .desc = "Standard PC",
437 .init = pc_init_pci_1_2,
438 .max_cpus = 255,
439 .compat_props = (GlobalProperty[]) {
440 PC_COMPAT_1_1,
441 { /* end of list */ }
442 },
443 DEFAULT_MACHINE_OPTIONS,
444 };
445
446 #define PC_COMPAT_1_0 \
447 PC_COMPAT_1_1,\
448 {\
449 .driver = "pc-sysfw",\
450 .property = "rom_only",\
451 .value = stringify(1),\
452 }, {\
453 .driver = "isa-fdc",\
454 .property = "check_media_rate",\
455 .value = "off",\
456 }, {\
457 .driver = "virtio-balloon-pci",\
458 .property = "class",\
459 .value = stringify(PCI_CLASS_MEMORY_RAM),\
460 },{\
461 .driver = "apic",\
462 .property = "vapic",\
463 .value = "off",\
464 },{\
465 .driver = TYPE_USB_DEVICE,\
466 .property = "full-path",\
467 .value = "no",\
468 }
469
470 static QEMUMachine pc_machine_v1_0 = {
471 .name = "pc-1.0",
472 .desc = "Standard PC",
473 .init = pc_init_pci_1_0,
474 .max_cpus = 255,
475 .compat_props = (GlobalProperty[]) {
476 PC_COMPAT_1_0,
477 { /* end of list */ }
478 },
479 .hw_version = "1.0",
480 DEFAULT_MACHINE_OPTIONS,
481 };
482
483 #define PC_COMPAT_0_15 \
484 PC_COMPAT_1_0
485
486 static QEMUMachine pc_machine_v0_15 = {
487 .name = "pc-0.15",
488 .desc = "Standard PC",
489 .init = pc_init_pci_1_0,
490 .max_cpus = 255,
491 .compat_props = (GlobalProperty[]) {
492 PC_COMPAT_0_15,
493 { /* end of list */ }
494 },
495 .hw_version = "0.15",
496 DEFAULT_MACHINE_OPTIONS,
497 };
498
499 #define PC_COMPAT_0_14 \
500 PC_COMPAT_0_15,\
501 {\
502 .driver = "virtio-blk-pci",\
503 .property = "event_idx",\
504 .value = "off",\
505 },{\
506 .driver = "virtio-serial-pci",\
507 .property = "event_idx",\
508 .value = "off",\
509 },{\
510 .driver = "virtio-net-pci",\
511 .property = "event_idx",\
512 .value = "off",\
513 },{\
514 .driver = "virtio-balloon-pci",\
515 .property = "event_idx",\
516 .value = "off",\
517 }
518
519 static QEMUMachine pc_machine_v0_14 = {
520 .name = "pc-0.14",
521 .desc = "Standard PC",
522 .init = pc_init_pci_1_0,
523 .max_cpus = 255,
524 .compat_props = (GlobalProperty[]) {
525 PC_COMPAT_0_14,
526 {
527 .driver = "qxl",
528 .property = "revision",
529 .value = stringify(2),
530 },{
531 .driver = "qxl-vga",
532 .property = "revision",
533 .value = stringify(2),
534 },
535 { /* end of list */ }
536 },
537 .hw_version = "0.14",
538 DEFAULT_MACHINE_OPTIONS,
539 };
540
541 #define PC_COMPAT_0_13 \
542 PC_COMPAT_0_14,\
543 {\
544 .driver = TYPE_PCI_DEVICE,\
545 .property = "command_serr_enable",\
546 .value = "off",\
547 },{\
548 .driver = "AC97",\
549 .property = "use_broken_id",\
550 .value = stringify(1),\
551 }
552
553 static QEMUMachine pc_machine_v0_13 = {
554 .name = "pc-0.13",
555 .desc = "Standard PC",
556 .init = pc_init_pci_no_kvmclock,
557 .max_cpus = 255,
558 .compat_props = (GlobalProperty[]) {
559 PC_COMPAT_0_13,
560 {
561 .driver = "virtio-9p-pci",
562 .property = "vectors",
563 .value = stringify(0),
564 },{
565 .driver = "VGA",
566 .property = "rombar",
567 .value = stringify(0),
568 },{
569 .driver = "vmware-svga",
570 .property = "rombar",
571 .value = stringify(0),
572 },
573 { /* end of list */ }
574 },
575 .hw_version = "0.13",
576 DEFAULT_MACHINE_OPTIONS,
577 };
578
579 #define PC_COMPAT_0_12 \
580 PC_COMPAT_0_13,\
581 {\
582 .driver = "virtio-serial-pci",\
583 .property = "max_ports",\
584 .value = stringify(1),\
585 },{\
586 .driver = "virtio-serial-pci",\
587 .property = "vectors",\
588 .value = stringify(0),\
589 }
590
591 static QEMUMachine pc_machine_v0_12 = {
592 .name = "pc-0.12",
593 .desc = "Standard PC",
594 .init = pc_init_pci_no_kvmclock,
595 .max_cpus = 255,
596 .compat_props = (GlobalProperty[]) {
597 PC_COMPAT_0_12,
598 {
599 .driver = "VGA",
600 .property = "rombar",
601 .value = stringify(0),
602 },{
603 .driver = "vmware-svga",
604 .property = "rombar",
605 .value = stringify(0),
606 },
607 { /* end of list */ }
608 },
609 .hw_version = "0.12",
610 DEFAULT_MACHINE_OPTIONS,
611 };
612
613 #define PC_COMPAT_0_11 \
614 PC_COMPAT_0_12,\
615 {\
616 .driver = "virtio-blk-pci",\
617 .property = "vectors",\
618 .value = stringify(0),\
619 },{\
620 .driver = TYPE_PCI_DEVICE,\
621 .property = "rombar",\
622 .value = stringify(0),\
623 }
624
625 static QEMUMachine pc_machine_v0_11 = {
626 .name = "pc-0.11",
627 .desc = "Standard PC, qemu 0.11",
628 .init = pc_init_pci_no_kvmclock,
629 .max_cpus = 255,
630 .compat_props = (GlobalProperty[]) {
631 PC_COMPAT_0_11,
632 {
633 .driver = "ide-drive",
634 .property = "ver",
635 .value = "0.11",
636 },{
637 .driver = "scsi-disk",
638 .property = "ver",
639 .value = "0.11",
640 },
641 { /* end of list */ }
642 },
643 .hw_version = "0.11",
644 DEFAULT_MACHINE_OPTIONS,
645 };
646
647 static QEMUMachine pc_machine_v0_10 = {
648 .name = "pc-0.10",
649 .desc = "Standard PC, qemu 0.10",
650 .init = pc_init_pci_no_kvmclock,
651 .max_cpus = 255,
652 .compat_props = (GlobalProperty[]) {
653 PC_COMPAT_0_11,
654 {
655 .driver = "virtio-blk-pci",
656 .property = "class",
657 .value = stringify(PCI_CLASS_STORAGE_OTHER),
658 },{
659 .driver = "virtio-serial-pci",
660 .property = "class",
661 .value = stringify(PCI_CLASS_DISPLAY_OTHER),
662 },{
663 .driver = "virtio-net-pci",
664 .property = "vectors",
665 .value = stringify(0),
666 },{
667 .driver = "ide-drive",
668 .property = "ver",
669 .value = "0.10",
670 },{
671 .driver = "scsi-disk",
672 .property = "ver",
673 .value = "0.10",
674 },
675 { /* end of list */ }
676 },
677 .hw_version = "0.10",
678 DEFAULT_MACHINE_OPTIONS,
679 };
680
681 static QEMUMachine isapc_machine = {
682 .name = "isapc",
683 .desc = "ISA-only PC",
684 .init = pc_init_isa,
685 .max_cpus = 1,
686 .compat_props = (GlobalProperty[]) {
687 {
688 .driver = "pc-sysfw",
689 .property = "rom_only",
690 .value = stringify(1),
691 },
692 { /* end of list */ }
693 },
694 DEFAULT_MACHINE_OPTIONS,
695 };
696
697 #ifdef CONFIG_XEN
698 static QEMUMachine xenfv_machine = {
699 .name = "xenfv",
700 .desc = "Xen Fully-virtualized PC",
701 .init = pc_xen_hvm_init,
702 .max_cpus = HVM_MAX_VCPUS,
703 .default_machine_opts = "accel=xen",
704 DEFAULT_MACHINE_OPTIONS,
705 };
706 #endif
707
708 static void pc_machine_init(void)
709 {
710 qemu_register_machine(&pc_i440fx_machine_v1_5);
711 qemu_register_machine(&pc_i440fx_machine_v1_4);
712 qemu_register_machine(&pc_machine_v1_3);
713 qemu_register_machine(&pc_machine_v1_2);
714 qemu_register_machine(&pc_machine_v1_1);
715 qemu_register_machine(&pc_machine_v1_0);
716 qemu_register_machine(&pc_machine_v0_15);
717 qemu_register_machine(&pc_machine_v0_14);
718 qemu_register_machine(&pc_machine_v0_13);
719 qemu_register_machine(&pc_machine_v0_12);
720 qemu_register_machine(&pc_machine_v0_11);
721 qemu_register_machine(&pc_machine_v0_10);
722 qemu_register_machine(&isapc_machine);
723 #ifdef CONFIG_XEN
724 qemu_register_machine(&xenfv_machine);
725 #endif
726 }
727
728 machine_init(pc_machine_init);