Re: [Xen-devel] [PATCH] x86/cpu: Fix SMAP check in PVOPS environments

From: David Vrabel
Date: Fri Jun 05 2015 - 05:33:24 EST


On 05/06/15 03:58, Rusty Russell wrote:
>
> Subject: x86: rename save_fl/restore_fl paravirt ops to highlight eflags.
> From: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
>
> As the comment in arch/x86/include/asm/paravirt_types.h says:
>
> * Get/set interrupt state. save_fl and restore_fl are only
> * expected to use X86_EFLAGS_IF; all other bits
> * returned from save_fl are undefined, and may be ignored by
> * restore_fl.
>
> Signed-off-by: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
[...]
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1074,8 +1074,8 @@ void xen_setup_vcpu_info_placement(void)
> * percpu area for all cpus, so make use of it. Note that for
> * PVH we want to use native IRQ mechanism. */
> if (have_vcpu_info_placement && !xen_pvh_domain()) {
> - pv_irq_ops.save_fl = __PV_IS_CALLEE_SAVE(xen_save_fl_direct);
> - pv_irq_ops.restore_fl = __PV_IS_CALLEE_SAVE(xen_restore_fl_direct);
> + pv_irq_ops.save_eflags_if = __PV_IS_CALLEE_SAVE(xen_save_fl_direct);
> + pv_irq_ops.restore_eflags_if = __PV_IS_CALLEE_SAVE(xen_restore_fl_direct);
> pv_irq_ops.irq_disable = __PV_IS_CALLEE_SAVE(xen_irq_disable_direct);
> pv_irq_ops.irq_enable = __PV_IS_CALLEE_SAVE(xen_irq_enable_direct);
> pv_mmu_ops.read_cr2 = xen_read_cr2_direct;
> @@ -1102,8 +1102,8 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf,
> switch (type) {
> SITE(pv_irq_ops, irq_enable);
> SITE(pv_irq_ops, irq_disable);
> - SITE(pv_irq_ops, save_fl);
> - SITE(pv_irq_ops, restore_fl);
> + SITE(pv_irq_ops, save_eflags_if);
> + SITE(pv_irq_ops, restore_eflags_if);
> #undef SITE
>
> patch_site:
> diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c

Acked-by: David Vrabel <david.vrabel@xxxxxxxxxx>

Thanks.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/