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

Re: [Xen-devel] PV guest + shadow mode translate causing hang

  • To: Tim Deegan <tim@xxxxxxx>
  • From: "Aravindh Puthiyaparambil (aravindp)" <aravindp@xxxxxxxxx>
  • Date: Mon, 18 Nov 2013 19:53:59 +0000
  • Accept-language: en-US
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 18 Nov 2013 19:54:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac7c89X6mGCqS3ZHRtS12xXU7IpILgEZnmsAAM8YUEA=
  • Thread-topic: PV guest + shadow mode translate causing hang

>At 08:15 +0000 on 11 Nov (1384154143), Aravindh Puthiyaparambil (aravindp)
>> I am trying to implement mem_access for PV guests using shadow
>pagetables. I am enabling shadow mode for pv using the following call:
>> xc_shadow_control(xch, domain_id,  XEN_DOMCTL_SHADOW_OP_ENABLE,
>> 0, NULL, 0, NULL);
>> This seems to work and I can see a lot of shadow activity if I turn on
>debugtrace (xl debug T). However I see that the p2m table does not get
>initialized in this shadow mode. So I tried enabling refcount and translate
>> xc_shadow_control(xch, domain_id,  XEN_DOMCTL_SHADOW_OP_ENABLE,
>> But this is causing the guest and host to hang.
>The guest I expect, as it's not expecting Xen to be translating its pagetables.
>The host hanging is unfortunate. :(
>What you want to do is something in between the two: you need to store
>some p2m-like information for each PV page but you don't actually want to do
>any translation.
>One option would be to fix up shadow_mode_translate so that it uses a
>1-1 p2m mapping, and then have that mapping be kept up to date with any
>alloc/free/map operations.
>Another, and I think better, would be to add a third implementation of the
>p2m interface, that always return mfn==gfn, but also records mem_event
>state.  Then you'd need to add another XEN_DOMCTL_SHADOW flag to select
>that mode.

OK, I will go down the path of adding another shadow mode. 

There is one other thing I am not clear about. When the mem_access listener is 
trying to map guest memory or set access permissions for say a 256MB pv guest, 
does it make the calls on gfns ranging from 0 to 256mb or does it need to do it 
on the mfn? Or should this gnf -> mfn translation be abstracted by the new 
shadow mode for the mem_access listener?


Xen-devel mailing list



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