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