[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [V10 PATCH 23/23] PVH xen: introduce vmexit handler for PVH



On Mon, Aug 12, 2013 at 5:00 PM, George Dunlap <dunlapg@xxxxxxxxx> wrote:

>> +static int vmxit_debug(struct cpu_user_regs *regs)
>> +{
>> +    struct vcpu *vp = current;
>> +    unsigned long exit_qualification = __vmread(EXIT_QUALIFICATION);
>> +
>> +    write_debugreg(6, exit_qualification | 0xffff0ff0);
>> +
>> +    /* gdbsx or another debugger. Never pause dom0. */
>> +    if ( vp->domain->domain_id != 0 && vp->domain->debugger_attached )
>> +        domain_pause_for_debugger();
>> +    else
>> +        hvm_inject_hw_exception(TRAP_debug, HVM_DELIVER_NO_ERROR_CODE);
>
> Hmm, strangely enough, the HVM handler for this doesn't seem to
> deliver this exception -- or if it does, I can't quite figure out
> where.  What you have here seems like the correct thing to do, but I
> would be interested in knowing the reason for the HVM behavior.

On further thought, this is probably wrong: HVM is probably configured
to exit on this trap only when a debugger *is* attached; so if it's
not attached, something is very wrong, and the domain should probably
crash.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.