apic: add apic_set_eoi_write for PV use
authorMichael S. Tsirkin <mst@redhat.com>
Sun, 15 Jul 2012 12:56:46 +0000 (15:56 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 16 Jul 2012 09:51:23 +0000 (12:51 +0300)
commit1551df646dd42122e17401013dba7a509d0f1b0d
treeb8c10e19edbee20c4c2f1eb99010a58f34e56bd7
parent64604e09ec3389cfc9668136a9302a3832cf0095
apic: add apic_set_eoi_write for PV use

KVM PV EOI optimization overrides eoi_write apic op with its own
version. Add an API for this to avoid meddling with core x86 apic driver
data structures directly.

For KVM use, we don't need any guarantees about when the switch to the
new op will take place, so it could in theory use this API after SMP init,
but it currently doesn't, and restricting callers to early init makes it
clear that it's safe as it won't race with actual APIC driver use.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/apic.h
arch/x86/kernel/apic/apic.c