Bug 195961

Summary: Linux 4.12 REGRESSION silently panics on early WARN_ONCE
Product: Platform Specific/Hardware Reporter: Frank Mehnert (frank.mehnert)
Component: x86-64Assignee: platform_x86_64 (platform_x86_64)
Status: RESOLVED CODE_FIX    
Severity: normal CC: jwrdegoede
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 4.12-rc1/-rc2/-rc3 Subsystem:
Regression: No Bisected commit-id:

Description Frank Mehnert 2017-06-01 13:56:03 UTC
When running a Linux 4.12 guest inside VirtualBox on an Intel Skylake host, the kernel warns about

  XSTATE_WARN_ON(paranoid_xstate_size != fpu_kernel_xstate_size);

This warning is triggered because the kernel uses the CPUID bits to determine various XSTATE-related features and determines the expected XSTATE size.

  fpu_kernel_xstate_size = 0x440
  paranoid_xstate_size   = 0x240

Please note that this bug report is NOT about this kernel warning:

Linux 4.11 prints a kernel warning and continues to boot.
Linux 4.12 just halts without showing any information. Guest stack:

VBoxDbg> k
RBP              Ret SS:RBP            Ret RIP          CS:RIP / Symbol [line]
ffffffff81e03cc8 0000:ffffffff81e03ce8 ffffffff8237c209 vmlinux!native_halt+5
ffffffff81e03ce8 0000:ffffffff81e03e00 ffffffff8235c167 vmlinux!early_fixup_exception+74
ffffffff81e03e00 0000:ffffffff81e03e20 ffffffff8236c3e9 vmlinux!early_idt_handler_common+47
ffffffff81e03e20 0000:ffffffff81e03e30 ffffffff8236d58b vmlinux!fpu__init_system+1e6
ffffffff81e03e30 0000:ffffffff81e03ea0 ffffffff82368821 vmlinux!early_cpu_init+102
ffffffff81e03ea0 0000:ffffffff81e03ee0 ffffffff8235cd01 vmlinux!setup_arch+bf
ffffffff81e03ee0 0000:ffffffff81e03ef0 ffffffff8235c2d4 vmlinux!start_kernel+c1
ffffffff81e03ef0 0000:ffffffff81e03f48 ffffffff8235c419 vmlinux!x86_64_start_reservations+29
ffffffff81e03f48 0000:0000000000000000 ffffffff810001bf vmlinux!x86_64_start_kernel+143
0000000000000000 0000:0000000000000000 0000000000000000 vmlinux!verify_cpu

Something is broken with the "early UD" handler.
Comment 1 Hans de Goede 2017-06-01 14:45:31 UTC
Adding REGRESSION to Summary to make clear that this is a regression.

This causes 4.12 to not boot as guest inside Virtual Box when running on any Sky Lake (and probably also Kaby Lake) host.

As Frank already mentioned this bug is not about the WARN_ON triggering / the oops, that happens with 4.11 too and is something for a separate bug report. This bug is about the regression from 4.11 -> 4.12-rc# where instead of getting an oops the kernel no longer boots at all.
Comment 2 Frank Mehnert 2017-06-21 08:32:15 UTC
Fixed in 4.12-rc6.