All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
To: <linux-kernel@vger.kernel.org>
Cc: <x86@kernel.org>, <kexec@lists.infradead.org>,
	<tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
	<ebiederm@xmission.com>, <kernel@kyup.com>, <bhe@redhat.com>,
	<xpang@redhat.com>, <joro@8bytes.org>,
	Wei Jiangang <weijg.fnst@cn.fujitsu.com>,
	Cao jin <caoj.fnst@cn.fujitsu.com>
Subject: [PATCH v2 1/3] x86/apic: Remove "focus disabled" for 64bit case
Date: Tue, 26 Jul 2016 10:59:53 +0800	[thread overview]
Message-ID: <1469501995-2991-2-git-send-email-weijg.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1469501995-2991-1-git-send-email-weijg.fnst@cn.fujitsu.com>

Disable processor focus for 64bit causes a crash,
Call Trace as following:

  [<ffffffff8133499f>] dump_stack+0x63/0x84
  [<ffffffff810800f1>] __warn+0xd1/0xf0
  [<ffffffff8108016f>] warn_slowpath_fmt+0x5f/0x80
  [<ffffffff81068ab2>] ex_handler_wrmsr_unsafe+0x62/0x70
  [<ffffffff81068b29>] fixup_exception+0x39/0x50
  [<ffffffff8102e030>] do_general_protection+0x80/0x160
  [<ffffffff816a89a8>] general_protection+0x28/0x30
  [<ffffffff81062554>] ? native_write_msr+0x4/0x30
  [<ffffffff81059c52>] ? native_apic_msr_write+0x32/0x40
  [<ffffffff81d92964>] init_bsp_APIC+0x5f/0x118
  [<ffffffff81d87489>] init_ISA_irqs+0x19/0x4c
  [<ffffffff81d87512>] native_init_IRQ+0xd/0x377
  [<ffffffff81d874fe>] init_IRQ+0x42/0x49
  [<ffffffff81d7afc6>] start_kernel+0x2ce/0x4c8
  [<ffffffff81d7aae6>] ? set_init_arg+0x55/0x55
  [<ffffffff81d7a120>] ? early_idt_handler_array+0x120/0x120
  [<ffffffff81d7a5db>] x86_64_start_reservations+0x2f/0x31
  [<ffffffff81d7a729>] x86_64_start_kernel+0x14c/0x16f

Keep a consistent implementation with the setup_local_APIC(),
always use processor focus for 64bit.
more details refer to commit 89c38c2867eb ("x86: apic - unify
setup_local_APIC")

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 arch/x86/kernel/apic/apic.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 60078a67d7e3..0273b652c689 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1154,9 +1154,7 @@ void __init init_bsp_APIC(void)
 	if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
 	    (boot_cpu_data.x86 == 15))
 		value &= ~APIC_SPIV_FOCUS_DISABLED;
-	else
 #endif
-		value |= APIC_SPIV_FOCUS_DISABLED;
 	value |= SPURIOUS_APIC_VECTOR;
 	apic_write(APIC_SPIV, value);
 
-- 
1.9.3

WARNING: multiple messages have this Message-ID (diff)
From: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
To: linux-kernel@vger.kernel.org
Cc: bhe@redhat.com, xpang@redhat.com, joro@8bytes.org,
	x86@kernel.org, kexec@lists.infradead.org,
	Cao jin <caoj.fnst@cn.fujitsu.com>,
	mingo@redhat.com, kernel@kyup.com, ebiederm@xmission.com,
	hpa@zytor.com, tglx@linutronix.de,
	Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Subject: [PATCH v2 1/3] x86/apic: Remove "focus disabled" for 64bit case
Date: Tue, 26 Jul 2016 10:59:53 +0800	[thread overview]
Message-ID: <1469501995-2991-2-git-send-email-weijg.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1469501995-2991-1-git-send-email-weijg.fnst@cn.fujitsu.com>

Disable processor focus for 64bit causes a crash,
Call Trace as following:

  [<ffffffff8133499f>] dump_stack+0x63/0x84
  [<ffffffff810800f1>] __warn+0xd1/0xf0
  [<ffffffff8108016f>] warn_slowpath_fmt+0x5f/0x80
  [<ffffffff81068ab2>] ex_handler_wrmsr_unsafe+0x62/0x70
  [<ffffffff81068b29>] fixup_exception+0x39/0x50
  [<ffffffff8102e030>] do_general_protection+0x80/0x160
  [<ffffffff816a89a8>] general_protection+0x28/0x30
  [<ffffffff81062554>] ? native_write_msr+0x4/0x30
  [<ffffffff81059c52>] ? native_apic_msr_write+0x32/0x40
  [<ffffffff81d92964>] init_bsp_APIC+0x5f/0x118
  [<ffffffff81d87489>] init_ISA_irqs+0x19/0x4c
  [<ffffffff81d87512>] native_init_IRQ+0xd/0x377
  [<ffffffff81d874fe>] init_IRQ+0x42/0x49
  [<ffffffff81d7afc6>] start_kernel+0x2ce/0x4c8
  [<ffffffff81d7aae6>] ? set_init_arg+0x55/0x55
  [<ffffffff81d7a120>] ? early_idt_handler_array+0x120/0x120
  [<ffffffff81d7a5db>] x86_64_start_reservations+0x2f/0x31
  [<ffffffff81d7a729>] x86_64_start_kernel+0x14c/0x16f

Keep a consistent implementation with the setup_local_APIC(),
always use processor focus for 64bit.
more details refer to commit 89c38c2867eb ("x86: apic - unify
setup_local_APIC")

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 arch/x86/kernel/apic/apic.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 60078a67d7e3..0273b652c689 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1154,9 +1154,7 @@ void __init init_bsp_APIC(void)
 	if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
 	    (boot_cpu_data.x86 == 15))
 		value &= ~APIC_SPIV_FOCUS_DISABLED;
-	else
 #endif
-		value |= APIC_SPIV_FOCUS_DISABLED;
 	value |= SPURIOUS_APIC_VECTOR;
 	apic_write(APIC_SPIV, value);
 
-- 
1.9.3




_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2016-07-26  3:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  2:59 [PATCH v2 0/3] Fix dump-capture kernel hangs with notsc Wei Jiangang
2016-07-26  2:59 ` Wei Jiangang
2016-07-26  2:59 ` Wei Jiangang [this message]
2016-07-26  2:59   ` [PATCH v2 1/3] x86/apic: Remove "focus disabled" for 64bit case Wei Jiangang
2016-07-26  2:59 ` [PATCH v2 2/3] x86/apic: Update comment about disabling processor focus Wei Jiangang
2016-07-26  2:59   ` Wei Jiangang
2016-07-26  2:59 ` [PATCH v2 3/3] x86/apic: Improved the setting of interrupt mode for bsp Wei Jiangang
2016-07-26  2:59   ` Wei Jiangang
2016-07-26  3:53   ` Eric W. Biederman
2016-07-26  3:53     ` Eric W. Biederman
2016-07-26  8:05     ` Wei, Jiangang
2016-07-26  8:05       ` Wei, Jiangang
2016-08-02 14:26       ` Eric W. Biederman
2016-08-02 14:26         ` Eric W. Biederman
2016-08-04 10:17         ` Wei, Jiangang
2016-08-04 10:17           ` Wei, Jiangang
2016-08-04 13:52           ` Eric W. Biederman
2016-08-04 13:52             ` Eric W. Biederman
2016-08-01  6:44 ` [PATCH v2 0/3] Fix dump-capture kernel hangs with notsc Wei, Jiangang
2016-08-01  6:44   ` Wei, Jiangang
2016-08-01 17:09   ` Eric W. Biederman
2016-08-01 17:09     ` Eric W. Biederman
2016-08-02  7:45     ` Wei, Jiangang
2016-08-02  7:45       ` Wei, Jiangang
2016-08-02 14:21       ` bhe
2016-08-02 14:21         ` bhe

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=1469501995-2991-2-git-send-email-weijg.fnst@cn.fujitsu.com \
    --to=weijg.fnst@cn.fujitsu.com \
    --cc=bhe@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=joro@8bytes.org \
    --cc=kernel@kyup.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xpang@redhat.com \
    /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.