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] Remove generic 'fast trap' from the Xen public interface

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove generic 'fast trap' from the Xen public interfaces. Internally
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 16 May 2005 10:50:02 +0000
Delivery-date: Mon, 16 May 2005 11:05:30 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1415, 2005/05/16 11:50:02+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Remove generic 'fast trap' from the Xen public interfaces. Internally
        within Xen, we automatically set up direct trap for int 0x80, which is
        the only 'fast trap' vector that we ever supported anyway.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 docs/src/interface.tex                                         |   18 ----
 extras/mini-os/h/hypervisor.h                                  |   11 --
 freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c             |    3 
 freebsd-5.3-xen-sparse/i386-xen/i386-xen/mp_machdep.c          |    6 -
 freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h           |   12 --
 linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c                |    1 
 linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c         |    4 
 linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c           |    4 
 linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h   |   16 ---
 linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h |   15 ---
 netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h        |   15 ---
 tools/libxc/xc_linux_build.c                                   |    4 
 tools/libxc/xc_linux_restore.c                                 |   13 +-
 tools/libxc/xc_plan9_build.c                                   |    4 
 tools/libxc/xc_vmx_build.c                                     |    4 
 xen/arch/x86/dom0_ops.c                                        |    6 -
 xen/arch/x86/domain.c                                          |    8 -
 xen/arch/x86/traps.c                                           |    6 +
 xen/arch/x86/x86_32/entry.S                                    |    2 
 xen/arch/x86/x86_32/traps.c                                    |   45 
++--------
 xen/include/asm-x86/domain.h                                   |    9 --
 xen/include/asm-x86/processor.h                                |   28 +-----
 xen/include/public/arch-x86_32.h                               |    3 
 xen/include/public/dom0_ops.h                                  |    2 
 xen/include/public/xen.h                                       |    1 
 25 files changed, 39 insertions(+), 201 deletions(-)


diff -Nru a/docs/src/interface.tex b/docs/src/interface.tex
--- a/docs/src/interface.tex    2005-05-16 07:06:07 -04:00
+++ b/docs/src/interface.tex    2005-05-16 07:06:07 -04:00
@@ -721,24 +721,6 @@
 
 \end{quote} 
 
-Finally, as an optimization it is possible for each guest OS 
-to install one ``fast trap'': this is a trap gate which will 
-allow direct transfer of control from ring 3 into ring 1 without
-indirecting via Xen. In most cases this is suitable for use by 
-the guest OS system call mechanism, although it may be used for
-any purpose. 
-
-
-\begin{quote}
-\hypercall{set\_fast\_trap(int idx)}
-
-Install the handler for exception vector {\tt idx} as the ``fast
-trap'' for this domain. Note that this installs the current handler 
-(i.e. that which has been installed more recently via a call 
-to {\tt set\_trap\_table()}). 
-
-\end{quote}
-
 
 
 \section{Scheduling and Timer}
diff -Nru a/extras/mini-os/h/hypervisor.h b/extras/mini-os/h/hypervisor.h
--- a/extras/mini-os/h/hypervisor.h     2005-05-16 07:06:07 -04:00
+++ b/extras/mini-os/h/hypervisor.h     2005-05-16 07:06:07 -04:00
@@ -257,17 +257,6 @@
     return ret;
 }
 
-static __inline__ int HYPERVISOR_set_fast_trap(int idx)
-{
-    int ret;
-    __asm__ __volatile__ (
-        TRAP_INSTR
-        : "=a" (ret) : "0" (__HYPERVISOR_set_fast_trap), 
-        _a1 (idx) : "memory" );
-
-    return ret;
-}
-
 static __inline__ int HYPERVISOR_dom_mem_op(void *dom_mem_op)
 {
     int ret;
diff -Nru a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c 
b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c
--- a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c        2005-05-16 
07:06:06 -04:00
+++ b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c        2005-05-16 
07:06:06 -04:00
@@ -1642,9 +1642,6 @@
        if ((error = HYPERVISOR_set_trap_table(trap_table)) != 0) {
                panic("set_trap_table failed - error %d\n", error);
        }
-       if ((error = HYPERVISOR_set_fast_trap(0x80)) != 0) {
-               panic("set_fast_trap failed - error %d\n", error);
-       }
         HYPERVISOR_set_callbacks(GSEL(GCODE_SEL, SEL_KPL), (unsigned 
long)Xhypervisor_callback,
                                 GSEL(GCODE_SEL, SEL_KPL), (unsigned 
long)failsafe_callback);
 
diff -Nru a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/mp_machdep.c 
b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/mp_machdep.c
--- a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/mp_machdep.c     2005-05-16 
07:06:07 -04:00
+++ b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/mp_machdep.c     2005-05-16 
07:06:07 -04:00
@@ -885,10 +885,9 @@
 }
 #endif
 
-static int 
+static void
 cpu_mp_trap_init(trap_info_t *trap_ctxt)
 {
-
         trap_info_t *t = trap_table;
 
         for (t = trap_table; t->address; t++) {
@@ -896,7 +895,6 @@
                 trap_ctxt[t->vector].cs = t->cs;
                 trap_ctxt[t->vector].address = t->address;
         }
-        return 0x80 /*SYSCALL_VECTOR*/;
 }
 
 /*
@@ -961,7 +959,7 @@
                ctxt.trap_ctxt[i].vector = i;
                ctxt.trap_ctxt[i].cs     = FLAT_KERNEL_CS;
        }
-       ctxt.fast_trap_idx = cpu_mp_trap_init(ctxt.trap_ctxt);
+       cpu_mp_trap_init(ctxt.trap_ctxt);
 
        /* No LDT. */
        ctxt.ldt_ents = 0;
diff -Nru a/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h 
b/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h
--- a/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h      2005-05-16 
07:06:06 -04:00
+++ b/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h      2005-05-16 
07:06:06 -04:00
@@ -284,18 +284,6 @@
 }
 
 static inline int 
-HYPERVISOR_set_fast_trap(int idx)
-{
-    int ret;
-    __asm__ __volatile__ (
-        TRAP_INSTR
-        : "=a" (ret) : "0" (__HYPERVISOR_set_fast_trap), 
-        "b" (idx) : "memory" );
-
-    return ret;
-}
-
-static inline int 
 HYPERVISOR_dom_mem_op(unsigned int   op,
                      unsigned long *pages,
                      unsigned long  nr_pages)
diff -Nru a/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c 
b/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c
--- a/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c   2005-05-16 07:06:06 
-04:00
+++ b/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c   2005-05-16 07:06:06 
-04:00
@@ -605,7 +605,6 @@
 void __init trap_init(void)
 {
     HYPERVISOR_set_trap_table(trap_table);    
-    HYPERVISOR_set_fast_trap(SYSCALL_VECTOR);
 
     /*
      * The default LDT is a single-entry callgate to lcall7 for iBCS and a
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c    2005-05-16 
07:06:06 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c    2005-05-16 
07:06:06 -04:00
@@ -821,7 +821,7 @@
        extern void startup_32_smp(void);
        extern void hypervisor_callback(void);
        extern void failsafe_callback(void);
-       extern int smp_trap_init(trap_info_t *);
+       extern void smp_trap_init(trap_info_t *);
        int i;
 
        cpu = ++cpucount;
@@ -881,7 +881,7 @@
                ctxt.trap_ctxt[i].vector = i;
                ctxt.trap_ctxt[i].cs     = FLAT_KERNEL_CS;
        }
-       ctxt.fast_trap_idx = smp_trap_init(ctxt.trap_ctxt);
+       smp_trap_init(ctxt.trap_ctxt);
 
        /* No LDT. */
        ctxt.ldt_ents = 0;
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c      2005-05-16 
07:06:06 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c      2005-05-16 
07:06:06 -04:00
@@ -957,7 +957,6 @@
 void __init trap_init(void)
 {
        HYPERVISOR_set_trap_table(trap_table);
-       HYPERVISOR_set_fast_trap(SYSCALL_VECTOR);
 
        /*
         * default LDT is a single-entry callgate to lcall7 for iBCS
@@ -971,7 +970,7 @@
        cpu_init();
 }
 
-int smp_trap_init(trap_info_t *trap_ctxt)
+void smp_trap_init(trap_info_t *trap_ctxt)
 {
        trap_info_t *t = trap_table;
 
@@ -980,5 +979,4 @@
                trap_ctxt[t->vector].cs = t->cs;
                trap_ctxt[t->vector].address = t->address;
        }
-       return SYSCALL_VECTOR;
 }
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h 
b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h      
2005-05-16 07:06:06 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h      
2005-05-16 07:06:06 -04:00
@@ -332,22 +332,6 @@
 }
 
 static inline int
-HYPERVISOR_set_fast_trap(
-    int idx)
-{
-    int ret;
-    unsigned long ign;
-
-    __asm__ __volatile__ (
-        TRAP_INSTR
-        : "=a" (ret), "=b" (ign)
-       : "0" (__HYPERVISOR_set_fast_trap), "1" (idx)
-       : "memory" );
-
-    return ret;
-}
-
-static inline int
 HYPERVISOR_dom_mem_op(
     unsigned int op, unsigned long *extent_list,
     unsigned long nr_extents, unsigned int extent_order)
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h 
b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h    
2005-05-16 07:06:06 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h    
2005-05-16 07:06:06 -04:00
@@ -310,21 +310,6 @@
 }
 
 static inline int
-HYPERVISOR_set_fast_trap(
-    int idx)
-{
-    int ret;
-
-    __asm__ __volatile__ (
-        TRAP_INSTR
-        : "=a" (ret)
-       : "0" ((unsigned long)__HYPERVISOR_set_fast_trap), "D" ((unsigned 
long)idx)
-       : __syscall_clobber );
-
-    return ret;
-}
-
-static inline int
 HYPERVISOR_dom_mem_op(
     unsigned int op, unsigned long *extent_list,
     unsigned long nr_extents, unsigned int extent_order)
diff -Nru a/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h 
b/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h
--- a/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h   2005-05-16 
07:06:07 -04:00
+++ b/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h   2005-05-16 
07:06:07 -04:00
@@ -354,21 +354,6 @@
 }
 
 static inline int
-HYPERVISOR_set_fast_trap(int idx)
-{
-    int ret;
-    unsigned long ign1;
-
-    __asm__ __volatile__ (
-        TRAP_INSTR
-        : "=a" (ret), "=b" (ign1)
-       : "0" (__HYPERVISOR_set_fast_trap), "1" (idx)
-       : "memory" );
-
-    return ret;
-}
-
-static inline int
 HYPERVISOR_dom_mem_op(unsigned int op, unsigned long *extent_list,
     unsigned long nr_extents, unsigned int extent_order)
 {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove generic 'fast trap' from the Xen public interfaces. Internally, BitKeeper Bot <=