[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: Remove CONFIG_COMPAT ifdef'ery from arch/x86 -- it is always defined.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Fri, 14 Sep 2012 10:55:35 +0000
  • Delivery-date: Fri, 14 Sep 2012 10:55:43 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1347477662 -3600
# Node ID 9686576228e552bd235a4dc2399e8855417c1142
# Parent  4fdaebea82d7c1d906df85eaf7fdab18625e8388
x86: Remove CONFIG_COMPAT ifdef'ery from arch/x86 -- it is always defined.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c     Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/cpu/mcheck/mce.c     Wed Sep 12 20:21:02 2012 +0100
@@ -1299,7 +1299,6 @@ static void x86_cmci_inject(void *data)
 #error BITS_PER_LONG definition absent
 #endif
 
-#ifdef CONFIG_COMPAT
 # include <compat/arch-x86/xen-mca.h>
 
 # define xen_mcinfo_msr              mcinfo_msr
@@ -1349,12 +1348,6 @@ CHECK_mcinfo_recovery;
 # undef xen_cpu_offline_action
 # undef xen_page_offline_action
 # undef xen_mcinfo_recovery
-#else
-# define compat_mc_fetch xen_mc_fetch
-# define compat_mc_physcpuinfo xen_mc_physcpuinfo
-# define compat_handle_is_null guest_handle_is_null
-# define copy_to_compat copy_to_guest
-#endif
 
 /* Machine Check Architecture Hypercall */
 long do_mca(XEN_GUEST_HANDLE(xen_mc_t) u_xen_mc)
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/domain.c     Wed Sep 12 20:21:02 2012 +0100
@@ -58,9 +58,7 @@
 #include <asm/amd.h>
 #include <xen/numa.h>
 #include <xen/iommu.h>
-#ifdef CONFIG_COMPAT
 #include <compat/vcpu.h>
-#endif
 
 DEFINE_PER_CPU(struct vcpu *, curr_vcpu);
 DEFINE_PER_CPU(unsigned long, cr4);
@@ -665,13 +663,11 @@ unsigned long pv_guest_cr4_fixup(const s
     return (hv_cr4 & hv_cr4_mask) | (guest_cr4 & ~hv_cr4_mask);
 }
 
-#ifdef CONFIG_COMPAT
 #define xen_vcpu_guest_context vcpu_guest_context
 #define fpu_ctxt fpu_ctxt.x
 CHECK_FIELD_(struct, vcpu_guest_context, fpu_ctxt);
 #undef fpu_ctxt
 #undef xen_vcpu_guest_context
-#endif
 
 /* Called by XEN_DOMCTL_setvcpucontext and VCPUOP_initialise. */
 int arch_set_info_guest(
@@ -688,11 +684,7 @@ int arch_set_info_guest(
      * we expect the tools to DTRT even in compat-mode callers. */
     compat = is_pv_32on64_domain(d);
 
-#ifdef CONFIG_COMPAT
 #define c(fld) (compat ? (c.cmp->fld) : (c.nat->fld))
-#else
-#define c(fld) (c.nat->fld)
-#endif
     flags = c(flags);
 
     if ( !is_hvm_vcpu(v) )
@@ -724,7 +716,6 @@ int arch_set_info_guest(
                                   LDT_ENTRY_SIZE) )
                 return -EINVAL;
         }
-#ifdef CONFIG_COMPAT
         else
         {
             fixup_guest_stack_selector(d, c.cmp->user_regs.ss);
@@ -744,7 +735,6 @@ int arch_set_info_guest(
                                          LDT_ENTRY_SIZE) )
                 return -EINVAL;
         }
-#endif
     }
 
     v->fpu_initialised = !!(flags & VGCF_I387_VALID);
@@ -763,7 +753,6 @@ int arch_set_info_guest(
             memcpy(v->arch.pv_vcpu.trap_ctxt, c.nat->trap_ctxt,
                    sizeof(c.nat->trap_ctxt));
     }
-#ifdef CONFIG_COMPAT
     else
     {
         XLAT_cpu_user_regs(&v->arch.user_regs, &c.cmp->user_regs);
@@ -771,7 +760,6 @@ int arch_set_info_guest(
             XLAT_trap_info(v->arch.pv_vcpu.trap_ctxt + i,
                            c.cmp->trap_ctxt + i);
     }
-#endif
     for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
         v->arch.debugreg[i] = c(debugreg[i]);
 
@@ -871,7 +859,6 @@ int arch_set_info_guest(
 
     if ( !compat )
         rc = (int)set_gdt(v, c.nat->gdt_frames, c.nat->gdt_ents);
-#ifdef CONFIG_COMPAT
     else
     {
         unsigned long gdt_frames[ARRAY_SIZE(v->arch.pv_vcpu.gdt_frames)];
@@ -883,7 +870,6 @@ int arch_set_info_guest(
             gdt_frames[i] = c.cmp->gdt_frames[i];
         rc = (int)set_gdt(v, gdt_frames, c.cmp->gdt_ents);
     }
-#endif
     if ( rc != 0 )
         return rc;
 
@@ -1463,7 +1449,6 @@ static void update_runstate_area(struct 
     if ( guest_handle_is_null(runstate_guest(v)) )
         return;
 
-#ifdef CONFIG_COMPAT
     if ( has_32bit_shinfo(v->domain) )
     {
         struct compat_vcpu_runstate_info info;
@@ -1472,7 +1457,6 @@ static void update_runstate_area(struct 
         __copy_to_guest(v->runstate_guest.compat, &info, 1);
         return;
     }
-#endif
 
     __copy_to_guest(runstate_guest(v), &v->runstate, 1);
 }
@@ -1593,7 +1577,6 @@ void context_switch(struct vcpu *prev, s
     {
         __context_switch();
 
-#ifdef CONFIG_COMPAT
         if ( !is_hvm_vcpu(next) &&
              (is_idle_vcpu(prev) ||
               is_hvm_vcpu(prev) ||
@@ -1603,7 +1586,6 @@ void context_switch(struct vcpu *prev, s
             if ( !(efer & EFER_SCE) )
                 write_efer(efer | EFER_SCE);
         }
-#endif
 
         /* Re-enable interrupts before restoring state which may fault. */
         local_irq_enable();
@@ -1776,7 +1758,6 @@ unsigned long hypercall_create_continuat
     return op;
 }
 
-#ifdef CONFIG_COMPAT
 int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...)
 {
     int rc = 0;
@@ -1865,7 +1846,6 @@ int hypercall_xlat_continuation(unsigned
 
     return rc;
 }
-#endif
 
 static int relinquish_memory(
     struct domain *d, struct page_list_head *list, unsigned long type)
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/domctl.c     Wed Sep 12 20:21:02 2012 +0100
@@ -594,14 +594,12 @@ long arch_do_domctl(
 
         switch ( domctl->u.address_size.size )
         {
-#ifdef CONFIG_COMPAT
         case 32:
             ret = switch_compat(d);
             break;
         case 64:
             ret = switch_native(d);
             break;
-#endif
         default:
             ret = (domctl->u.address_size.size == BITS_PER_LONG) ? 0 : -EINVAL;
             break;
@@ -1522,23 +1520,17 @@ long arch_do_domctl(
     return ret;
 }
 
-#ifdef CONFIG_COMPAT
 #define xen_vcpu_guest_context vcpu_guest_context
 #define fpu_ctxt fpu_ctxt.x
 CHECK_FIELD_(struct, vcpu_guest_context, fpu_ctxt);
 #undef fpu_ctxt
 #undef xen_vcpu_guest_context
-#endif
 
 void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
 {
     unsigned int i;
     bool_t compat = is_pv_32on64_domain(v->domain);
-#ifdef CONFIG_COMPAT
 #define c(fld) (!compat ? (c.nat->fld) : (c.cmp->fld))
-#else
-#define c(fld) (c.nat->fld)
-#endif
 
     if ( is_hvm_vcpu(v) )
         memset(c.nat, 0, sizeof(*c.nat));
@@ -1555,7 +1547,6 @@ void arch_get_info_guest(struct vcpu *v,
             memcpy(c.nat->trap_ctxt, v->arch.pv_vcpu.trap_ctxt,
                    sizeof(c.nat->trap_ctxt));
     }
-#ifdef CONFIG_COMPAT
     else
     {
         XLAT_cpu_user_regs(&c.cmp->user_regs, &v->arch.user_regs);
@@ -1563,7 +1554,6 @@ void arch_get_info_guest(struct vcpu *v,
             XLAT_trap_info(c.cmp->trap_ctxt + i,
                            v->arch.pv_vcpu.trap_ctxt + i);
     }
-#endif
 
     for ( i = 0; i < ARRAY_SIZE(v->arch.debugreg); ++i )
         c(debugreg[i] = v->arch.debugreg[i]);
@@ -1606,10 +1596,8 @@ void arch_get_info_guest(struct vcpu *v,
         c(ldt_ents = v->arch.pv_vcpu.ldt_ents);
         for ( i = 0; i < ARRAY_SIZE(v->arch.pv_vcpu.gdt_frames); ++i )
             c(gdt_frames[i] = v->arch.pv_vcpu.gdt_frames[i]);
-#ifdef CONFIG_COMPAT
         BUILD_BUG_ON(ARRAY_SIZE(c.nat->gdt_frames) !=
                      ARRAY_SIZE(c.cmp->gdt_frames));
-#endif
         for ( ; i < ARRAY_SIZE(c.nat->gdt_frames); ++i )
             c(gdt_frames[i] = 0);
         c(gdt_ents = v->arch.pv_vcpu.gdt_ents);
@@ -1649,7 +1637,6 @@ void arch_get_info_guest(struct vcpu *v,
             c.nat->debugreg[7] |= c.nat->debugreg[5];
             c.nat->debugreg[5] = 0;
         }
-#ifdef CONFIG_COMPAT
         else
         {
             l4_pgentry_t *l4e = __va(pagetable_get_paddr(v->arch.guest_table));
@@ -1659,7 +1646,6 @@ void arch_get_info_guest(struct vcpu *v,
             c.cmp->debugreg[7] |= c.cmp->debugreg[5];
             c.cmp->debugreg[5] = 0;
         }
-#endif
 
         if ( guest_kernel_mode(v, &v->arch.user_regs) )
             c(flags |= VGCF_in_kernel);
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Wed Sep 12 20:21:02 2012 +0100
@@ -1046,11 +1046,9 @@ int hvm_vcpu_initialise(struct vcpu *v)
 
     v->arch.hvm_vcpu.inject_trap.vector = -1;
 
-#ifdef CONFIG_COMPAT
     rc = setup_compat_arg_xlat(v);
     if ( rc != 0 )
         goto fail4;
-#endif
 
     rc = hvm_vcpu_cacheattr_init(v);
     if ( rc != 0 )
@@ -1081,9 +1079,7 @@ int hvm_vcpu_initialise(struct vcpu *v)
     return 0;
 
  fail5:
-#ifdef CONFIG_COMPAT
     free_compat_arg_xlat(v);
-#endif
  fail4:
     nestedhvm_vcpu_destroy(v);
  fail3:
@@ -1098,9 +1094,7 @@ void hvm_vcpu_destroy(struct vcpu *v)
 {
     nestedhvm_vcpu_destroy(v);
 
-#ifdef CONFIG_COMPAT
     free_compat_arg_xlat(v);
-#endif
 
     tasklet_kill(&v->arch.hvm_vcpu.assert_evtchn_irq_tasklet);
     hvm_vcpu_cacheattr_destroy(v);
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/machine_kexec.c
--- a/xen/arch/x86/machine_kexec.c      Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/machine_kexec.c      Wed Sep 12 20:21:02 2012 +0100
@@ -94,7 +94,6 @@ void machine_kexec(xen_kexec_image_t *im
      */
     asm volatile ( "lgdt %0" : : "m" (gdt_desc) );
 
-#ifdef CONFIG_COMPAT
     if ( is_pv_32on64_domain(dom0) )
     {
         compat_machine_kexec(image->page_list[1],
@@ -103,7 +102,6 @@ void machine_kexec(xen_kexec_image_t *im
                              image->start_address);
     }
     else
-#endif
     {
         relocate_new_kernel_t rnk;
 
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/oprofile/xenoprof.c
--- a/xen/arch/x86/oprofile/xenoprof.c  Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/oprofile/xenoprof.c  Wed Sep 12 20:21:02 2012 +0100
@@ -12,9 +12,7 @@
 #include <xen/sched.h>
 #include <xen/xenoprof.h>
 #include <public/xenoprof.h>
-#ifdef CONFIG_COMPAT
 #include <compat/xenoprof.h>
-#endif
 #include <asm/hvm/support.h>
 
 #include "op_counter.h"
@@ -56,7 +54,6 @@ int xenoprof_arch_ibs_counter(XEN_GUEST_
     return 0;
 }
 
-#ifdef CONFIG_COMPAT
 int compat_oprof_arch_counter(XEN_GUEST_HANDLE(void) arg)
 {
     struct compat_oprof_counter counter;
@@ -76,7 +73,6 @@ int compat_oprof_arch_counter(XEN_GUEST_
 
     return 0;
 }
-#endif
 
 int xenoprofile_get_mode(const struct vcpu *v,
                          const struct cpu_user_regs *regs)
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/setup.c
--- a/xen/arch/x86/setup.c      Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/setup.c      Wed Sep 12 20:21:02 2012 +0100
@@ -26,10 +26,8 @@
 #include <xen/pfn.h>
 #include <xen/nodemask.h>
 #include <public/version.h>
-#ifdef CONFIG_COMPAT
 #include <compat/platform.h>
 #include <compat/xen.h>
-#endif
 #include <asm/bitops.h>
 #include <asm/smp.h>
 #include <asm/processor.h>
@@ -1082,12 +1080,10 @@ void __init __start_xen(unsigned long mb
     BUILD_BUG_ON(sizeof(shared_info_t) > PAGE_SIZE);
     BUILD_BUG_ON(sizeof(struct vcpu_info) != 64);
 
-#ifdef CONFIG_COMPAT
     BUILD_BUG_ON(sizeof(((struct compat_platform_op *)0)->u) !=
                  sizeof(((struct compat_platform_op *)0)->u.pad));
     BUILD_BUG_ON(sizeof(start_info_compat_t) > PAGE_SIZE);
     BUILD_BUG_ON(sizeof(struct compat_vcpu_info) != 64);
-#endif
 
     /* Check definitions in public headers match internal defs. */
     BUILD_BUG_ON(__HYPERVISOR_VIRT_START != HYPERVISOR_VIRT_START);
diff -r 4fdaebea82d7 -r 9686576228e5 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/arch/x86/traps.c      Wed Sep 12 20:21:02 2012 +0100
@@ -92,9 +92,7 @@ DEFINE_PER_CPU(u64, efer);
 DEFINE_PER_CPU_READ_MOSTLY(u32, ler_msr);
 
 DEFINE_PER_CPU_READ_MOSTLY(struct desc_struct *, gdt_table);
-#ifdef CONFIG_COMPAT
 DEFINE_PER_CPU_READ_MOSTLY(struct desc_struct *, compat_gdt_table);
-#endif
 
 /* Master table, used by CPU0. */
 idt_entry_t idt_table[IDT_ENTRIES];
@@ -2273,14 +2271,12 @@ static int emulate_privileged_op(struct 
                 *reg = xen_pfn_to_cr3(mfn_to_gmfn(
                     v->domain, mfn));
             }
-#ifdef CONFIG_COMPAT
             else
             {
                 mfn = l4e_get_pfn(*(l4_pgentry_t 
*)__va(pagetable_get_paddr(v->arch.guest_table)));
                 *reg = compat_pfn_to_cr3(mfn_to_gmfn(
                     v->domain, mfn));
             }
-#endif
             /* PTs should not be shared */
             BUG_ON(page_get_owner(mfn_to_page(mfn)) == dom_cow);
         }
@@ -2337,14 +2333,8 @@ static int emulate_privileged_op(struct 
             unsigned long gfn;
             struct page_info *page;
             domain_lock(v->domain);
-            if ( !is_pv_32on64_vcpu(v) )
-            {
-                gfn = xen_cr3_to_pfn(*reg);
-#ifdef CONFIG_COMPAT
-            } else {
-                gfn = compat_cr3_to_pfn(*reg);
-#endif
-            }
+            gfn = !is_pv_32on64_vcpu(v)
+                ? xen_cr3_to_pfn(*reg) : compat_cr3_to_pfn(*reg);
             page = get_page_from_gfn(v->domain, gfn, NULL, P2M_ALLOC);
             rc = page ? new_guest_cr3(page_to_mfn(page)) : 0;
             if ( page )
@@ -3422,13 +3412,11 @@ void load_TR(void)
         (unsigned long)tss,
         offsetof(struct tss_struct, __cacheline_filler) - 1,
         9);
-#ifdef CONFIG_COMPAT
     _set_tssldt_desc(
         this_cpu(compat_gdt_table) + TSS_ENTRY - FIRST_RESERVED_GDT_ENTRY,
         (unsigned long)tss,
         offsetof(struct tss_struct, __cacheline_filler) - 1,
         11);
-#endif
 
     /* Switch to non-compat GDT (which has B bit clear) to execute LTR. */
     asm volatile (
@@ -3504,9 +3492,7 @@ void __init trap_init(void)
     idt_tables[0] = idt_table;
 
     this_cpu(gdt_table) = boot_cpu_gdt_table;
-#ifdef CONFIG_COMPAT
     this_cpu(compat_gdt_table) = boot_cpu_compat_gdt_table;
-#endif
 
     percpu_traps_init();
 
diff -r 4fdaebea82d7 -r 9686576228e5 xen/include/asm-x86/desc.h
--- a/xen/include/asm-x86/desc.h        Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/include/asm-x86/desc.h        Wed Sep 12 20:21:02 2012 +0100
@@ -143,13 +143,8 @@ struct desc_ptr {
 
 extern struct desc_struct boot_cpu_gdt_table[];
 DECLARE_PER_CPU(struct desc_struct *, gdt_table);
-#ifdef CONFIG_COMPAT
 extern struct desc_struct boot_cpu_compat_gdt_table[];
 DECLARE_PER_CPU(struct desc_struct *, compat_gdt_table);
-#else
-# define boot_cpu_compat_gdt_table boot_cpu_gdt_table
-# define per_cpu__compat_gdt_table per_cpu__gdt_table
-#endif
 
 extern void set_intr_gate(unsigned int irq, void * addr);
 extern void load_TR(void);
diff -r 4fdaebea82d7 -r 9686576228e5 xen/include/asm-x86/domain.h
--- a/xen/include/asm-x86/domain.h      Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/include/asm-x86/domain.h      Wed Sep 12 20:21:02 2012 +0100
@@ -447,9 +447,7 @@ struct arch_vcpu
     /* A secondary copy of the vcpu time info. */
     XEN_GUEST_HANDLE(vcpu_time_info_t) time_info_guest;
 
-#ifdef CONFIG_COMPAT
     void *compat_arg_xlat;
-#endif
 
 } __cacheline_aligned;
 
diff -r 4fdaebea82d7 -r 9686576228e5 xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h  Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/include/asm-x86/mm.h  Wed Sep 12 20:21:02 2012 +0100
@@ -473,7 +473,6 @@ TYPE_SAFE(unsigned long,mfn);
 #define SHARED_M2P_ENTRY         (~0UL - 1UL)
 #define SHARED_M2P(_e)           ((_e) == SHARED_M2P_ENTRY)
 
-#ifdef CONFIG_COMPAT
 #define compat_machine_to_phys_mapping ((unsigned int 
*)RDWR_COMPAT_MPT_VIRT_START)
 #define _set_gpfn_from_mfn(mfn, pfn) ({                        \
     struct domain *d = page_get_owner(__mfn_to_page(mfn));     \
@@ -483,15 +482,6 @@ TYPE_SAFE(unsigned long,mfn);
             (compat_machine_to_phys_mapping[(mfn)] = (unsigned int)(entry))), \
      machine_to_phys_mapping[(mfn)] = (entry));                \
     })
-#else
-#define _set_gpfn_from_mfn(mfn, pfn) ({                        \
-    struct domain *d = page_get_owner(__mfn_to_page(mfn));     \
-    if(d && (d == dom_cow))                                    \
-        machine_to_phys_mapping[(mfn)] = SHARED_M2P_ENTRY;     \
-    else                                                       \
-        machine_to_phys_mapping[(mfn)] = (pfn);                \
-    })
-#endif
 
 /*
  * Disable some users of set_gpfn_from_mfn() (e.g., free_heap_pages()) until
@@ -579,13 +569,8 @@ int map_ldt_shadow_page(unsigned int);
 
 extern int memory_add(unsigned long spfn, unsigned long epfn, unsigned int 
pxm);
 
-#ifdef CONFIG_COMPAT
 void domain_set_alloc_bitsize(struct domain *d);
 unsigned int domain_clamp_alloc_bitsize(struct domain *d, unsigned int bits);
-#else
-# define domain_set_alloc_bitsize(d) ((void)0)
-# define domain_clamp_alloc_bitsize(d, b) (b)
-#endif
 
 unsigned long domain_get_maximum_gpfn(struct domain *d);
 
diff -r 4fdaebea82d7 -r 9686576228e5 xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h   Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/include/asm-x86/processor.h   Wed Sep 12 20:21:02 2012 +0100
@@ -504,11 +504,7 @@ void show_execution_state(struct cpu_use
 void show_page_walk(unsigned long addr);
 void fatal_trap(int trapnr, struct cpu_user_regs *regs);
 
-#ifdef CONFIG_COMPAT
 void compat_show_guest_stack(struct vcpu *, struct cpu_user_regs *, int lines);
-#else
-#define compat_show_guest_stack(vcpu, regs, lines) ((void)0)
-#endif
 
 extern void mtrr_ap_init(void);
 extern void mtrr_bp_init(void);
diff -r 4fdaebea82d7 -r 9686576228e5 xen/include/asm-x86/shared.h
--- a/xen/include/asm-x86/shared.h      Wed Sep 12 19:31:16 2012 +0100
+++ b/xen/include/asm-x86/shared.h      Wed Sep 12 20:21:02 2012 +0100
@@ -1,8 +1,6 @@
 #ifndef __XEN_X86_SHARED_H__
 #define __XEN_X86_SHARED_H__
 
-#ifdef CONFIG_COMPAT
-
 #define nmi_reason(d) (!has_32bit_shinfo(d) ?                             \
                        (u32 *)&(d)->shared_info->native.arch.nmi_reason : \
                        (u32 *)&(d)->shared_info->compat.arch.nmi_reason)
@@ -39,33 +37,6 @@ static inline void arch_set_##field(stru
         v->vcpu_info->compat.arch.field = val;                  \
 }
 
-#else
-
-#define nmi_reason(d) ((u32 *)&(d)->shared_info->arch.nmi_reason)
-
-#define GET_SET_SHARED(type, field)                             \
-static inline type arch_get_##field(const struct domain *d)     \
-{                                                               \
-    return d->shared_info->arch.field;                          \
-}                                                               \
-static inline void arch_set_##field(struct domain *d,           \
-                                    type val)                   \
-{                                                               \
-    d->shared_info->arch.field = val;                           \
-}
-
-#define GET_SET_VCPU(type, field)                               \
-static inline type arch_get_##field(const struct vcpu *v)       \
-{                                                               \
-    return v->vcpu_info->arch.field;                            \
-}                                                               \
-static inline void arch_set_##field(struct vcpu *v,             \
-                                    type val)                   \
-{                                                               \
-    v->vcpu_info->arch.field = val;                             \
-}
-#endif
-
 GET_SET_SHARED(unsigned long, max_pfn)
 GET_SET_SHARED(xen_pfn_t, pfn_to_mfn_frame_list_list)
 GET_SET_SHARED(unsigned long, nmi_reason)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.