hw/misc: don't create pvpanic device by default
[qemu/kevin.git] / hw / i386 / pc_piix.c
blobec7f13fd54f42f9f0f1756ebb5673e9ee50ea29d
1 /*
2 * QEMU PC System Emulator
4 * Copyright (c) 2003-2004 Fabrice Bellard
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:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
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.
25 #include <glib.h>
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 "hw/cpu/icc_bus.h"
41 #include "sysemu/arch_init.h"
42 #include "sysemu/blockdev.h"
43 #include "hw/i2c/smbus.h"
44 #include "hw/xen/xen.h"
45 #include "exec/memory.h"
46 #include "exec/address-spaces.h"
47 #include "hw/acpi/acpi.h"
48 #include "cpu.h"
49 #ifdef CONFIG_XEN
50 # include <xen/hvm/hvm_info_table.h>
51 #endif
53 #define MAX_IDE_BUS 2
55 static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 };
56 static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
57 static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
59 static bool has_pvpanic;
60 static bool has_pci_info = true;
62 /* PC hardware initialisation */
63 static void pc_init1(MemoryRegion *system_memory,
64 MemoryRegion *system_io,
65 ram_addr_t ram_size,
66 const char *boot_device,
67 const char *kernel_filename,
68 const char *kernel_cmdline,
69 const char *initrd_filename,
70 const char *cpu_model,
71 int pci_enabled,
72 int kvmclock_enabled)
74 int i;
75 ram_addr_t below_4g_mem_size, above_4g_mem_size;
76 PCIBus *pci_bus;
77 ISABus *isa_bus;
78 PCII440FXState *i440fx_state;
79 int piix3_devfn = -1;
80 qemu_irq *cpu_irq;
81 qemu_irq *gsi;
82 qemu_irq *i8259;
83 qemu_irq *smi_irq;
84 GSIState *gsi_state;
85 DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
86 BusState *idebus[MAX_IDE_BUS];
87 ISADevice *rtc_state;
88 ISADevice *floppy;
89 MemoryRegion *ram_memory;
90 MemoryRegion *pci_memory;
91 MemoryRegion *rom_memory;
92 DeviceState *icc_bridge;
93 FWCfgState *fw_cfg = NULL;
94 PcGuestInfo *guest_info;
96 if (xen_enabled() && xen_hvm_init() != 0) {
97 fprintf(stderr, "xen hardware virtual machine initialisation failed\n");
98 exit(1);
101 icc_bridge = qdev_create(NULL, TYPE_ICC_BRIDGE);
102 object_property_add_child(qdev_get_machine(), "icc-bridge",
103 OBJECT(icc_bridge), NULL);
105 pc_cpus_init(cpu_model, icc_bridge);
106 pc_acpi_init("acpi-dsdt.aml");
108 if (kvm_enabled() && kvmclock_enabled) {
109 kvmclock_create();
112 if (ram_size >= 0xe0000000 ) {
113 above_4g_mem_size = ram_size - 0xe0000000;
114 below_4g_mem_size = 0xe0000000;
115 } else {
116 above_4g_mem_size = 0;
117 below_4g_mem_size = ram_size;
120 if (pci_enabled) {
121 pci_memory = g_new(MemoryRegion, 1);
122 memory_region_init(pci_memory, NULL, "pci", INT64_MAX);
123 rom_memory = pci_memory;
124 } else {
125 pci_memory = NULL;
126 rom_memory = system_memory;
129 guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size);
130 guest_info->has_pci_info = has_pci_info;
131 guest_info->isapc_ram_fw = !pci_enabled;
133 /* allocate ram and load rom/bios */
134 if (!xen_enabled()) {
135 fw_cfg = pc_memory_init(system_memory,
136 kernel_filename, kernel_cmdline, initrd_filename,
137 below_4g_mem_size, above_4g_mem_size,
138 rom_memory, &ram_memory, guest_info);
141 gsi_state = g_malloc0(sizeof(*gsi_state));
142 if (kvm_irqchip_in_kernel()) {
143 kvm_pc_setup_irq_routing(pci_enabled);
144 gsi = qemu_allocate_irqs(kvm_pc_gsi_handler, gsi_state,
145 GSI_NUM_PINS);
146 } else {
147 gsi = qemu_allocate_irqs(gsi_handler, gsi_state, GSI_NUM_PINS);
150 if (pci_enabled) {
151 pci_bus = i440fx_init(&i440fx_state, &piix3_devfn, &isa_bus, gsi,
152 system_memory, system_io, ram_size,
153 below_4g_mem_size,
154 0x100000000ULL - below_4g_mem_size,
155 above_4g_mem_size,
156 pci_memory, ram_memory);
157 } else {
158 pci_bus = NULL;
159 i440fx_state = NULL;
160 isa_bus = isa_bus_new(NULL, system_io);
161 no_hpet = 1;
163 isa_bus_irqs(isa_bus, gsi);
165 if (kvm_irqchip_in_kernel()) {
166 i8259 = kvm_i8259_init(isa_bus);
167 } else if (xen_enabled()) {
168 i8259 = xen_interrupt_controller_init();
169 } else {
170 cpu_irq = pc_allocate_cpu_irq();
171 i8259 = i8259_init(isa_bus, cpu_irq[0]);
174 for (i = 0; i < ISA_NUM_IRQS; i++) {
175 gsi_state->i8259_irq[i] = i8259[i];
177 if (pci_enabled) {
178 ioapic_init_gsi(gsi_state, "i440fx");
180 qdev_init_nofail(icc_bridge);
182 pc_register_ferr_irq(gsi[13]);
184 pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL);
186 /* init basic PC hardware */
187 pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled());
189 pc_nic_init(isa_bus, pci_bus);
191 ide_drive_get(hd, MAX_IDE_BUS);
192 if (pci_enabled) {
193 PCIDevice *dev;
194 if (xen_enabled()) {
195 dev = pci_piix3_xen_ide_init(pci_bus, hd, piix3_devfn + 1);
196 } else {
197 dev = pci_piix3_ide_init(pci_bus, hd, piix3_devfn + 1);
199 idebus[0] = qdev_get_child_bus(&dev->qdev, "ide.0");
200 idebus[1] = qdev_get_child_bus(&dev->qdev, "ide.1");
201 } else {
202 for(i = 0; i < MAX_IDE_BUS; i++) {
203 ISADevice *dev;
204 dev = isa_ide_init(isa_bus, ide_iobase[i], ide_iobase2[i],
205 ide_irq[i],
206 hd[MAX_IDE_DEVS * i], hd[MAX_IDE_DEVS * i + 1]);
207 idebus[i] = qdev_get_child_bus(DEVICE(dev), "ide.0");
211 pc_cmos_init(below_4g_mem_size, above_4g_mem_size, boot_device,
212 floppy, idebus[0], idebus[1], rtc_state);
214 if (pci_enabled && usb_enabled(false)) {
215 pci_create_simple(pci_bus, piix3_devfn + 2, "piix3-usb-uhci");
218 if (pci_enabled && acpi_enabled) {
219 i2c_bus *smbus;
221 smi_irq = qemu_allocate_irqs(pc_acpi_smi_interrupt, first_cpu, 1);
222 /* TODO: Populate SPD eeprom data. */
223 smbus = piix4_pm_init(pci_bus, piix3_devfn + 3, 0xb100,
224 gsi[9], *smi_irq,
225 kvm_enabled(), fw_cfg);
226 smbus_eeprom_init(smbus, 8, NULL, 0);
229 if (pci_enabled) {
230 pc_pci_device_init(pci_bus);
233 if (has_pvpanic) {
234 pvpanic_init(isa_bus);
238 static void pc_init_pci(QEMUMachineInitArgs *args)
240 ram_addr_t ram_size = args->ram_size;
241 const char *cpu_model = args->cpu_model;
242 const char *kernel_filename = args->kernel_filename;
243 const char *kernel_cmdline = args->kernel_cmdline;
244 const char *initrd_filename = args->initrd_filename;
245 const char *boot_device = args->boot_device;
246 pc_init1(get_system_memory(),
247 get_system_io(),
248 ram_size, boot_device,
249 kernel_filename, kernel_cmdline,
250 initrd_filename, cpu_model, 1, 1);
253 static void pc_init_pci_1_6(QEMUMachineInitArgs *args)
255 has_pci_info = false;
256 has_pvpanic = true;
257 pc_init_pci(args);
260 static void pc_init_pci_1_5(QEMUMachineInitArgs *args)
262 pc_init_pci_1_6(args);
265 static void pc_init_pci_1_4(QEMUMachineInitArgs *args)
267 x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE);
268 has_pci_info = false;
269 pc_init_pci(args);
272 static void pc_init_pci_1_3(QEMUMachineInitArgs *args)
274 enable_compat_apic_id_mode();
275 pc_init_pci_1_4(args);
278 /* PC machine init function for pc-1.1 to pc-1.2 */
279 static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
281 disable_kvm_pv_eoi();
282 pc_init_pci_1_3(args);
285 /* PC machine init function for pc-0.14 to pc-1.0 */
286 static void pc_init_pci_1_0(QEMUMachineInitArgs *args)
288 pc_init_pci_1_2(args);
291 /* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */
292 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
294 ram_addr_t ram_size = args->ram_size;
295 const char *cpu_model = args->cpu_model;
296 const char *kernel_filename = args->kernel_filename;
297 const char *kernel_cmdline = args->kernel_cmdline;
298 const char *initrd_filename = args->initrd_filename;
299 const char *boot_device = args->boot_device;
300 has_pci_info = false;
301 disable_kvm_pv_eoi();
302 enable_compat_apic_id_mode();
303 pc_init1(get_system_memory(),
304 get_system_io(),
305 ram_size, boot_device,
306 kernel_filename, kernel_cmdline,
307 initrd_filename, cpu_model, 1, 0);
310 static void pc_init_isa(QEMUMachineInitArgs *args)
312 ram_addr_t ram_size = args->ram_size;
313 const char *cpu_model = args->cpu_model;
314 const char *kernel_filename = args->kernel_filename;
315 const char *kernel_cmdline = args->kernel_cmdline;
316 const char *initrd_filename = args->initrd_filename;
317 const char *boot_device = args->boot_device;
318 has_pci_info = false;
319 if (cpu_model == NULL)
320 cpu_model = "486";
321 disable_kvm_pv_eoi();
322 enable_compat_apic_id_mode();
323 pc_init1(get_system_memory(),
324 get_system_io(),
325 ram_size, boot_device,
326 kernel_filename, kernel_cmdline,
327 initrd_filename, cpu_model, 0, 1);
330 #ifdef CONFIG_XEN
331 static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
333 PCIBus *bus;
335 pc_init_pci(args);
337 bus = pci_find_primary_bus();
338 if (bus != NULL) {
339 pci_create_simple(bus, -1, "xen-platform");
342 #endif
344 static QEMUMachine pc_i440fx_machine_v1_6 = {
345 .name = "pc-i440fx-1.6",
346 .alias = "pc",
347 .desc = "Standard PC (i440FX + PIIX, 1996)",
348 .init = pc_init_pci_1_6,
349 .hot_add_cpu = pc_hot_add_cpu,
350 .max_cpus = 255,
351 .is_default = 1,
352 DEFAULT_MACHINE_OPTIONS,
355 static QEMUMachine pc_i440fx_machine_v1_5 = {
356 .name = "pc-i440fx-1.5",
357 .desc = "Standard PC (i440FX + PIIX, 1996)",
358 .init = pc_init_pci_1_5,
359 .hot_add_cpu = pc_hot_add_cpu,
360 .max_cpus = 255,
361 .compat_props = (GlobalProperty[]) {
362 PC_COMPAT_1_5,
363 { /* end of list */ }
365 DEFAULT_MACHINE_OPTIONS,
368 static QEMUMachine pc_i440fx_machine_v1_4 = {
369 .name = "pc-i440fx-1.4",
370 .desc = "Standard PC (i440FX + PIIX, 1996)",
371 .init = pc_init_pci_1_4,
372 .max_cpus = 255,
373 .compat_props = (GlobalProperty[]) {
374 PC_COMPAT_1_4,
375 { /* end of list */ }
377 DEFAULT_MACHINE_OPTIONS,
380 #define PC_COMPAT_1_3 \
381 PC_COMPAT_1_4, \
383 .driver = "usb-tablet",\
384 .property = "usb_version",\
385 .value = stringify(1),\
386 },{\
387 .driver = "virtio-net-pci",\
388 .property = "ctrl_mac_addr",\
389 .value = "off", \
390 },{ \
391 .driver = "virtio-net-pci", \
392 .property = "mq", \
393 .value = "off", \
394 }, {\
395 .driver = "e1000",\
396 .property = "autonegotiation",\
397 .value = "off",\
400 static QEMUMachine pc_machine_v1_3 = {
401 .name = "pc-1.3",
402 .desc = "Standard PC",
403 .init = pc_init_pci_1_3,
404 .max_cpus = 255,
405 .compat_props = (GlobalProperty[]) {
406 PC_COMPAT_1_3,
407 { /* end of list */ }
409 DEFAULT_MACHINE_OPTIONS,
412 #define PC_COMPAT_1_2 \
413 PC_COMPAT_1_3,\
415 .driver = "nec-usb-xhci",\
416 .property = "msi",\
417 .value = "off",\
418 },{\
419 .driver = "nec-usb-xhci",\
420 .property = "msix",\
421 .value = "off",\
422 },{\
423 .driver = "ivshmem",\
424 .property = "use64",\
425 .value = "0",\
426 },{\
427 .driver = "qxl",\
428 .property = "revision",\
429 .value = stringify(3),\
430 },{\
431 .driver = "qxl-vga",\
432 .property = "revision",\
433 .value = stringify(3),\
434 },{\
435 .driver = "VGA",\
436 .property = "mmio",\
437 .value = "off",\
440 static QEMUMachine pc_machine_v1_2 = {
441 .name = "pc-1.2",
442 .desc = "Standard PC",
443 .init = pc_init_pci_1_2,
444 .max_cpus = 255,
445 .compat_props = (GlobalProperty[]) {
446 PC_COMPAT_1_2,
447 { /* end of list */ }
449 DEFAULT_MACHINE_OPTIONS,
452 #define PC_COMPAT_1_1 \
453 PC_COMPAT_1_2,\
455 .driver = "virtio-scsi-pci",\
456 .property = "hotplug",\
457 .value = "off",\
458 },{\
459 .driver = "virtio-scsi-pci",\
460 .property = "param_change",\
461 .value = "off",\
462 },{\
463 .driver = "VGA",\
464 .property = "vgamem_mb",\
465 .value = stringify(8),\
466 },{\
467 .driver = "vmware-svga",\
468 .property = "vgamem_mb",\
469 .value = stringify(8),\
470 },{\
471 .driver = "qxl-vga",\
472 .property = "vgamem_mb",\
473 .value = stringify(8),\
474 },{\
475 .driver = "qxl",\
476 .property = "vgamem_mb",\
477 .value = stringify(8),\
478 },{\
479 .driver = "virtio-blk-pci",\
480 .property = "config-wce",\
481 .value = "off",\
484 static QEMUMachine pc_machine_v1_1 = {
485 .name = "pc-1.1",
486 .desc = "Standard PC",
487 .init = pc_init_pci_1_2,
488 .max_cpus = 255,
489 .compat_props = (GlobalProperty[]) {
490 PC_COMPAT_1_1,
491 { /* end of list */ }
493 DEFAULT_MACHINE_OPTIONS,
496 #define PC_COMPAT_1_0 \
497 PC_COMPAT_1_1,\
499 .driver = TYPE_ISA_FDC,\
500 .property = "check_media_rate",\
501 .value = "off",\
502 }, {\
503 .driver = "virtio-balloon-pci",\
504 .property = "class",\
505 .value = stringify(PCI_CLASS_MEMORY_RAM),\
506 },{\
507 .driver = "apic",\
508 .property = "vapic",\
509 .value = "off",\
510 },{\
511 .driver = TYPE_USB_DEVICE,\
512 .property = "full-path",\
513 .value = "no",\
516 static QEMUMachine pc_machine_v1_0 = {
517 .name = "pc-1.0",
518 .desc = "Standard PC",
519 .init = pc_init_pci_1_0,
520 .max_cpus = 255,
521 .compat_props = (GlobalProperty[]) {
522 PC_COMPAT_1_0,
523 { /* end of list */ }
525 .hw_version = "1.0",
526 DEFAULT_MACHINE_OPTIONS,
529 #define PC_COMPAT_0_15 \
530 PC_COMPAT_1_0
532 static QEMUMachine pc_machine_v0_15 = {
533 .name = "pc-0.15",
534 .desc = "Standard PC",
535 .init = pc_init_pci_1_0,
536 .max_cpus = 255,
537 .compat_props = (GlobalProperty[]) {
538 PC_COMPAT_0_15,
539 { /* end of list */ }
541 .hw_version = "0.15",
542 DEFAULT_MACHINE_OPTIONS,
545 #define PC_COMPAT_0_14 \
546 PC_COMPAT_0_15,\
548 .driver = "virtio-blk-pci",\
549 .property = "event_idx",\
550 .value = "off",\
551 },{\
552 .driver = "virtio-serial-pci",\
553 .property = "event_idx",\
554 .value = "off",\
555 },{\
556 .driver = "virtio-net-pci",\
557 .property = "event_idx",\
558 .value = "off",\
559 },{\
560 .driver = "virtio-balloon-pci",\
561 .property = "event_idx",\
562 .value = "off",\
565 static QEMUMachine pc_machine_v0_14 = {
566 .name = "pc-0.14",
567 .desc = "Standard PC",
568 .init = pc_init_pci_1_0,
569 .max_cpus = 255,
570 .compat_props = (GlobalProperty[]) {
571 PC_COMPAT_0_14,
573 .driver = "qxl",
574 .property = "revision",
575 .value = stringify(2),
577 .driver = "qxl-vga",
578 .property = "revision",
579 .value = stringify(2),
581 { /* end of list */ }
583 .hw_version = "0.14",
584 DEFAULT_MACHINE_OPTIONS,
587 #define PC_COMPAT_0_13 \
588 PC_COMPAT_0_14,\
590 .driver = TYPE_PCI_DEVICE,\
591 .property = "command_serr_enable",\
592 .value = "off",\
593 },{\
594 .driver = "AC97",\
595 .property = "use_broken_id",\
596 .value = stringify(1),\
599 static QEMUMachine pc_machine_v0_13 = {
600 .name = "pc-0.13",
601 .desc = "Standard PC",
602 .init = pc_init_pci_no_kvmclock,
603 .max_cpus = 255,
604 .compat_props = (GlobalProperty[]) {
605 PC_COMPAT_0_13,
607 .driver = "virtio-9p-pci",
608 .property = "vectors",
609 .value = stringify(0),
611 .driver = "VGA",
612 .property = "rombar",
613 .value = stringify(0),
615 .driver = "vmware-svga",
616 .property = "rombar",
617 .value = stringify(0),
619 { /* end of list */ }
621 .hw_version = "0.13",
622 DEFAULT_MACHINE_OPTIONS,
625 #define PC_COMPAT_0_12 \
626 PC_COMPAT_0_13,\
628 .driver = "virtio-serial-pci",\
629 .property = "max_ports",\
630 .value = stringify(1),\
631 },{\
632 .driver = "virtio-serial-pci",\
633 .property = "vectors",\
634 .value = stringify(0),\
635 },{\
636 .driver = "usb-mouse",\
637 .property = "serial",\
638 .value = "1",\
639 },{\
640 .driver = "usb-tablet",\
641 .property = "serial",\
642 .value = "1",\
643 },{\
644 .driver = "usb-kbd",\
645 .property = "serial",\
646 .value = "1",\
649 static QEMUMachine pc_machine_v0_12 = {
650 .name = "pc-0.12",
651 .desc = "Standard PC",
652 .init = pc_init_pci_no_kvmclock,
653 .max_cpus = 255,
654 .compat_props = (GlobalProperty[]) {
655 PC_COMPAT_0_12,
657 .driver = "VGA",
658 .property = "rombar",
659 .value = stringify(0),
661 .driver = "vmware-svga",
662 .property = "rombar",
663 .value = stringify(0),
665 { /* end of list */ }
667 .hw_version = "0.12",
668 DEFAULT_MACHINE_OPTIONS,
671 #define PC_COMPAT_0_11 \
672 PC_COMPAT_0_12,\
674 .driver = "virtio-blk-pci",\
675 .property = "vectors",\
676 .value = stringify(0),\
677 },{\
678 .driver = TYPE_PCI_DEVICE,\
679 .property = "rombar",\
680 .value = stringify(0),\
683 static QEMUMachine pc_machine_v0_11 = {
684 .name = "pc-0.11",
685 .desc = "Standard PC, qemu 0.11",
686 .init = pc_init_pci_no_kvmclock,
687 .max_cpus = 255,
688 .compat_props = (GlobalProperty[]) {
689 PC_COMPAT_0_11,
691 .driver = "ide-drive",
692 .property = "ver",
693 .value = "0.11",
695 .driver = "scsi-disk",
696 .property = "ver",
697 .value = "0.11",
699 { /* end of list */ }
701 .hw_version = "0.11",
702 DEFAULT_MACHINE_OPTIONS,
705 static QEMUMachine pc_machine_v0_10 = {
706 .name = "pc-0.10",
707 .desc = "Standard PC, qemu 0.10",
708 .init = pc_init_pci_no_kvmclock,
709 .max_cpus = 255,
710 .compat_props = (GlobalProperty[]) {
711 PC_COMPAT_0_11,
713 .driver = "virtio-blk-pci",
714 .property = "class",
715 .value = stringify(PCI_CLASS_STORAGE_OTHER),
717 .driver = "virtio-serial-pci",
718 .property = "class",
719 .value = stringify(PCI_CLASS_DISPLAY_OTHER),
721 .driver = "virtio-net-pci",
722 .property = "vectors",
723 .value = stringify(0),
725 .driver = "ide-drive",
726 .property = "ver",
727 .value = "0.10",
729 .driver = "scsi-disk",
730 .property = "ver",
731 .value = "0.10",
733 { /* end of list */ }
735 .hw_version = "0.10",
736 DEFAULT_MACHINE_OPTIONS,
739 static QEMUMachine isapc_machine = {
740 .name = "isapc",
741 .desc = "ISA-only PC",
742 .init = pc_init_isa,
743 .max_cpus = 1,
744 .compat_props = (GlobalProperty[]) {
745 { /* end of list */ }
747 DEFAULT_MACHINE_OPTIONS,
750 #ifdef CONFIG_XEN
751 static QEMUMachine xenfv_machine = {
752 .name = "xenfv",
753 .desc = "Xen Fully-virtualized PC",
754 .init = pc_xen_hvm_init,
755 .max_cpus = HVM_MAX_VCPUS,
756 .default_machine_opts = "accel=xen",
757 DEFAULT_MACHINE_OPTIONS,
759 #endif
761 static void pc_machine_init(void)
763 qemu_register_machine(&pc_i440fx_machine_v1_6);
764 qemu_register_machine(&pc_i440fx_machine_v1_5);
765 qemu_register_machine(&pc_i440fx_machine_v1_4);
766 qemu_register_machine(&pc_machine_v1_3);
767 qemu_register_machine(&pc_machine_v1_2);
768 qemu_register_machine(&pc_machine_v1_1);
769 qemu_register_machine(&pc_machine_v1_0);
770 qemu_register_machine(&pc_machine_v0_15);
771 qemu_register_machine(&pc_machine_v0_14);
772 qemu_register_machine(&pc_machine_v0_13);
773 qemu_register_machine(&pc_machine_v0_12);
774 qemu_register_machine(&pc_machine_v0_11);
775 qemu_register_machine(&pc_machine_v0_10);
776 qemu_register_machine(&isapc_machine);
777 #ifdef CONFIG_XEN
778 qemu_register_machine(&xenfv_machine);
779 #endif
782 machine_init(pc_machine_init);