From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: Kees Cook <keescook@chromium.org>,
x86@kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
xen-devel@lists.xenproject.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [Xen-devel] [PATCH v4 04/10] x86: paravirt: Wrap initialization of set_iopl_mask in a macro
Date: Mon, 1 Dec 2014 10:37:59 -0500 [thread overview]
Message-ID: <20141201153759.GE3180@laptop.dumpdata.com> (raw)
In-Reply-To: <d50798c4b4860edfed4f95e34b7ffac3e6622aaf.1414870871.git.josh@joshtriplett.org>
On Sun, Nov 02, 2014 at 09:32:20AM -0800, Josh Triplett wrote:
> This will allow making set_iopl_mask optional later.
>
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> arch/x86/include/asm/paravirt_types.h | 1 +
> arch/x86/kernel/paravirt.c | 2 +-
> arch/x86/xen/enlighten.c | 4 ++--
> 3 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h
> index 7549b8b..3caf2a8 100644
> --- a/arch/x86/include/asm/paravirt_types.h
> +++ b/arch/x86/include/asm/paravirt_types.h
> @@ -143,6 +143,7 @@ struct pv_cpu_ops {
> void (*load_sp0)(struct tss_struct *tss, struct thread_struct *t);
>
> void (*set_iopl_mask)(unsigned mask);
> +#define INIT_SET_IOPL_MASK(f) .set_iopl_mask = f,
>
> void (*wbinvd)(void);
> void (*io_delay)(void);
> diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c
> index 548d25f..e7969d4 100644
> --- a/arch/x86/kernel/paravirt.c
> +++ b/arch/x86/kernel/paravirt.c
> @@ -383,7 +383,7 @@ __visible struct pv_cpu_ops pv_cpu_ops = {
> .iret = native_iret,
> .swapgs = native_swapgs,
>
> - .set_iopl_mask = native_set_iopl_mask,
> + INIT_SET_IOPL_MASK(native_set_iopl_mask)
> .io_delay = native_io_delay,
>
> .start_context_switch = paravirt_nop,
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 1a3f044..8ad0778 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -912,7 +912,7 @@ static void xen_load_sp0(struct tss_struct *tss,
> xen_mc_issue(PARAVIRT_LAZY_CPU);
> }
>
> -static void xen_set_iopl_mask(unsigned mask)
> +static void __maybe_unused xen_set_iopl_mask(unsigned mask)
> {
> struct physdev_set_iopl set_iopl;
>
> @@ -1279,7 +1279,7 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = {
> .write_idt_entry = xen_write_idt_entry,
> .load_sp0 = xen_load_sp0,
>
> - .set_iopl_mask = xen_set_iopl_mask,
> + INIT_SET_IOPL_MASK(xen_set_iopl_mask)
> .io_delay = xen_io_delay,
>
> /* Xen takes care of %gs when switching to usermode for us */
> --
> 2.1.1
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-12-01 15:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-02 17:31 [PATCH v4 00/10] x86: Support compiling out userspace IO (iopl and ioperm) Josh Triplett
2014-11-02 17:31 ` [PATCH v4 01/10] x86: process: Unify 32-bit and 64-bit copy_thread I/O bitmap handling Josh Triplett
2014-11-02 17:32 ` [PATCH v4 02/10] x86: tss: Eliminate fragile calculation of TSS segment limit Josh Triplett
2014-11-02 17:32 ` [PATCH v4 03/10] x86: processor.h: Introduce macros to initialize IO fields of thread and TSS Josh Triplett
2014-11-02 17:32 ` [PATCH v4 04/10] x86: paravirt: Wrap initialization of set_iopl_mask in a macro Josh Triplett
2014-12-01 15:37 ` Konrad Rzeszutek Wilk [this message]
2014-11-02 17:32 ` [PATCH v4 05/10] x86: cpu: Add helper function unifying 32-bit and 64-bit IO init in cpu_init Josh Triplett
2014-11-02 17:32 ` [PATCH v4 06/10] x86: process: Introduce helper to clear a thread's IO bitmap Josh Triplett
2014-11-02 17:32 ` [PATCH v4 07/10] x86: process: Introduce helper to switch iopl mask Josh Triplett
2014-11-02 17:32 ` [PATCH v4 08/10] x86: process: Introduce helper for IO-related bits of exit_thread Josh Triplett
2014-11-02 17:32 ` [PATCH v4 09/10] x86: process: Introduce helper to switch IO bitmap Josh Triplett
2014-11-02 17:33 ` [PATCH v4 10/10] x86: Support compiling out userspace IO (iopl and ioperm) Josh Triplett
[not found] ` <ec10c497d3a7f44f335dbc267edd6de5b4acd671.1414870871.git.josh@joshtriplett.org>
2014-11-03 12:10 ` One Thousand Gnomes
[not found] ` <20141103121049.2f0c81a9@alan.etchedpixels.co.uk>
2014-11-03 14:13 ` Josh Triplett
2014-11-03 15:27 ` One Thousand Gnomes
[not found] ` <20141103152748.327032f8@alan.etchedpixels.co.uk>
2014-11-03 16:45 ` josh
2014-11-03 19:26 ` Andy Lutomirski
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=20141201153759.GE3180@laptop.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=hpa@zytor.com \
--cc=josh@joshtriplett.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).