|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] reenabling ptrace for paravirtualized guests
On 12 May 2006, at 08:07, Simon Kagstrom wrote:
ctxt.gs_base_kernel = (unsigned long)(cpu_pda(vcpu));
#endif
+ /* set sane cr0 bits, protected and paging enabled */
+ ctxt.ctrlreg[0] = 0x80000001;
BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_initialise, vcpu, &ctxt));
}
I'll add this to the patch.
This can be done entirely in Xen without guest modification and
avoiding magic numbers.
Add the following to arch_set_info_guest, immediately after the memcpy
to guest_context:
/* Only CR0.TS is modifiable by guest or admin. */
v->arch.guest_context.ctrl_reg[0] &= X86_CR0_TS;
v->arch.guest_context.ctrl_reg[0] |= read_cr0() & ~X86_CR0_TS;
Whether we should fill in from real CR0 or simply set a static
selection of flags is open to debate. I don't really think it matters
either way.
-- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|