From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaeyong Yoo Subject: A simple question regarding hvm_context_save Date: Fri, 31 May 2013 10:46:39 +0000 (GMT) Message-ID: <32587091.297611369997199444.JavaMail.weblogic@epv6ml06> Reply-To: jaeyong.yoo@samsung.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: MIME-version: 1.0 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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. 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