On 2016-05-15 12:56, Okky Hendriansyah wrote:
On Sun, May 15, 2016 at 5:43 PM, Torbjorn Jansson <
torbjorn.jans...@mbox200.swipnet.se> wrote:
Hello all.
Hi Torbjorn,
got a few questions regarding win10, gpu passthru and the config of the vm,
but first thing first.
my first attempts at passing thru my old gtx570 only worked once and
second boot always resulted in a hardlock of host.
now i have replaced it with a gtx970 and things work much better.
my host is running fedora 22 so it only have qemu 2.3.1.
this means i have to use the old style libvirt settings of hiding kvm and
so on to get the nvidia drivers working.
So first things first, care to elaborate on your host specs? I assume that
you were doing the UEFI/OVMF approach on passing through the GPU?
host cpu is: i5-3470
mb is Asus P8Z77-V LE Plus
and yes im using uefi/ovmf to pass thru the gpu.
for this vm im also passing thru a physical network card (a 4 port intel
server card)
this works just fine, so my next step was to see if i can get a newer
version of qemu and use the hv_vendor_id workaround instead.
checked out the stable-2.5 branch from git and compiled it and setup the
wrapper scrips as documented in previous mails on this list and then edited
the libvirt xml file to point to the right wrapper script.
vm booted just fine but at this stage i still have the old hyperv and kvm
settings turned off.
since hv_vendor_id is supposed to make that not needed i tried to turn
them back on again and as soon as i did win10 crashes at boot with system
thread exception.
it doesnt matter which one i turn back on again, just one is enough to
cause a crash.
i tried each one in order to see if i could find the one causing it, but
any single option of those is enough to cause the crash.
i suspect this crash only happens when hv_vendor_id is specified.
Please share your libvirt XML and your runtime QEMU command line (ps -ef |
grep qemu) when the guest runs.
qemu command from the version that boots (old style nvidia workaround)
/usr/local/bin/qemu-system-x86_64 -machine accel=kvm -name win10 -S
-machine pc-i440fx-2.3,accel=kvm,usb=off -cpu core2duo,kvm=off -drive
file=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd,if=pflash,format=raw,unit=0,readonly=on
-drive
file=/var/lib/libvirt/qemu/nvram/win10_VARS.fd,if=pflash,format=raw,unit=1
-m 4096 -realtime mlock=off -smp 2,sockets=1,cores=2,threads=1 -uuid
098e9157-b878-4882-9c7a-22bd334920c1 -nographic -no-user-config
-nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/win10.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc
base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard
-no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global
PIIX4_PM.disable_s4=1 -boot strict=on -device
ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x6.0x7 -device
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x6
-device
ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x6.0x1
-device
ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x6.0x2 -drive
file=/mnt/store/virt/vms/Win10.qcow2,if=none,id=drive-virtio-disk0,format=qcow2
-device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive
file=/mnt/store/virt/isos/virtio-win-0.1.117.iso,if=none,id=drive-ide0-0-1,readonly=on,format=raw
-device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 -netdev
tap,fd=24,id=hostnet0,vhost=on,vhostfd=27 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:12:48:26,bus=pci.0,addr=0x3
-device usb-host,hostbus=5,hostaddr=6,id=hostdev0 -device
vfio-pci,host=05:00.0,id=hostdev1,bus=pci.0,addr=0x2 -device
vfio-pci,host=05:00.1,id=hostdev2,bus=pci.0,addr=0x4 -device
vfio-pci,host=03:00.0,id=hostdev3,bus=pci.0,addr=0x5 -device
vfio-pci,host=03:00.1,id=hostdev4,bus=pci.0,addr=0x9 -device
vfio-pci,host=04:00.0,id=hostdev5,bus=pci.0,addr=0xa -device
vfio-pci,host=04:00.1,id=hostdev6,bus=pci.0,addr=0xb -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on
and the libvirt xml file is attached.
changing any one of the hyperv, kvm or hypervclock back to normal
results in win10 crashing at boot.
any advice on how to get win10 to boot without system thread exception with
hv_vendor_id specified and the hyperv and kvm options turned on?
i read something about x2apic but i don't fully understand what to do.
i also tried to change cpu model to core2duo with no success.
do we know what driver is causing the system thread exception?
anyone analyzed the crashdump via a debugger?
What are your VirtIO driver version that you used for the boot drive? Some
version crashes or make the guest slow.
im using the ones from: virtio-win-0.1.117.iso
had an older version earlier but upgraded by going to device manager and
then update drivers and point to the contents of the is on all devices
related to virtio (storage, network, baloon and so on)
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit win10
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>win10</name>
<uuid>098e9157-b878-4882-9c7a-22bd334920c1</uuid>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
<loader readonly='yes' type='pflash'>/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
<hyperv>
<relaxed state='off'/>
<vapic state='off'/>
<spinlocks state='off'/>
</hyperv>
<kvm>
<hidden state='on'/>
</kvm>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>core2duo</model>
<topology sockets='1' cores='2' threads='1'/>
</cpu>
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
<timer name='hypervclock' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/local/bin/qemu-kvm-hv-vendor</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/mnt/store/virt/vms/Win10.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='/mnt/store/virt/isos/virtio-win-0.1.117.iso'/>
<target dev='hdb' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='network'>
<mac address='52:54:00:12:48:26'/>
<source network='routednet'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x1241'/>
<product id='0x0504'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x05' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
</source>
<address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
</hostdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</memballoon>
</devices>
</domain>
_______________________________________________
vfio-users mailing list
vfio-users@redhat.com
https://www.redhat.com/mailman/listinfo/vfio-users