-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nightly ISO boot fails with page fault on libvirt VM #358
Comments
virtual machine configurationmds@optiplex3050:~$ virsh domxml-to-native qemu-argv --domain gvtguefiLC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin HOME=/var/lib/libvirt/qemu/domain--1-gvtguefi XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-gvtguefi/.local/share XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-gvtguefi/.cache XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-gvtguefi/.config INTEL_DEBUG=norbc /usr/bin/qemu-system-x86_64 -name guest=gvtguefi,debug-threads=on -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-gvtguefi/master-key.aes"}' -blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE_4M.fd","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"raw","file":"libvirt-pflash0-storage"}' -blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/gvtguefi_VARS.fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"raw","file":"libvirt-pflash1-storage"}' -machine pc-q35-6.2,usb=off,vmport=off,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,memory-backend=pc.ram -accel kvm -cpu host,migratable=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff -m 8192 -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":8589934592}' -overcommit mem-lock=off -smp 4,sockets=1,dies=1,cores=4,threads=1 -uuid 24c322b3-52b5-4a49-b818-96701ee89aab -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain--1-gvtguefi/monitor.sock,server=on,wait=off -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device pcie-root-port,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 -device pcie-root-port,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 -device pcie-root-port,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 -device pcie-root-port,port=19,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 -device pcie-root-port,port=20,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 -device pcie-root-port,port=21,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 -device pcie-root-port,port=22,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 -device pcie-root-port,port=23,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 -device pcie-root-port,port=24,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x3 -device pcie-root-port,port=25,chassis=10,id=pci.10,bus=pcie.0,addr=0x3.0x1 -device pcie-root-port,port=26,chassis=11,id=pci.11,bus=pcie.0,addr=0x3.0x2 -device pcie-root-port,port=27,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x3 -device pcie-root-port,port=28,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x4 -device pcie-root-port,port=29,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x5 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/gvtguefi.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-2-format","read-only":false,"discard":"unmap","driver":"qcow2","file":"libvirt-2-storage"}' -device virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-2-format,id=virtio-disk0,bootindex=2 -blockdev '{"driver":"file","filename":"/home/mds/Downloads/ravynOS_0.4.0pre5_f14_6521265220485120_amd64.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' -device ide-cd,bus=ide.1,drive=libvirt-1-format,id=sata0-0-1,bootindex=1 -netdev tap,fd=27,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:f5:44:4b,bus=pci.1,addr=0x0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -audiodev '{"id":"audio1","driver":"spice"}' -spice port=0,disable-ticketing=on,gl=on,rendernode=/dev/dri/by-path/pci-0000:00:02.0-render,seamless-migration=on -device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0,audiodev=audio1 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device vfio-pci,id=hostdev0,sysfsdev=/sys/bus/mdev/devices/cb33ec6d-ad44-4702-b80f-c176f56afea1,display=on,bus=pci.6,addr=0x0 -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -set device.hostdev0.x-igd-opregion=on -set device.hostdev0.ramfb=on -set device.hostdev0.driver=vfio-pci-nohotplug -set device.hostdev0.romfile=/home/mds/Downloads/vbios_gvt_uefi.rom -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on |
I also tested this ISO on the bare metal host machine and it booted up fine to the login display. Logged in and saw the desktop. So I'm satisfied that we haven't broken anything there. |
I tested this ISO on a Proxmox VM and it boots up without issue. Of course there are no graphics as I don't have GVT-g mediated passthrough configured there. serial consoleConsoles: EFI console Reading loader env vars from /efi/freebsd/loader.env Setting currdev to cd1: ?cLoading kernel... /boot/kernel/kernel text=0x188d30 text=0xe1ca18 text=0x67106c data=0x140 data=0x1cc330+0x432cd0 0x8+0x194af0+0x8+0x1b4b2f| Loading configured modules... /boot/kernel/nullfs.ko size 0x9108 at 0x234a000 /boot/kernel/geom_uzip.ko size 0x95c8 at 0x2354000 /boot/kernel/cryptodev.ko size 0x7780 at 0x235e000 can't find '/etc/hostid' /data/ramdisk.ufs size=0x1510000 /boot/kernel/mach.ko size 0x66128 at 0x3876000 /boot/kernel/zfs.ko size 0x611008 at 0x38dd000Hit [Enter] to boot immediately, or any other key for command prompt. virtual machine configroot@epyc3000:~# qm showcmd 128 --pretty /usr/bin/kvm \ -id 128 \ -name 'ravynOS,debug-threads=on' \ -no-shutdown \ -chardev 'socket,id=qmp,path=/var/run/qemu-server/128.qmp,server=on,wait=off' \ -mon 'chardev=qmp,mode=control' \ -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ -mon 'chardev=qmp-event,mode=control' \ -pidfile /var/run/qemu-server/128.pid \ -daemonize \ -smbios 'type=1,uuid=8125120d-6858-497c-951d-9b1e3b586935' \ -drive 'if=pflash,unit=0,format=raw,readonly=on,file=/usr/share/pve-edk2-firmware//OVMF_CODE_4M.secboot.fd' \ -drive 'if=pflash,unit=1,cache=writeback,format=raw,id=drive-efidisk0,size=540672,file=rbd:CephPool/vm-128-disk-1:conf=/etc/pve/ceph.conf:id=admin:keyring=/etc/pve/priv/ceph/CephPool.keyring:rbd_cache_policy=writeback' \ -smp '4,sockets=1,cores=4,maxcpus=4' \ -nodefaults \ -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ -vnc 'unix:/var/run/qemu-server/128.vnc,password=on' \ -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ -m 4096 \ -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \ -device 'vmgenid,guid=68083c2d-54ca-41a1-aa5b-900c4f1eff18' \ -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \ -chardev 'socket,id=serial0,path=/var/run/qemu-server/128.serial0,server=on,wait=off' \ -device 'isa-serial,chardev=serial0' \ -device 'vmware-svga,id=vga,bus=pcie.0,addr=0x1' \ -iscsi 'initiator-name=iqn.1993-08.org.debian:01:cdf99f5be896' \ -drive 'file=/mnt/pve/cephfs/template/iso/ravynOS_0.4.0pre5_f14_6521265220485120_amd64.iso,if=none,id=drive-ide2,media=cdrom,aio=io_uring' \ -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=100' \ -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' \ -drive 'file=rbd:CephPool/vm-128-disk-0:conf=/etc/pve/ceph.conf:id=admin:keyring=/etc/pve/priv/ceph/CephPool.keyring,if=none,id=drive-scsi0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' \ -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=101' \ -netdev 'type=tap,id=net0,ifname=tap128i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \ -device 'virtio-net-pci,mac=56:68:24:EF:A5:0A,netdev=net0,bus=pci.0,addr=0x12,id=net0' \ -machine 'type=q35+pve0' root@epyc3000:~# |
serial consoleBdsDxe: loading Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0) BdsDxe: starting Boot0001 "UEFI QEMU DVD-ROM QM00001 " from PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0)... Consoles: EFI console Command line arguments: loader.efi ... ?cLoading kernel... Hit [Enter] to boot immediately, or any other key for command prompt. add host 127.0.0.1: gateway lo0 fib 0: route already in table Fri Sep 9 14:11:31 EDT 2022 |
AMAZING! Nice work! Definitely some artifacts to resolve but what a huge step forward to be able to use GPU passthrough. |
ravynOS_0.4.0pre5_f14_6521265220485120_amd64.iso
Attempting to test the Intel GVT-g mediated passthrough on a libvirt VM on Ubuntu 22.04. Booted ISO and it failed with a page fault.
serial console
BdsDxe: loading Boot0001 "UEFI QEMU DVD-ROM QM00003 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0) BdsDxe: starting Boot0001 "UEFI QEMU DVD-ROM QM00003 " from PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)...
Consoles: EFI console
Reading loader env vars from /efi/freebsd/loader.env
Setting currdev to cd1:
Staging area's size is reduced: 16384 -> 1542!
FreeBSD/amd64 EFI loader, Revision 1.1
(Wed Sep 7 02:29:16 UTC 2022 root@cirrus-task-6086949000708096)
Command line arguments: loader.efi
Image base: 0x7dc3c000
EFI version: 2.70
EFI Firmware: EDK II (rev 1.00)
Console: efi (0x20001000)
Load Path: \EFI\BOOT\BOOTX64.EFI
Load Device: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)/CDROM(0x1)
BootCurrent: 0001
BootOrder: 0001[*] 0002 0000 0003
BootInfo Path: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)
Ignoring Boot0001: Only one DP found
Trying ESP: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)/CDROM(0x1)
Setting currdev to cd1:
Trying: PciRoot(0x0)/Pci(0x1F,0x2)/Sata(0x1,0xFFFF,0x0)/CDROM(0x0)
Setting currdev to cd0:
Loading /boot/defaults/loader.conf
Loading /boot/defaults/loader.conf
Loading /boot/device.hints
Loading /boot/loader.conf
Loading /boot/loader.conf.local
-
...
?cLoading kernel...
/boot/kernel/kernel text=0x188d30 text=0xe1ca18 text=0x67106c data=0x140 data=0x1cc330+0x432cd0 0x8+0x194af0+0x8+0x1b4b2f|
Loading configured modules...
/boot/kernel/nullfs.ko size 0x9108 at 0x234a000
/boot/kernel/zfs.ko size 0x611008 at 0x2354000
/boot/kernel/mach.ko size 0x66128 at 0x2966000
can't find '/etc/hostid'
/boot/kernel/geom_uzip.ko size 0x95c8 at 0x29cd000
/data/ramdisk.ufs size=0x1510000
/boot/kernel/cryptodev.ko size 0x7780 at 0x3ee7000
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [/boot/kernel/kernel]...
staging 0x73800000 (not copying) tramp 0x7db35000 PT4 0x7db2c000
Start @ 0xffffffff80389000 ...
EFI framebuffer information:
addr, size 0x7e900000, 0x300000
dimensions 800 x 600
stride 800
masks 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000
GDB: no debug ports present
KDB: debugger backends: ddb
KDB: current backend: ddb
---<>---
Copyright (c) 1992-2022 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 14.0-CURRENT #0 main-n747-04a6bb04385: Wed Sep 7 01:09:46 UTC 2022
root@cirrus-task-5523999047286784:/usr/obj/tmp/cirrus-ci-build/amd64.amd64/sys/RAVYN amd64
ravynOSclang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
VT(efifb): resolution 800x600
Hyper-V Version: 10.0.14393 [SP0]
Features=0x232<TMREFCNT,APIC,HYPERCALL,REFTSC>
PM Features=0x0 [C0]
Features3=0x8
Timecounter "Hyper-V" frequency 10000000 Hz quality 2000
Setting sysctl vfs.zfs.arc_max failed: 22
mach services loaded - mach system calls available
CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (3600.00-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x906e9 Family=0x6 Model=0x9e Stepping=9
Features=0x1f83fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,SS,HTT>
Features2=0xfffab223<SSE3,PCLMULQDQ,VMX,SSSE3,FMA,CX16,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
AMD Features2=0x121<LAHF,ABM,Prefetch>
Structured Extended Features=0x9c47ab<FSGSBASE,TSCADJ,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT>
Structured Extended Features2=0x4
Structured Extended Features3=0xac000400<MD_CLEAR,IBPB,STIBP,ARCH_CAP,SSBD>
XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
IA32_ARCH_CAPS=0x4c<RSBA,SKIP_L1DFL_VME>
AMD Extended Feature Extensions ID EBX=0x100d000<IBPB,IBRS,STIBP,SSBD>
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
Hypervisor: Origin = "Microsoft Hv"
real memory = 8589934592 (8192 MB)
avail memory = 8208437248 (7828 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table:
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
arc4random: WARNING: initial seeding bypassed the cryptographic random device because it was not yet seeded and the knob 'bypass_before_seeding' was enabled.
ioapic0 <Version 1.1> irqs 0-23
Launching APs: 1 3 2
Timecounter "Hyper-V-TSC" frequency 10000000 Hz quality 3000
random: entropy device external interface
md0: Preloaded image </data/ramdisk.ufs> 22085632 bytes at 0xffffffff829d65c8
Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address = 0x218
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80f64915
stack pointer = 0x28:0xfffffe008569bb60
frame pointer = 0x28:0xfffffe008569bb90
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 13 (g_event)
rdi: 0 rsi: 0 rdx: 1
rcx: 80 r8: 0 r9: 8080808080808080
rax: fffff800016a2740 rbx: 0 rbp: fffffe008569bb90
r10: fffff800016f2c00 r11: ffff9c9acbcac8cd r12: ffffffff812acabf
r13: ffffffff8120d9c5 r14: fffffe008569bbd8 r15: 1
trap number = 12
panic: page fault
cpuid = 1
time = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe008569b920
vpanic() at vpanic+0x151/frame 0xfffffe008569b970
panic() at panic+0x43/frame 0xfffffe008569b9d0
trap_fatal() at trap_fatal+0x407/frame 0xfffffe008569ba30
trap_pfault() at trap_pfault+0x4f/frame 0xfffffe008569ba90
calltrap() at calltrap+0x8/frame 0xfffffe008569ba90
--- trap 0xc, rip = 0xffffffff80f64915, rsp = 0xfffffe008569bb60, rbp = 0xfffffe008569bb90 ---
uma_zalloc_arg() at uma_zalloc_arg+0x35/frame 0xfffffe008569bb90
devctl_alloc_dei_sb() at devctl_alloc_dei_sb+0x54/frame 0xfffffe008569bbc0
devctl_notify() at devctl_notify+0x41/frame 0xfffffe008569bc50
g_dev_taste() at g_dev_taste+0x4c7/frame 0xfffffe008569be80
g_load_class() at g_load_class+0x15c/frame 0xfffffe008569beb0
g_run_events() at g_run_events+0x11c/frame 0xfffffe008569bef0
fork_exit() at fork_exit+0x7e/frame 0xfffffe008569bf30
fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008569bf30
--- trap 0, rip = 0, rsp = 0, rbp = 0 ---
KDB: enter: panic
[ thread pid 13 tid 100043 ]
Stopped at kdb_enter+0x32: movq $0,0x127e2e3(%rip)
db>
The text was updated successfully, but these errors were encountered: