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

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



>>> On 04.08.14 at 17:11, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
> On 08/04/2014 05:26 PM, Jan Beulich wrote:
>>>>> On 04.08.14 at 13:30, <rcojocaru@xxxxxxxxxxxxxxx> wrote:
>>> +static bool_t vmx_check_pf_injection(void)
>>> +{
>>> +    struct vcpu *curr = current;
>>> +    struct domain *d = curr->domain;
>>> +    struct segment_register seg;
>>> +    unsigned long ev;
>>> +    uint32_t pending_event = 0;
>>> +
>>> +    if ( likely(d->arch.hvm_domain.fault_info.virtual_address == 0 )
>> 
>> Bad space before ). And my question stands: Why is VA zero
>> special?
> 
> It's special because for our purposes (mostly Windows HVM guests, but I
> think the same applies to Linux), that page is reserved and it's never
> swapped out, so there would be no point in asking for a page fault
> injection there.
> 
> If you think that a code comment is not enough here and that in the
> future somebody might legitimately want to use 0 as a proper value, I'll
> add a "valid" member and use that explicitly.

Perhaps in another thread I said this earlier today already: In the
HVM code we should not be making assumptions about particular
guest behavior, except when it comes to optimization for certain
special cases.

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