[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v15 08/14] x86/hvm: Introduce lapic_save_hidden_one
This is used to save data from a single instance. Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx> --- xen/arch/x86/hvm/vlapic.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index 1b9f00a..0795161 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -1435,23 +1435,29 @@ static void lapic_rearm(struct vlapic *s) s->timer_last_update = s->pt.last_plt_gtime; } -static int lapic_save_hidden(struct domain *d, hvm_domain_context_t *h) +static int lapic_save_hidden_one(struct vcpu *v, hvm_domain_context_t *h) { - struct vcpu *v; - struct vlapic *s; - int rc = 0; + struct vlapic *s = vcpu_vlapic(v); - if ( !has_vlapic(d) ) + if ( !has_vlapic(v->domain) ) return 0; + return hvm_save_entry(LAPIC, v->vcpu_id, h, &s->hw); +} + +static int lapic_save_hidden(struct domain *d, hvm_domain_context_t *h) +{ + struct vcpu *v; + int err = 0; + for_each_vcpu ( d, v ) { - s = vcpu_vlapic(v); - if ( (rc = hvm_save_entry(LAPIC, v->vcpu_id, h, &s->hw)) != 0 ) + err = lapic_save_hidden_one(v, h); + if ( err ) break; } - return rc; + return err; } static int lapic_save_regs(struct domain *d, hvm_domain_context_t *h) -- 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |