[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL for-2.0-rc0 17/58] target-i386: Enable x2apic by defa
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL for-2.0-rc0 17/58] target-i386: Enable x2apic by default on KVM |
Date: |
Thu, 13 Mar 2014 15:54:20 +0100 |
From: Eduardo Habkost <address@hidden>
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 <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Andreas Färber <address@hidden>
---
hw/i386/pc_piix.c | 1 +
hw/i386/pc_q35.c | 1 +
target-i386/cpu.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 5011c3a..7930a26 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -267,6 +267,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)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 4b0456a..c844dc2 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)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 5f960ac..ea20332 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -369,6 +369,7 @@ static uint32_t kvm_default_features[FEATURE_WORDS] = {
(1 << KVM_FEATURE_STEAL_TIME) |
(1 << KVM_FEATURE_PV_EOI) |
(1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT),
+ [FEAT_1_ECX] = CPUID_EXT_X2APIC,
};
void x86_cpu_compat_disable_kvm_features(FeatureWord w, uint32_t features)
--
1.8.4.5
- [Qemu-devel] [PULL for-2.0-rc0 08/58] target-unicore32: Clean up ENV_GET_CPU() usage, (continued)
- [Qemu-devel] [PULL for-2.0-rc0 08/58] target-unicore32: Clean up ENV_GET_CPU() usage, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 09/58] target-xtensa: Clean up ENV_GET_CPU() usage, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 12/58] target-i386: Call x86_cpu_load_def() earlier, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 10/58] cpu: Turn cpu_has_work() into a CPUClass hook, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 13/58] target-i386: Rename x86_def_t to X86CPUDefinition, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 11/58] target-i386: Rename cpu_x86_register() to x86_cpu_load_def(), Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 15/58] target-i386: Make kvm_default_features an array, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 14/58] target-i386: Don't declare variables in the middle of blocks, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 18/58] target-i386: Prepare CPUClass::class_by_name for X86CPU, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 16/58] target-i386: Introduce x86_cpu_compat_disable_kvm_features(), Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 17/58] target-i386: Enable x2apic by default on KVM,
Andreas Färber <=
- [Qemu-devel] [PULL for-2.0-rc0 20/58] cpu: Introduce CPUClass::parse_features() hook, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 21/58] target-sparc: Use error_report() for CPU error reporting, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 23/58] target-sparc: Defer SPARCCPU feature inference to QOM realize, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 19/58] target-i386: X86CPU model subclasses, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 24/58] cpu: Implement CPUClass::parse_features() for the rest of CPUs, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 26/58] target-m68k: Remove custom qemu_assert() function, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 22/58] target-sparc: Implement CPUClass::parse_features() for SPARCCPU, Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 25/58] cpu: Factor out cpu_generic_init(), Andreas Färber, 2014/03/13
- [Qemu-devel] [PULL for-2.0-rc0 28/58] cpu: Move mem_io_{pc, vaddr} fields from CPU_COMMON to CPUState, Andreas Färber, 2014/03/13