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

Re: [Xen-devel] [PATCH] x86/mm: Use static inlines for {, un}adjust_guest_l?e()



On 04/09/17 11:33, Jan Beulich wrote:
>>>> On 04.09.17 at 12:02, <andrew.cooper3@xxxxxxxxxx> wrote:
>> +static l1_pgentry_t adjust_guest_l1e(l1_pgentry_t l1e, const struct domain 
>> *d)
>> +{
>> +    if ( likely(l1e_get_flags(l1e) & _PAGE_PRESENT) &&
>> +         likely(!is_pv_32bit_domain(d)) )
>> +    {
>> +        /* _PAGE_GUEST_KERNEL page cannot have the Global bit set. */
>> +        if ( (l1e_get_flags(l1e) & (_PAGE_GUEST_KERNEL | _PAGE_GLOBAL)) ==
>> +             (_PAGE_GUEST_KERNEL | _PAGE_GLOBAL) )
>> +            gdprintk(XENLOG_WARNING,
>> +                     "Global bit is set in kernel page %lx\n",
> Looks like this could be a single line now.

So it can.

>
>> +static l4_pgentry_t adjust_guest_l4e(l4_pgentry_t l4e, const struct domain 
>> *d)
>> +{
>> +    if ( likely(l4e_get_flags(l4e) & _PAGE_PRESENT) &&
>> +         likely(!is_pv_32bit_domain(d)) )
> Would it be reasonable to move this 2nd condition out of the if()
> into an ASSERT()? With or without that adjustment
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

I'll do a separate patch clarifying the correctness of 32bit PV guests
in a number of places.

~Andrew

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

 


Rackspace

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