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-devel

[Xen-devel] [PATCH] vmxassist-cleanup.patch

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] vmxassist-cleanup.patch
From: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>
Date: Tue, 14 Jun 2005 22:53:17 -0400
Delivery-date: Wed, 15 Jun 2005 02:53:55 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM T.J. Watson Research Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Some minor fixups and improved debug output.

Signed-Off-By: Leendert van Doorn <leendert@xxxxxxxxxxxxxx>

diff --exclude=ChangeSet --exclude=BitKeeper --exclude='*SCCS*' -ru -bB -N 
xeno-unstable.orig/tools/firmware/vmxassist/Makefile 
xeno-unstable.mine/tools/firmware/vmxassist/Makefile
--- xeno-unstable.orig/tools/firmware/vmxassist/Makefile        2005-06-13 
20:41:59.000000000 -0400
+++ xeno-unstable.mine/tools/firmware/vmxassist/Makefile        2005-06-14 
21:44:53.000000000 -0400
@@ -23,9 +23,9 @@
 
 # The emulator code lives in ROM space
 TEXTADDR=0x000D0000
+
 DEFINES=-DDEBUG -DTEXTADDR=${TEXTADDR}
-XENINC=-I../../../xen/include
-#TEXTADDR=0x000E0000
+XENINC=-I$(XEN_ROOT)/xen/include
 #DEFINES=-DDEBUG -DTEST -DTEXTADDR=${TEXTADDR}
 #XENINC=-I/home/leendert/xen/xeno-unstable.bk/xen/include
 
diff --exclude=ChangeSet --exclude=BitKeeper --exclude='*SCCS*' -ru -bB -N 
xeno-unstable.orig/tools/firmware/vmxassist/setup.c 
xeno-unstable.mine/tools/firmware/vmxassist/setup.c
--- xeno-unstable.orig/tools/firmware/vmxassist/setup.c 2005-06-08 
08:46:32.000000000 -0400
+++ xeno-unstable.mine/tools/firmware/vmxassist/setup.c 2005-06-08 
22:51:58.000000000 -0400
@@ -21,11 +21,9 @@
 #include "util.h"
 #include "machine.h"
 
-#ifndef TEST
 #if (VMXASSIST_BASE != TEXTADDR)
 #error VMXAssist base mismatch
 #endif
-#endif
 
 #define        NR_PGD          (PGSIZE / sizeof(unsigned))
 
@@ -118,8 +116,8 @@
                              "movl %%eax,%%fs;"
                              "movl %%eax,%%gs;"
                              "movl %%eax,%%ss" : : "a" (DATA_SELECTOR));
-/* XXX 0x10 == CODE_SELECTOR (figure out gnuas) */
-       __asm__ __volatile__ ("ljmp $0x10,$1f; 1:");
+
+       __asm__ __volatile__ ("ljmp %0,$1f; 1:" : : "i" (CODE_SELECTOR));
 
        __asm__ __volatile__ ("ltr %%ax" : : "a" (TSS_SELECTOR));
 }
diff --exclude=ChangeSet --exclude=BitKeeper --exclude='*SCCS*' -ru -bB -N 
xeno-unstable.orig/tools/firmware/vmxassist/vm86.c 
xeno-unstable.mine/tools/firmware/vmxassist/vm86.c
--- xeno-unstable.orig/tools/firmware/vmxassist/vm86.c  2005-06-08 
08:46:32.000000000 -0400
+++ xeno-unstable.mine/tools/firmware/vmxassist/vm86.c  2005-06-11 
00:57:30.000000000 -0400
@@ -39,6 +39,13 @@
 
 #ifdef DEBUG
 int traceset = 0;
+
+char *states[] = {
+       "<VM86_REAL>",
+       "<VM86_REAL_TO_PROTECTED>",
+       "<VM86_PROTECTED_TO_REAL>",
+       "<VM86_PROTECTED>"
+};
 #endif /* DEBUG */
 
 
@@ -596,7 +603,6 @@
 {
        switch (newmode) {
        case VM86_REAL:
-               TRACE((regs, 0, "<VM86_REAL>"));
                if (mode == VM86_PROTECTED_TO_REAL) {
                        real_mode(regs);
                        break;
@@ -607,7 +613,6 @@
                break;
 
        case VM86_REAL_TO_PROTECTED:
-               TRACE((regs, 0, "<VM86_REAL_TO_PROTECTED>"));
                if (mode == VM86_REAL) {
                        regs->eflags |= EFLAGS_TF;
                        break;
@@ -624,7 +629,6 @@
                        panic("unexpected protected-to-real mode transition");
 
        case VM86_PROTECTED:
-               TRACE((regs, 0, "<VM86_PROTECTED>"));
                if (mode == VM86_REAL_TO_PROTECTED) {
                        protected_mode(regs);
                        break;
@@ -634,6 +638,7 @@
        }
 
        mode = newmode;
+       TRACE((regs, 0, states[mode]));
 }
 
 void


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] vmxassist-cleanup.patch, Leendert van Doorn <=