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

Re: [Xen-devel] [V15 PATCH 1/2] pvh dom0: Add and remove foreign pages



>>> On 28.05.14 at 02:51, <mukesh.rathor@xxxxxxxxxx> wrote:
> On Mon, 26 May 2014 10:24:01 +0100
> "Jan Beulich" <JBeulich@xxxxxxxx> wrote:
>> >>> On 24.05.14 at 01:50, <mukesh.rathor@xxxxxxxxxx> wrote:
>> > On Sat, 24 May 2014 01:08:49 +0200
>> > Tim Deegan <tim@xxxxxxx> wrote:
>> >> Having the change where it is seems fine, but I think the correct
>> >> test is (is_pv() && paging_mode_translate()) rather than
>> >> (!is_pvh() && paging_mode_translate()) -- it's a weakness of the
>> >> PV pagetable ops that's being avoided here, rather than any
>> >> special treatment for PVH.
>> > 
>> > Good point, but Jan had a concern on that when I had dropped the if
>> > statement completely, that it would allow HVM guests to go thru. 
>> > Hence !is_pvh to let hvm guest continue to fail.
>> 
>> The same would be achieved by using is_pv as Tim suggested.
> 
> So sorry, but I don't understand how:
> 
>     if ( is_pv_domain(curr) && unlikely(paging_mode_translate(curr)) )
>     {
>         MEM_LOG("Cannot mix foreign mappings with translated domains");
>         goto out;
>     }
> 
> will cause this error for hvm, which is what happens now without my
> change, or will continue to with my proposed change:
> 
>     if ( !is_pvh_domain(curr) && unlikely(paging_mode_translate(curr)) )
>     {
>         MEM_LOG("Cannot mix foreign mappings with translated domains");
> ..
> 
> 
> I understand your suggestion earlier was that hvm should continue to fail.
> 
> Also, my understanding is that pv domains are never translated?

Hmm, indeed, good point. I wonder whether the whole condition
shouldn't simply become !is_hvm() then (and perhaps the log
message adjusted accordingly). Tim?

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