lkml.org 
[lkml]   [2006]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH 11/35] Add support for Xen to entry.S.
Date
On Tuesday 09 May 2006 09:00, Chris Wright wrote:

> +#define sizeof_vcpu_shift 6

This should be generated in asm-offsets.c

> +
> +#ifdef CONFIG_SMP
> +#define GET_VCPU_INFO movl TI_cpu(%ebp),%esi ; \
> + shl $sizeof_vcpu_shift,%esi ; \
> + addl HYPERVISOR_shared_info,%esi

I think you need some comments on the register usage in the macros.
Otherwise people hacking on it later will go crazy.

> restore_all:
> +#ifndef CONFIG_XEN
> movl EFLAGS(%esp), %eax # mix EFLAGS, SS and CS
> # Warning: OLDSS(%esp) contains the wrong/random values if we
> # are returning to the kernel.
> @@ -258,12 +289,32 @@ restore_all:
> cmpl $((4 << 8) | 3), %eax
> je ldt_ss # returning to user-space with LDT SS
> restore_nocheck:
> +#else

Needs comment

> +restore_nocheck:
> + movl EFLAGS(%esp), %eax # mix EFLAGS and CS
> + movb CS(%esp), %al
> + andl $(VM_MASK | 3), %eax
> + cmpl $3, %eax
> + jne hypervisor_iret
> + ENABLE_INTERRUPTS
>

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

\
 
 \ /
  Last update: 2006-05-09 18:55    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site