From: xennn Subject: switch vcpu on physical cpu Date: Mon, 3 Mar 2014 12:10:42 -0800 (PST) Message-ID: <1393877442849-5721484.post@n5.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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.xensource.com List-Id: xen-devel@lists.xenproject.org hello all I would like to ask about switching vcpu-s on physcial one when we have paravirtualization. I think tha actual switching is happaning at switch_kernel_stack(struct vcpu *v) function in domain.c file. static inline void switch_kernel_stack(struct vcpu *v) { struct tss_struct *tss = &this_cpu(init_tss); tss->esp1 = v->arch.pv_vcpu.kernel_sp; tss->ss1 = v->arch.pv_vcpu.kernel_ss; } Here the actual task switching is happen - the kernel stack of the current physical cpu is get by this_cpu() and afther that the kernel stack of that current task is changed to the vcpu's one. So the task is swiched to the new vcpu state. Is that correct? I would like to ask what is tss_struct - task structure, task stack segment structure or something else? Best Regards -- View this message in context: http://xen.1045712.n5.nabble.com/switch-vcpu-on-physical-cpu-tp5721484.html Sent from the Xen - Dev mailing list archive at Nabble.com.