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

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


  • To: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Tue, 22 Sep 2015 18:39:27 +0300
  • Cc: "wei.liu2@xxxxxxxxxx" <wei.liu2@xxxxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Keir Fraser <keir@xxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Tue, 22 Sep 2015 15:39:48 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=JZDIcnjHfFaN37bgqXkxSFvZM2w2NnwyMzzlnUwNG69W9UwVJag903n6Eq8DBzxXj5n0y+MAAs6V4kwmoW1McRZFaDz/W7Tn/Dimm6ET1TyYNbU+lvNQbE9DeGn7gtvP3R//CGiq/z3PAxcnY7sbOEFBUmfMF5WIiLidrQRrRS3RN+73R6SAZDtgbqDV4feuoo6QLwypE1Kng7n+vdwU1rjIgW44TNv4tCWTmZYKdyqbo25/Bg2N0E/FY+GgeyhIaBCzv96ALOB3nvSd4ONrOiaM1+I3edRZ++9iGr3s4/+r1EhFl9aqGBaLy1ccELB6Oo11XRnO5g8E6A3gPthhug==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From: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/22/2015 06:34 PM, Tamas K Lengyel wrote:
> 
> 
> On Tue, Sep 22, 2015 at 9:19 AM, Jan Beulich <JBeulich@xxxxxxxx
> <mailto:JBeulich@xxxxxxxx>> wrote:
> 
>     >>> On 21.09.15 at 15:31, <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. In the future, other
>     > registers can also be set via a vm_event reply by using this flag.
>     > The VCPU needs to be paused for this flag to take effect.
>     >
>     > Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx 
> <mailto:rcojocaru@xxxxxxxxxxxxxxx>>
>     >
>     > ---
>     > Changes since V1:
>     >  - Renamed the patch (VM_EVENT_FLAG_SET_EIP ->
>     >    VM_EVENT_FLAG_SET_REGISTERS).
>     >  - As suggested by Tamas Lengyel, EIP is now being set via a dedicated
>     >    generic vm_event_set_registers() function that can be extended to
>     >    set other registers in the future.
> 
>     Isn't it a bad move to call the thing "set registers" but have it set
>     just EIP? If going forward you were to add more registers, you'd
>     need new flags anyway I suppose, and hence the public interface
>     part of this should be reverted (while the other internal
>     abstraction seems fine to me).
> 
>     Jan
> 
> 
> IMHO you should just add setting all registers included in the snapshot
> here rather then postpone it to a later patch.

Right, but setting some of the registers in the reply has side-effects
(such as the control registers), so I thought it better to not just try
to copy them if it's not needed (though I suppose we could check if the
new value differs from the old and only set it if it is at least).


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