aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-05-16 10:50:02 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-05-16 10:50:02 +0000
commitbfad55585786589fb608058034792e90b0cca1e4 (patch)
tree4935190e49656dd01a568cabc9803d80f7994f21
parentfa1bec6f50e52d93b4e842fb305d309768191771 (diff)
downloadxen-bfad55585786589fb608058034792e90b0cca1e4.tar.gz
xen-bfad55585786589fb608058034792e90b0cca1e4.tar.bz2
xen-bfad55585786589fb608058034792e90b0cca1e4.zip
bitkeeper revision 1.1415 (42887ada_Jmkta2rYHnpJBE2EVpy4w)
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@xensource.com>
-rw-r--r--docs/src/interface.tex18
-rw-r--r--extras/mini-os/h/hypervisor.h11
-rw-r--r--freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c3
-rw-r--r--freebsd-5.3-xen-sparse/i386-xen/i386-xen/mp_machdep.c6
-rw-r--r--freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h12
-rw-r--r--linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c1
-rw-r--r--linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c4
-rw-r--r--linux-2.6.11-xen-sparse/arch/xen/i386/kernel/traps.c4
-rw-r--r--linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/hypercall.h16
-rw-r--r--linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/hypercall.h15
-rw-r--r--netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h15
-rw-r--r--tools/libxc/xc_linux_build.c4
-rw-r--r--tools/libxc/xc_linux_restore.c13
-rw-r--r--tools/libxc/xc_plan9_build.c4
-rw-r--r--tools/libxc/xc_vmx_build.c4
-rw-r--r--xen/arch/x86/dom0_ops.c6
-rw-r--r--xen/arch/x86/domain.c8
-rw-r--r--xen/arch/x86/traps.c6
-rw-r--r--xen/arch/x86/x86_32/entry.S2
-rw-r--r--xen/arch/x86/x86_32/traps.c45
-rw-r--r--xen/include/asm-x86/domain.h9
-rw-r--r--xen/include/asm-x86/processor.h28
-rw-r--r--xen/include/public/arch-x86_32.h3
-rw-r--r--xen/include/public/dom0_ops.h2
-rw-r--r--xen/include/public/xen.h1
25 files changed, 39 insertions, 201 deletions
diff --git a/docs/src/interface.tex b/docs/src/interface.tex
index f06313a20c..1f2ee72470 100644
--- a/docs/src/interface.tex
+++ b/docs/src/interface.tex
@@ -721,24 +721,6 @@ stack-frame layout is used.
\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 --git a/extras/mini-os/h/hypervisor.h b/extras/mini-os/h/hypervisor.h
index e364253757..c167850d55 100644
--- a/extras/mini-os/h/hypervisor.h
+++ b/extras/mini-os/h/hypervisor.h
@@ -257,17 +257,6 @@ static __inline__ int HYPERVISOR_update_descriptor(
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 --git a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c
index 2343e63409..efda2eac13 100644
--- a/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c
+++ b/freebsd-5.3-xen-sparse/i386-xen/i386-xen/machdep.c
@@ -1642,9 +1642,6 @@ init386(void)
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 --git 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
index 64f42259e8..5ef412ac21 100644
--- 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
@@ -885,10 +885,9 @@ install_ap_tramp(void)
}
#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 @@ cpu_mp_trap_init(trap_info_t *trap_ctxt)
trap_ctxt[t->vector].cs = t->cs;
trap_ctxt[t->vector].address = t->address;
}
- return 0x80 /*SYSCALL_VECTOR*/;
}
/*
@@ -961,7 +959,7 @@ start_ap(int apic_id)
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 --git a/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h b/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h
index 824ca96cee..0a290cef19 100644
--- a/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h
+++ b/freebsd-5.3-xen-sparse/i386-xen/include/hypervisor.h
@@ -284,18 +284,6 @@ HYPERVISOR_update_descriptor(
}
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 --git a/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c b/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c
index dc9220dfe0..b87fc3804c 100644
--- a/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c
+++ b/linux-2.4.29-xen-sparse/arch/xen/kernel/traps.c
@@ -605,7 +605,6 @@ static trap_info_t trap_table[] = {
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 --git 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
index c1ca5c5c0e..9a158e2900 100644
--- 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
@@ -821,7 +821,7 @@ static int __init do_boot_cpu(int apicid)
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 @@ static int __init do_boot_cpu(int apicid)
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 --git 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
index d0718b5299..539c1d5b7d 100644
--- 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
@@ -957,7 +957,6 @@ static trap_info_t trap_table[] = {
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 @@ void __init trap_init(void)
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 @@ int smp_trap_init(trap_info_t *trap_ctxt)
trap_ctxt[t->vector].cs = t->cs;
trap_ctxt[t->vector].address = t->address;
}
- return SYSCALL_VECTOR;
}
diff --git 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
index 187d44f874..13ab9c3fde 100644
--- 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
@@ -332,22 +332,6 @@ HYPERVISOR_update_descriptor(
}
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 --git 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
index 2bfb9e7262..e57c54769a 100644
--- 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
@@ -310,21 +310,6 @@ HYPERVISOR_update_descriptor(
}
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 --git a/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h b/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h
index d01af8034a..683f9640ce 100644
--- a/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h
+++ b/netbsd-2.0-xen-sparse/sys/arch/xen/include/hypervisor.h
@@ -354,21 +354,6 @@ HYPERVISOR_update_descriptor(unsigned long pa, unsigned long word1,
}
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)
{
diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c
index 84e99e9457..bf92bc749d 100644
--- a/tools/libxc/xc_linux_build.c
+++ b/tools/libxc/xc_linux_build.c
@@ -426,10 +426,6 @@ int xc_linux_build(int xc_handle,
ctxt->trap_ctxt[i].cs = FLAT_KERNEL_CS;
}
-#if defined(__i386__)
- ctxt->fast_trap_idx = 0;
-#endif
-
/* No LDT. */
ctxt->ldt_ents = 0;
diff --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c
index 5374ffd3a5..0d05d0f903 100644
--- a/tools/libxc/xc_linux_restore.c
+++ b/tools/libxc/xc_linux_restore.c
@@ -600,13 +600,12 @@ int xc_linux_restore(int xc_handle, XcIOContext *ioctxt)
* 1. user_regs is fine, as Xen checks that on context switch.
* 2. fpu_ctxt is fine, as it can't hurt Xen.
* 3. trap_ctxt needs the code selectors checked.
- * 4. fast_trap_idx is checked by Xen.
- * 5. ldt base must be page-aligned, no more than 8192 ents, ...
- * 6. gdt already done, and further checking is done by Xen.
- * 7. check that kernel_ss is safe.
- * 8. pt_base is already done.
- * 9. debugregs are checked by Xen.
- * 10. callback code selectors need checking.
+ * 4. ldt base must be page-aligned, no more than 8192 ents, ...
+ * 5. gdt already done, and further checking is done by Xen.
+ * 6. check that kernel_ss is safe.
+ * 7. pt_base is already done.
+ * 8. debugregs are checked by Xen.
+ * 9. callback code selectors need checking.
*/
for ( i = 0; i < 256; i++ )
{
diff --git a/tools/libxc/xc_plan9_build.c b/tools/libxc/xc_plan9_build.c
index bfa5ccdf33..08ac06d08a 100644
--- a/tools/libxc/xc_plan9_build.c
+++ b/tools/libxc/xc_plan9_build.c
@@ -510,10 +510,6 @@ xc_plan9_build(int xc_handle,
ctxt->trap_ctxt[i].cs = FLAT_KERNEL_CS;
}
-#if defined(__i386__)
- ctxt->fast_trap_idx = 0;
-#endif
-
/* No LDT. */
ctxt->ldt_ents = 0;
diff --git a/tools/libxc/xc_vmx_build.c b/tools/libxc/xc_vmx_build.c
index 1edb8dc997..31319db21a 100644
--- a/tools/libxc/xc_vmx_build.c
+++ b/tools/libxc/xc_vmx_build.c
@@ -591,10 +591,6 @@ int xc_vmx_build(int xc_handle,
ctxt->trap_ctxt[i].cs = FLAT_KERNEL_CS;
}
-#if defined(__i386__)
- ctxt->fast_trap_idx = 0;
-#endif
-
/* No LDT. */
ctxt->ldt_ents = 0;
diff --git a/xen/arch/x86/dom0_ops.c b/xen/arch/x86/dom0_ops.c
index 171cb3b8a6..fb4bd53338 100644
--- a/xen/arch/x86/dom0_ops.c
+++ b/xen/arch/x86/dom0_ops.c
@@ -406,12 +406,6 @@ void arch_getdomaininfo_ctxt(
c->flags |= VGCF_VMX_GUEST;
#endif
-#ifdef ARCH_HAS_FAST_TRAP
- if ( (ed->arch.fast_trap_desc.a == 0) &&
- (ed->arch.fast_trap_desc.b == 0) )
- c->fast_trap_idx = 0;
-#endif
-
c->gdt_ents = 0;
if ( GET_GDT_ADDRESS(ed) == GDT_VIRT_START(ed) )
{
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 6e69cf32cd..34c79ce68a 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -242,8 +242,6 @@ void arch_do_createdomain(struct exec_domain *ed)
{
struct domain *d = ed->domain;
- SET_DEFAULT_FAST_TRAP(&ed->arch);
-
ed->arch.flags = TF_kernel_mode;
if ( d->domain_id != IDLE_DOMAIN_ID )
@@ -422,9 +420,6 @@ int arch_set_info_guest(
if ( test_bit(_VCPUF_initialised, &ed->vcpu_flags) )
return 0;
- if ( (rc = (int)set_fast_trap(ed, c->fast_trap_idx)) != 0 )
- return rc;
-
memset(ed->arch.guest_context.debugreg, 0,
sizeof(ed->arch.guest_context.debugreg));
for ( i = 0; i < 8; i++ )
@@ -726,7 +721,6 @@ static void __context_switch(void)
stack_regs,
CTXT_SWITCH_STACK_BYTES);
unlazy_fpu(p);
- CLEAR_FAST_TRAP(&p->arch);
save_segments(p);
}
@@ -750,7 +744,7 @@ static void __context_switch(void)
if ( !VMX_DOMAIN(n) )
{
- SET_FAST_TRAP(&n->arch);
+ set_int80_direct_trap(n);
switch_kernel_stack(n, cpu);
}
}
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index d68539df88..6e2c2ef163 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1176,7 +1176,11 @@ long do_set_trap_table(trap_info_t *traps)
break;
}
- memcpy(dst+cur.vector, &cur, sizeof(cur));
+ memcpy(&dst[cur.vector], &cur, sizeof(cur));
+
+ if ( cur.vector == 0x80 )
+ init_int80_direct_trap(current);
+
traps++;
}
diff --git a/xen/arch/x86/x86_32/entry.S b/xen/arch/x86/x86_32/entry.S
index 032344d161..7737904a15 100644
--- a/xen/arch/x86/x86_32/entry.S
+++ b/xen/arch/x86/x86_32/entry.S
@@ -729,7 +729,7 @@ ENTRY(hypercall_table)
.long do_set_debugreg
.long do_get_debugreg
.long do_update_descriptor /* 10 */
- .long do_set_fast_trap
+ .long do_ni_hypercall
.long do_dom_mem_op
.long do_multicall
.long do_update_va_mapping
diff --git a/xen/arch/x86/x86_32/traps.c b/xen/arch/x86/x86_32/traps.c
index 4d7c94e1b9..a75badbad7 100644
--- a/xen/arch/x86/x86_32/traps.c
+++ b/xen/arch/x86/x86_32/traps.c
@@ -12,7 +12,7 @@
#include <asm/vmx.h>
#endif
-/* All CPUs have their own IDT to allow set_fast_trap(). */
+/* All CPUs have their own IDT to allow int80 direct trap. */
idt_entry_t *idt_tables[NR_CPUS] = { 0 };
void show_registers(struct cpu_user_regs *regs)
@@ -184,50 +184,23 @@ void __init percpu_traps_init(void)
set_task_gate(TRAP_double_fault, __DOUBLEFAULT_TSS_ENTRY<<3);
}
-long set_fast_trap(struct exec_domain *p, int idx)
+void init_int80_direct_trap(struct exec_domain *ed)
{
- trap_info_t *ti;
-
- /* Index 0 is special: it disables fast traps. */
- if ( idx == 0 )
- {
- if ( p == current )
- CLEAR_FAST_TRAP(&p->arch);
- SET_DEFAULT_FAST_TRAP(&p->arch);
- return 0;
- }
-
- /* We only fast-trap vector 0x80 (used by Linux and the BSD variants). */
- if ( idx != 0x80 )
- return -1;
-
- ti = &p->arch.guest_context.trap_ctxt[idx];
+ trap_info_t *ti = &ed->arch.guest_context.trap_ctxt[0x80];
/*
* We can't virtualise interrupt gates, as there's no way to get
* the CPU to automatically clear the events_mask variable.
*/
if ( TI_GET_IF(ti) )
- return -1;
-
- if ( p == current )
- CLEAR_FAST_TRAP(&p->arch);
-
- p->arch.guest_context.fast_trap_idx = idx;
- p->arch.fast_trap_desc.a = (ti->cs << 16) | (ti->address & 0xffff);
- p->arch.fast_trap_desc.b =
- (ti->address & 0xffff0000) | 0x8f00 | (TI_GET_DPL(ti)&3)<<13;
-
- if ( p == current )
- SET_FAST_TRAP(&p->arch);
-
- return 0;
-}
+ return;
+ ed->arch.int80_desc.a = (ti->cs << 16) | (ti->address & 0xffff);
+ ed->arch.int80_desc.b =
+ (ti->address & 0xffff0000) | 0x8f00 | ((TI_GET_DPL(ti) & 3) << 13);
-long do_set_fast_trap(int idx)
-{
- return set_fast_trap(current, idx);
+ if ( ed == current )
+ set_int80_direct_trap(ed);
}
long do_set_callbacks(unsigned long event_selector,
diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
index 86c806d2fd..79eda33a07 100644
--- a/xen/include/asm-x86/domain.h
+++ b/xen/include/asm-x86/domain.h
@@ -17,7 +17,7 @@ struct trap_bounce {
struct arch_domain
{
l1_pgentry_t *mm_perdomain_pt;
-#ifdef __x86_64__
+#ifdef CONFIG_X86_64
l2_pgentry_t *mm_perdomain_l2;
l3_pgentry_t *mm_perdomain_l3;
#endif
@@ -82,9 +82,8 @@ struct arch_exec_domain
int iobmp_limit; /* Number of ports represented in the bitmap. */
int iopl; /* Current IOPL for this VCPU. */
- /* Trap info. */
-#ifdef ARCH_HAS_FAST_TRAP
- struct desc_struct fast_trap_desc;
+#ifdef CONFIG_X86_32
+ struct desc_struct int80_desc;
#endif
/* Virtual Machine Extensions */
@@ -106,7 +105,7 @@ struct arch_exec_domain
l2_pgentry_t *monitor_vtable; /* virtual address of monitor_table */
l1_pgentry_t *hl2_vtable; /* virtual address of hl2_table */
-#ifdef __x86_64__
+#ifdef CONFIG_X86_64
l3_pgentry_t *guest_vl3table;
l4_pgentry_t *guest_vl4table;
#endif
diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
index f5b628fb58..9ccfcf3f3a 100644
--- a/xen/include/asm-x86/processor.h
+++ b/xen/include/asm-x86/processor.h
@@ -374,31 +374,17 @@ extern idt_entry_t *idt_tables[];
extern struct tss_struct init_tss[NR_CPUS];
-#ifdef ARCH_HAS_FAST_TRAP
+#ifdef CONFIG_X86_32
-#define SET_DEFAULT_FAST_TRAP(_p) \
- (_p)->guest_context.fast_trap_idx = 0x30; \
- (_p)->fast_trap_desc.a = 0; \
- (_p)->fast_trap_desc.b = 0;
-
-#define CLEAR_FAST_TRAP(_p) \
- (memset(idt_tables[smp_processor_id()] + \
- (_p)->guest_context.fast_trap_idx, \
- 0, 8))
-
-#define SET_FAST_TRAP(_p) \
- (memcpy(idt_tables[smp_processor_id()] + \
- (_p)->guest_context.fast_trap_idx, \
- &((_p)->fast_trap_desc), 8))
-
-long set_fast_trap(struct exec_domain *p, int idx);
+extern void init_int80_direct_trap(struct exec_domain *ed);
+#define set_int80_direct_trap(_ed) \
+ (memcpy(idt_tables[(_ed)->processor] + 0x80, \
+ &((_ed)->arch.int80_desc), 8))
#else
-#define SET_DEFAULT_FAST_TRAP(_p) ((void)0)
-#define CLEAR_FAST_TRAP(_p) ((void)0)
-#define SET_FAST_TRAP(_p) ((void)0)
-#define set_fast_trap(_p, _i) (0)
+#define init_int80_direct_trap(_ed) ((void)0)
+#define set_int80_direct_trap(_ed) ((void)0)
#endif
diff --git a/xen/include/public/arch-x86_32.h b/xen/include/public/arch-x86_32.h
index 4dbbacea8f..8c57f7c787 100644
--- a/xen/include/public/arch-x86_32.h
+++ b/xen/include/public/arch-x86_32.h
@@ -133,7 +133,6 @@ typedef struct vcpu_guest_context {
struct { char x[512]; } fpu_ctxt /* User-level FPU registers */
__attribute__((__aligned__(16))); /* (needs 16-byte alignment) */
trap_info_t trap_ctxt[256]; /* Virtual IDT */
- unsigned int fast_trap_idx; /* "Fast trap" vector offset */
unsigned long ldt_base, ldt_ents; /* LDT (linear address, # ents) */
unsigned long gdt_frames[16], gdt_ents; /* GDT (machine frames, # ents) */
unsigned long kernel_ss, kernel_sp; /* Virtual TSS (only SS1/SP1) */
@@ -154,8 +153,6 @@ typedef struct {
typedef struct {
} arch_vcpu_info_t;
-#define ARCH_HAS_FAST_TRAP
-
#endif
#endif
diff --git a/xen/include/public/dom0_ops.h b/xen/include/public/dom0_ops.h
index 430244d220..76bd18e079 100644
--- a/xen/include/public/dom0_ops.h
+++ b/xen/include/public/dom0_ops.h
@@ -19,7 +19,7 @@
* This makes sure that old versions of dom0 tools will stop working in a
* well-defined way (rather than crashing the machine, for instance).
*/
-#define DOM0_INTERFACE_VERSION 0xAAAA1005
+#define DOM0_INTERFACE_VERSION 0xAAAA1006
/************************************************************************/
diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h
index e3ba5e9b06..31f264aaeb 100644
--- a/xen/include/public/xen.h
+++ b/xen/include/public/xen.h
@@ -42,7 +42,6 @@
#define __HYPERVISOR_set_debugreg 8
#define __HYPERVISOR_get_debugreg 9
#define __HYPERVISOR_update_descriptor 10
-#define __HYPERVISOR_set_fast_trap 11 /* x86/32 only */
#define __HYPERVISOR_dom_mem_op 12
#define __HYPERVISOR_multicall 13
#define __HYPERVISOR_update_va_mapping 14