Commit caea79a9db0e1e316144ce29a9182ff0cb2d81b0
Committed by
Anthony Liguori
1 parent
d399f677
Remove the pc-0-10 machine type
We have the pc-0.10 machine type now which does exactly the same thing. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
5 additions
and
50 deletions
hw/pc.c
... | ... | @@ -1100,11 +1100,6 @@ static CPUState *pc_new_cpu(const char *cpu_model) |
1100 | 1100 | return env; |
1101 | 1101 | } |
1102 | 1102 | |
1103 | -enum { | |
1104 | - COMPAT_DEFAULT = 0, | |
1105 | - COMPAT_0_10, /* compatible with qemu 0.10.x */ | |
1106 | -}; | |
1107 | - | |
1108 | 1103 | /* PC hardware initialisation */ |
1109 | 1104 | static void pc_init1(ram_addr_t ram_size, |
1110 | 1105 | const char *boot_device, |
... | ... | @@ -1112,8 +1107,7 @@ static void pc_init1(ram_addr_t ram_size, |
1112 | 1107 | const char *kernel_cmdline, |
1113 | 1108 | const char *initrd_filename, |
1114 | 1109 | const char *cpu_model, |
1115 | - int pci_enabled, | |
1116 | - int compat_level) | |
1110 | + int pci_enabled) | |
1117 | 1111 | { |
1118 | 1112 | char *filename; |
1119 | 1113 | int ret, linux_boot, i; |
... | ... | @@ -1131,7 +1125,6 @@ static void pc_init1(ram_addr_t ram_size, |
1131 | 1125 | BlockDriverState *fd[MAX_FD]; |
1132 | 1126 | int using_vga = cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled; |
1133 | 1127 | void *fw_cfg; |
1134 | - const char *virtio_blk_name, *virtio_console_name; | |
1135 | 1128 | |
1136 | 1129 | if (ram_size >= 0xe0000000 ) { |
1137 | 1130 | above_4g_mem_size = ram_size - 0xe0000000; |
... | ... | @@ -1416,25 +1409,12 @@ static void pc_init1(ram_addr_t ram_size, |
1416 | 1409 | } |
1417 | 1410 | } |
1418 | 1411 | |
1419 | - switch (compat_level) { | |
1420 | - case COMPAT_DEFAULT: | |
1421 | - default: | |
1422 | - virtio_blk_name = "virtio-blk-pci"; | |
1423 | - virtio_console_name = "virtio-console-pci"; | |
1424 | - break; | |
1425 | - | |
1426 | - case COMPAT_0_10: | |
1427 | - virtio_blk_name = "virtio-blk-pci-0-10"; | |
1428 | - virtio_console_name = "virtio-console-pci-0-10"; | |
1429 | - break; | |
1430 | - } | |
1431 | - | |
1432 | 1412 | /* Add virtio block devices */ |
1433 | 1413 | if (pci_enabled) { |
1434 | 1414 | int unit_id = 0; |
1435 | 1415 | |
1436 | 1416 | while ((dinfo = drive_get(IF_VIRTIO, 0, unit_id)) != NULL) { |
1437 | - pci_dev = pci_create(virtio_blk_name, | |
1417 | + pci_dev = pci_create("virtio-blk-pci", | |
1438 | 1418 | dinfo->devaddr); |
1439 | 1419 | qdev_init(&pci_dev->qdev); |
1440 | 1420 | unit_id++; |
... | ... | @@ -1451,7 +1431,7 @@ static void pc_init1(ram_addr_t ram_size, |
1451 | 1431 | if (pci_enabled) { |
1452 | 1432 | for(i = 0; i < MAX_VIRTIO_CONSOLES; i++) { |
1453 | 1433 | if (virtcon_hds[i]) { |
1454 | - pci_create_simple(pci_bus, -1, virtio_console_name); | |
1434 | + pci_create_simple(pci_bus, -1, "virtio-console-pci"); | |
1455 | 1435 | } |
1456 | 1436 | } |
1457 | 1437 | } |
... | ... | @@ -1466,8 +1446,7 @@ static void pc_init_pci(ram_addr_t ram_size, |
1466 | 1446 | { |
1467 | 1447 | pc_init1(ram_size, boot_device, |
1468 | 1448 | kernel_filename, kernel_cmdline, |
1469 | - initrd_filename, cpu_model, | |
1470 | - 1, COMPAT_DEFAULT); | |
1449 | + initrd_filename, cpu_model, 1); | |
1471 | 1450 | } |
1472 | 1451 | |
1473 | 1452 | static void pc_init_isa(ram_addr_t ram_size, |
... | ... | @@ -1479,21 +1458,7 @@ static void pc_init_isa(ram_addr_t ram_size, |
1479 | 1458 | { |
1480 | 1459 | pc_init1(ram_size, boot_device, |
1481 | 1460 | kernel_filename, kernel_cmdline, |
1482 | - initrd_filename, cpu_model, | |
1483 | - 0, COMPAT_DEFAULT); | |
1484 | -} | |
1485 | - | |
1486 | -static void pc_init_pci_0_10(ram_addr_t ram_size, | |
1487 | - const char *boot_device, | |
1488 | - const char *kernel_filename, | |
1489 | - const char *kernel_cmdline, | |
1490 | - const char *initrd_filename, | |
1491 | - const char *cpu_model) | |
1492 | -{ | |
1493 | - pc_init1(ram_size, boot_device, | |
1494 | - kernel_filename, kernel_cmdline, | |
1495 | - initrd_filename, cpu_model, | |
1496 | - 1, COMPAT_0_10); | |
1461 | + initrd_filename, cpu_model, 0); | |
1497 | 1462 | } |
1498 | 1463 | |
1499 | 1464 | /* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE) |
... | ... | @@ -1543,21 +1508,11 @@ static QEMUMachine isapc_machine = { |
1543 | 1508 | .max_cpus = 1, |
1544 | 1509 | }; |
1545 | 1510 | |
1546 | -static QEMUMachine pc_0_10_machine = { | |
1547 | - .name = "pc-0-10", | |
1548 | - .desc = "Standard PC compatible with qemu 0.10.x", | |
1549 | - .init = pc_init_pci_0_10, | |
1550 | - .max_cpus = 255, | |
1551 | -}; | |
1552 | - | |
1553 | 1511 | static void pc_machine_init(void) |
1554 | 1512 | { |
1555 | 1513 | qemu_register_machine(&pc_machine); |
1556 | 1514 | qemu_register_machine(&pc_machine_v0_10); |
1557 | 1515 | qemu_register_machine(&isapc_machine); |
1558 | - | |
1559 | - /* For compatibility with 0.10.x */ | |
1560 | - qemu_register_machine(&pc_0_10_machine); | |
1561 | 1516 | } |
1562 | 1517 | |
1563 | 1518 | machine_init(pc_machine_init); | ... | ... |