All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"JBeulich@suse.com" <JBeulich@suse.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: Re: [PATCH 1/2] xen: Introduce PHYSDEVOP_pirq_eoi_gmfn_new
Date: Thu, 26 Jan 2012 17:14:24 +0000	[thread overview]
Message-ID: <CB473A70.29ABE%keir.xen@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1201261623380.3196@kaball-desktop>

On 26/01/2012 16:29, "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
wrote:

> On Thu, 26 Jan 2012, Keir Fraser wrote:
>> On 26/01/2012 15:49, "Stefano Stabellini" <Stefano.Stabellini@eu.citrix.com>
>> wrote:
>> 
>>> PHYSDEVOP_pirq_eoi_gmfn changes the semantics of PHYSDEVOP_eoi.
>>> Introduce PHYSDEVOP_pirq_eoi_gmfn_new, that is like
>>> PHYSDEVOP_pirq_eoi_gmfn but it doesn't modify the behaviour of another
>>> hypercall.
>> 
>> It's nasty that pirq_eoi_gmfn has the side effect. I suggest add a PHYSDEVOP
>> to explicitly enable/disable unmask-on-eoi (i.e., the command accepts a
>> boolean parameter). Once it is explicitly enabled/disabled in this way,
>> pirq_eoi_gmfn no longer has the side effect (regardless of whether it is
>> called before or after the explicit setting). So e.g., pv_domain.auto_unmask
>> becomes an int where 0/1 means no/yes, and -1 means default (i.e., old
>> behavour where it depends on whether PHYSDEVOP_pirq_eoi_gmfn has been
>> called).
>> 
>> This seems to me to move a bad interface in a better direction.
> 
> The problem with this approach is that by default we have an hypercall
> (PHYSDEVOP_pirq_eoi_gmfn) changing the behaviour of another one
> (PHYSDEVOP_eoi). Not only this but we have an hypercall
> (PHYSDEVOP_pirq_eoi_gmfn) violating the public interface of shared_info
> as documented in public/xen.h.
> 
> Introducing a new hypercall with the same name
> (PHYSDEVOP_pirq_eoi_gmfn_new) is the first step in admitting that the
> old hypercall was a mistake and should not be used.
> 
> I don't think we should ever change the semantics of PHYSDEVOP_eoi with
> another hypercall. If we want a PHYSDEVOP that eoi and unmask and event
> channel let's introduce PHYSDEVOP_eoi_unmask.

Okay, fine by me. See my comments on naming in the email I sent just a sec
ago.

 -- Keir

  parent reply	other threads:[~2012-01-26 17:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 15:49 [PATCH 0/2] use pirq_eoi_map in modern Linux kernels Stefano Stabellini
2012-01-26 15:49 ` [PATCH 1/2] xen: Introduce PHYSDEVOP_pirq_eoi_gmfn_new Stefano Stabellini
2012-01-26 16:09   ` Jan Beulich
2012-01-26 16:14     ` Stefano Stabellini
2012-01-26 16:11   ` Keir Fraser
2012-01-26 16:26     ` Keir Fraser
2012-01-26 16:29     ` Stefano Stabellini
2012-01-26 16:42       ` Ian Campbell
2012-01-26 16:45         ` Stefano Stabellini
2012-01-26 17:13           ` Keir Fraser
2012-01-26 17:37             ` Stefano Stabellini
2012-01-26 18:00               ` [PATCH v2 1/2] xen: introduce PHYSDEVOP_pirq_eoi_gmfn_v2 Stefano Stabellini
2012-01-26 18:00               ` [PATCH v2 2/2] linux/xen: support pirq_eoi_map Stefano Stabellini
2012-01-26 18:51                 ` Konrad Rzeszutek Wilk
2012-01-27 11:03                   ` Stefano Stabellini
2012-01-27 13:51                     ` Konrad Rzeszutek Wilk
2012-01-27 14:10                       ` Stefano Stabellini
2012-01-26 17:14       ` Keir Fraser [this message]
2012-01-26 15:49 ` [PATCH " Stefano Stabellini

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=CB473A70.29ABE%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.