[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [vfio-users] R7 240 and RX 480 gpu passthrough



Hi,

even with the root.1 it kills the host without warning :(

Gh.

Stano Lano wrote:
Hi,

to update from win10 1511 to win10 1607 I had to setup my VM to have only 1 core and 1 thread per core or the update would fail.
Also for the next big update I had to do the same.

For the Win RX 480 setup you need to bind the GPU to ioh3420 or the driver will not work:

-device vfio-pci,host=02:00.0,id=hostdev6,bus=root.1,multifunction=on,addr=0x2,x-vga=on \
-device vfio-pci,host=02:00.1,id=hostdev7,bus=root.1,addr=0x2.0x1 \

You may also need to set the addr to 0x0 and 0x0.0x1

I cant help with linux guest but you can try the same.

Good luck

On Mon, Mar 20, 2017 at 8:09 AM, Jiří Novák <jiri novak actum cz> wrote:
Hi,
previously I've had R7 250x (borrowed) which worked for both linux and
windows guests. Now i'm trying to make R7 240 to work with linux and RX
480 with windows quest and both is failing miserably.

The R7 240 in linux doesn't boot at all. bios says boot from disk, but
nothing happens, black screen, I think the VM hangs (no ping/ssh after
time). The windows VM used with r7 250x does work correctly with similar
setup, except that update from win10 1511 to win 10 1607 fails, which it
did previously too.

This is the original linux config:

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
QEMU_AUDIO_DRV=pa /usr/bin/qemu-system-x86_64 \
    -name 10-debian \
    -machine pc-i440fx-2.4,accel=kvm,usb=off \
    -cpu
SandyBridge,+invtsc,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff
\
    -m 4096 \
    -realtime mlock=off \
    -smp 2,sockets=1,cores=2,threads=1 \
    -nographic -no-user-config -nodefaults \
    -rtc base=utc,driftfix=slew \
    -global kvm-pit.lost_tick_policy=discard \
    -no-hpet -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 \
    -boot menu=off,strict=on \
    -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.0,addr=0x3 \
    -device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.0,addr=0x4 \
    -device pci-bridge,chassis_nr=4,id=pci.4,bus=pci.0,addr=0x5 \
    -device pci-bridge,chassis_nr=5,id=pci.5,bus=pci.0,addr=0x6 \
    -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
    -drive
file=/dev/X-gzfs/backups/pools/C-nas/qemu/10-debian,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
\
    -device
virtio-blk-pci,scsi=off,bus=pci.2,addr=0x1,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
\
    -netdev tap,id=netdev0,ifname=V0300t10,script=no,downscript=no \
    -device
virtio-net-pci,netdev=netdev0,id=net0,mac=42:42:42:00:00:0a,bus=pci.2,addr=0x2
\
    -chardev pty,id=charserial0 \
    -device isa-serial,chardev=charserial0,id=serial0 \
    -device vfio-pci,host=07:00.0,id=hostdev2,bus=pci.4,addr=0x1 \
    -device vfio-pci,host=00:1a.0,id=hostdev3,bus=pci.2,addr=0x4 \
    -device vfio-pci,host=00:1d.0,id=hostdev5,bus=pci.2,addr=0x6 \
    -device
vfio-pci,host=03:00.0,id=hostdev6,bus=pci.5,multifunction=on,addr=0x1,x-vga=on,romfile=/root/roms/R7.240.176679.rom
\
    -device vfio-pci,host=03:00.1,id=hostdev7,bus=pci.5,addr=0x1.0x1 \
    -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x7 \
    -vga none \
    -soundhw hda \
    -chardev stdio,id=seabios \
    -device isa-debugcon,iobase=0x402,chardev=seabios \
    -msg timestamp=on \
    >>/var/log/kvm/10-debian.stdout 2>>/var/log/kvm/10-debian.stderr &

I've been recomennded to change it to q35 and attach the radeon directly
to root port, without any change though.

changed config:

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
QEMU_AUDIO_DRV=pa /usr/bin/taskset -c 2-3,18-19
/usr/bin/qemu-system-x86_64 \
    -name 10-debian \
    -machine pc-q35-2.4,accel=kvm,usb=off \
    -cpu
SandyBridge,+invtsc,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,kvm=off
\
    -object
memory-backend-file,id=mem0,size=16G,mem-path=/dev/hugepages,share=off \
    -numa node,nodeid=0,memdev=mem0 \
    -m 16G \
    -realtime mlock=off \
    -smp sockets=1,cores=2,threads=2 \
    -nographic -no-user-config -nodefaults -no-hpet \
    -rtc base=localtime,driftfix=slew \
    -global kvm-pit.lost_tick_policy=discard \
    -boot menu=off,strict=on \
    -device
ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
    -device piix3-usb-uhci,id=usb,bus=pcie.0,addr=0x7 \
    -drive
file=/dev/X-gzfs/backups/pools/C-nas/qemu/10-debian,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
\
    -device virtio-scsi-pci,bus=pcie.0,addr=0x5 \
    -device scsi-hd,drive=drive-virtio-disk0 \
    -device
vfio-pci,host=03:00.0,id=hostdev6,bus=pcie.0,multifunction=on,addr=0x2,x-vga=on,romfile=/root/roms/R7.240.176679.rom
\
    -device vfio-pci,host=03:00.1,id=hostdev7,bus=pcie.0,addr=0x2.0x1 \
    -device vfio-pci,host=00:1a.0,id=hostdev3,bus=pcie.0,addr=0x3 \
    -device vfio-pci,host=00:1d.0,id=hostdev5,bus=pcie.0,addr=0x4 \
    -netdev tap,id=netdev0,ifname=V0300t12,script=no,downscript=no \
    -device
virtio-net-pci,netdev=netdev0,id=net0,mac=42:42:42:00:00:0a,bus=pcie.0,addr=0x6
\
    -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x8 \
    -vga none \
    -soundhw hda \
    -device virtio-rng-pci \
    -chardev stdio,id=seabios \
    -device isa-debugcon,iobase=0x402,chardev=seabios \
    -msg timestamp=on \
    >>/var/log/kvm/10-debian.stdout 2>>/var/log/kvm/10-debian.stderr &

for reference working windows:

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
QEMU_AUDIO_DRV=pa /usr/bin/taskset -c 0-7 /usr/bin/qemu-system-x86_64 \
    -name 11-windows \
    -machine pc-i440fx-2.1,accel=kvm,usb=off \
    -cpu
SandyBridge,+invtsc,+osxsave,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme,hv_time,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff
\
    -object
memory-backend-file,id=mem0,size=16G,mem-path=/dev/hugepages,share=off \
    -numa node,nodeid=0,memdev=mem0 \
    -m 16G \
    -realtime mlock=off \
    -smp 2,sockets=1,cores=2,threads=1 \
    -nographic -no-user-config -nodefaults -no-hpet \
    -rtc base=localtime,driftfix=slew \
    -global kvm-pit.lost_tick_policy=discard \
    -boot menu=off,strict=on \
    -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.0,addr=0x3 \
    -device pci-bridge,chassis_nr=3,id=pci.3,bus=pci.0,addr=0x4 \
    -device pci-bridge,chassis_nr=4,id=pci.4,bus=pci.0,addr=0x5 \
    -device pci-bridge,chassis_nr=5,id=pci.5,bus=pci.0,addr=0x6 \
    -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
    -drive
file=/dev/Z-ssd/qemu/11b-win10,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
\
    -drive
file=/dev/Z-ssd/data/games-blizzard,if=none,id=drive-virtio-disk1,format=raw,cache=none,aio=native
\
    -device virtio-scsi-pci,bus=pci.2,addr=0x1 \
    -device scsi-hd,drive=drive-virtio-disk0 \
    -device scsi-hd,drive=drive-virtio-disk1 \
    -netdev tap,id=netdev0,ifname=G42t11,script=no,downscript=no \
    -device
virtio-net-pci,netdev=netdev0,id=net0,mac=42:42:42:00:00:0b,bus=pci.2,addr=0x2
\
    -device vfio-pci,host=00:1a.0,id=hostdev3,bus=pci.2,addr=0x4 \
    -device vfio-pci,host=00:1d.0,id=hostdev5,bus=pci.2,addr=0x6 \
    -device
vfio-pci,host=03:00.0,id=hostdev6,bus=pci.5,multifunction=on,addr=0x1,x-vga=on,romfile=/root/roms/R7.240.176679.rom
\
    -device vfio-pci,host=03:00.1,id=hostdev7,bus=pci.5,addr=0x1.0x1 \
    -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x7 \
    -vga none \
    -soundhw hda \
    -chardev stdio,id=seabios \
    -device isa-debugcon,iobase=0x402,chardev=seabios \
    -msg timestamp=on \
    >>/var/log/kvm/11b-win10.stdout 2>>/var/log/kvm/11b-win10.stderr &


Other GPU, RX 480 I didn't manage to make work with anything. Windows
works until point driver kicks in, then it freezes the host. If I don't
install drivers for gpu (or network card, because windows will install
something on their own) this one runs. Any ideas what to try next?

config:

LC_ALL=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
QEMU_AUDIO_DRV=pa /usr/bin/taskset -c 4-7,20-23
/usr/bin/qemu-system-x86_64 \
    -name 12-wingame \
    -machine pc-q35-2.8,accel=kvm,usb=off \
    -cpu host \
    -object
memory-backend-file,id=mem0,size=16G,mem-path=/dev/hugepages,share=off \
    -numa node,nodeid=0,memdev=mem0 \
    -m 16G \
    -realtime mlock=off \
    -smp sockets=1,cores=4,threads=2 \
    -nographic -no-user-config -nodefaults -no-hpet \
    -rtc base=localtime,driftfix=slew \
    -global kvm-pit.lost_tick_policy=discard \
    -boot d \
    -device
ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
    -device piix3-usb-uhci,id=usb,bus=pcie.0,addr=0x7 \
    -drive
file=/dev/Z-ssd/qemu/12-wingame,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
\
    -drive
file=/dev/Z-ssd/data/games-blizzard,if=none,id=drive-virtio-disk1,format=raw,cache=none,aio=native
\
    -device virtio-scsi-pci,bus=pcie.0,addr=0x5 \
    -device scsi-hd,drive=drive-virtio-disk0 \
    -device scsi-hd,drive=drive-virtio-disk1 \
    -netdev tap,id=netdev0,ifname=V0300t12,script=no,downscript=no \
    -device
virtio-net-pci,netdev=netdev0,id=net0,mac=42:42:42:00:00:0c,bus=pcie.0,addr=0x6
\
    -device
vfio-pci,host=02:00.0,id=hostdev6,bus=pcie.0,multifunction=on,addr=0x2,x-vga=on
\
    -device vfio-pci,host=02:00.1,id=hostdev7,bus=pcie.0,addr=0x2.0x1 \
    -device vfio-pci,host=07:00.0,id=hostdev2,bus=pcie.0,addr=0x3 \
    -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x8 \
    -vga none \
    -soundhw hda \
    -device virtio-rng-pci \
    -chardev stdio,id=seabios \
    -device isa-debugcon,iobase=0x402,chardev=seabios \
    -msg timestamp=on \
        -drive
file=/mnt/X-gzfs/backups/pools/C-nas/data/sysiso/win10n_1607.iso,index=0,media=cdrom
\
        -drive
file=/mnt/X-gzfs/backups/pools/C-nas/data/sysiso/virtio-win-0.1.118.iso,index=1,media=cdrom
\
    >>/var/log/kvm/12-wingame.stdout 2>>/var/log/kvm/12-wingame.stderr &

Thanks in advance,
Gh.

Jiří Novák
Infrastructure Specialist

ACTUM / City Green Court
Hvězdova 1734/2c / 140 00 Praha 4 / Czech Republic
Mobile +420 737 910 508 / Reception +420 266 798 200
jiri novak actum cz / www.actum.cz

_______________________________________________
vfio-users mailing list
vfio-users redhat com
https://www.redhat.com/mailman/listinfo/vfio-users



_______________________________________________
vfio-users mailing list
vfio-users redhat com
https://www.redhat.com/mailman/listinfo/vfio-users


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]