[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 7/9] xen: Handle resumed instruction based on previous mem_event reply
>>> On 02.07.14 at 15:33, <rcojocaru@xxxxxxxxxxxxxxx> wrote: > In a scenario where a page fault that triggered a mem_event occured, > p2m_mem_access_check() will now be able to either 1) emulate the > current instruction, 2) skip the current instruction, or 3) emulate > it, but don't allow it to perform any writes. Since some SSE2 > instructions are problematic to emulate (Firefox uses some), > support for setting the A and D (accessed and dirty) bits has been > added (please see p2m_set_ad_bits()). Sadly that reference is useless - the function doesn't have any explanation what all this is about either. > --- a/xen/arch/x86/hvm/emulate.c > +++ b/xen/arch/x86/hvm/emulate.c > @@ -1372,6 +1372,16 @@ void hvm_emulate_one_full(bool_t nowrite) > switch ( rc ) > { > case X86EMUL_UNHANDLEABLE: > + printk("Emulation failed @ %04x:%lx: " > + "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", > + hvmemul_get_seg_reg(x86_seg_cs, ctx)->sel, > + ctx->insn_buf_eip, > + ctx->insn_buf[0], ctx->insn_buf[1], > + ctx->insn_buf[2], ctx->insn_buf[3], > + ctx->insn_buf[4], ctx->insn_buf[5], > + ctx->insn_buf[6], ctx->insn_buf[7], > + ctx->insn_buf[8], ctx->insn_buf[9]); > + > hvm_inject_hw_exception(TRAP_invalid_op, HVM_DELIVER_NO_ERROR_CODE); > break; Since this is non-fatal to the guest, this must get its log level lowered. > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -121,6 +121,9 @@ struct vcpu *alloc_vcpu( > v->domain = d; > v->vcpu_id = vcpu_id; > > + v->sse_pg_dirty.eip = 0; > + v->sse_pg_dirty.gla = 0; > + All fields start out as zero already. And this is hardly arch-independent code. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |