Re: efi boot failures due to PTI with 32 bit builds and Intel CPUs

From: Joerg Roedel
Date: Thu Aug 30 2018 - 03:19:56 EST

Hey Guenter,

On Wed, Aug 29, 2018 at 01:16:59PM -0700, Guenter Roeck wrote:
> I see boot failures on mainline when trying to boot x86 images with an efi
> bios on Intel CPUs in qemu. Behavior is quite unusual: qemu dies silently
> after the kernel displays "Run /sbin/init as init process". With debugging
> enabled, qemu reports a CR3 update followed by a triple fault.
> Here is the end of the log file:
> ----------------
> IN:
> 0xc75f1d1a: 66 90 nop
> 0xc75f1d1c: 0f 20 d8 movl %cr3, %eax
> 0xc75f1d1f: 0d 00 10 00 00 orl $0x1000, %eax
> 0xc75f1d24: 0f 22 d8 movl %eax, %cr3
> CR3 update: CR3=0e39b000

Thanks for the bug report, from a quick glance it looks like the kernel
is switching to an empty page-table. But I need to debug that further.

> qemu-system-i386 -kernel arch/x86/boot/bzImage -M q35 -cpu core2duo \
> -no-reboot -m 256 \
> -bios OVMF-pure-efi-32.fd \
> -usb -device usb-storage,drive=d0 \
> -drive file=rootfs.ext2,if=none,id=d0,format=raw \
> --append 'root=/dev/sda rw rootwait mem=256M console=ttyS0 console=tty noreboot' \
> -nographic

Can you please provide the exact OVMF-pure-efi-32.fd image and the
.config of the kernel?

Thanks a lot,