[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 16/26] xen/domctl: wrap arch-specific domain_set_time_offset() with CONFIG_MGMT_HYPERCALLS
Arch-specific domain_set_time_offset() is responisble for XEN_DOMCTL_settimeoffset domctl-op, and shall be wrapped with CONFIG_MGMT_HYPERCALLS Wrap XEN_DOMCTL_settimeoffset-case transiently with CONFIG_MGMT_HYPERCALLS, and it will be removed when introducing CONFIG_MGMT_HYPERCALLS on the common/domctl.c in the last. Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx> --- v1 -> v2: - adapt to changes of "unify DOMCTL to MGMT_HYPERCALLS" - wrap XEN_DOMCTL_settimeoffset-case transiently --- xen/arch/arm/time.c | 2 ++ xen/arch/x86/time.c | 2 ++ xen/common/domctl.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index e74d30d258..dfed0b0ab8 100644 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -365,12 +365,14 @@ void force_update_vcpu_system_time(struct vcpu *v) update_vcpu_system_time(v); } +#ifdef CONFIG_MGMT_HYPERCALLS void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds) { d->time_offset.seconds = time_offset_seconds; d->time_offset.set = true; /* XXX update guest visible wallclock time */ } +#endif /* CONFIG_MGMT_HYPERCALLS */ static int cpu_time_callback(struct notifier_block *nfb, unsigned long action, diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 59129f419d..e7394ce8cf 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1841,6 +1841,7 @@ static void update_domain_rtc(void) rcu_read_unlock(&domlist_read_lock); } +#ifdef CONFIG_MGMT_HYPERCALLS void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds) { d->time_offset.seconds = time_offset_seconds; @@ -1849,6 +1850,7 @@ void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds) rtc_update_clock(d); update_domain_wallclock_time(d); } +#endif /* CONFIG_MGMT_HYPERCALLS */ int cpu_frequency_change(u64 freq) { diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 6048a87826..776bf7b8e2 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -748,9 +748,11 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) break; } +#ifdef CONFIG_MGMT_HYPERCALLS case XEN_DOMCTL_settimeoffset: domain_set_time_offset(d, op->u.settimeoffset.time_offset_seconds); break; +#endif /* CONFIG_MGMT_HYPERCALLS */ case XEN_DOMCTL_set_target: { -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |