From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>,
IanJackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] evtchn: simplify sending of notifications
Date: Mon, 12 Jan 2015 16:01:34 +0000 [thread overview]
Message-ID: <54B3EFDE.40408@citrix.com> (raw)
In-Reply-To: <54B3C1500200007800053B09@mail.emea.novell.com>
On 12/01/15 11:42, Jan Beulich wrote:
>>>> On 12.01.15 at 12:33, <andrew.cooper3@citrix.com> wrote:
>> On 12/01/15 08:57, Jan Beulich wrote:
>>> --- a/xen/include/xen/event.h
>>> +++ b/xen/include/xen/event.h
>>> @@ -152,10 +152,11 @@ static inline void evtchn_port_init(stru
>>> d->evtchn_port_ops->init(d, evtchn);
>>> }
>>>
>>> -static inline void evtchn_port_set_pending(struct vcpu *v,
>>> +static inline void evtchn_port_set_pending(struct domain *d,
>>> + unsigned int vcpu_id,
>>> struct evtchn *evtchn)
>> I would rename this to the, now vacant, evtchn_set_pending(). It takes
>> an evtchn* not a port. (Its sole caller was evtchn_set_pending(), so
>> the patch won't grow)
> No (and I had actually considered it) - that would get its name out of
> sync with all its sibling wrappers.
Ah yes - consistency is more important than correctness here.
>
>> Furthermore, all callers except send_guest_vcpu_virq() currently use
>> evtchn->notify_vcpu_id to get a struct vcpu* to pass. I think you can
>> drop the vcpu_id parameter and use evtchn->notify_vcpu_id directly,
>> which reduces the likelyhood of a bug where the evtchn is bound to one
>> vcpu but a caller gets the wrong id and raises the event channel on the
>> wrong vcpu.
> Generally a nice idea, but it doesn't immediately/obviously fit with
> the use in send_guest_vcpu_virq().
It is awkward that some of the virqs will get delivered on an arbitrary
vcpu, especially as the virq API requires the binding domain to choose a
destination vcpu. Either way, this is not something to be addressed in
a cleanup patch.
Therefore the original patch is Reviewed-by: Andrew Cooper
<andrew.cooper3@citrix.com>
~Andrew
prev parent reply other threads:[~2015-01-12 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-12 8:57 [PATCH] evtchn: simplify sending of notifications Jan Beulich
2015-01-12 10:52 ` David Vrabel
2015-01-12 11:33 ` Andrew Cooper
2015-01-12 11:42 ` Jan Beulich
2015-01-12 16:01 ` Andrew Cooper [this message]
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=54B3EFDE.40408@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.