debuggers.hg
changeset 17967:4af5059f4e0d
[IA64] add VGCF_online flag for XEN_DOMCTL_setvcpucontext to make vcpu online.
Extend the XEN_DOMCTL_setvcpucontext hypercall with VGCF_online
to make vcpu online.
This extension is necessary for save/restore support of pv_ops linux guest.
Currently Linux kernel makes vcpus offline except a boot processor
(vcpu = 0) when saving so that only vcpu = 0 is made online by the tools
stack when restoring. Then Linux kernel itself makes other vcpus up.
On the other hand, pv_ops linux guest doesn't make vcpus offline.
It uses stop_machine_run() keeping all vcpus online.
Thus all of vcpus context must be saved/restored and all vcpus needs to be
made online by the tools stack. So there needs a way to make vcpu online.
Add VGCF_online flag to the XEN_DOMCTL_setvcpucontext hypercall
following the x86 way.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Extend the XEN_DOMCTL_setvcpucontext hypercall with VGCF_online
to make vcpu online.
This extension is necessary for save/restore support of pv_ops linux guest.
Currently Linux kernel makes vcpus offline except a boot processor
(vcpu = 0) when saving so that only vcpu = 0 is made online by the tools
stack when restoring. Then Linux kernel itself makes other vcpus up.
On the other hand, pv_ops linux guest doesn't make vcpus offline.
It uses stop_machine_run() keeping all vcpus online.
Thus all of vcpus context must be saved/restored and all vcpus needs to be
made online by the tools stack. So there needs a way to make vcpu online.
Add VGCF_online flag to the XEN_DOMCTL_setvcpucontext hypercall
following the x86 way.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author | Isaku Yamahata <yamahata@valinux.co.jp> |
---|---|
date | Tue Jun 10 15:54:47 2008 +0900 (2008-06-10) |
parents | 1feb98eb64ef |
children | fc89fb719214 |
files | xen/arch/ia64/xen/domain.c xen/include/public/arch-ia64.h |
line diff
1.1 --- a/xen/arch/ia64/xen/domain.c Tue Jun 10 15:08:06 2008 +0900 1.2 +++ b/xen/arch/ia64/xen/domain.c Tue Jun 10 15:54:47 2008 +0900 1.3 @@ -1200,7 +1200,8 @@ int arch_set_info_guest(struct vcpu *v, 1.4 1.5 v->is_initialised = 1; 1.6 /* Auto-online VCPU0 when it is initialised. */ 1.7 - if (v->vcpu_id == 0) 1.8 + if (v->vcpu_id == 0 || (c.nat != NULL && 1.9 + c.nat->flags & VGCF_online)) 1.10 clear_bit(_VPF_down, &v->pause_flags); 1.11 } 1.12
2.1 --- a/xen/include/public/arch-ia64.h Tue Jun 10 15:08:06 2008 +0900 2.2 +++ b/xen/include/public/arch-ia64.h Tue Jun 10 15:54:47 2008 +0900 2.3 @@ -391,6 +391,7 @@ struct vcpu_guest_context_regs { 2.4 struct vcpu_guest_context { 2.5 #define VGCF_EXTRA_REGS (1UL << 1) /* Set extra regs. */ 2.6 #define VGCF_SET_CR_IRR (1UL << 2) /* Set cr_irr[0:3]. */ 2.7 +#define VGCF_online (1UL << 3) /* make this vcpu online */ 2.8 unsigned long flags; /* VGCF_* flags */ 2.9 2.10 struct vcpu_guest_context_regs regs;