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: [PATCH 3/12] Provide basic Xen PM infrastructure

To: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 3/12] Provide basic Xen PM infrastructure
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Tue, 05 Jun 2007 10:48:49 +0100
Cc: "Yu, Ke" <ke.yu@xxxxxxxxx>
Delivery-date: Tue, 05 Jun 2007 02:47:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <D470B4E54465E3469E2ABBC5AFAC390F9E121A@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdQGG3ZpxEgy19kSqWdKUeqNdZLwxXPkmXV
Thread-topic: [PATCH 3/12] Provide basic Xen PM infrastructure
User-agent: Microsoft-Entourage/11.3.3.061214
A few comments are included below, but I should also add that I suspect the
sleep/wakeup code is broken by the fact that x86/64 Xen is relocated in
physical memory. The sleep/wakeup code should be potentially added to the
trampoline at 0x90000?

On 14/2/07 09:13, "Tian, Kevin" <kevin.tian@xxxxxxxxx> wrote:

> Add basic infrastructure for xen power management. Now
> only S3 (suspend to ram) is supported.
> 
> Signed-off-by Ke Yu <ke.yu@xxxxxxxxx>
> Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
> 
> --- a/xen/arch/x86/boot/x86_32.S Wed Feb 14 11:13:40 2007 +0800
> +++ b/xen/arch/x86/boot/x86_32.S Wed Feb 14 11:13:40 2007 +0800
> @@ -146,6 +146,8 @@ start_paging:
>          rdmsr
>          bts     $_EFER_NX,%eax
>          wrmsr
> +        mov     $1,%eax
> +        mov     %eax, nx_enabled-__PAGE_OFFSET
>  no_execute_disable:
>          pop     %ebx
>  #endif

The boot code has changed so this won't apply. In any case you can use
cpu_has_nx, or create a macro called nx_enabled. There's no need for another
global variable.

> diff -r 13e258a58044 xen/arch/x86/smp.c
> --- a/xen/arch/x86/smp.c Wed Feb 14 11:13:40 2007 +0800
> +++ b/xen/arch/x86/smp.c Wed Feb 14 14:59:49 2007 +0800
> @@ -276,8 +276,9 @@ int on_selected_cpus(
>  {
>      struct call_data_struct data;
>      unsigned int nr_cpus = cpus_weight(selected);
> -
> -    ASSERT(local_irq_is_enabled());
> +    unsigned int self = cpu_isset(smp_processor_id(), selected);
> +
> +    ASSERT(!self || local_irq_is_enabled());
>  
>      if ( nr_cpus == 0 )
>          return 0;

That's rather bogus isn't it?

 -- Keir


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

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