[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



Hello, and thanks for your comments.

+    if ( v->arch.hvm_vmx.mem_event_emulate )

Lack of mem event support for AMD processors will be fixed as soon as someone 
with interest (and time!) gets going. I don't recall anything fundamental 
standing in the way.

So it's best if you lift this field into the generic hvm level.

That would make it v->arch.mem_event_emulate, correct?

Tim's point is that you won't get all the mem events, because the instruction 
can easily touch multiple pages. It's a question that addresses the need for 
this patch in the first place.

Yes, I did get Tim's point. Sorry if I haven't been able to make that as clear as I should have in my reply to Tim's email.

One potential (hairy) fix is to have all get_page_from_gfn check for and emit a 
mem event. It's a bit of rat hole, because we'll need to pass the intended 
permissions down the stack, check against mem event status, etc etc. It will 
help extend mem event to catch all hypervisor-based accesses that currently it 
mostly can't, as well as foreign mappings. It's certainly not for the faint of 
heart.

Fortunately, for the purposes of my patch, the simple solution is enough.

+#define MEM_EVENT_FLAG_EMULATE      (1 << 5) /* Emulate the instruction that 
caused the current mem_event */
Line overflow, better stack the comment on top

No problem.

Thank you,
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®.