From: David Vrabel <david.vrabel@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: "Keir (Xen.org)" <keir@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>,
"jbeulich@suse.com" <jbeulich@suse.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [RFC PATCH V3 07/22] Add evtchn_extended in struct domain
Date: Thu, 28 Feb 2013 11:55:32 +0000 [thread overview]
Message-ID: <512F45B4.2000105@citrix.com> (raw)
In-Reply-To: <1361975655-22295-8-git-send-email-wei.liu2@citrix.com>
On 27/02/13 14:34, Wei Liu wrote:
> This field is a bitmap of currently in use extended event channel ABI, which
> can have 0 (no extended event channel in use) 1 bit set. It is manipulated by
> hypervisor only, so if anything goes wrong it is a bug.
>
> The default event channel ABI is EVTCHN_EXTENDED_NONE, which means no extended
> event channel is used.
[...]
> --- a/xen/include/xen/event.h
> +++ b/xen/include/xen/event.h
> @@ -14,6 +14,7 @@
> #include <xen/softirq.h>
> #include <asm/bitops.h>
> #include <asm/event.h>
> +#include <public/event_channel.h>
>
> #ifndef CONFIG_COMPAT
> #define BITS_PER_EVTCHN_WORD(d) BITS_PER_LONG
> @@ -22,7 +23,16 @@
> #endif
> static inline unsigned int max_evtchns(struct domain *d)
> {
> - return BITS_PER_EVTCHN_WORD(d) * BITS_PER_EVTCHN_WORD(d);
> + unsigned int ret = 0;
> + switch ( d->evtchn_extended )
> + {
> + case EVTCHN_EXTENDED_NONE:
> + ret = BITS_PER_EVTCHN_WORD(d) * BITS_PER_EVTCHN_WORD(d);
> + break;
> + default:
> + BUG();
> + }
BUG'ing in every switch that uses d->evtchn_extended doesn't seem useful
and may add extra overhead in hot paths.
Perhaps an ASSERT() but this this field is written in such a limited set
of places this doesn't seem useful.
David
next prev parent reply other threads:[~2013-02-28 11:55 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 14:33 [RFC PATCH V3] Implement 3-level event channel in Xen Wei Liu
2013-02-27 14:33 ` [RFC PATCH V3 01/22] Clean up trailing whitespaces Wei Liu
2013-02-28 11:30 ` David Vrabel
2013-02-28 11:36 ` Wei Liu
2013-02-28 11:38 ` Jan Beulich
2013-02-28 12:14 ` Ian Campbell
2013-02-28 12:29 ` Wei Liu
2013-02-28 13:08 ` Jan Beulich
2013-02-27 14:33 ` [RFC PATCH V3 02/22] Dynamically allocate d->evtchn Wei Liu
2013-02-27 16:35 ` Jan Beulich
2013-02-27 14:33 ` [RFC PATCH V3 03/22] Move event channel macros / struct definition to proper place Wei Liu
2013-02-27 14:33 ` [RFC PATCH V3 04/22] flask: include xen/event.h Wei Liu
2013-02-28 11:20 ` David Vrabel
2013-02-28 11:22 ` Wei Liu
2013-02-27 14:33 ` [RFC PATCH V3 05/22] Change MAX_EVTCHNS macro to max_evtchns inline function Wei Liu
2013-02-28 11:58 ` David Vrabel
2013-02-28 13:59 ` Wei Liu
2013-02-27 14:33 ` [RFC PATCH V3 06/22] Define extended event channel registration interface Wei Liu
2013-02-27 16:42 ` Jan Beulich
2013-02-28 11:25 ` Wei Liu
2013-02-28 11:32 ` Jan Beulich
2013-02-28 11:41 ` Wei Liu
2013-02-28 12:32 ` David Vrabel
2013-02-28 15:04 ` Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 07/22] Add evtchn_extended in struct domain Wei Liu
2013-02-28 11:55 ` David Vrabel [this message]
2013-02-27 14:34 ` [RFC PATCH V3 08/22] Calculate max event channels for EVTCHN_EXTENDED_L3 Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 09/22] Bump EVTCHNS_PER_BUCKET to 512 Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 10/22] Add evtchn_is_{pending, masked} and evtchn_clear_pending Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 11/22] Update Xen public header Wei Liu
2013-02-28 12:00 ` David Vrabel
2013-02-27 14:34 ` [RFC PATCH V3 12/22] Add supported extended event channel ABI bitmap Wei Liu
2013-02-27 16:47 ` Jan Beulich
2013-02-28 11:21 ` Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 13/22] Add evtchn_abi_str Wei Liu
2013-02-27 16:51 ` Jan Beulich
2013-02-28 11:28 ` Wei Liu
2013-02-28 11:33 ` Jan Beulich
2013-02-27 14:34 ` [RFC PATCH V3 14/22] Add control structures for 3-level event channel Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 15/22] Genneralized event channel operations Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 16/22] Introduce some macros for event channels Wei Liu
2013-02-27 16:53 ` Jan Beulich
2013-02-27 17:04 ` Ian Campbell
2013-02-28 7:54 ` Jan Beulich
2013-02-28 8:35 ` Ian Campbell
2013-02-28 11:17 ` Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 17/22] Infrastructure to manipulate 3-level event channel pages Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 18/22] Implement EVTCHNOP_register_extended Wei Liu
2013-02-28 12:33 ` David Vrabel
2013-02-27 14:34 ` [RFC PATCH V3 19/22] Enable exteneded event channel ABI query Wei Liu
2013-02-28 12:36 ` David Vrabel
2013-02-27 14:34 ` [RFC PATCH V3 20/22] Implement 3-level event channel routines Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 21/22] Only allow extended event channel on Dom0 and driver domains Wei Liu
2013-02-27 16:58 ` Jan Beulich
2013-02-28 11:19 ` Wei Liu
2013-02-28 12:43 ` David Vrabel
2013-02-28 19:29 ` Wei Liu
2013-02-27 14:34 ` [RFC PATCH V3 22/22] libxl: add evtchn_extended flag Wei Liu
2013-02-28 12:48 ` David Vrabel
2013-03-01 11:55 ` Ian Jackson
2013-02-27 16:28 ` [RFC PATCH V3] Implement 3-level event channel in Xen Keir Fraser
2013-02-27 17:01 ` Jan Beulich
2013-02-27 19:49 ` Keir Fraser
2013-02-27 23:19 ` Wei Liu
2013-02-28 5:58 ` Keir Fraser
2013-02-28 7:23 ` Jan Beulich
2013-03-01 12:00 ` Ian Jackson
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=512F45B4.2000105@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.