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

Re: [Xen-devel] [PATCH 2/2] xen: Introduce VM_EVENT_FLAG_SET_EIP


  • To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Wed, 16 Sep 2015 19:12:41 +0300
  • Cc: Keir Fraser <keir@xxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "wei.liu2@xxxxxxxxxx" <wei.liu2@xxxxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Wed, 16 Sep 2015 16:10:40 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=oVaR49ToJGgGaXRqOP+QOYNsgUn+ocn5dEYKtBnSj9qE8/QwsrEKQ+WUDTZxY7xv5bFMdivPon6k/WNnhQIF0ULEwsjWeGgrXqLGovhfVvJifKnk3CwAy4psgVjn7vknaCD+6US5fN0KDgIf/bGkqDKldQpxEJ5urXX0W2J3z50w9LAtQrLCw6DMLG8VUz4JlNTwXyemv6cv3tn0JFS/pZfQunbQJ0zlHqf+k+61k4k25ndePD+UUx8gJ2wfKHoRpTndpoP7lLQk35KXAkWpR3fk0ZDrskqcGjN3/7O1bgvRlITiYPqwetcUl+VPvgCvL0RhO34yCJdwnndnj/AFgQ==; h=Received:Received:Received:Received:Received:From:Subject:To:References:Cc:X-Enigmail-Draft-Status:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 09/16/2015 06:57 PM, Tamas K Lengyel wrote:
> 
> 
> On Tue, Sep 15, 2015 at 5:19 AM, Razvan Cojocaru
> <rcojocaru@xxxxxxxxxxxxxxx <mailto:rcojocaru@xxxxxxxxxxxxxxx>> wrote:
> 
>     A previous version of this patch dealing with support for skipping
>     the current instruction when a vm_event response requested it
>     computed the instruction length in the hypervisor, adding non-trivial
>     code dependencies. This patch allows a userspace vm_event client to
>     simply request that the guest's EIP is set to an arbitary value,
>     computed by the introspection application.
> 
> 
> So in my opinion this patch introduces a feature that is not strictly
> tied to emulation related vm_event paths. I could use this feature to
> update the instruction pointer any time we respond to a vm_event and
> furthermore, it may be benefitial to expand the scope of which registers
> can be updated this way. For example, I have tools that update not just
> the instruction pointer but also the stack pointer and registers used to
> pass function inputs. Since we already send a snapshot of select
> registers to the user with each event, we could introduce a response
> flag that indicates that all registers included in that snapshot should
> be set to the values sent back by the user. The user then could choose
> which registers need to be updated in bulk.
> 
> What do you think?

Hello Tamas, thanks for the reply!

Yes, I thought it might come up that this doesn't have to be
emulation-specific, but thought I'd hitch it there since I've assumed
that at the moment this is the only case where it's actually used.

I have nothing in principle against having a SET_REGISTERS flag instead
of a SET_EIP one, but I am unsure of how (and where) that would be best
implemented. What do you have in mind? A handler similar to void
vm_event_register_write_resume() where we set these registers for the
respective vcpu? Is this even possible at vm_event response handling time?


Thanks,
Razvan

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