From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] evtchn: simplify sending of notifications
Date: Mon, 12 Jan 2015 11:33:15 +0000 [thread overview]
Message-ID: <54B3B0FB.7050209@citrix.com> (raw)
In-Reply-To: <54B39A7C020000780005382E@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1414 bytes --]
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)
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.
~Andrew
> {
> - v->domain->evtchn_port_ops->set_pending(v, evtchn);
> + d->evtchn_port_ops->set_pending(d->vcpu[vcpu_id], evtchn);
> }
>
> static inline void evtchn_port_clear_pending(struct domain *d,
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2256 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-01-12 11:33 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 [this message]
2015-01-12 11:42 ` Jan Beulich
2015-01-12 16:01 ` Andrew Cooper
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=54B3B0FB.7050209@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.