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

Re: [Xen-devel] [PATCH v2] x86/vm_event: toggle singlestep from vm_event response


  • To: "Lengyel, Tamas" <tlengyel@xxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Mon, 6 Jul 2015 20:03:35 +0300
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, keir@xxxxxxx, stefano.stabellini@xxxxxxxxxx, Ian Campbell <ian.campbell@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxx>
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Mon, 06 Jul 2015 17:03:55 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=qCoIvkCOqPqUY7jglE+O8dQQJ0aeVBjjugV2X0yML/A1IDW7o7Zh/idL4fjvpWAVDdx0/E9GGdJ8e83EXK1Ixz3t58PqRtwQOHwC+zFyHdvuOj0GzX5EgvwxTGm5T4Al3RD3ecW8RvoHJaSq/l8JYIqkqa7ZnXvsn2tbSOqWfY4XuvL3A1glaAd32Mnp4R7zHh7D35sDWZusNMoGuJIL3lm7jRLCtZ4hcltL1LIZtVGFEljvfb10uL/hs7MAdwuo9Z5ijqjZaWRvCjA8AvK6qJ452/51SNqg7h1dnMWGpDOKkpZQBRvvn3pD7iGgA2OfpzWxlYnK5JAWV530qhTmFg==; h=Received:Received:Received:Received:Received:Subject:To:References:Cc:From: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 07/06/2015 07:26 PM, Lengyel, Tamas wrote:
> 
> 
> On Mon, Jul 6, 2015 at 11:54 AM, Jan Beulich <JBeulich@xxxxxxxx
> <mailto:JBeulich@xxxxxxxx>> wrote:
> 
>     >>> On 06.07.15 at 17:35, <tlengyel@xxxxxxxxxxx
>     <mailto:tlengyel@xxxxxxxxxxx>> wrote:
>     > On Mon, Jul 6, 2015 at 11:26 AM, Jan Beulich <JBeulich@xxxxxxxx
>     <mailto:JBeulich@xxxxxxxx>> wrote:
>     >
>     >> >>> On 30.06.15 at 16:40, <tlengyel@xxxxxxxxxxx
>     <mailto:tlengyel@xxxxxxxxxxx>> wrote:
>     >> > On Tue, Jun 30, 2015 at 10:18 AM, Andrew Cooper <
>     >> andrew.cooper3@xxxxxxxxxx <mailto:andrew.cooper3@xxxxxxxxxx>>
>     >> > wrote:
>     >> >
>     >> >> On 30/06/15 15:11, Tamas K Lengyel wrote:
>     >> >> > diff --git a/xen/include/public/vm_event.h
>     >> >> b/xen/include/public/vm_event.h
>     >> >> > index 577e971..b8c3dde 100644
>     >> >> > --- a/xen/include/public/vm_event.h
>     >> >> > +++ b/xen/include/public/vm_event.h
>     >> >> > @@ -44,9 +44,15 @@
>     >> >> >   *  paused
>     >> >> >   * VCPU_PAUSED in a response signals to unpause the vCPU
>     >> >> >   */
>     >> >> > -#define VM_EVENT_FLAG_VCPU_PAUSED     (1 << 0)
>     >> >> > -/* Flags to aid debugging mem_event */
>     >> >> > -#define VM_EVENT_FLAG_FOREIGN         (1 << 1)
>     >> >> > +#define VM_EVENT_FLAG_VCPU_PAUSED       (1 << 0)
>     >> >> > +/* Flag to aid debugging mem_event */
>     >> >> > +#define VM_EVENT_FLAG_FOREIGN           (1 << 1)
>     >> >> > +/*
>     >> >> > + * Toggle singlestepping on vm_event response.
>     >> >> > + * Requires the vCPU to be paused already (synchronous
>     events only).
>     >> >> > + * Only supported on Intel CPUs with MTF capability.
>     >> >>
>     >> >> This sentence shouldn't be in the public API.  It is a
>     limitation of the
>     >> >> current implementation, not of the API, and could be removed with
>     >> >> further development.
>     >> >>
>     >> >
>     >> > I disagree because there is no error condition returned if a
>     user tries
>     >> to
>     >> > use it on non-Intel hw, so the only option a user would have to
>     figure
>     >> out
>     >> > why it's not working is reading the Xen source. IMHO the public API
>     >> should
>     >> > describe the limitations as that's what potential users will
>     read first.
>     >> > When we have hardware other then Intel that supports something
>     like this,
>     >> > we can remove the comment.
>     >>
>     >> FWIW I agree with Andrew, and if on non-Intel hardware there's
>     >> no error (or other indication) being returned, that's actually an
>     >> issue to be fixed imo.
>     >
>     > There is no opportunity for that, the current API does not provide a
>     > mechanism to signal failure on things that were requested on the 
> vm_event
>     > response. Creating such a mechanism is beyond the scope of this patch 
> and I
>     > don't think it's necessary. IMHO the comment makes it clear that this 
> will
>     > only work on Intel hardware which suffices for now.
> 
>     You're the maintainer of the code in question, so I won't (and
>     can't) enforce Andrew's and my view.
> 
>     Jan
> 
> 
> Unless Razvan have a different opinion on the matter (although he
> already Acked it), I think it's good as is.

I don't mind just having the comment for now, so for what it's worth I
stand by my ack.

Having said that (and with the understading that it is beyond the scope
of this patch), a way to validate things like these is a good idea. I
wonder if, in a future patch, we could not have ./configure detect these
things and simply disable the relevant VM_EVENT_FLAG constants with
#if(n)defs, for example. That way, you wouldn't be able to compile code
that wouldn't work silently on platforms where that is the case.


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