mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1159.1.423 (419a4b1eF-m6DjqBFFvhQQg8V-VsqQ)
Initialize trap tables on additional cpus.
This commit is contained in:
1 parent
bba1818382
commit
c581ca2cee
2 files changed
+14
-1
No files matched your search
@@ -835,6 +835,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 *);
|
||||
int i;
|
||||
|
||||
cpu = ++cpucount;
|
||||
@@ -894,7 +895,7 @@ static int __init do_boot_cpu(int apicid)
|
||||
ctxt.trap_ctxt[i].vector = i;
|
||||
ctxt.trap_ctxt[i].cs = FLAT_GUESTOS_CS;
|
||||
}
|
||||
ctxt.fast_trap_idx = 0;
|
||||
ctxt.fast_trap_idx = smp_trap_init(ctxt.trap_ctxt);
|
||||
|
||||
/* No LDT. */
|
||||
ctxt.ldt_ents = 0;
|
||||
|
||||
@@ -1073,6 +1073,18 @@ void __init trap_init(void)
|
||||
cpu_init();
|
||||
}
|
||||
|
||||
int smp_trap_init(trap_info_t *trap_ctxt)
|
||||
{
|
||||
trap_info_t *t = trap_table;
|
||||
|
||||
for (t = trap_table; t->address; t++) {
|
||||
trap_ctxt[t->vector].flags = t->flags;
|
||||
trap_ctxt[t->vector].cs = t->cs;
|
||||
trap_ctxt[t->vector].address = t->address;
|
||||
}
|
||||
return SYSCALL_VECTOR;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* install_safe_pf_handler / install_normal_pf_handler:
|
||||
|
||||