]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Annotate hypercall stubs as functions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2016 18:47:42 +0000 (19:47 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2016 18:47:42 +0000 (19:47 +0100)
Move DECLARE_HYPERCALL() from asm_macros.h to being local, as it is not useful
elsewhere.  Link hypercall_page in .data rather than .text, to avoid polluting
the disassembly.  Annotate hypercall_page itself as data.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/hypercall_page.S
build/files.mk
include/xtf/asm_macros.h

index 5e0b6dbe5c4a8d53e815dea3683bfd178c4fb311..5b94a49741d4a78b73f501142641f01ab83b00df 100644 (file)
@@ -2,13 +2,24 @@
 #include <xtf/asm_macros.h>
 #include <xen/xen.h>
 
-.text
+.data
 .align PAGE_SIZE
 GLOBAL(hypercall_page)
          /* Poisoned with `ret` for safety before hypercalls are set up. */
         .fill PAGE_SIZE, 1, 0xc3
+        .type hypercall_page, STT_OBJECT
         .size hypercall_page, PAGE_SIZE
 
+/*
+ * Identify a specific hypercall in the hypercall page
+ * @param name Hypercall name.
+ */
+#define DECLARE_HYPERCALL(name)                                                 \
+        .globl HYPERCALL_ ## name;                                              \
+        .set   HYPERCALL_ ## name, hypercall_page + __HYPERVISOR_ ## name * 32; \
+        .type  HYPERCALL_ ## name, STT_FUNC;                                    \
+        .size  HYPERCALL_ ## name, 32
+
 DECLARE_HYPERCALL(set_trap_table)
 DECLARE_HYPERCALL(mmu_update)
 DECLARE_HYPERCALL(set_gdt)
index f411c8a1660baa6994848aa64d9dbe95a00c22fa..ea34b8bb1d2a2bca21a40b6787ac6cad43a28ab8 100644 (file)
@@ -15,12 +15,10 @@ obj-perarch += $(ROOT)/common/report.o
 obj-perarch += $(ROOT)/common/setup.o
 
 obj-perenv += $(ROOT)/arch/x86/desc.o
+obj-perenv += $(ROOT)/arch/x86/hypercall_page.o
 obj-perenv += $(ROOT)/arch/x86/setup.o
 obj-perenv += $(ROOT)/arch/x86/traps.o
 
-# Always link hypercall_page.S last as it is a page of data replaced by the hyperisor
-obj-perenv += $(ROOT)/arch/x86/hypercall_page.o
-
 
 # HVM specific objects
 obj-hvm += $(ROOT)/arch/x86/hvm/pagetables.o
index 71ec874c2651fbe20b8d6058cb33b096c0354ccd..1de91aeb66f256b23ae2736176ae49707f7ef483 100644 (file)
@@ -35,15 +35,6 @@ name:
 #define SIZE(name)                              \
     .size name, . - name;
 
-/**
- * Identify a specific hypercall in the hypercall page
- * @param name Hypercall name.
- */
-#define DECLARE_HYPERCALL(name)                                         \
-    .globl HYPERCALL_ ## name;                                          \
-    .set HYPERCALL_ ## name, hypercall_page + __HYPERVISOR_ ## name * 32; \
-    .size HYPERCALL_ ## name, 32
-
 /**
  * Create an ELF note entry.
  *