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

Re: [Xen-devel] [PATCH RFC v2 1/4] x86/mm: Shadow and p2m changes for PV mem_access



At 19:23 +0000 on 28 Aug (1409250226), Aravindh Puthiyaparambil (aravindp) 
wrote:
> In the PV case step 2 is problematic as the range of pages that
> belong to the PV guest is unknown to the mem-access listener. I
> tried adding another PV specific API for setting default access that
> will walk the page_list and set the shadow_flag to default. But Jan
> rightly pointed out issues surrounding hypercall preemption /
> continuation during which, the page_list could be modified. So my
> current plan is to blow all shadow pages every time the API for
> setting default access is called. The on the subsequent page-faults
> where the PTE is marked not present, set the shadow_flag to the
> default access as part of creating the PTE.

How do you know when this step finishes?  I.e. how can you tell the
difference between an access field in the shadow_flags that was set
before you enabled mem_access and one that was set since?

At some point you need some more state - either something resetting
the shadow_flags (though indeed I don't know how to do that reliably
and safely) or an epoch counter (which there isn't room for) or some
other trick that I can't think of right now.

I wonder if it's possible just to mandate in the API that you might
get spurious mem_access faults in this case.  A bit ugly though. :(

Tim.

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