[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
image works in native but not in vm when -cpu is set to host
From: |
daggs |
Subject: |
image works in native but not in vm when -cpu is set to host |
Date: |
Fri, 27 Nov 2020 09:41:52 +0100 |
Greetings.
I have an image I've created with a bunch of chost flags which works on my
machine when it comes to native boot.
if I take that same image into a vm managed via libvirt, I get kernel panic.
I'd assume that something is missing from my vm config, question is what and
what I can do about it?
here is the flags part of lscpu in native and vm: https://dpaste.com/3TR8QJ5G8
the qemu cmd is: /usr/bin/qemu-system-x86_64 -name
guest=streamer-vm-q35,debug-threads=on -S -object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-streamer-vm-q35/master-key.aes
-blockdev
{"driver":"file","filename":"/usr/share/qemu/edk2-x86_64-secure-code.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/streamer-vm-q35_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-5.0,accel=kvm,usb=off,smm=on,dump-guest-core=off,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format
-cpu host,migratable=on -m 7168 -overcommit mem-lock=off -smp
2,sockets=1,dies=1,cores=1,threads=2 -uuid 4fb1463b-837c-40fc-a760-a69afc040a1a
-display none -no-user-config -nodefaults -chardev
socket,id=charmonitor,fd=27,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc,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
i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e -device
pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 -device
pcie-root-port,port=0x8,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x1
-device pcie-root-port,port=0x9,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x1
-device pcie-root-port,port=0xa,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x2
-device pcie-root-port,port=0xb,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x3
-device pcie-root-port,port=0xc,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x4
-device qemu-xhci,id=usb,bus=pci.4,addr=0x0 -device
virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x1 -blockdev
{"driver":"file","filename":"/home/streamer/streamer.img.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}
-blockdev
{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null}
-device
virtio-blk-pci,bus=pci.5,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1
-netdev tap,fd=30,id=hostnet0 -device
e1000e,netdev=hostnet0,id=net0,mac=52:54:00:5a:4c:8c,bus=pci.3,addr=0x0
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0
-blockdev
{"driver":"host_device","filename":"/dev/sg0","node-name":"libvirt-2-backend","read-only":true}
-device
scsi-generic,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=libvirt-2-backend,id=hostdev0
-device
vfio-pci,host=0000:00:02.0,id=hostdev1,bus=pci.7,addr=0x0,romfile=/home/streamer/gpu-8086:5902-uefi.rom
-device vfio-pci,host=0000:00:1f.3,id=hostdev2,bus=pci.2,addr=0x2 -device
usb-host,hostbus=1,hostaddr=3,id=hostdev3,bus=usb.0,port=1 -device
usb-host,id=hostdev4,bus=usb.0,port=2 -device
virtio-balloon-pci,id=balloon0,bus=pci.6,addr=0x0 -sandbox
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg
timestamp=on
if I build the image with the default flags (march=x86-64), the vm boots well.
my new chost is -O2 -pipe -march=skylake -mabm -mno-adx -mno-avx -mno-avx2
-mno-bmi -mno-bmi2 -mno-f16c -mno-fma -mno-xsave -mno-xsavec -mno-xsaveopt
-mno-xsaves -mno-sgx
the cpu is Intel(R) Pentium(R) CPU G4560 @ 3.50GHz
thoughts?
Thanks,
Dagg.
- image works in native but not in vm when -cpu is set to host,
daggs <=