[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 20/20] xen/sysctl: wrap around sysctl hypercall
From: Stefano Stabellini <stefano.stabellini@xxxxxxx> Wrap sysctl hypercall def and sysctl.o with CONFIG_SYSCTL, and since PV_SHIM_EXCLUSIVE needs sorting as a prereq in the future, we move them out of PV_SHIM_EXCLUSIVE condition at the same time. We also need to remove all transient "#ifdef CONFIG_SYSCTL"-s in sysctl.c. Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx> --- v1 -> v2: - remove all transient "#ifdef CONFIG_SYSCTL"-s in sysctl.c --- v2 -> v3: - move out of CONFIG_PV_SHIM_EXCLUSIVE condition --- xen/common/Makefile | 2 +- xen/common/sysctl.c | 12 ------------ xen/include/hypercall-defs.c | 8 ++++++-- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/xen/common/Makefile b/xen/common/Makefile index 98f0873056..15ab048244 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -49,6 +49,7 @@ obj-y += spinlock.o obj-$(CONFIG_STACK_PROTECTOR) += stack-protector.o obj-y += stop_machine.o obj-y += symbols.o +obj-$(CONFIG_SYSCTL) += sysctl.o obj-y += tasklet.o obj-y += time.o obj-y += timer.o @@ -70,7 +71,6 @@ obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o memory.o multicall.o xlat.o ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y) obj-y += domctl.o obj-$(CONFIG_VM_EVENT) += monitor.o -obj-y += sysctl.o endif extra-y := symbols-dummy.o diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c index 85a1adacdd..08174a924d 100644 --- a/xen/common/sysctl.c +++ b/xen/common/sysctl.c @@ -58,7 +58,6 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) switch ( op->cmd ) { -#ifdef CONFIG_SYSCTL case XEN_SYSCTL_readconsole: ret = xsm_readconsole(XSM_HOOK, op->u.readconsole.clear); if ( ret ) @@ -66,17 +65,14 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) ret = read_console_ring(&op->u.readconsole); break; -#endif /* CONFIG_SYSCTL */ case XEN_SYSCTL_tbuf_op: ret = tb_control(&op->u.tbuf_op); break; -#ifdef CONFIG_SYSCTL case XEN_SYSCTL_sched_id: op->u.sched_id.sched_id = scheduler_id(); break; -#endif /* CONFIG_SYSCTL */ case XEN_SYSCTL_getdomaininfolist: { @@ -117,7 +113,6 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) } break; -#ifdef CONFIG_SYSCTL #ifdef CONFIG_PERF_COUNTERS case XEN_SYSCTL_perfc_op: ret = perfc_control(&op->u.perfc_op); @@ -129,7 +124,6 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) ret = spinlock_profile_control(&op->u.lockprof_op); break; #endif -#endif /* CONFIG_SYSCTL */ case XEN_SYSCTL_debug_keys: { @@ -191,7 +185,6 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) break; #endif /* CONFIG_PM_OP */ -#ifdef CONFIG_SYSCTL case XEN_SYSCTL_page_offline_op: { uint32_t *status, *ptr; @@ -302,7 +295,6 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) ret = -EFAULT; } break; -#endif /* CONFIG_SYSCTL */ case XEN_SYSCTL_numainfo: { @@ -493,11 +485,7 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) break; default: -#ifdef CONFIG_SYSCTL ret = arch_do_sysctl(op, u_sysctl); -#else - ret = -EOPNOTSUPP; -#endif copyback = 0; break; } diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c index 7720a29ade..c1081d87a2 100644 --- a/xen/include/hypercall-defs.c +++ b/xen/include/hypercall-defs.c @@ -194,8 +194,10 @@ kexec_op(unsigned long op, void *uarg) #ifdef CONFIG_IOREQ_SERVER dm_op(domid_t domid, unsigned int nr_bufs, xen_dm_op_buf_t *bufs) #endif -#ifndef CONFIG_PV_SHIM_EXCLUSIVE +#ifdef CONFIG_SYSCTL sysctl(xen_sysctl_t *u_sysctl) +#endif +#ifndef CONFIG_PV_SHIM_EXCLUSIVE domctl(xen_domctl_t *u_domctl) paging_domctl_cont(xen_domctl_t *u_domctl) platform_op(xen_platform_op_t *u_xenpf_op) @@ -273,8 +275,10 @@ physdev_op compat do hvm hvm do_arm #ifdef CONFIG_HVM hvm_op do do do do do #endif -#ifndef CONFIG_PV_SHIM_EXCLUSIVE +#ifdef CONFIG_SYSCTL sysctl do do do do do +#endif +#ifndef CONFIG_PV_SHIM_EXCLUSIVE domctl do do do do do #endif #ifdef CONFIG_KEXEC -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |