[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 4/9] viridian: add missing context save helpers into synic and time modules
Currently the time module lacks vcpu context save helpers and the synic module lacks domain context save helpers. These helpers are not yet required but subsequent patches will require at least some of them so this patch completes the set to avoid introducing them in an ad-hoc way. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: "Roger Pau Monné" <roger.pau@xxxxxxxxxx> v3: - Add missing callers so that they are not added in an ad-hoc way --- xen/arch/x86/hvm/viridian/private.h | 10 ++++++++++ xen/arch/x86/hvm/viridian/synic.c | 10 ++++++++++ xen/arch/x86/hvm/viridian/time.c | 10 ++++++++++ xen/arch/x86/hvm/viridian/viridian.c | 4 ++++ 4 files changed, 34 insertions(+) diff --git a/xen/arch/x86/hvm/viridian/private.h b/xen/arch/x86/hvm/viridian/private.h index 040c3c991d..1864bab3d5 100644 --- a/xen/arch/x86/hvm/viridian/private.h +++ b/xen/arch/x86/hvm/viridian/private.h @@ -85,6 +85,11 @@ void viridian_synic_save_vcpu_ctxt(const struct vcpu *v, void viridian_synic_load_vcpu_ctxt( struct vcpu *v, const struct hvm_viridian_vcpu_context *ctxt); +void viridian_synic_save_domain_ctxt( + const struct domain *d, struct hvm_viridian_domain_context *ctxt); +void viridian_synic_load_domain_ctxt( + struct domain *d, const struct hvm_viridian_domain_context *ctxt); + int viridian_time_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val); int viridian_time_rdmsr(const struct vcpu *v, uint32_t idx, uint64_t *val); @@ -94,6 +99,11 @@ int viridian_time_domain_init(struct domain *d); void viridian_time_vcpu_deinit(struct vcpu *v); void viridian_time_domain_deinit(struct domain *d); +void viridian_time_save_vcpu_ctxt( + const struct vcpu *v, struct hvm_viridian_vcpu_context *ctxt); +void viridian_time_load_vcpu_ctxt( + struct vcpu *v, const struct hvm_viridian_vcpu_context *ctxt); + void viridian_time_save_domain_ctxt( const struct domain *d, struct hvm_viridian_domain_context *ctxt); void viridian_time_load_domain_ctxt( diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c index 9892bf279d..d8c35b4785 100644 --- a/xen/arch/x86/hvm/viridian/synic.c +++ b/xen/arch/x86/hvm/viridian/synic.c @@ -179,6 +179,16 @@ void viridian_synic_load_vcpu_ctxt( v->arch.hvm.viridian->apic_assist_pending = ctxt->apic_assist_pending; } +void viridian_synic_save_domain_ctxt( + const struct domain *d, struct hvm_viridian_domain_context *ctxt) +{ +} + +void viridian_synic_load_domain_ctxt( + struct domain *d, const struct hvm_viridian_domain_context *ctxt) +{ +} + /* * Local variables: * mode: C diff --git a/xen/arch/x86/hvm/viridian/time.c b/xen/arch/x86/hvm/viridian/time.c index b1d67035e4..9225bdf9ab 100644 --- a/xen/arch/x86/hvm/viridian/time.c +++ b/xen/arch/x86/hvm/viridian/time.c @@ -232,6 +232,16 @@ void viridian_time_domain_deinit(struct domain *d) { } +void viridian_time_save_vcpu_ctxt( + const struct vcpu *v, struct hvm_viridian_vcpu_context *ctxt) +{ +} + +void viridian_time_load_vcpu_ctxt( + struct vcpu *v, const struct hvm_viridian_vcpu_context *ctxt) +{ +} + void viridian_time_save_domain_ctxt( const struct domain *d, struct hvm_viridian_domain_context *ctxt) { diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c index 157d9f48b2..82d059b18d 100644 --- a/xen/arch/x86/hvm/viridian/viridian.c +++ b/xen/arch/x86/hvm/viridian/viridian.c @@ -724,6 +724,7 @@ static int viridian_save_domain_ctxt(struct vcpu *v, return 0; viridian_time_save_domain_ctxt(d, &ctxt); + viridian_synic_save_domain_ctxt(d, &ctxt); return (hvm_save_entry(VIRIDIAN_DOMAIN, 0, h, &ctxt) != 0); } @@ -739,6 +740,7 @@ static int viridian_load_domain_ctxt(struct domain *d, d->arch.hvm.viridian->hypercall_gpa.raw = ctxt.hypercall_gpa; d->arch.hvm.viridian->guest_os_id.raw = ctxt.guest_os_id; + viridian_synic_load_domain_ctxt(d, &ctxt); viridian_time_load_domain_ctxt(d, &ctxt); return 0; @@ -754,6 +756,7 @@ static int viridian_save_vcpu_ctxt(struct vcpu *v, hvm_domain_context_t *h) if ( !is_viridian_vcpu(v) ) return 0; + viridian_time_save_vcpu_ctxt(v, &ctxt); viridian_synic_save_vcpu_ctxt(v, &ctxt); return hvm_save_entry(VIRIDIAN_VCPU, v->vcpu_id, h, &ctxt); @@ -780,6 +783,7 @@ static int viridian_load_vcpu_ctxt(struct domain *d, return -EINVAL; viridian_synic_load_vcpu_ctxt(v, &ctxt); + viridian_time_load_vcpu_ctxt(v, &ctxt); return 0; } -- 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |