LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: [REGRESSION][4.0-rc1] My i386 fails to do CPU hotplug
Date: Fri, 27 Feb 2015 12:52:08 -0500
Message-ID: <20150227125208.71c36402@gandalf.local.home> (raw)


Running my test suite on 4.0-rc1, my i386 run of my tests crashed with
the following:

Initializing CPU#1
invalid opcode: 0000 [#1] SMP
Modules linked in: ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ipv6 ppdev parport_pc microcode r8169 parport
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.0.0-rc1-test #2
Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014
task: f2ee8000 ti: f2ee6000 task.ti: f2ee6000
EIP: 0060:[<c040ab1f>] EFLAGS: 00210046 CPU: 1
EIP is at xstate_enable+0x2b/0x30
EAX: 00000007 EBX: 00000001 ECX: 00000000 EDX: 00000000
ESI: f2ee8000 EDI: c144c930 EBP: f2ee7f58 ESP: f2ee7f58
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
CR0: 80050033 CR2: 00000000 CR3: 01139000 CR4: 000000b0
Stack:
 f2ee7f60 c040b47b f2ee7f6c c040a4fd f352ef00 f2ee7f94 c040f40d c0fd8c4c
 00000001 320f4000 f2ee7fec 00000000 02100800 00000000 00000000 f2ee7fb4
 c0425f1a 00000000 00000000 00000000 00000000 00000001 00200002 00000000
Call Trace:
 [<c040b47b>] xsave_init+0x25/0x27
 [<c040a4fd>] fpu_init+0xb3/0xbb
 [<c040f40d>] cpu_init+0x20e/0x225
 [<c0425f1a>] start_secondary+0xe/0x162
Code: 64 8b 15 88 d0 43 c1 89 d0 0d 00 00 04 00 55 39 d0 89 e5 74 09 64 a3 88 d0 43 c1 0f 22 e0 8b 15 3c c9 44 c1 31 c9 a1 38 c9 44 c1 <0f> 01 d1 5d c3 55 89 e5 57 56 53 3e 8d 74 26 00 83 cb ff 89 d7
EIP: [<c040ab1f>] xstate_enable+0x2b/0x30 SS:ESP 0068:f2ee7f58
---[ end trace 9afa73ad583edc40 ]---
Kernel panic - not syncing: Attempted to kill the idle task!


Interesting that the fault happened at "<0f> 01 d1" and that matches:

static inline void xsetbv(u32 index, u64 value)
{
	u32 eax = value;
	u32 edx = value >> 32;

	asm volatile(".byte 0x0f,0x01,0xd1" /* xsetbv */
		     : : "a" (eax), "d" (edx), "c" (index));
}


Doing a bisect, it ended on this commit:

commit 1e02ce4cccdcb9688386e5b8d2c9fa4660b45389
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Fri Oct 24 15:58:08 2014 -0700

    x86: Store a per-cpu shadow copy of CR4


Reverting it fixed the regression, and my box can happily hotplug again!

-- Steve

             reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 17:52 Steven Rostedt [this message]
2015-02-27 18:59 ` Linus Torvalds
2015-02-27 19:50   ` [PATCH] x86: Init per-cpu shadow copy of CR4 for i386 too Steven Rostedt
2015-02-27 19:54     ` Andy Lutomirski
2015-02-27 19:59       ` Steven Rostedt
2015-02-28  7:07     ` [tip:x86/urgent] x86: Init per-cpu shadow copy of CR4 on 32-bit CPUs too tip-bot for Steven Rostedt
2015-02-27 19:53   ` [PATCH] x86_32: Initialize the cr4 shadow on cpu init Andy Lutomirski
2015-02-27 20:19     ` Steven Rostedt
2015-02-27 20:21       ` 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=20150227125208.71c36402@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git