From ef02ef5f4536dba090b12360a6c862ef0e57e3bc Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 19 Feb 2014 11:58:12 -0300 Subject: target-i386: Enable x2apic by default on KVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When on KVM mode, enable x2apic by default on all CPU models. Normally we try to keep the CPU model definitions as close as the real CPUs as possible, but x2apic can be emulated by KVM without host CPU support for x2apic, and it improves performance by reducing APIC access overhead. x2apic emulation is available on KVM since 2009 (Linux 2.6.32-rc1), there's no reason for not enabling x2apic by default when running KVM. Signed-off-by: Eduardo Habkost Acked-by: Michael S. Tsirkin Signed-off-by: Andreas Färber --- hw/i386/pc_q35.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/i386/pc_q35.c') diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 4b0456a95b..c844dc2a9f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -245,6 +245,7 @@ static void pc_compat_1_7(QEMUMachineInitArgs *args) smbios_type1_defaults = false; gigabyte_align = false; option_rom_has_mr = true; + x86_cpu_compat_disable_kvm_features(FEAT_1_ECX, CPUID_EXT_X2APIC); } static void pc_compat_1_6(QEMUMachineInitArgs *args) -- cgit v1.2.1