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

Re: [Xen-devel] [PATCH V2] mem_event: Allow emulating an instruction that caused a page fault



On Jan 22, 2013, at 8:47 AM, Razvan Cojocaru <rzvncj@xxxxxxxxx> wrote:

>> Ok, talking only about writes, we have the destination operand, plus all
>> the pagetables (for setting Accessed bits) plus any stacks and TSSes
>> needed in delivering faults; something like 32 pages for the full
>> double-fault scenario.
> 
> I see, but then, even setting aside Andres' argument that having all possible 
> events sent to userspace is far from trivial, doing so would completely 
> cripple the monitored domain speed-wise. Imagine having userspace having to 
> decide if it allows a write 32 times per one instruction.

Razvan, have you tried the n2rwx mode? It'll cause an event for the first 
access to each page. It'll automatically patch the access (hence 2 rwx) to 
allow execution to continue unhindered.

So user-space doesn't decide anything, but gets informed about everything 
(within the constraints of mem event, i.e. no foreign mappings, no Xen 
mappings).

If you want to know about every write and decide on every write… you can't have 
your cake and eat it too, right?

Andres
> 
> Even with its limitations, this patch at least gives us a shot at looking at 
> what the domain does with memory - the existing model (releasing the page 
> completely to allow the write) is not fit for anything like this at all.
> 
> So far, between the requirements of reasonable demands on the domU, and 
> satisfactory levels of control provided by the received mem_events, at least 
> as far as writes go, the patch's done it's job quite nicely.
> 
> Thanks,
> Razvan Cojocaru


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