mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
bitkeeper revision 1.1159.1.255 (4177bef1YxrXgVRyVzt2_EdbMj5rDg)
Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk into freefall.cl.cam.ac.uk:/local/scratch/kaf24/xeno
This commit is contained in:
commit
f0c92861c4
5 files changed
+22
-22
No files matched your search
@@ -107,8 +107,8 @@ void arch_getdomaininfo_ctxt(struct domain *d, full_execution_context_t *c)
|
||||
|
||||
c->flags = 0;
|
||||
memcpy(&c->cpu_ctxt,
|
||||
&d->shared_info->execution_context,
|
||||
sizeof(d->shared_info->execution_context));
|
||||
&d->thread.user_ctxt,
|
||||
sizeof(d->thread.user_ctxt));
|
||||
if ( test_bit(DF_DONEFPUINIT, &d->flags) )
|
||||
c->flags |= ECF_I387_VALID;
|
||||
memcpy(&c->fpu_ctxt,
|
||||
|
||||
+16
-17
@@ -240,9 +240,18 @@ int arch_final_setup_guestos(struct domain *d, full_execution_context_t *c)
|
||||
if ( c->flags & ECF_I387_VALID )
|
||||
set_bit(DF_DONEFPUINIT, &d->flags);
|
||||
|
||||
memcpy(&d->shared_info->execution_context,
|
||||
memcpy(&d->thread.user_ctxt,
|
||||
&c->cpu_ctxt,
|
||||
sizeof(d->shared_info->execution_context));
|
||||
sizeof(d->thread.user_ctxt));
|
||||
|
||||
/*
|
||||
* This is sufficient! If the descriptor DPL differs from CS RPL then we'll
|
||||
* #GP. If DS, ES, FS, GS are DPL 0 then they'll be cleared automatically.
|
||||
* If SS RPL or DPL differs from CS RPL then we'll #GP.
|
||||
*/
|
||||
if ( ((d->thread.user_ctxt.cs & 3) == 0) ||
|
||||
((d->thread.user_ctxt.ss & 3) == 0) )
|
||||
return -EINVAL;
|
||||
|
||||
memcpy(&d->thread.i387,
|
||||
&c->fpu_ctxt,
|
||||
@@ -295,12 +304,12 @@ int arch_final_setup_guestos(struct domain *d, full_execution_context_t *c)
|
||||
|
||||
#if defined(__i386__)
|
||||
|
||||
void new_thread(struct domain *p,
|
||||
void new_thread(struct domain *d,
|
||||
unsigned long start_pc,
|
||||
unsigned long start_stack,
|
||||
unsigned long start_info)
|
||||
{
|
||||
execution_context_t *ec = &p->shared_info->execution_context;
|
||||
execution_context_t *ec = &d->thread.user_ctxt;
|
||||
|
||||
/*
|
||||
* Initial register values:
|
||||
@@ -320,7 +329,7 @@ void new_thread(struct domain *p,
|
||||
ec->eflags |= X86_EFLAGS_IF;
|
||||
|
||||
/* No fast trap at start of day. */
|
||||
SET_DEFAULT_FAST_TRAP(&p->thread);
|
||||
SET_DEFAULT_FAST_TRAP(&d->thread);
|
||||
}
|
||||
|
||||
|
||||
@@ -345,7 +354,7 @@ void switch_to(struct domain *prev_p, struct domain *next_p)
|
||||
/* Switch guest general-register state. */
|
||||
if ( !is_idle_task(prev_p) )
|
||||
{
|
||||
memcpy(&prev_p->shared_info->execution_context,
|
||||
memcpy(&prev_p->thread.user_ctxt,
|
||||
stack_ec,
|
||||
sizeof(*stack_ec));
|
||||
unlazy_fpu(prev_p);
|
||||
@@ -355,19 +364,9 @@ void switch_to(struct domain *prev_p, struct domain *next_p)
|
||||
if ( !is_idle_task(next_p) )
|
||||
{
|
||||
memcpy(stack_ec,
|
||||
&next_p->shared_info->execution_context,
|
||||
&next_p->thread.user_ctxt,
|
||||
sizeof(*stack_ec));
|
||||
|
||||
/*
|
||||
* This is sufficient! If the descriptor DPL differs from CS RPL then
|
||||
* we'll #GP. If DS, ES, FS, GS are DPL 0 then they'll be cleared
|
||||
* automatically. If SS RPL or DPL differs from CS RPL then we'll #GP.
|
||||
*/
|
||||
if ( (stack_ec->cs & 3) == 0 )
|
||||
stack_ec->cs = FLAT_RING1_CS;
|
||||
if ( (stack_ec->ss & 3) == 0 )
|
||||
stack_ec->ss = FLAT_RING1_DS;
|
||||
|
||||
SET_FAST_TRAP(&next_p->thread);
|
||||
|
||||
/* Switch the guest OS ring-1 stack. */
|
||||
|
||||
@@ -291,6 +291,8 @@ struct thread_struct {
|
||||
unsigned long debugreg[8]; /* %%db0-7 debug registers */
|
||||
/* floating point info */
|
||||
struct i387_state i387;
|
||||
/* general user-visible register state */
|
||||
execution_context_t user_ctxt;
|
||||
/* Trap info. */
|
||||
#ifdef __i386__
|
||||
int fast_trap_idx;
|
||||
@@ -331,6 +333,7 @@ long set_fast_trap(struct domain *p, int idx);
|
||||
0, 0, \
|
||||
{ [0 ... 7] = 0 }, /* debugging registers */ \
|
||||
{ { 0, }, }, /* 387 state */ \
|
||||
{ 0 }, \
|
||||
0x20, { 0, 0 }, /* DEFAULT_FAST_TRAP */ \
|
||||
{ {0} } /* io permissions */ \
|
||||
}
|
||||
|
||||
@@ -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 0xAAAA0016
|
||||
#define DOM0_INTERFACE_VERSION 0xAAAA0017
|
||||
|
||||
#define MAX_DOMAIN_NAME 16
|
||||
|
||||
|
||||
@@ -358,8 +358,6 @@ typedef struct shared_info_st
|
||||
u64 wall_timeout; /* 312 */
|
||||
u64 domain_timeout; /* 320 */
|
||||
|
||||
execution_context_t execution_context; /* 328 */
|
||||
|
||||
arch_shared_info_t arch;
|
||||
|
||||
} PACKED shared_info_t;
|
||||
|
||||