x86: enclose hvm_op and dm_op in CONFIG_HVM in relevant tables
authorWei Liu <wei.liu2@citrix.com>
Sun, 26 Aug 2018 12:19:36 +0000 (13:19 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 28 Aug 2018 09:48:33 +0000 (10:48 +0100)
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 <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hypercall.c
xen/arch/x86/pv/hypercall.c

index 90e88c1d2c976aaa8d590ab2728058552063119b..74bde5e958c3c14bc176fd06caf19e56649aca07 100644 (file)
@@ -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),
 };
index bbc3011d1a607c10e6d210c7dab3e2db348b435a..7f42b40d7f23bdfb27a06f6f3c1c25873f9a2ce8 100644 (file)
@@ -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),
 };