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

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



Hi,

Hello Tim, thank you for taking the time to review this.

I think there ought to be some other control to this: what if a single
instruction accesses multiple pages, each of which would cause an access
fault?  You only get a notification of the first one, so short of
emulating the instruction yourself in userspace I don't know how you can
decide that it's safe.

You're right, but I can't see how this case could be handled at all without lifting the restrictions, one page at a time. And that's precisely what this patch aims to make unnecessary. I can't see a way around it (not while the emulation support is limited to hvm_emulate_one() and hvm_emulate_one_nowrite()).

This function always operates on the currently scheduled vcpu, so you
don't need to pass a cpu-user-regs struct all the way down the stack --
you can just use guest_cpu_user_regs() here.

Of course. Thank you.

I don't think this is necessary: you only need to add a field to thuiis
file if you'll be using it from assembly code.

I thought I'd be polite and add it anyway, in case somebody will want to use it later. Was that pollution? I'll remove it.

+#define MEM_EVENT_FLAG_EMULATE      (1 << 5)

Please add a comment saying what this flag does.  I know the rest of
this code is poorly commented, but let's try to make thing better as we
go. :)

I will.

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