All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir@xensource.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	xen-devel@lists.xensource.com
Cc: "Yu, Ke" <ke.yu@intel.com>
Subject: Re: [PATCH 3/12] Provide basic Xen PM infrastructure
Date: Tue, 05 Jun 2007 10:48:49 +0100	[thread overview]
Message-ID: <C28AF011.100D3%keir@xensource.com> (raw)
In-Reply-To: <D470B4E54465E3469E2ABBC5AFAC390F9E121A@pdsmsx412.ccr.corp.intel.com>


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@intel.com> wrote:

> Add basic infrastructure for xen power management. Now
> only S3 (suspend to ram) is supported.
> 
> Signed-off-by Ke Yu <ke.yu@intel.com>
> Signed-off-by Kevin Tian <kevin.tian@intel.com>
> 
> --- 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

  reply	other threads:[~2007-06-05  9:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14  9:13 [PATCH 3/12] Provide basic Xen PM infrastructure Tian, Kevin
2007-06-05  9:48 ` Keir Fraser [this message]
2007-06-05 10:02   ` Tian, Kevin
2007-06-05 10:22   ` Tian, Kevin
2007-06-05 10:29     ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2007-05-15 14:16 Tian, Kevin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C28AF011.100D3%keir@xensource.com \
    --to=keir@xensource.com \
    --cc=ke.yu@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.