]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86: make x86_64/traps.c build with !CONFIG_PV
authorWei Liu <wei.liu2@citrix.com>
Thu, 4 Oct 2018 15:43:24 +0000 (16:43 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 15 Oct 2018 14:29:08 +0000 (15:29 +0100)
Provide declarations for hypercall_page_initialise_ring*_kernel, make
sure DCE work as expected.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/hypercall.h

index afe539ff1da7c55edf38a1322c9f94faf60e9bb9..27154f2ae2e46bad3b1d0f5a0985ec08102b72cd 100644 (file)
@@ -354,10 +354,12 @@ void hypercall_page_initialise(struct domain *d, void *hypercall_page)
     memset(hypercall_page, 0xCC, PAGE_SIZE);
     if ( is_hvm_domain(d) )
         hvm_hypercall_page_initialise(d, hypercall_page);
-    else if ( !is_pv_32bit_domain(d) )
+    else if ( is_pv_64bit_domain(d) )
         hypercall_page_initialise_ring3_kernel(hypercall_page);
-    else
+    else if ( is_pv_32bit_domain(d) )
         hypercall_page_initialise_ring1_kernel(hypercall_page);
+    else
+        ASSERT_UNREACHABLE();
 }
 
 /*
index da38b7991c1f96ec0bce41f7628435418273134d..7f302ecd97332faf8fc6066d69bdb31bdbd50994 100644 (file)
@@ -28,9 +28,10 @@ extern const hypercall_args_t hypercall_args_table[NR_hypercalls];
 #ifdef CONFIG_PV
 extern const hypercall_table_t pv_hypercall_table[];
 void pv_hypercall(struct cpu_user_regs *regs);
+#endif
+
 void hypercall_page_initialise_ring3_kernel(void *hypercall_page);
 void hypercall_page_initialise_ring1_kernel(void *hypercall_page);
-#endif
 
 /*
  * Both do_mmuext_op() and do_mmu_update():