From: Andrew Cooper <andrew.cooper3@citrix.com>
To: "jaeyong.yoo@samsung.com" <jaeyong.yoo@samsung.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: A simple question regarding hvm_context_save
Date: Fri, 31 May 2013 11:55:19 +0100 [thread overview]
Message-ID: <51A88197.1040706@citrix.com> (raw)
In-Reply-To: <32587091.297611369997199444.JavaMail.weblogic@epv6ml06>
On 31/05/13 11:46, Jaeyong Yoo wrote:
> Hello,
> I'm reading live migration related code and got a simple question
> in function hvm_context_save:
>
> static int hvm_save_cpu_ctxt(struct domain *d, hvm_domain_context_t *h)
> {
> blah...
> /* We don't need to save state for a vcpu that is down; the restore
> * code will leave it down if there is nothing saved. */
> if ( test_bit(_VPF_down, &v->pause_flags) )
> continue;
> blah...
>
> In the above, if the vcpu is paused, we don't need to store cpu registers
> (since vcpu structure already stored them). But, as far as I know, before
> we save the hvm context, we suspend the domain, which calls shutdown
> sched_op, and the vcpu is paused.
_VPF_down is only one possible pause reason. See
xen/include/xen/sched.h for all of them.
In particular, _VPF_migrating is a different pause reason.
If a VCPU is down, the guest is required to reinitialise it from
scratch. This is why the state does not need saving.
~Andrew
> Then, I guess testing pause_flags always returns down and we don't
> need to store cpu ctxts. Do I miss something here?
>
> best,
> Jaeyong
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
prev parent reply other threads:[~2013-05-31 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 10:46 A simple question regarding hvm_context_save Jaeyong Yoo
2013-05-31 10:53 ` Ian Campbell
2013-05-31 10:55 ` Andrew Cooper [this message]
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=51A88197.1040706@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jaeyong.yoo@samsung.com \
--cc=xen-devel@lists.xen.org \
/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.