From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xen.org>,
Jan Beulich <jbeulich@suse.com>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>
Subject: Re: [PATCH 2/2] xen: Introduce VM_EVENT_FLAG_SET_EIP
Date: Wed, 16 Sep 2015 19:12:41 +0300 [thread overview]
Message-ID: <55F994F9.8060106@bitdefender.com> (raw)
In-Reply-To: <CABfawhmXHfZPxkw=O7Vsaa1+MFp-sZnXNsfBX8PzkZLUAD3m2w@mail.gmail.com>
On 09/16/2015 06:57 PM, Tamas K Lengyel wrote:
>
>
> On Tue, Sep 15, 2015 at 5:19 AM, Razvan Cojocaru
> <rcojocaru@bitdefender.com <mailto:rcojocaru@bitdefender.com>> 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
next prev parent reply other threads:[~2015-09-16 16:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 9:19 [PATCH 0/2] Introspection optimization helpers Razvan Cojocaru
2015-09-15 9:19 ` [PATCH 1/2] xen, libxc: Introduced XEN_DOMCTL_emulate_each_rep Razvan Cojocaru
2015-09-15 9:51 ` Ian Campbell
2015-09-15 15:36 ` Julien Grall
2015-09-15 15:46 ` Razvan Cojocaru
2015-09-17 12:59 ` Andrew Cooper
2015-09-17 13:20 ` Razvan Cojocaru
2015-09-17 13:37 ` Andrew Cooper
2015-09-17 13:45 ` Razvan Cojocaru
2015-09-15 9:19 ` [PATCH 2/2] xen: Introduce VM_EVENT_FLAG_SET_EIP Razvan Cojocaru
2015-09-16 15:57 ` Tamas K Lengyel
2015-09-16 16:12 ` Razvan Cojocaru [this message]
2015-09-18 19:19 ` Tamas K Lengyel
2015-09-21 8:53 ` Jan Beulich
2015-09-21 9:05 ` Razvan Cojocaru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F994F9.8060106@bitdefender.com \
--to=rcojocaru@bitdefender.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tamas@tklengyel.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.