linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: "Shai Fultheim (Shai@ScaleMP.com)" <Shai@ScaleMP.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"x86@kernel.org" <x86@kernel.org>
Cc: "hpa@zytor.com" <hpa@zytor.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
	"rusty@rustcorp.com.au" <rusty@rustcorp.com.au>,
	"lguest@lists.ozlabs.org" <lguest@lists.ozlabs.org>
Subject: Re: [PATCH 3/3] x86/vsmp: remove vsmp paravirt support
Date: Thu, 10 Aug 2017 17:30:39 +0200	[thread overview]
Message-ID: <39911c9d-3381-db06-9e92-2e29c62ab742@suse.com> (raw)
In-Reply-To: <BN6PR15MB18598B41EBF65B5AD6D24585C3880@BN6PR15MB1859.namprd15.prod.outlook.com>

On 10/08/17 17:28, Shai Fultheim (Shai@ScaleMP.com) wrote:
> NACK.  This is needed and used by thousands of installations.

Okay, thanks for reacting so fast. Will drop the patch.


Juergen

> 
> 
> ________________________________________________________
> Shai Fultheim | M +1 (408) 480-1612 | E Shai@ScaleMP.com
> 
> This email message and any attachments to it are ScaleMP confidential information.
> 
> -----Original Message-----
> From: Ingo Molnar [mailto:mingo.kernel.org@gmail.com] On Behalf Of Juergen Gross
> Sent: Thursday, August 10, 2017 15:53
> To: linux-kernel@vger.kernel.org; xen-devel@lists.xenproject.org; x86@kernel.org
> Cc: hpa@zytor.com; mingo@redhat.com; tglx@linutronix.de; boris.ostrovsky@oracle.com; rusty@rustcorp.com.au; lguest@lists.ozlabs.org; Juergen Gross <jgross@suse.com>
> Subject: [PATCH 3/3] x86/vsmp: remove vsmp paravirt support
> 
> vSMP has seen its last functional patch more than 3 years ago. It is
> not clear whether the vSMP paravirtualized irq functions are still
> needed.
> 
> Remove them as they seem to be optional and their existence is blocking
> some simplification work of paravirt infrastructure.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
>  arch/x86/Kconfig          |  1 -
>  arch/x86/kernel/vsmp_64.c | 69 +----------------------------------------------
>  2 files changed, 1 insertion(+), 69 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 3fac2570a2e1..13a3d8744ae4 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -495,7 +495,6 @@ config X86_NUMACHIP
>  config X86_VSMP
>  	bool "ScaleMP vSMP"
>  	select HYPERVISOR_GUEST
> -	select PARAVIRT
>  	depends on X86_64 && PCI
>  	depends on X86_EXTENDED_PLATFORM
>  	depends on SMP
> diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
> index b034b1b14b9c..5d392b809ee4 100644
> --- a/arch/x86/kernel/vsmp_64.c
> +++ b/arch/x86/kernel/vsmp_64.c
> @@ -21,7 +21,6 @@
>  #include <asm/apic.h>
>  #include <asm/pci-direct.h>
>  #include <asm/io.h>
> -#include <asm/paravirt.h>
>  #include <asm/setup.h>
>  
>  #define TOPOLOGY_REGISTER_OFFSET 0x10
> @@ -29,64 +28,7 @@
>  /* Flag below is initialized once during vSMP PCI initialization. */
>  static int irq_routing_comply = 1;
>  
> -#if defined CONFIG_PCI && defined CONFIG_PARAVIRT
> -/*
> - * Interrupt control on vSMPowered systems:
> - * ~AC is a shadow of IF.  If IF is 'on' AC should be 'off'
> - * and vice versa.
> - */
> -
> -asmlinkage __visible unsigned long vsmp_save_fl(void)
> -{
> -	unsigned long flags = native_save_fl();
> -
> -	if (!(flags & X86_EFLAGS_IF) || (flags & X86_EFLAGS_AC))
> -		flags &= ~X86_EFLAGS_IF;
> -	return flags;
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_save_fl);
> -
> -__visible void vsmp_restore_fl(unsigned long flags)
> -{
> -	if (flags & X86_EFLAGS_IF)
> -		flags &= ~X86_EFLAGS_AC;
> -	else
> -		flags |= X86_EFLAGS_AC;
> -	native_restore_fl(flags);
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_restore_fl);
> -
> -asmlinkage __visible void vsmp_irq_disable(void)
> -{
> -	unsigned long flags = native_save_fl();
> -
> -	native_restore_fl((flags & ~X86_EFLAGS_IF) | X86_EFLAGS_AC);
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_disable);
> -
> -asmlinkage __visible void vsmp_irq_enable(void)
> -{
> -	unsigned long flags = native_save_fl();
> -
> -	native_restore_fl((flags | X86_EFLAGS_IF) & (~X86_EFLAGS_AC));
> -}
> -PV_CALLEE_SAVE_REGS_THUNK(vsmp_irq_enable);
> -
> -static unsigned __init vsmp_patch(u8 type, u16 clobbers, void *ibuf,
> -				  unsigned long addr, unsigned len)
> -{
> -	switch (type) {
> -	case PARAVIRT_PATCH(pv_irq_ops.irq_enable):
> -	case PARAVIRT_PATCH(pv_irq_ops.irq_disable):
> -	case PARAVIRT_PATCH(pv_irq_ops.save_fl):
> -	case PARAVIRT_PATCH(pv_irq_ops.restore_fl):
> -		return paravirt_patch_default(type, clobbers, ibuf, addr, len);
> -	default:
> -		return native_patch(type, clobbers, ibuf, addr, len);
> -	}
> -
> -}
> -
> +#if defined CONFIG_PCI
>  static void __init set_vsmp_pv_ops(void)
>  {
>  	void __iomem *address;
> @@ -115,15 +57,6 @@ static void __init set_vsmp_pv_ops(void)
>  	}
>  #endif
>  
> -	if (cap & ctl & (1 << 4)) {
> -		/* Setup irq ops and turn on vSMP  IRQ fastpath handling */
> -		pv_irq_ops.irq_disable = PV_CALLEE_SAVE(vsmp_irq_disable);
> -		pv_irq_ops.irq_enable  = PV_CALLEE_SAVE(vsmp_irq_enable);
> -		pv_irq_ops.save_fl  = PV_CALLEE_SAVE(vsmp_save_fl);
> -		pv_irq_ops.restore_fl  = PV_CALLEE_SAVE(vsmp_restore_fl);
> -		pv_init_ops.patch = vsmp_patch;
> -		ctl &= ~(1 << 4);
> -	}
>  	writel(ctl, address + 4);
>  	ctl = readl(address + 4);
>  	pr_info("vSMP CTL: control set to:0x%08x\n", ctl);
> 

      reply	other threads:[~2017-08-10 15:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-10 12:52 [PATCH 0/3] x86: paravirt related cleanup Juergen Gross
2017-08-10 12:52 ` [PATCH 1/3] paravirt,xen: remove xen_patch() Juergen Gross
2017-08-10 16:24   ` Peter Zijlstra
2017-08-10 16:29     ` Peter Zijlstra
2017-08-10 17:30       ` Juergen Gross
2017-08-10 16:29   ` Josh Poimboeuf
2017-08-10 12:52 ` [PATCH 2/3] x86/lguest: remove lguest support Juergen Gross
2017-08-10 12:52 ` [PATCH 3/3] x86/vsmp: remove vsmp paravirt support Juergen Gross
2017-08-10 15:28   ` Shai Fultheim (Shai@ScaleMP.com)
2017-08-10 15:30     ` Juergen Gross [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=39911c9d-3381-db06-9e92-2e29c62ab742@suse.com \
    --to=jgross@suse.com \
    --cc=Shai@ScaleMP.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=hpa@zytor.com \
    --cc=lguest@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --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).