qemu freeze after jailhouse enable configs/qemu-vm.cell

84 views
Skip to first unread message

Georg Schiesser

unread,
Apr 14, 2016, 9:48:35 PM4/14/16
to jailho...@googlegroups.com
Dear jailhouse-dev mailing list,

I'm trying to get the qemu example from the README working, but as soon as I
enable qemu-vm.cell, qemu freezes, with top reporting 400% cpu load.

Both host and guest are Debian jessie. On the host I'm using the Debian stretch
4.2.0-1-amd64 kernel, on the guest I tried both 3.16.0-4-amd64 and the stretch
one. Also, I tried using intel_iommu=off on the host system, without success.
Also, qemu -nographic didnt help. I think I also tried qemu-system-i386.

I dont really know where to start debugging, so I really would appreciate your
help. Please let me know what additional information I shall report.

Thanks,
georg

--- snip ---

HOST information:

georg@tunix:~$ uname -a
Linux tunix 4.2.0-1-amd64 #1 SMP Debian 4.2.1-2 (2015-09-27) x86_64 GNU/Linux
georg@tunix:~$
georg@tunix:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.2.0-1-amd64 root=UUID=e3973c37-203e-40ea-aa51-a069917227cd ro initrd=/install/initrd.gz quiet
georg@tunix:~$
georg@tunix:~$ head -n 27 /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 63
model name : Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
stepping : 2
microcode : 0x29
cpu MHz : 1225.769
cache size : 15360 KB
physical id : 0
siblings : 12
core id : 0
cpu cores : 6
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 15
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm ida arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm xsaveopt cqm_llc cqm_occup_llc
bugs :
bogomips : 6596.18
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

georg@tunix:~$
georg@tunix:~$ qemu-system-x86_64 -version
QEMU emulator version 2.1.2 (Debian 1:2.1+dfsg-12+deb8u5a), Copyright (c) 2003-2008 Fabrice Bellard
georg@tunix:~$
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ ## make sure nested=1
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ sudo rmmod kvm_intel
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ sudo modprobe kvm_intel nested=1
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ ## start qemu container
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ ./qemu-intel.sh
+ QEMU_AUDIO_DRV=none
+ qemu-system-x86_64 -machine q35 -m 1G -enable-kvm -smp 4 -cpu kvm64,-kvm_pv_eoi,-kvm_steal_time,-kvm_asyncpf,-kvmclock,+vmx,+x2apic -drive file=disk,id=disk,if=none -device ide-hd,drive=disk -serial stdio -serial vc -device intel-hda,addr=1b.0 -device hda-duplex -snapshot -net nic -net user,hostfwd=tcp:127.0.0.1:8022-:22 -kernel boot/vmlinuz-3.16.0-4-amd64 -initrd boot/initrd.img-3.16.0-4-amd64 -append 'root=/dev/sda1 ro memmap=66M$0x3b000000'


georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ ## ssh into the guest
georg@tunix:~/projects.osadl.org/JHS/src/investigation/qemu-example$ ./ssh.sh
user@debian:~/jailhouse$ git remote update
user@debian:~/jailhouse$ git pull . origin/master
user@debian:~/jailhouse$ make
user@debian:~/jailhouse$ sudo make install
user@debian:~/jailhouse$ sudo insmod driver/jailhouse.ko
user@debian:~/jailhouse$ sudo jailhouse enable configs/qemu-vm.cell

## all above working fine, but jailhouse enable never returns, but freezes the entire guest system.
## I do get some output on the serial console though:


Initializing Jailhouse hypervisor v0.5 (238-g33fbbbd) on CPU 3
Code location: 0xfffffffff0000030
Using x2APIC
Page pool usage after early setup: mem 38/1498, remap 64/131072
Initializing processors:
CPU 3... (APIC ID 3) OK
CPU 0... (APIC ID 0) OK
CPU 1... (APIC ID 1) OK
CPU 2... (APIC ID 2) OK
WARNING: No VT-d support found!
Adding PCI device 00:01.0 to cell "QEMU-VM"
Adding PCI device 00:02.0 to cell "QEMU-VM"
Adding PCI device 00:1b.0 to cell "QEMU-VM"
Adding PCI device 00:1f.0 to cell "QEMU-VM"
Adding PCI device 00:1f.2 to cell "QEMU-VM"
Adding PCI device 00:1f.3 to cell "QEMU-VM"
Adding PCI device 00:1f.7 to cell "QEMU-VM"
Adding virtual PCI device 00:0f.0 to cell "QEMU-VM"
Page pool usage after late setup: mem 177/1498, remap 65606/131072
Activating hypervisor


## HOST dmesg says:
[1653797.717894] kvm: zapping shadow pages for mmio generation wraparound
but I dont think that is contributing to the problem.

## HOST top
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3093 georg 20 0 2479176 313744 20412 S 400.0 1.0 10:15.05 qemu-system-x86

user@debian:~/jailhouse$ lspci
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller
00:01.0 VGA compatible controller: Cirrus Logic GD 5446
00:02.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 01)
00:1f.0 ISA bridge: Intel Corporation 82801IB (ICH9) LPC Interface Controller (rev 02)
00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 02)
user@debian:~/jailhouse$

## On the guest display, the last kernel messages I see are:
jailhouse: firmware: direct-loading firmware jailhouse-intel.bin
pci 0000:00:0f.0: BAR 0: assigned [mem 0xc00000000-0xc000000ff 64bit]
pci 0000:00:0f.0: BAR 4: assigned [mem 0xc00000100-0xc0000011f 64bit]
The Jailhouse is opening.


Thanks,
georg

charles king

unread,
Apr 14, 2016, 10:16:22 PM4/14/16
to Georg Schiesser, jailho...@googlegroups.com
hi,
    I remember the documentation/articles/LJ-article-04-2015.txt said, line 192
sudo make firmware_install sudo insmod jailhouse.ko
could you take a try, "sudo make firmware_install" first?
Then sudo insmod jailhouse.ko.

best regards
from Xuguo Wang


--
You received this message because you are subscribed to the Google Groups "Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Georg Schiesser

unread,
Apr 15, 2016, 9:14:59 AM4/15/16
to charles king, jailho...@googlegroups.com
On Fri, Apr 15, 2016 at 10:16:21AM +0800, charles king wrote:
> hi,
> I remember the documentation/articles/LJ-article-04-2015.txt said, line
> 192
> sudo make firmware_install sudo insmod jailhouse.ko
> could you take a try, "sudo make firmware_install" first?
> Then sudo insmod jailhouse.ko.

Thank you very much for your feedback, but unfortunately it didnt make
any difference. At the end there is a screenlog of testing with
firmware_install, but IMHO I had this already covered by "make install",
because firmware_install is a dependency of the install target.

Maybe there is a problem with my hardware or BIOS? I'll try to run it on
a different intel system. Debian jessie should be working fine, right?

Please let me know if you have any ideas,

Thanks so much,
georg
user@debian:~$ cd jailhouse/
user@debian:~/jailhouse$ git remote update
Fetching origin
remote: Counting objects: 674, done.
remote: Total 674 (delta 306), reused 306 (delta 306), pack-reused 368
Receiving objects: 100% (674/674), 165.97 KiB | 0 bytes/s, done.
Resolving deltas: 100% (428/428), completed with 83 local objects.
From https://github.com/siemens/jailhouse
5298ecc..33fbbbd master -> origin/master
5298ecc..33fbbbd coverity_scan -> origin/coverity_scan
+ 387f23c...d15df6b next -> origin/next (forced update)
+ eaab4ce...65ee2af wip/arm64 -> origin/wip/arm64 (forced update)
user@debian:~/jailhouse$ git pull . origin/master
From .
* remote-tracking branch origin/master -> FETCH_HEAD
Updating 5298ecc..33fbbbd
Fast-forward
configs/f2a88xm-hd3.c | 11 ++-
configs/h87i.c | 12 ++-
configs/qemu-vm.c | 7 +-
hypervisor/arch/x86/amd_iommu.c | 767 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
hypervisor/arch/x86/include/asm/amd_iommu.h | 22 +++--
hypervisor/arch/x86/include/asm/cell.h | 5 +-
hypervisor/arch/x86/include/asm/iommu.h | 3 +
hypervisor/arch/x86/include/asm/svm.h | 2 -
hypervisor/arch/x86/include/asm/vtd.h | 166 -----------------------------------
hypervisor/arch/x86/iommu.c | 22 ++++-
hypervisor/arch/x86/paging.c | 51 +++++------
hypervisor/arch/x86/svm.c | 116 ++++++++++++++++--------
hypervisor/arch/x86/vmx.c | 10 +--
hypervisor/arch/x86/vtd.c | 220 +++++++++++++++++++++++++++++++++++++---------
hypervisor/include/jailhouse/cell-config.h | 12 ++-
hypervisor/paging.c | 2 +-
hypervisor/pci.c | 3 +
inmates/lib/cmdline.c | 4 +-
tools/jailhouse-config-create | 110 ++++++++++++++++++-----
tools/root-cell-config.c.tmpl | 17 +++-
20 files changed, 1219 insertions(+), 343 deletions(-)
delete mode 100644 hypervisor/arch/x86/include/asm/vtd.h
user@debian:~/jailhouse$ make
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CC /home/user/jailhouse/configs/apic-demo.o
OBJCOPY /home/user/jailhouse/configs/apic-demo.cell
CC /home/user/jailhouse/configs/bananapi-gic-demo.o
OBJCOPY /home/user/jailhouse/configs/bananapi-gic-demo.cell
CC /home/user/jailhouse/configs/bananapi-uart-demo.o
OBJCOPY /home/user/jailhouse/configs/bananapi-uart-demo.cell
CC /home/user/jailhouse/configs/bananapi.o
OBJCOPY /home/user/jailhouse/configs/bananapi.cell
CC /home/user/jailhouse/configs/e1000-demo.o
OBJCOPY /home/user/jailhouse/configs/e1000-demo.cell
CC /home/user/jailhouse/configs/f2a88xm-hd3.o
OBJCOPY /home/user/jailhouse/configs/f2a88xm-hd3.cell
CC /home/user/jailhouse/configs/h87i.o
OBJCOPY /home/user/jailhouse/configs/h87i.cell
CC /home/user/jailhouse/configs/imb-a180.o
OBJCOPY /home/user/jailhouse/configs/imb-a180.cell
CC /home/user/jailhouse/configs/ioapic-demo.o
OBJCOPY /home/user/jailhouse/configs/ioapic-demo.cell
CC /home/user/jailhouse/configs/ivshmem-demo.o
OBJCOPY /home/user/jailhouse/configs/ivshmem-demo.cell
CC /home/user/jailhouse/configs/jetson-tk1-demo.o
OBJCOPY /home/user/jailhouse/configs/jetson-tk1-demo.cell
CC /home/user/jailhouse/configs/jetson-tk1.o
OBJCOPY /home/user/jailhouse/configs/jetson-tk1.cell
CC /home/user/jailhouse/configs/linux-x86-demo.o
OBJCOPY /home/user/jailhouse/configs/linux-x86-demo.cell
CC /home/user/jailhouse/configs/pci-demo.o
OBJCOPY /home/user/jailhouse/configs/pci-demo.cell
CC /home/user/jailhouse/configs/qemu-vm.o
OBJCOPY /home/user/jailhouse/configs/qemu-vm.cell
CC /home/user/jailhouse/configs/smp-demo.o
OBJCOPY /home/user/jailhouse/configs/smp-demo.cell
CC /home/user/jailhouse/configs/tiny-demo.o
OBJCOPY /home/user/jailhouse/configs/tiny-demo.cell
CC /home/user/jailhouse/configs/vexpress-gic-demo.o
OBJCOPY /home/user/jailhouse/configs/vexpress-gic-demo.cell
CC /home/user/jailhouse/configs/vexpress-linux-demo.o
OBJCOPY /home/user/jailhouse/configs/vexpress-linux-demo.cell
CC /home/user/jailhouse/configs/vexpress-uart-demo.o
OBJCOPY /home/user/jailhouse/configs/vexpress-uart-demo.cell
CC /home/user/jailhouse/configs/vexpress.o
OBJCOPY /home/user/jailhouse/configs/vexpress.cell
LDS /home/user/jailhouse/hypervisor/hypervisor.lds
CC /home/user/jailhouse/hypervisor/arch/x86/asm-defines.s
GEN /home/user/jailhouse/hypervisor/include/generated/asm-defines.h
CHK /home/user/jailhouse/hypervisor/include/generated/version.h
UPD /home/user/jailhouse/hypervisor/include/generated/version.h
CC /home/user/jailhouse/hypervisor/setup.o
CC /home/user/jailhouse/hypervisor/printk.o
CC /home/user/jailhouse/hypervisor/paging.o
CC /home/user/jailhouse/hypervisor/control.o
CC /home/user/jailhouse/hypervisor/lib.o
CC /home/user/jailhouse/hypervisor/mmio.o
CHK /home/user/jailhouse/hypervisor/include/generated/config.mk
UPD /home/user/jailhouse/hypervisor/include/generated/config.mk
CC /home/user/jailhouse/hypervisor/arch/x86/apic.o
CC /home/user/jailhouse/hypervisor/arch/x86/dbg-write.o
AS /home/user/jailhouse/hypervisor/arch/x86/entry.o
CC /home/user/jailhouse/hypervisor/arch/x86/setup.o
CC /home/user/jailhouse/hypervisor/arch/x86/control.o
CC /home/user/jailhouse/hypervisor/arch/x86/mmio.o
CC /home/user/jailhouse/hypervisor/arch/x86/iommu.o
CC /home/user/jailhouse/hypervisor/arch/x86/paging.o
CC /home/user/jailhouse/hypervisor/arch/x86/../../pci.o
CC /home/user/jailhouse/hypervisor/arch/x86/pci.o
CC /home/user/jailhouse/hypervisor/arch/x86/ioapic.o
CC /home/user/jailhouse/hypervisor/arch/x86/i8042.o
CC /home/user/jailhouse/hypervisor/arch/x86/vcpu.o
CC /home/user/jailhouse/hypervisor/arch/x86/../../pci_ivshmem.o
CC /home/user/jailhouse/hypervisor/arch/x86/svm.o
CC /home/user/jailhouse/hypervisor/arch/x86/amd_iommu.o
AS /home/user/jailhouse/hypervisor/arch/x86/svm-vmexit.o
CC /home/user/jailhouse/hypervisor/arch/x86/cat-stubs.o
CC /home/user/jailhouse/hypervisor/arch/x86/vmx.o
CC /home/user/jailhouse/hypervisor/arch/x86/vtd.o
AS /home/user/jailhouse/hypervisor/arch/x86/vmx-vmexit.o
CC /home/user/jailhouse/hypervisor/arch/x86/cat.o
LD /home/user/jailhouse/hypervisor/arch/x86/built-in-amd.o
LD /home/user/jailhouse/hypervisor/arch/x86/built-in-intel.o
LD /home/user/jailhouse/hypervisor/hypervisor-amd.o
OBJCOPY /home/user/jailhouse/hypervisor/jailhouse-amd.bin
LD /home/user/jailhouse/hypervisor/hypervisor-intel.o
OBJCOPY /home/user/jailhouse/hypervisor/jailhouse-intel.bin
CC [M] /home/user/jailhouse/driver/cell.o
CC [M] /home/user/jailhouse/driver/main.o
CC [M] /home/user/jailhouse/driver/sysfs.o
CC [M] /home/user/jailhouse/driver/pci.o
LD [M] /home/user/jailhouse/driver/jailhouse.o
CC /home/user/jailhouse/inmates/lib/x86/../cmdline.o
CC /home/user/jailhouse/inmates/lib/x86/../pci.o
CC /home/user/jailhouse/inmates/lib/x86/../string.o
AS /home/user/jailhouse/inmates/lib/x86/header.o
CC /home/user/jailhouse/inmates/lib/x86/hypercall.o
CC /home/user/jailhouse/inmates/lib/x86/int.o
CC /home/user/jailhouse/inmates/lib/x86/ioapic.o
CC /home/user/jailhouse/inmates/lib/x86/mem.o
CC /home/user/jailhouse/inmates/lib/x86/pci.o
CC /home/user/jailhouse/inmates/lib/x86/printk.o
CC /home/user/jailhouse/inmates/lib/x86/smp.o
CC /home/user/jailhouse/inmates/lib/x86/timing.o
AR /home/user/jailhouse/inmates/lib/x86/lib.a
AS /home/user/jailhouse/inmates/lib/x86/header-32.o
CC /home/user/jailhouse/inmates/lib/x86/hypercall-32.o
CC /home/user/jailhouse/inmates/lib/x86/ioapic-32.o
CC /home/user/jailhouse/inmates/lib/x86/printk-32.o
CC /home/user/jailhouse/inmates/lib/x86/smp-32.o
CC /home/user/jailhouse/inmates/lib/x86/../pci-32.o
CC /home/user/jailhouse/inmates/lib/x86/../string-32.o
CC /home/user/jailhouse/inmates/lib/x86/../cmdline-32.o
AR /home/user/jailhouse/inmates/lib/x86/lib32.a
CC /home/user/jailhouse/inmates/demos/x86/tiny-demo.o
LD /home/user/jailhouse/inmates/demos/x86/tiny-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/tiny-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/apic-demo.o
LD /home/user/jailhouse/inmates/demos/x86/apic-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/apic-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/ioapic-demo.o
LD /home/user/jailhouse/inmates/demos/x86/ioapic-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/ioapic-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/32-bit-demo.o
LD /home/user/jailhouse/inmates/demos/x86/32-bit-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/32-bit-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/pci-demo.o
LD /home/user/jailhouse/inmates/demos/x86/pci-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/pci-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/e1000-demo.o
LD /home/user/jailhouse/inmates/demos/x86/e1000-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/e1000-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/ivshmem-demo.o
LD /home/user/jailhouse/inmates/demos/x86/ivshmem-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/ivshmem-demo.bin
CC /home/user/jailhouse/inmates/demos/x86/smp-demo.o
LD /home/user/jailhouse/inmates/demos/x86/smp-demo-linked.o
OBJCOPY /home/user/jailhouse/inmates/demos/x86/smp-demo.bin
CC /home/user/jailhouse/inmates/tools/x86/linux-loader.o
LD /home/user/jailhouse/inmates/tools/x86/linux-loader-linked.o
OBJCOPY /home/user/jailhouse/inmates/tools/x86/linux-loader.bin
Building modules, stage 2.
MODPOST 1 modules
CC /home/user/jailhouse/driver/jailhouse.mod.o
LD [M] /home/user/jailhouse/driver/jailhouse.ko
gcc -g -O3 -I../driver -DLIBEXECDIR=\"/usr/local/libexec\" -Wall -Wmissing-declarations -Wmissing-prototypes -DJAILHOUSE_VERSION=\"v0.5\" -o jailhouse jailhouse.c
./jailhouse-config-create -g jailhouse-config-collect
user@debian:~/jailhouse$
user@debian:~/jailhouse$ sudo make install
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CHK /home/user/jailhouse/hypervisor/include/generated/version.h
CHK /home/user/jailhouse/hypervisor/include/generated/config.mk
Building modules, stage 2.
MODPOST 1 modules
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
INSTALL /home/user/jailhouse/driver/jailhouse.ko
DEPMOD 3.16.0-4-amd64
install -m 644 hypervisor/jailhouse*.bin /lib/firmware
install -d -m 755 /usr/local/libexec/jailhouse
install -m 644 inmates/tools/x86/*.bin /usr/local/libexec/jailhouse
install jailhouse /usr/local/sbin
install jailhouse-cell-linux jailhouse-cell-list jailhouse-cell-stats jailhouse-config-create jailhouse-config-collect /usr/local/libexec/jailhouse
install -d -m 755 /usr/local/share/jailhouse
install -m 644 jailhouse-config-collect.tmpl root-cell-config.c.tmpl /usr/local/share/jailhouse
user@debian:~/jailhouse$
user@debian:~/jailhouse$ grep firmware Makefile
# out-of-tree build for our kernel-module, firmware and inmates
firmware_install: $(DESTDIR)$(firmwaredir) modules
install: modules_install firmware_install $(TOOL_INMATES_INSTALL)
.PHONY: modules_install install clean firmware_install modules tools docs \
user@debian:~/jailhouse$
user@debian:~/jailhouse$ sudo make firmware_install
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CHK /home/user/jailhouse/hypervisor/include/generated/version.h
CHK /home/user/jailhouse/hypervisor/include/generated/config.mk
Building modules, stage 2.
MODPOST 1 modules
install -m 644 hypervisor/jailhouse*.bin /lib/firmware
user@debian:~/jailhouse$
user@debian:~/jailhouse$ sudo insmod driver/jailhouse.ko
user@debian:~/jailhouse$
user@debian:~/jailhouse$ sudo jailhouse enable configs/qemu-vm.cell
user@debian:~/jailhouse$ Connection to 127.0.0.1 closed by remote host.
Connection to 127.0.0.1 closed.

Georg Schiesser

unread,
Apr 15, 2016, 11:09:46 AM4/15/16
to charles king, jailho...@googlegroups.com
On Fri, Apr 15, 2016 at 10:26:57PM +0800, charles king wrote:
> hi,
> Georg, all what you have done is in you qemu system?

Yes, exactly. I compile and insmod inside the guest system.

> And Can I see you iports? Please pub cat /proc/ioports output.

I'll attach both guest and host /proc/ioports at the end.

> The LJ-article-04-2015.txt said "it is recommended to have the same kernel
> on the host and
> inside QEMU", can you take a try 4.2 on the host and qemu?

Yes, I'll try that again, but AFAICT it didnt work either. I'll do
another full test later today, with the following setup:
HOST jessie + stretch 4.x kernel, intel_iommu=off, kvm_intel with nested=1,
qemu-system-x86_64 with kvm options from the README example.
GUEST jessie + same stretch 4.x kernel, with latest jailhouse git master.

Thanks so much for your time and feedback,
georg


> best regards
> from Xuguo Wang
>
GUEST /proc/ioports
user@debian:~$ cat /proc/ioports
0000-0cd7 : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0064-0064 : keyboard
0070-0071 : rtc0
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
02f8-02ff : serial
0378-037a : parport0
03c0-03df : vga+
03f2-03f2 : floppy
03f4-03f5 : floppy
03f7-03f7 : floppy
03f8-03ff : serial
0600-067f : 0000:00:1f.0
0600-0603 : ACPI PM1a_EVT_BLK
0604-0605 : ACPI PM1a_CNT_BLK
0608-060b : ACPI PM_TMR
0620-062f : ACPI GPE0_BLK
0700-073f : 0000:00:1f.3
0700-073f : i801_smbus
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
c000-c03f : 0000:00:02.0
c000-c03f : e1000
c080-c09f : 0000:00:1f.2
c080-c09f : ahci
user@debian:~$

HOST /proc/ioports
georg@tunix:~$ cat /proc/ioports
0000-03af : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0061-0061 : PNP0800:00
0064-0064 : keyboard
0070-0071 : rtc0
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
00f0-00f0 : PNP0C04:00
0290-029f : pnp 00:02
03b0-03df : PCI Bus 0000:00
03c0-03df : vga+
03e0-0cf7 : PCI Bus 0000:00
03f8-03ff : serial
0400-0403 : ACPI PM1a_EVT_BLK
0404-0405 : ACPI PM1a_CNT_BLK
0408-040b : ACPI PM_TMR
0410-0415 : ACPI CPU throttle
0420-042f : ACPI GPE0_BLK
0430-0433 : iTCO_wdt.0.auto
0430-0433 : iTCO_wdt
0450-0450 : ACPI PM2_CNT_BLK
0460-047f : iTCO_wdt.0.auto
0460-047f : iTCO_wdt
0500-057f : pnp 00:01
0580-059f : 0000:00:1f.3
0580-059f : pnp 00:01
0580-059f : i801_smbus
0600-061f : pnp 00:01
0800-081f : pnp 00:01
0880-0883 : pnp 00:01
0cf8-0cff : PCI conf1
1000-ffff : PCI Bus 0000:00
e000-efff : PCI Bus 0000:01
e000-e0ff : 0000:01:00.0
f000-f01f : 0000:00:1f.2
f000-f01f : ahci
f020-f03f : 0000:00:19.0
f040-f043 : 0000:00:1f.2
f040-f043 : ahci
f050-f057 : 0000:00:1f.2
f050-f057 : ahci
f060-f063 : 0000:00:1f.2
f060-f063 : ahci
f070-f077 : 0000:00:1f.2
f070-f077 : ahci
georg@tunix:~$

Jan Kiszka

unread,
Apr 15, 2016, 11:34:25 AM4/15/16
to Georg Schiesser, charles king, jailho...@googlegroups.com
On 2016-04-15 06:15, Georg Schiesser wrote:
> On Fri, Apr 15, 2016 at 10:16:21AM +0800, charles king wrote:
>> hi,
>> I remember the documentation/articles/LJ-article-04-2015.txt said, line
>> 192
>> sudo make firmware_install sudo insmod jailhouse.ko
>> could you take a try, "sudo make firmware_install" first?
>> Then sudo insmod jailhouse.ko.
>
> Thank you very much for your feedback, but unfortunately it didnt make
> any difference. At the end there is a screenlog of testing with
> firmware_install, but IMHO I had this already covered by "make install",
> because firmware_install is a dependency of the install target.
>
> Maybe there is a problem with my hardware or BIOS? I'll try to run it on
> a different intel system. Debian jessie should be working fine, right?
>
> Please let me know if you have any ideas,

The QEMU version you are using my produce a different hardware layout
than what the qemu config was generated for. You can try to regenerate
the config inside the VM, or switch to latest upstream QEMU.

Jan

Georg Schiesser

unread,
Apr 15, 2016, 11:48:35 AM4/15/16
to Jan Kiszka, charles king, jailho...@googlegroups.com
Thanks, Jan. I'll try building the lastest qemu from git master, since
I'm not familiar with regenerating the config. Just for information,
I've been using the default jessie qemu so far:

georg@tunix:~$ qemu-system-x86_64 -version
QEMU emulator version 2.1.2 (Debian 1:2.1+dfsg-12+deb8u5a), Copyright (c) 2003-2008 Fabrice Bellard
georg@tunix:~$

https://packages.debian.org/jessie/qemu-system-x86

Thanks, I'll report later...
georg

Jan Kiszka

unread,
Apr 15, 2016, 11:50:00 AM4/15/16
to Georg Schiesser, charles king, jailho...@googlegroups.com
On 2016-04-15 08:49, Georg Schiesser wrote:
> On Fri, Apr 15, 2016 at 08:34:10AM -0700, Jan Kiszka wrote:
>> On 2016-04-15 06:15, Georg Schiesser wrote:
>>> On Fri, Apr 15, 2016 at 10:16:21AM +0800, charles king wrote:
>>>> hi,
>>>> I remember the documentation/articles/LJ-article-04-2015.txt said, line
>>>> 192
>>>> sudo make firmware_install sudo insmod jailhouse.ko
>>>> could you take a try, "sudo make firmware_install" first?
>>>> Then sudo insmod jailhouse.ko.
>>>
>>> Thank you very much for your feedback, but unfortunately it didnt make
>>> any difference. At the end there is a screenlog of testing with
>>> firmware_install, but IMHO I had this already covered by "make install",
>>> because firmware_install is a dependency of the install target.
>>>
>>> Maybe there is a problem with my hardware or BIOS? I'll try to run it on
>>> a different intel system. Debian jessie should be working fine, right?
>>>
>>> Please let me know if you have any ideas,
>>
>> The QEMU version you are using my produce a different hardware layout
>> than what the qemu config was generated for. You can try to regenerate
>> the config inside the VM, or switch to latest upstream QEMU.
>
> Thanks, Jan. I'll try building the lastest qemu from git master, since
> I'm not familiar with regenerating the config. Just for information,

qemu-vm # jailhouse config create my-config.c
Reply all
Reply to author
Forward
0 new messages