]> git.karo-electronics.de Git - mv-sheeva.git/commit
x86/apic: Enable x2APIC without interrupt remapping under KVM
authorGleb Natapov <gleb@redhat.com>
Mon, 20 Jul 2009 12:24:17 +0000 (15:24 +0300)
committerIngo Molnar <mingo@elte.hu>
Wed, 5 Aug 2009 12:28:50 +0000 (14:28 +0200)
commitce69a784504222c3ab6f1b3c357d09ec5772127a
tree73f6d67be7b923572f6d1942d692ae523074886d
parent9910887af84e33ba98fd6792029470ae80166208
x86/apic: Enable x2APIC without interrupt remapping under KVM

KVM would like to provide x2APIC interface to a guest without emulating
interrupt remapping device. The reason KVM prefers guest to use x2APIC
is that x2APIC interface is better virtualizable and provides better
performance than mmio xAPIC interface:

 - msr exits are faster than mmio (no page table walk, emulation)
 - no need to read back ICR to look at the busy bit
 - one 64 bit ICR write instead of two 32 bit writes
 - shared code with the Hyper-V paravirt interface

Included patch changes x2APIC enabling logic to enable it even if IR
initialization failed, but kernel runs under KVM and no apic id is
greater than 255 (if there is one spec requires BIOS to move to x2apic
mode before starting an OS).

-v2: fix build
-v3: fix bug causing compiler warning

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Sheng Yang <sheng@linux.intel.com>
Cc: "avi@redhat.com" <avi@redhat.com>
LKML-Reference: <20090720122417.GR5638@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/apic.c
arch/x86/kernel/apic/probe_64.c