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

Re: [Xen-devel] [PATCH] x86/mm: relax the check in get_pg_owner



>>> On 24.03.17 at 12:08, <wei.liu2@xxxxxxxxxx> wrote:
> On Fri, Mar 24, 2017 at 02:12:47AM -0600, Jan Beulich wrote:
>> >>> On 23.03.17 at 19:08, <wei.liu2@xxxxxxxxxx> wrote:
>> > PVH guest is actually an translated guest. It should be able to
>> > manipulate page table for other domains when acting as Dom0.
>> 
>> The same was true for PVHv1, so I'm afraid there's a little more to
>> this.
>> 
>> > --- a/xen/arch/x86/mm.c
>> > +++ b/xen/arch/x86/mm.c
>> > @@ -3041,12 +3041,6 @@ static struct domain *get_pg_owner(domid_t domid)
>> >          goto out;
>> >      }
>> >  
>> > -    if ( unlikely(paging_mode_translate(curr)) )
>> > -    {
>> > -        MEM_LOG("Cannot mix foreign mappings with translated domains");
>> > -        goto out;
>> > -    }
>> 
>> Prior to Roger's recent removal of PVHv1 code this was
>> 
>>     if ( !is_pvh_domain(curr) && unlikely(paging_mode_translate(curr)) )
>> 
>> Instead of removing the left side, I think it should have been
>> converted to !is_hvm_domain() (or is_pv_domain()).
>> 
> 
> DYM:
> 
>     if ( !is_hvm_domain(curr) && unlikely(paging_mode_translate(curr)) )
> 
> ?

Yes.

> Here is something I'm not entirely sure of: is autotranslated PV guest
> still a thing? I thought Andrew removed it already?

From the tools, iirc, but not from the hypervisor, at least not
entirely (as you see from the change you want to make).

Jan


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