WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Remove EF_* duplicate defs for X86_E

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Remove EF_* duplicate defs for X86_EFLAGS_*.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Aug 2009 00:40:15 -0700
Delivery-date: Fri, 14 Aug 2009 00:40:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250235372 -3600
# Node ID f4601471c59bff0e42aa8312e93adf81f0f42018
# Parent  042e2103c3a2dfe48d7696905946afb2d9d99300
x86: Remove EF_* duplicate defs for X86_EFLAGS_*.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/acpi/suspend.c       |    5 ++++-
 xen/arch/x86/domain.c             |    4 ++--
 xen/arch/x86/domctl.c             |    2 +-
 xen/arch/x86/hvm/hvm.c            |    2 +-
 xen/arch/x86/traps.c              |   10 +++++-----
 xen/arch/x86/x86_64/traps.c       |   10 +++++++---
 xen/include/asm-x86/regs.h        |   23 -----------------------
 xen/include/asm-x86/x86_32/regs.h |    2 +-
 8 files changed, 21 insertions(+), 37 deletions(-)

diff -r 042e2103c3a2 -r f4601471c59b xen/arch/x86/acpi/suspend.c
--- a/xen/arch/x86/acpi/suspend.c       Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/arch/x86/acpi/suspend.c       Fri Aug 14 08:36:12 2009 +0100
@@ -46,7 +46,10 @@ void restore_rest_processor_state(void)
     wrmsrl(MSR_LSTAR, saved_lstar);
     wrmsrl(MSR_CSTAR, saved_cstar);
     wrmsr(MSR_STAR, 0, (FLAT_RING3_CS32<<16) | __HYPERVISOR_CS);
-    wrmsr(MSR_SYSCALL_MASK, EF_VM|EF_RF|EF_NT|EF_DF|EF_IE|EF_TF, 0U);    
+    wrmsr(MSR_SYSCALL_MASK,
+          X86_EFLAGS_VM|X86_EFLAGS_RF|X86_EFLAGS_NT|
+          X86_EFLAGS_DF|X86_EFLAGS_IF|X86_EFLAGS_TF,
+          0U);
 
     if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
     {
diff -r 042e2103c3a2 -r f4601471c59b xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/arch/x86/domain.c     Fri Aug 14 08:36:12 2009 +0100
@@ -676,10 +676,10 @@ int arch_set_info_guest(
 
     /* IOPL privileges are virtualised. */
     v->arch.iopl = (v->arch.guest_context.user_regs.eflags >> 12) & 3;
-    v->arch.guest_context.user_regs.eflags &= ~EF_IOPL;
+    v->arch.guest_context.user_regs.eflags &= ~X86_EFLAGS_IOPL;
 
     /* Ensure real hardware interrupts are enabled. */
-    v->arch.guest_context.user_regs.eflags |= EF_IE;
+    v->arch.guest_context.user_regs.eflags |= X86_EFLAGS_IF;
 
     cr4 = v->arch.guest_context.ctrlreg[4];
     v->arch.guest_context.ctrlreg[4] = cr4 ? pv_guest_cr4_fixup(cr4) :
diff -r 042e2103c3a2 -r f4601471c59b xen/arch/x86/domctl.c
--- a/xen/arch/x86/domctl.c     Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/arch/x86/domctl.c     Fri Aug 14 08:36:12 2009 +0100
@@ -1154,7 +1154,7 @@ void arch_get_info_guest(struct vcpu *v,
     else
     {
         /* IOPL privileges are virtualised: merge back into returned eflags. */
-        BUG_ON((c(user_regs.eflags) & EF_IOPL) != 0);
+        BUG_ON((c(user_regs.eflags) & X86_EFLAGS_IOPL) != 0);
         c(user_regs.eflags |= v->arch.iopl << 12);
 
         if ( !is_pv_32on64_domain(v->domain) )
diff -r 042e2103c3a2 -r f4601471c59b xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Fri Aug 14 08:36:12 2009 +0100
@@ -1251,7 +1251,7 @@ static int hvm_load_segment_selector(
     struct cpu_user_regs *regs = guest_cpu_user_regs();
     struct vcpu *v = current;
 
-    if ( regs->eflags & EF_VM )
+    if ( regs->eflags & X86_EFLAGS_VM )
     {
         segr.sel = sel;
         segr.base = (uint32_t)sel << 4;
diff -r 042e2103c3a2 -r f4601471c59b xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/arch/x86/traps.c      Fri Aug 14 08:36:12 2009 +0100
@@ -1852,7 +1852,7 @@ static int emulate_privileged_op(struct 
                                      PFEC_write_access);
                 return EXCRET_fault_fixed;
             }
-            wr_ad(edi, regs->edi + (int)((regs->eflags & EF_DF)
+            wr_ad(edi, regs->edi + (int)((regs->eflags & X86_EFLAGS_DF)
                                          ? -op_bytes : op_bytes));
             break;
 
@@ -1871,7 +1871,7 @@ static int emulate_privileged_op(struct 
                 return EXCRET_fault_fixed;
             }
             guest_io_write(port, op_bytes, data, v, regs);
-            wr_ad(esi, regs->esi + (int)((regs->eflags & EF_DF)
+            wr_ad(esi, regs->esi + (int)((regs->eflags & X86_EFLAGS_DF)
                                          ? -op_bytes : op_bytes));
             break;
         }
@@ -2998,7 +2998,7 @@ asmlinkage void do_debug(struct cpu_user
 
     if ( !guest_mode(regs) )
     {
-        if ( regs->eflags & EF_TF )
+        if ( regs->eflags & X86_EFLAGS_TF )
         {
 #ifdef __x86_64__
             void sysenter_entry(void);
@@ -3008,14 +3008,14 @@ asmlinkage void do_debug(struct cpu_user
                  (regs->rip <= (unsigned long)sysenter_eflags_saved) )
             {
                 if ( regs->rip == (unsigned long)sysenter_eflags_saved )
-                    regs->eflags &= ~EF_TF;
+                    regs->eflags &= ~X86_EFLAGS_TF;
                 goto out;
             }
 #endif
             if ( !debugger_trap_fatal(TRAP_debug, regs) )
             {
                 WARN_ON(1);
-                regs->eflags &= ~EF_TF;
+                regs->eflags &= ~X86_EFLAGS_TF;
             }
         }
         else
diff -r 042e2103c3a2 -r f4601471c59b xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c       Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/arch/x86/x86_64/traps.c       Fri Aug 14 08:36:12 2009 +0100
@@ -296,7 +296,8 @@ unsigned long do_iret(void)
 
     regs->rip    = iret_saved.rip;
     regs->cs     = iret_saved.cs | 3; /* force guest privilege */
-    regs->rflags = (iret_saved.rflags & ~(EF_IOPL|EF_VM)) | EF_IE;
+    regs->rflags = ((iret_saved.rflags & ~(X86_EFLAGS_IOPL|X86_EFLAGS_VM))
+                    | X86_EFLAGS_IF);
     regs->rsp    = iret_saved.rsp;
     regs->ss     = iret_saved.ss | 3; /* force guest privilege */
 
@@ -359,7 +360,7 @@ end:
     v->trap_priority = v->old_trap_priority;
 
     /* Restore upcall mask from supplied EFLAGS.IF. */
-    vcpu_info(v, evtchn_upcall_mask) = !(iret_saved.rflags & EF_IE);
+    vcpu_info(v, evtchn_upcall_mask) = !(iret_saved.rflags & X86_EFLAGS_IF);
 
     /* Saved %rax gets written back to regs->rax in entry.S. */
     return iret_saved.rax;
@@ -464,7 +465,10 @@ void __devinit subarch_percpu_traps_init
 
     /* Common SYSCALL parameters. */
     wrmsr(MSR_STAR, 0, (FLAT_RING3_CS32<<16) | __HYPERVISOR_CS);
-    wrmsr(MSR_SYSCALL_MASK, EF_VM|EF_RF|EF_NT|EF_DF|EF_IE|EF_TF, 0U);
+    wrmsr(MSR_SYSCALL_MASK,
+          X86_EFLAGS_VM|X86_EFLAGS_RF|X86_EFLAGS_NT|
+          X86_EFLAGS_DF|X86_EFLAGS_IF|X86_EFLAGS_TF,
+          0U);
 }
 
 void init_int80_direct_trap(struct vcpu *v)
diff -r 042e2103c3a2 -r f4601471c59b xen/include/asm-x86/regs.h
--- a/xen/include/asm-x86/regs.h        Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/include/asm-x86/regs.h        Fri Aug 14 08:36:12 2009 +0100
@@ -7,29 +7,6 @@
 #else
 #include <asm/x86_32/regs.h>
 #endif
-
-enum EFLAGS {
-    EF_CF   = 0x00000001,
-    EF_PF   = 0x00000004,
-    EF_AF   = 0x00000010,
-    EF_ZF   = 0x00000040,
-    EF_SF   = 0x00000080,
-    EF_TF   = 0x00000100,
-    EF_IE   = 0x00000200,
-    EF_DF   = 0x00000400,
-    EF_OF   = 0x00000800,
-    EF_IOPL = 0x00003000,
-    EF_IOPL_RING0 = 0x00000000,
-    EF_IOPL_RING1 = 0x00001000,
-    EF_IOPL_RING2 = 0x00002000,
-    EF_NT   = 0x00004000,   /* nested task */
-    EF_RF   = 0x00010000,   /* resume */
-    EF_VM   = 0x00020000,   /* virtual mode */
-    EF_AC   = 0x00040000,   /* alignment */
-    EF_VIF  = 0x00080000,   /* virtual interrupt */
-    EF_VIP  = 0x00100000,   /* virtual interrupt pending */
-    EF_ID   = 0x00200000,   /* id */
-};
 
 #define guest_mode(r)                                                         \
 ({                                                                            \
diff -r 042e2103c3a2 -r f4601471c59b xen/include/asm-x86/x86_32/regs.h
--- a/xen/include/asm-x86/x86_32/regs.h Fri Aug 14 08:22:34 2009 +0100
+++ b/xen/include/asm-x86/x86_32/regs.h Fri Aug 14 08:36:12 2009 +0100
@@ -4,7 +4,7 @@
 #include <xen/types.h>
 #include <public/xen.h>
 
-#define vm86_mode(r) ((r)->eflags & EF_VM)
+#define vm86_mode(r) ((r)->eflags & X86_EFLAGS_VM)
 #define ring_0(r)    (((r)->cs & 3) == 0)
 #define ring_1(r)    (((r)->cs & 3) == 1)
 #define ring_2(r)    (((r)->cs & 3) == 2)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Remove EF_* duplicate defs for X86_EFLAGS_*., Xen patchbot-unstable <=