diff options
Diffstat (limited to 'hw/pc_piix.c')
-rw-r--r-- | hw/pc_piix.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fd5898fba..1fc20cda9 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -53,6 +53,8 @@ static const int ide_iobase[MAX_IDE_BUS] = { 0x1f0, 0x170 }; static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 }; static const int ide_irq[MAX_IDE_BUS] = { 14, 15 }; +const char *global_cpu_model; /* cpu hotadd */ + static void kvm_piix3_setup_irq_routing(bool pci_enabled) { #ifdef CONFIG_KVM @@ -149,6 +151,8 @@ static void pc_init1(MemoryRegion *system_memory, MemoryRegion *rom_memory; void *fw_cfg = NULL; + global_cpu_model = cpu_model; + pc_cpus_init(cpu_model); if (kvmclock_enabled) { @@ -239,7 +243,7 @@ static void pc_init1(MemoryRegion *system_memory, if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0)) pc_init_ne2k_isa(isa_bus, nd); else - pci_nic_init_nofail(nd, "e1000", NULL); + pci_nic_init_nofail(nd, "rtl8139", NULL); } ide_drive_get(hd, MAX_IDE_BUS); @@ -349,6 +353,12 @@ static void pc_xen_hvm_init(ram_addr_t ram_size, } #endif +#ifdef CONFIG_KVM_OPTIONS +#define KVM_MACHINE_OPTIONS "accel=kvm" +#else +#define KVM_MACHINE_OPTIONS "" +#endif + static QEMUMachine pc_machine_v1_3 = { .name = "pc-1.3", .alias = "pc", @@ -356,6 +366,7 @@ static QEMUMachine pc_machine_v1_3 = { .init = pc_init_pci, .max_cpus = 255, .is_default = 1, + .default_machine_opts = KVM_MACHINE_OPTIONS, }; #define PC_COMPAT_1_2 \ @@ -397,19 +408,19 @@ static QEMUMachine pc_machine_v1_2 = { },{\ .driver = "VGA",\ .property = "vgamem_mb",\ - .value = stringify(8),\ + .value = stringify(16),\ },{\ .driver = "vmware-svga",\ .property = "vgamem_mb",\ - .value = stringify(8),\ + .value = stringify(16),\ },{\ .driver = "qxl-vga",\ .property = "vgamem_mb",\ - .value = stringify(8),\ + .value = stringify(16),\ },{\ .driver = "qxl",\ .property = "vgamem_mb",\ - .value = stringify(8),\ + .value = stringify(16),\ },{\ .driver = "virtio-blk-pci",\ .property = "config-wce",\ @@ -421,6 +432,7 @@ static QEMUMachine pc_machine_v1_1 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_1_1, { /* end of list */ } @@ -456,6 +468,7 @@ static QEMUMachine pc_machine_v1_0 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_1_0, { /* end of list */ } @@ -471,6 +484,7 @@ static QEMUMachine pc_machine_v0_15 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_0_15, { /* end of list */ } @@ -503,6 +517,7 @@ static QEMUMachine pc_machine_v0_14 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_0_14, { @@ -536,6 +551,7 @@ static QEMUMachine pc_machine_v0_13 = { .desc = "Standard PC", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_0_13, { @@ -573,6 +589,7 @@ static QEMUMachine pc_machine_v0_12 = { .desc = "Standard PC", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_0_12, { @@ -606,6 +623,7 @@ static QEMUMachine pc_machine_v0_11 = { .desc = "Standard PC, qemu 0.11", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_0_11, { @@ -627,6 +645,7 @@ static QEMUMachine pc_machine_v0_10 = { .desc = "Standard PC, qemu 0.10", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { PC_COMPAT_0_11, { @@ -660,6 +679,7 @@ static QEMUMachine isapc_machine = { .desc = "ISA-only PC", .init = pc_init_isa, .max_cpus = 1, + .default_machine_opts = KVM_MACHINE_OPTIONS, .compat_props = (GlobalProperty[]) { { .driver = "pc-sysfw", |