[lkml]   [2018]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectSome linux kernel with KAISER/KPTI patch can't work under qemu + haxm.
It seems for some reason, some linux kernel with KAISER/KPTI patch
can't work with qemu + haxm.
The mainline kernel from Linus is fine. But the patch to 4.4/4.10 doesn't work.

I am not familiar with HAXM and KPTI either. so not sure if this is a
qemu bug or KPTI bug or haxm bug.

The same kernel works fine under qemu + kvm.

This is the way to reproduce it:

1. Download qemu for windows, follow instructions here:

2. Build a kernel with KAISER/KPTI, I am using kernel here:
Or follow instruction here to build a 4.10 kernel:

3. Build an ext2 image which has a simple init:
dd of=img count=8192 bs=4096 if=/dev/zero
mke2fs img
gcc --static -o init init.c
debugfs -R "write init init" -w img
cat init.c
#include <stdio.h>
#include <time.h>

int main()
while(1) {
printf("This is init %d\n", time(NULL));

4. copy kernel and disk image generated from 3 to windows and run it:
qemu-system-x86_64.exe -kernel bzImage -hda img -append "init=/init
root=/dev/sda" -serial stdio -accel hax

You will see kernel panic or "vpu shutdown reqeust" to qemu.

 \ /
  Last update: 2018-01-04 23:14    [W:0.059 / U:2.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site