Re: [PATCH] x86: let 32bit use apic_ops too - fix

From: Yinghai Lu
Date: Mon Jul 14 2008 - 13:00:38 EST


On Mon, Jul 14, 2008 at 9:49 AM, Suresh Siddha
<suresh.b.siddha@xxxxxxxxx> wrote:
> On Mon, Jul 14, 2008 at 12:12:07AM -0700, Ingo Molnar wrote:
>>
>> * Yinghai Lu <yhlu.kernel@xxxxxxxxx> wrote:
>>
>> > fix for pv.
>> >
>> > Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
>>
>> applied to tip/x86/x2apic - thanks Yinghai.
>
> Ingo, before you try for the third attempt ;) we need one more lguest apic_ops
> fix. Patch appended. Thanks.
>
> ---
> [patch] x86: apic_ops for lguest
>
> apic_ops for lguest.
>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
> Cc: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
> ---
>
> Index: x86.git/arch/x86/lguest/boot.c
> ===================================================================
> --- x86.git.orig/arch/x86/lguest/boot.c 2008-07-14 09:44:31.000000000 -0700
> +++ x86.git/arch/x86/lguest/boot.c 2008-07-14 09:45:12.000000000 -0700
> @@ -791,6 +791,37 @@
> {
> return 0;
> }
> +
> +static u64 lguest_apic_icr_read(void)
> +{
> + return 0;
> +}
> +
> +static void lguest_apic_icr_write(u32 low, u32 id)
> +{
> + /* Warn to see if there's any stray references */
> + WARN_ON(1);
> +}
> +
> +static void lguest_apic_wait_icr_idle(void)
> +{
> + return;
> +}
> +
> +static u32 lguest_apic_safe_wait_icr_idle(void)
> +{
> + return 0;
> +}
> +
> +static struct apic_ops lguest_basic_apic_ops = {
> + .read = lguest_apic_read,
> + .write = lguest_apic_write,
> + .write_atomic = lguest_apic_write,
> + .icr_read = lguest_apic_icr_read,
> + .icr_write = lguest_apic_icr_write,
> + .wait_icr_idle = lguest_apic_wait_icr_idle,
> + .safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle,
> +};
> #endif
>
> /* STOP! Until an interrupt comes in. */
> @@ -990,9 +1021,7 @@
>
> #ifdef CONFIG_X86_LOCAL_APIC
> /* apic read/write intercepts */
> - pv_apic_ops.apic_write = lguest_apic_write;
> - pv_apic_ops.apic_write_atomic = lguest_apic_write;
> - pv_apic_ops.apic_read = lguest_apic_read;
> + apic_ops = &lguest_basic_apic_ops;
> #endif
>
> /* time operations */

do we need one for KVM pv?

YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/