All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Keir Fraser <keir@xensource.com>
Cc: xen-devel@lists.xensource.com, "Zhai, Edwin" <edwin.zhai@intel.com>
Subject: Re: Re: HVM smp guest save/restore support
Date: Thu, 25 Jan 2007 11:30:54 +0800	[thread overview]
Message-ID: <20070125033054.GE15711@edwin-srv.sh.intel.com> (raw)
In-Reply-To: <C1DD56C4.82C1%keir@xensource.com>

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

thanks for your comments,
update it.

thanks,

On Wed, Jan 24, 2007 at 06:32:36PM +0000, Keir Fraser wrote:
> On 24/1/07 13:30, "Zhai, Edwin" <edwin.zhai@intel.com> wrote:
> 
> >> All hvm vcpu context restore should be done via the new hvm domctl, and the
> >> wakeup of APs can be implemented there (rather than in common/ directory).
> > 
> > how about this patch?
> > thanks,
> 
> This new piece of code is not VMX specific. Define an hvm_load_cpu_ctxt()
> function which executes that new piece of code after calling the VMX/SVM
> specific hook function. Also you shouldn't need to check if the vcpu is HVM,
> as otherwise you wouldn't be in this function!
> 
>  -- Keir
> 

-- 
best rgds,
edwin

[-- Attachment #2: smp_fix2.patch --]
[-- Type: text/plain, Size: 1015 bytes --]

diff -r bea505a69722 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c	Tue Jan 23 15:58:05 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c	Thu Jan 25 10:29:18 2007 +0800
@@ -170,12 +170,27 @@ void hvm_domain_destroy(struct domain *d
         unmap_domain_page_global((void *)d->arch.hvm_domain.buffered_io_va);
 }
 
+int hvm_load_cpu_ctxt(hvm_domain_context_t *h, void *opaque, int version)
+{
+    struct vcpu *v = opaque;
+
+    if ( hvm_funcs.load_cpu_ctxt(h, opaque, version) < 0 )
+        return -EINVAL;
+
+    /* wake up this vcpu for smp support */
+    if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) ) {
+        vcpu_wake(v);
+    }
+
+    return 0;
+}
+
 int hvm_vcpu_initialise(struct vcpu *v)
 {
     int rc;
 
     hvm_register_savevm(v->domain, "xen_hvm_cpu", v->vcpu_id, 1,
-                        hvm_funcs.save_cpu_ctxt, hvm_funcs.load_cpu_ctxt, 
+                        hvm_funcs.save_cpu_ctxt, hvm_load_cpu_ctxt, 
                         (void *)v);
 
     if ( (rc = vlapic_init(v)) != 0 )

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  reply	other threads:[~2007-01-25  3:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23 15:34 HVM smp guest save/restore support Zhai, Edwin
2007-01-23 15:49 ` Keir Fraser
2007-01-24 13:30   ` Zhai, Edwin
2007-01-24 18:32     ` Keir Fraser
2007-01-25  3:30       ` Zhai, Edwin [this message]
2007-01-25 12:29         ` Keir Fraser

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=20070125033054.GE15711@edwin-srv.sh.intel.com \
    --to=edwin.zhai@intel.com \
    --cc=keir@xensource.com \
    --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.