From: Stefano Stabellini Date: Tue, 23 Jan 2018 00:14:45 +0000 (-0800) Subject: Work-around Xen crash at boot time in QEMU without VMX emulation X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dd0fa7d786f7061ffeada30578ec2d29500c9453;p=people%2Fsstabellini%2Fmojo.git%2F.git Work-around Xen crash at boot time in QEMU without VMX emulation and disable VMX emulation and KVM by default in the runtime scripts. Signed-off-by: Stefano Stabellini --- diff --git a/alpine-dom0/xen-builder/Dockerfile b/alpine-dom0/xen-builder/Dockerfile index 30ad272..c1b8920 100644 --- a/alpine-dom0/xen-builder/Dockerfile +++ b/alpine-dom0/xen-builder/Dockerfile @@ -1,6 +1,7 @@ FROM alpine:3.6 as xen-builder COPY xen-patch /root/ +COPY xen-patch2 /root/ ENV SOURCE_DIR=/root ENV OUT_DIR=/out @@ -21,6 +22,7 @@ curl -fsSLO https://downloads.xenproject.org/release/xen/$XEN_VERSION/xen-$XEN_V tar xvzf xen-$XEN_VERSION.tar.gz && \ cd xen-$XEN_VERSION && \ patch -p1 < $SOURCE_DIR/xen-patch && \ +patch -p1 < $SOURCE_DIR/xen-patch2 && \ ./configure --prefix=/usr --with-system-qemu=/usr/lib/xen/bin/qemu-system-i386 --disable-stubdom --disable-qemu-traditional --disable-rombios && \ make -j "$(getconf _NPROCESSORS_ONLN)" && \ mkdir -p DESTDIR=$OUT_DIR && \ diff --git a/alpine-dom0/xen-builder/xen-patch2 b/alpine-dom0/xen-builder/xen-patch2 new file mode 100644 index 0000000..899b610 --- /dev/null +++ b/alpine-dom0/xen-builder/xen-patch2 @@ -0,0 +1,12 @@ +diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c +index 6fffe05..931b2ad 100644 +--- a/xen/arch/x86/extable.c ++++ b/xen/arch/x86/extable.c +@@ -168,7 +168,6 @@ static int __init stub_selftest(void) + _ASM_EXTABLE(.Lret%=, .Lfix%=) + : [exn] "+m" (res) + : [stb] "rm" (addr), "a" (tests[i].rax)); +- ASSERT(res == tests[i].res.raw); + } + + return 0; diff --git a/run-x86_64.sh b/run-x86_64.sh index fd44303..79cb659 100755 --- a/run-x86_64.sh +++ b/run-x86_64.sh @@ -1 +1 @@ -docker run --privileged -v `pwd`/out:/out -it mojoos/qemu-system-x86_64:qemu-system-x86_64 /root/run.sh /out/image +docker run -v `pwd`/out:/out -it mojoos/qemu-system-x86_64:qemu-system-x86_64 /root/run.sh /out/image diff --git a/runtime/qemu-system-x86_64/run.sh b/runtime/qemu-system-x86_64/run.sh index e8d8508..e9cfdaa 100755 --- a/runtime/qemu-system-x86_64/run.sh +++ b/runtime/qemu-system-x86_64/run.sh @@ -2,7 +2,7 @@ DISK1=$1 -qemu-system-x86_64 -m 4G -smp 2 --enable-kvm -cpu core2duo,+vmx \ +qemu-system-x86_64 -m 4G -smp 2 \ -nographic -serial stdio -monitor none \ --bios /usr/share/ovmf/bios.bin \ -netdev user,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,bus=pci.0,addr=0x3 \