WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [RFC PATCH 11/35] Add support for Xen to entry.S.

To: virtualization@xxxxxxxxxxxxxx
Subject: [Xen-devel] Re: [RFC PATCH 11/35] Add support for Xen to entry.S.
From: Andi Kleen <ak@xxxxxxx>
Date: Tue, 9 May 2006 18:51:37 +0200
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Delivery-date: Tue, 09 May 2006 09:53:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060509085152.524462000@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060509084945.373541000@xxxxxxxxxxxx> <20060509085152.524462000@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>