early console in setup code
Probing EDD (edd=off to disable)... ok
early console in extract_kernel
input_data: 0x000000000260e3b1
input_len: 0x00000000008e8662
output: 0x0000000001000000
output_len: 0x0000000001ec79a8
kernel_total_size: 0x0000000001c83000
trampoline_32bit: 0x000000000009d000

Decompressing Linux... Parsing ELF... done.
Booting the kernel.
[    0.000000] Linux version 4.19.0-rc2-00018-g7ffb318 (kbuild@lkp-ib03) (gcc version 7.3.0 (Debian 7.3.0-1)) #1 SMP Tue Sep 18 04:49:08 CST 2018
[    0.000000] Command line: ip=::::vm-lkp-nex04-8G-15::dhcp root=/dev/ram0 user=lkp job=/lkp/jobs/scheduled/vm-lkp-nex04-8G-15/boot-1-debian-x86_64-2018-04-03.cgz-7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac-20180918-33281-pjeexf-3.yaml ARCH=x86_64 kconfig=x86_64-lkp branch=linux-devel/devel-catchup-201809172301 commit=7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac BOOT_IMAGE=/pkg/linux/x86_64-lkp/gcc-7/7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac/vmlinuz-4.19.0-rc2-00018-g7ffb318 max_uptime=600 RESULT_ROOT=/result/boot/1/vm-lkp-nex04-8G/debian-x86_64-2018-04-03.cgz/x86_64-lkp/gcc-7/7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac/3 LKP_SERVER=inn debug apic=debug sysrq_always_enabled rcupdate.rcu_cpu_stall_timeout=100 net.ifnames=0 printk.devkmsg=on panic=-1 softlockup_panic=1 nmi_watchdog=panic oops=panic load_ramdisk=2 prompt_ramdisk=0 drbd.minor_count=8 systemd.log_level=err ignore_loglevel console=tty0 earlyprintk=ttyS0,115200 console=ttyS0,115200 vga=normal rw rcuperf.shutdown=0
[    0.000000] x86/fpu: x87 FPU will use FXSAVE
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bffddfff] usable
[    0.000000] BIOS-e820: [mem 0x00000000bffde000-0x00000000bfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000023fffffff] usable
[    0.000000] debug: ignoring loglevel setting.
[    0.000000] bootconsole [earlyser0] enabled
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.8 present.
[    0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[    0.000000] Hypervisor detected: KVM
[    0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[    0.000004] kvm-clock: cpu 0, msr 2ae2001, primary cpu clock
[    0.000004] kvm-clock: using sched offset of 5405067245 cycles
[    0.009828] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.037528] tsc: Detected 2260.998 MHz processor
[    0.057832] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.069238] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.800215] AGP: No AGP bridge found
PANIC: early exception 0xe3 IP 10:ffffffff8294623f error 0 cr2 0x0
[    0.815262] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.0-rc2-00018-g7ffb318 #1
[    0.826860] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014
[    0.839894] RIP: 0010:early_is_amd_nb+0x30/0x4b
[    0.846986] Code: 15 07 3e c8 ff 0f b7 cf 48 c7 c0 c0 6a 01 82 80 fa 02 74 13 80 fa 09 48 c7 c0 20 69 01 82 ba 00 00 00 00 48 0f 45 c2 c1 ef 10 <8b> 10 85 d2 74 0f 39 ca 75 05 39 78 04 74 09 48 83 c0 20 eb eb 31
[    0.876321] RSP: 0000:ffffffff82403e38 EFLAGS: 00010017 ORIG_RAX: 0000000000000000
[    0.888131] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000ffff
[    0.899187] RDX: 0000000000000000 RSI: 000000000000c000 RDI: 000000000000ffff
[    0.910233] RBP: 0000000000000018 R08: 0000000000000002 R09: 0000000000000000
[    0.921388] R10: ffffffff829ecc40 R11: ffffffff82aeed87 R12: 0000000000000000
[    0.932476] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[    0.943658] FS:  0000000000000000(0000) GS:ffffffff82909000(0000) knlGS:0000000000000000
[    0.956271] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.965216] CR2: 0000000000000000 CR3: 00000000029a2000 CR4: 00000000000006a0
[    0.976358] Call Trace:
[    0.980238]  ? early_gart_iommu_check+0xef/0x2c5
[    0.987493]  ? setup_arch+0x4fa/0xc67
[    0.993231]  ? printk+0x52/0x6e
[    0.998157]  ? start_kernel+0x6e/0x4dc
[    1.004044]  ? load_ucode_bsp+0x42/0x12e
[    1.010145]  ? secondary_startup_64+0xa4/0xb0
BUG: kernel hang in boot stage

Elapsed time: 700

#!/bin/bash

# To reproduce,
# 1) save job-script and this script (both are attached in 0day report email)
# 2) run this script with your compiled kernel and optional env $INSTALL_MOD_PATH

kernel=$1

initrds=(
	/osimage/debian/debian-x86_64-2018-04-03.cgz
	/lkp/lkp/lkp-x86_64.cgz
	/osimage/deps/debian-x86_64-2018-04-03.cgz/run-ipconfig_2018-04-03.cgz
	/osimage/deps/debian-x86_64-2018-04-03.cgz/lkp_2018-04-03.cgz
	/osimage/deps/debian-x86_64-2018-04-03.cgz/rsync-rootfs_2018-04-03.cgz
)

HTTP_PREFIX=https://download.01.org/0day-ci/lkp-qemu
wget --timestamping "${initrds[@]/#/$HTTP_PREFIX}"

{
	cat "${initrds[@]//*\//}"
	[[ $INSTALL_MOD_PATH ]] && (
		cd "$INSTALL_MOD_PATH"
		find lib | cpio -o -H newc --quiet | gzip
	)
	echo  job-script | cpio -o -H newc --quiet | gzip
} > initrd.img

qemu-img create -f qcow2 disk-vm-lkp-nex04-8G-15-0 256G

kvm=(
	qemu-system-x86_64
	-enable-kvm
	-cpu kvm64,+ssse3
	-kernel $kernel
	-initrd initrd.img
	-m 8192
	-smp 2
	-device e1000,netdev=net0
	-netdev user,id=net0,hostfwd=tcp::23264-:22
	-boot order=nc
	-no-reboot
	-watchdog i6300esb
	-watchdog-action debug
	-rtc base=localtime
	-drive file=disk-vm-lkp-nex04-8G-15-0,media=disk,if=virtio
	-serial stdio
	-display none
	-monitor null
)

append=(
	ip=::::vm-lkp-nex04-8G-15::dhcp
	root=/dev/ram0
	user=lkp
	job=/job-script
	ARCH=x86_64
	kconfig=x86_64-lkp
	branch=linux-devel/devel-catchup-201809172301
	commit=7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac
	BOOT_IMAGE=/pkg/linux/x86_64-lkp/gcc-7/7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac/vmlinuz-4.19.0-rc2-00018-g7ffb318
	max_uptime=600
	RESULT_ROOT=/result/boot/1/vm-lkp-nex04-8G/debian-x86_64-2018-04-03.cgz/x86_64-lkp/gcc-7/7ffb31888cbaab36ec464fc43ecf5ddecdbd55ac/3
	result_service=tmpfs
	debug
	apic=debug
	sysrq_always_enabled
	rcupdate.rcu_cpu_stall_timeout=100
	net.ifnames=0
	printk.devkmsg=on
	panic=-1
	softlockup_panic=1
	nmi_watchdog=panic
	oops=panic
	load_ramdisk=2
	prompt_ramdisk=0
	drbd.minor_count=8
	systemd.log_level=err
	ignore_loglevel
	console=tty0
	earlyprintk=ttyS0,115200
	console=ttyS0,115200
	vga=normal
	rw
	rcuperf.shutdown=0
)

"${kvm[@]}" -append "${append[*]}"
