From: Wei Liu Date: Sun, 26 Aug 2018 12:19:36 +0000 (+0100) Subject: x86: enclose hvm_op and dm_op in CONFIG_HVM in relevant tables X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~3394 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a0a6b2421ffcd917d35c2879b6df6c1bfe63f6ca;p=xen.git x86: enclose hvm_op and dm_op in CONFIG_HVM in relevant tables PV guest (Dom0) needs to able to use these two hypercalls in order to serve HVM guests. But if xen doesn't support HVM at all there is no point in exposing them to PV guests. Signed-off-by: Wei Liu Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/hypercall.c b/xen/arch/x86/hypercall.c index 90e88c1d2c..74bde5e958 100644 --- a/xen/arch/x86/hypercall.c +++ b/xen/arch/x86/hypercall.c @@ -60,13 +60,15 @@ const hypercall_args_t hypercall_args_table[NR_hypercalls] = ARGS(xenoprof_op, 2), ARGS(event_channel_op, 2), ARGS(physdev_op, 2), - ARGS(hvm_op, 2), ARGS(sysctl, 1), ARGS(domctl, 1), ARGS(kexec_op, 2), ARGS(tmem_op, 1), ARGS(xenpmu_op, 2), +#ifdef CONFIG_HVM + ARGS(hvm_op, 2), ARGS(dm_op, 3), +#endif ARGS(mca, 1), ARGS(arch_1, 1), }; diff --git a/xen/arch/x86/pv/hypercall.c b/xen/arch/x86/pv/hypercall.c index bbc3011d1a..7f42b40d7f 100644 --- a/xen/arch/x86/pv/hypercall.c +++ b/xen/arch/x86/pv/hypercall.c @@ -68,7 +68,6 @@ const hypercall_table_t pv_hypercall_table[] = { #endif HYPERCALL(event_channel_op), COMPAT_CALL(physdev_op), - HYPERCALL(hvm_op), HYPERCALL(sysctl), HYPERCALL(domctl), #ifdef CONFIG_KEXEC @@ -78,7 +77,10 @@ const hypercall_table_t pv_hypercall_table[] = { HYPERCALL(tmem_op), #endif HYPERCALL(xenpmu_op), +#ifdef CONFIG_HVM + HYPERCALL(hvm_op), COMPAT_CALL(dm_op), +#endif HYPERCALL(mca), HYPERCALL(arch_1), };