1 From: Suresh Siddha <suresh.b.siddha@intel.com>
2 Subject: x86: apic_ops for lguest
3 References: fate #303948 and fate #303984
4 Patch-Mainline: queued for .28
5 Commit-ID: 511d9d34183662aada3890883e860b151d707e22
7 Signed-off-by: Thomas Renninger <trenn@suse.de>
11 Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
12 Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
13 Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 arch/x86/lguest/boot.c | 34 ++++++++++++++++++++++++++++++++--
17 1 file changed, 32 insertions(+), 2 deletions(-)
19 Index: linux-2.6.26/arch/x86/lguest/boot.c
20 ===================================================================
21 --- linux-2.6.26.orig/arch/x86/lguest/boot.c
22 +++ linux-2.6.26/arch/x86/lguest/boot.c
23 @@ -792,6 +792,37 @@ static u32 lguest_apic_read(u32 reg)
28 +static u64 lguest_apic_icr_read(void)
33 +static void lguest_apic_icr_write(u32 low, u32 id)
35 + /* Warn to see if there's any stray references */
39 +static void lguest_apic_wait_icr_idle(void)
44 +static u32 lguest_apic_safe_wait_icr_idle(void)
49 +static struct apic_ops lguest_basic_apic_ops = {
50 + .read = lguest_apic_read,
51 + .write = lguest_apic_write,
52 + .write_atomic = lguest_apic_write,
53 + .icr_read = lguest_apic_icr_read,
54 + .icr_write = lguest_apic_icr_write,
55 + .wait_icr_idle = lguest_apic_wait_icr_idle,
56 + .safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle,
60 /* STOP! Until an interrupt comes in. */
61 @@ -991,8 +1022,7 @@ __init void lguest_init(void)
63 #ifdef CONFIG_X86_LOCAL_APIC
64 /* apic read/write intercepts */
65 - pv_apic_ops.apic_write = lguest_apic_write;
66 - pv_apic_ops.apic_read = lguest_apic_read;
67 + apic_ops = &lguest_basic_apic_ops;