ia64/xen-unstable

changeset 10826:38943ca3c8cc

Remove unused definitions in xc_hvm_build.c.

Signed-off-by: Xin Li <xin.b.li@intel.com>
author kfraser@localhost.localdomain
date Thu Jul 27 13:19:28 2006 +0100 (2006-07-27)
parents d60da1c0664d
children 3c95a8ed22d0
files tools/libxc/xc_hvm_build.c
line diff
     1.1 --- a/tools/libxc/xc_hvm_build.c	Thu Jul 27 13:18:36 2006 +0100
     1.2 +++ b/tools/libxc/xc_hvm_build.c	Thu Jul 27 13:19:28 2006 +0100
     1.3 @@ -15,12 +15,6 @@
     1.4  
     1.5  #define HVM_LOADER_ENTR_ADDR  0x00100000
     1.6  
     1.7 -#define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_USER)
     1.8 -#define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_USER)
     1.9 -#ifdef __x86_64__
    1.10 -#define L3_PROT (_PAGE_PRESENT)
    1.11 -#endif
    1.12 -
    1.13  #define E820MAX     128
    1.14  
    1.15  #define E820_RAM          1
    1.16 @@ -41,9 +35,6 @@ struct e820entry {
    1.17      uint32_t type;
    1.18  } __attribute__((packed));
    1.19  
    1.20 -#define round_pgup(_p)    (((_p)+(PAGE_SIZE-1))&PAGE_MASK)
    1.21 -#define round_pgdown(_p)  ((_p)&PAGE_MASK)
    1.22 -
    1.23  static int
    1.24  parseelfimage(
    1.25      char *elfbase, unsigned long elfsize, struct domain_setup_info *dsi);
    1.26 @@ -52,7 +43,7 @@ loadelfimage(
    1.27      char *elfbase, int xch, uint32_t dom, unsigned long *parray,
    1.28      struct domain_setup_info *dsi);
    1.29  
    1.30 -static unsigned char build_e820map(void *e820_page, unsigned long long mem_size)
    1.31 +static void build_e820map(void *e820_page, unsigned long long mem_size)
    1.32  {
    1.33      struct e820entry *e820entry =
    1.34          (struct e820entry *)(((unsigned char *)e820_page) + E820_MAP_OFFSET);
    1.35 @@ -115,7 +106,7 @@ static unsigned char build_e820map(void 
    1.36      e820entry[nr_map].type = E820_IO;
    1.37      nr_map++;
    1.38  
    1.39 -    return (*(((unsigned char *)e820_page) + E820_MAP_NR_OFFSET) = nr_map);
    1.40 +    *(((unsigned char *)e820_page) + E820_MAP_NR_OFFSET) = nr_map;
    1.41  }
    1.42  
    1.43  static void set_hvm_info_checksum(struct hvm_info_table *t)
    1.44 @@ -186,7 +177,6 @@ static int setup_guest(int xc_handle,
    1.45  
    1.46      shared_info_t *shared_info;
    1.47      void *e820_page;
    1.48 -    unsigned char e820_map_nr;
    1.49  
    1.50      struct domain_setup_info dsi;
    1.51      uint64_t v_end;
    1.52 @@ -261,7 +251,7 @@ static int setup_guest(int xc_handle,
    1.53                page_array[E820_MAP_PAGE >> PAGE_SHIFT])) == 0 )
    1.54          goto error_out;
    1.55      memset(e820_page, 0, PAGE_SIZE);
    1.56 -    e820_map_nr = build_e820map(e820_page, v_end);
    1.57 +    build_e820map(e820_page, v_end);
    1.58      munmap(e820_page, PAGE_SIZE);
    1.59  
    1.60      /* shared_info page starts its life empty. */
    1.61 @@ -311,23 +301,7 @@ static int setup_guest(int xc_handle,
    1.62      /*
    1.63       * Initial register values:
    1.64       */
    1.65 -    ctxt->user_regs.ds = 0;
    1.66 -    ctxt->user_regs.es = 0;
    1.67 -    ctxt->user_regs.fs = 0;
    1.68 -    ctxt->user_regs.gs = 0;
    1.69 -    ctxt->user_regs.ss = 0;
    1.70 -    ctxt->user_regs.cs = 0;
    1.71      ctxt->user_regs.eip = dsi.v_kernentry;
    1.72 -    ctxt->user_regs.edx = 0;
    1.73 -    ctxt->user_regs.eax = 0;
    1.74 -    ctxt->user_regs.esp = 0;
    1.75 -    ctxt->user_regs.ebx = 0; /* startup_32 expects this to be 0 to signal boot cpu */
    1.76 -    ctxt->user_regs.ecx = 0;
    1.77 -    ctxt->user_regs.esi = 0;
    1.78 -    ctxt->user_regs.edi = 0;
    1.79 -    ctxt->user_regs.ebp = 0;
    1.80 -
    1.81 -    ctxt->user_regs.eflags = 0;
    1.82  
    1.83      return 0;
    1.84