aboutsummaryrefslogtreecommitdiff
path: root/hw/pc_piix.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-10-18 00:15:48 +0200
committerMichael S. Tsirkin <mst@redhat.com>2012-10-29 17:59:06 +0200
commitdc59944bc9a5ad784572eea57610de60e4a2f4e5 (patch)
tree9195b225864e937e61bd742646f0f24a7cb2fb84 /hw/pc_piix.c
parent05c0621e64b425d9f89bef542f0b85e61dc57ff8 (diff)
qemu: enable PV EOI for qemu 1.3
Enable KVM PV EOI by default. You can still disable it with -kvm_pv_eoi cpu flag. To avoid breaking cross-version migration, enable only for qemu 1.3 (or in the future, newer) machine type. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pc_piix.c')
-rw-r--r--hw/pc_piix.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index c7dd75b0c0..85529b2cea 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -43,6 +43,7 @@
#include "xen.h"
#include "memory.h"
#include "exec-memory.h"
+#include "cpu.h"
#ifdef CONFIG_XEN
# include <xen/hvm/hvm_info_table.h>
#endif
@@ -302,6 +303,12 @@ static void pc_init_pci(QEMUMachineInitArgs *args)
initrd_filename, cpu_model, 1, 1);
}
+static void pc_init_pci_1_3(QEMUMachineInitArgs *args)
+{
+ enable_kvm_pv_eoi();
+ pc_init_pci(args);
+}
+
static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
{
ram_addr_t ram_size = args->ram_size;
@@ -349,7 +356,7 @@ static QEMUMachine pc_machine_v1_3 = {
.name = "pc-1.3",
.alias = "pc",
.desc = "Standard PC",
- .init = pc_init_pci,
+ .init = pc_init_pci_1_3,
.max_cpus = 255,
.is_default = 1,
};