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

Re: [Xen-devel] [PATCH RFC V3 4/5] xen, libxc: Request page fault injection via libxc



>>> On 24.07.14 at 18:18, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
> On 07/24/2014 06:27 PM, Jan Beulich wrote:
>>>>> On 23.07.14 at 14:34, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>>> +static void check_pf_injection(void)
>>> +{
>>> +    struct vcpu *curr = current;
>>> +    struct domain *d = curr->domain;
>>> +    struct hvm_hw_cpu ctxt;
>>> +    struct segment_register seg;
>>> +    int errcode = PFEC_user_mode;
>>> +
>>> +    if ( !is_hvm_domain(d)
>>> +         || d->arch.hvm_domain.fault_info.virtual_address == 0 )
>>> +        return;
>>> +
>>> +    hvm_funcs.save_cpu_ctxt(curr, &ctxt);
>> 
>> Isn't this a little heavy handed?
> 
> It did seem that way to me too, but I couldn't find another way to get
> to ctxt.pending_event and CR3 at this point in the code. Is there an
> alternative I'm not aware of?

The question was more towards "Wouldn't it be worthwhile
introducing a way for you to get at just the information you
need?"

>>> @@ -1012,6 +1024,7 @@ struct xen_domctl {
>>>  #define XEN_DOMCTL_gdbsx_pausevcpu             1001
>>>  #define XEN_DOMCTL_gdbsx_unpausevcpu           1002
>>>  #define XEN_DOMCTL_gdbsx_domstatus             1003
>>> +#define XEN_DOMCTL_set_pagefault_info          1004
>> 
>> That doesn't look like the range you want to extend.
> 
> Could you please elaborate? Thank you.

Since your code is gdbsx unrelated, your addition belongs at the
end of the "base" range (currently in the 70s) rather than at the
end of the gdbsx one.

Jan


_______________________________________________
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®.