[vfio-users] AMD RX480 Not working with windows

Nick Sarnie commendsarnex at gmail.com
Sat Feb 4 18:42:38 UTC 2017


I only needed core2duo when installing the anniversary update. I heard it
tries to flash CPU microcode and QEMU blocks this so the update fails, but
it doesn't try to install it for core2duo.

On Sat, Feb 4, 2017 at 1:42 PM, Nick Sarnie <commendsarnex at gmail.com> wrote:

> I only needed core2duo when installing the anniversary update. I heard it
> tries to flash CPU microcode and QEMU blocks this so the update fails, but
> it doesn't try to install it for core2duo.
>
> On Sat, Feb 4, 2017 at 6:17 AM, Javier Celaya <jcelaya at gmail.com> wrote:
>
>> This is my command line:
>> qemu-system-x86_64
>>         -nodefaults -no-user-config
>>         -enable-kvm -m 8192
>>         -cpu Opteron_G1,+cx16,+lahf_lm,kvm=off
>>         -M q35
>>         -smp 4,sockets=1,cores=4,threads=1
>>         -realtime mlock=on -rtc base=localtime,driftfix=slew
>>         -drive file="OVMF_CODE-pure-efi.fd",i
>> f=pflash,format=raw,unit=0,readonly=on
>>         -drive file="OVMF_VARS-pure-efi.fd",if=pflash,format=raw,unit=1
>>         -drive file="$HD",id=disk1,if=virtio,cache=none
>>         -netdev bridge,id=netuser,br=br0
>>         -device virtio-net-pci,netdev=netuser,
>> id=net0,mac=52:54:00:72:75:9e
>>         -device ich9-intel-hda,id=sound0
>>         -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
>>         -device ioh3420,bus=pcie.0,multifuncti
>> on=on,port=1,chassis=1,id=root.0
>>         -usbdevice $JOYPAD
>>         -usbdevice $KEYBOARD
>>         -usbdevice $MOUSE
>>
>>         -mem-path $MEM_PATH
>>
>>         -nographic -vga none
>>         -device vfio-pci,host=01:00.0,id=hostd
>> ev0,bus=root.0,multifunction=on
>>         -device vfio-pci,host=01:00.1,id=hostdev1,bus=pcie.0
>>
>> I see some differences with yours:
>> - @Janusz: Q35 works fine for me, as does i440fx
>> - Why are you using a ROM file? Your RX480 does not support UEFI?
>> - You are not explicitly attaching the graphics card and the HDMI sound
>> card to the PCI-E bus, not sure if that could be a problem.
>> - "-cpu host" is known to have problems with Windows 10 guests. If it
>> hangs, try using my config or "-cpu core2duo".
>>
>> Cheers
>>
>>
>> Javi
>>
>> 2017-02-03 12:41 GMT+01:00 Janusz <januszmk6 at gmail.com>:
>>
>>> Q35 doesn't work with polaris gpus, try i440fx
>>>
>>> On 02/03/2017 08:29 AM, ryanlynch at sigaint.org wrote:
>>> > Hi
>>> >
>>> > I have a working configuration with ubuntu guest. I tried using 1G
>>> pages
>>> > and found that I need at least 4G for the linux driver to load. I am
>>> using
>>> > the standard XFX roms that I used to flash the BIOS which are signed
>>> and
>>> > not modded. I have tried taking the working native windows
>>> configuration
>>> > and booting that up via qemu and after it installs the acpi drivers is
>>> > fails with the same reason..
>>> >
>>> > This command line works for macOs sierra (unacellerated but it does the
>>> > full screen 1920x2060 and 3840x2060) and works with glamour enabled
>>> Ubuntu
>>> > guest. I also found that you get a corrupt screen if you don't enable
>>> > glamour under gentoo.
>>> >
>>> > img=win
>>> > bios=/mnt/work/vm/etc
>>> > mem="-m 4G -mem-path /mnt/hugepg1g"
>>> > #cpus="-cpu host,nx=on,kvm=on,vendor=GenuineIntel -smp
>>> > cpus=4,sockets=1,cores=2,threads=2"
>>> > cpus="-cpu
>>> > host,+kvmclock,+kvmclock-stable-bit,nx=on,kvm=on,vendor=GenuineIntel
>>> -smp
>>> > cpus=4,sockets=1,cores=2,threads=2"
>>> > monitor="-monitor none"
>>> > # rombar=1 = good
>>> > vfio="-device
>>> > vfio-pci,host=01:00.0,x-vga=off,multifunction=on,rombar=1,ro
>>> mfile=/${bios}/xfx-rx480-stock.rom,addr=10.0
>>> > -device vfio-pci,host=01:00.1,addr=10.1"
>>> > machine="-machine q35,accel=kvm,usb=off,vmport=off,kernel_irqchip=on"
>>> > net="-netdev user,id=vmnic,restrict=n,hostfwd=tcp::1022-:22 -device
>>> > virtio-net-pci,romfile=,netdev=vmnic"
>>> > display="-display none"
>>> > graphic=""
>>> > sound=""
>>> > inputs=""
>>> > image_file="windoze.img"
>>> > serial="-serial stdio"
>>> >
>>> > if [ ! -z "${1}" ] ; then
>>> >    image_file="${1}"
>>> > fi
>>> >
>>> >     for dev in 0000:01:00.0 0000:01:00.1 ; do
>>> >         vendor="$(cat /sys/bus/pci/devices/${dev}/vendor)"
>>> >         device="$(cat /sys/bus/pci/devices/${dev}/device)"
>>> >         if [ -e "/sys/bus/pci/devices/${dev}/driver" ]; then
>>> >             echo "${dev}" > "/sys/bus/pci/devices/${dev}/d
>>> river/unbind"
>>> >          fi
>>> >          echo "${vendor}" "${device}" > /sys/bus/pci/drivers/vfio-pci/
>>> new_id
>>> >     done
>>> >
>>> > inputs="-usbdevice host:xxxx:yyyy"
>>> >
>>> > if [ ! -f "${image_file}" ] ; then
>>> >     loop_dev="$(losetup --find)"
>>> >     qemu-img create -f raw "${image_file}" 12G
>>> >     sgdisk --zap-all "${image_file}"
>>> >     sgdisk --set-alignment=1 --new=1:34:131071 "${image_file}"
>>> >     sgdisk --typecode 1:ef00 "${image_file}"
>>> >     sgdisk --set-alignment=1 --new=2:131072: "${image_file}"
>>> >     sgdisk --typecode 2:8300 "${image_file}"
>>> >     sgdisk --partition-guid=1:R
>>> >     sgdisk --partition-guid=2:R
>>> >     gdisk -l  "${image_file}"
>>> >     tmpMount="$(mktemp -d)"
>>> >     losetup --partscan "${loop_dev}" "${image_file}"
>>> >     mkfs.vfat -f1 -F12 "${loop_dev}"p1
>>> >     mount -orw "${loop_dev}"p1 "${tmpMount}"
>>> >     mkdir -p "${tmpMount}"/EFI/BOOT
>>> >     cp /mnt/work/os/ar//lib/modules/current/../bootx64.efi
>>> > "${tmpMount}"/EFI/BOOT/BOOTX64.EFI
>>> >     umount "${tmpMount}"
>>> >     mkfs.ext4 -O
>>> > ^has_journal,extent,huge_file,flex_bg,inline_data,64bit,dir_
>>> nlink,extra_isize,bigalloc,sparse_super2
>>> > -E num_backup_sb=0 -G 32 -C 4096 -I 256 "${loop_dev}"p2
>>> >     tune2fs -E hash_alg=tea -e remount-ro "${loop_dev}"p2
>>> >     mount -t ext4 -onoatime,nodiratime,user_xatt
>>> r,acl,noauto,delalloc,rw
>>> > "${loop_dev}"p2 "${tmpMount}"
>>> >     rsync -SHax /mnt/work/os/ar/ "${tmpMount}"/
>>> >     umount "${tmpMount}"
>>> >     rmdir "${tmpMount}"
>>> >     losetup --detach "${loop_dev}"
>>> > fi
>>> >
>>> > qemu-system-x86_64 \
>>> >    -nodefaults \
>>> >    -nodefconfig \
>>> >    -enable-kvm \
>>> >    -no-fd-bootchk \
>>> >    -no-user-config \
>>> >    -no-hpet \
>>> >    -rtc base=utc,clock=host,driftfix=none \
>>> >    ${mem} \
>>> >    ${machine} \
>>> >    ${cpus} \
>>> >    -L ${bios} \
>>> >    -drive if=pflash,format=raw,readonly,file=${bios}/OVMF_CODE-pure-efi.fd
>>> \
>>> >    -drive if=pflash,format=raw,readonly,file=${bios}/OVMF_1600_600-efi.fd
>>> \
>>> >    ${vfio} \
>>> >    -drive
>>> > id=disk0,if=none,format=raw,cache=none,detect-zeroes=on,copy
>>> -on-read=off,file="${image_file}"
>>> > -device virtio-scsi-pci --device scsi-hd,drive=disk0,bootindex=0 \
>>> >    ${net} \
>>> >    ${vga} \
>>> >    ${display} \
>>> >    ${inputs} \
>>> >    ${graphic} \
>>> >    ${sound} \
>>> >    ${monitor} \
>>> >    ${serial} \
>>> >    -parallel none
>>> >
>>> >
>>> > Cheers
>>> >
>>> > Ryan
>>> >
>>> >
>>> >> I have a working configuration with an RX480, Windows 10 guest and
>>> Linux
>>> >> x64 host, but with a Sandy Bridge i5. Can you give more information?
>>> Host
>>> >> kernel version, chipset, iommu groups, qemu/libvirt configuration...
>>> Have
>>> >> you ever managed to get it working with a different graphics card or
>>> guest
>>> >> OS?
>>> >>
>>> >>
>>> >> Javi
>>> >>
>>> >> 2017-02-03 5:22 GMT+01:00 <ryanlynch at sigaint.org>:
>>> >>
>>> >>> Does the RX480 work with windows 10 guest on linux x64 host haswell
>>> >>> vt-d?
>>> >>> I have working config for linux guest but windows 10 gives error -31
>>> >>> "Could not install drivers" and video driver using low res vga driver
>>> >>> (from windows) all booting UEFI.
>>> >>>
>>> >>> Have tried 3 different windows version drivers 16.9 16.12 and 17.1
>>> and
>>> >>> still have same problem. Anyone have success with this?
>>> >>>
>>> >>> Lync
>>> >>>
>>> >>> _______________________________________________
>>> >>> vfio-users mailing list
>>> >>> vfio-users at redhat.com
>>> >>> https://www.redhat.com/mailman/listinfo/vfio-users
>>> >>>
>>> >
>>> > _______________________________________________
>>> > vfio-users mailing list
>>> > vfio-users at redhat.com
>>> > https://www.redhat.com/mailman/listinfo/vfio-users
>>>
>>>
>>>
>>
>> _______________________________________________
>> vfio-users mailing list
>> vfio-users at redhat.com
>> https://www.redhat.com/mailman/listinfo/vfio-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/vfio-users/attachments/20170204/2ffd0065/attachment.htm>


More information about the vfio-users mailing list