<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hi,<br>
      <br>
      not sure in this case, with other GPU, R7 240 it works fine,
      there's nothing else on the same iommu group than the gpu and it's
      soundcard.<br>
      When I started teting out things like this some time ago libvirt
      didn't allow to set up all the things that were needes for vga
      passthrough, so I've just trashed and stayed like that :) Might
      retry now on debian 9, if it supports what I need or not.<br>
      Anyway, with libvirt it's usually more difficult to fix the wrong
      commandline so I'm trying to find out what is actually wrong to be
      able to fix it, not to hope libvirt will work out of the box and
      if not, I'm doomed :)<br>
      <br>
      Gh.<br>
      <br>
      Quentin Deldycke wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHYLta5Ty3uG27rgGm=5umS2VCqcZfdtu8sRswm3c8Vhbj9VOQ@mail.gmail.com">
      <div dir="ltr">Hello,
        <div><br>
        </div>
        <div>I think that first, you should use libvirt.</div>
        <div>I believe that most bugs are from a badly made qemu command
          line, bad isolations or stull like this.</div>
        <div><br>
        </div>
        <div>Libvirt => less pain, more working vms!</div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="gmail_signature" data-smartmail="gmail_signature">
            <div dir="ltr">--
              <div>Deldycke Quentin<br>
              </div>
              <div>
                <div><br>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">On 22 August 2017 at 13:16, Jiri Novak
          <span dir="ltr"><<a href="mailto:jiri.novak@ghorland.net"
              target="_blank" moz-do-not-send="true">jiri.novak@ghorland.net</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
            <br>
            I've got back again to  testing the RX 480 setup with tips I
            got<br>
            previously (like using i440fx instead of q35) and got a bit
            further, now<br>
            I can run it at least in 2D mode (if I use driver from
            windows update)<br>
            on windows 10 rev 1703.<br>
            <br>
            If I install full driver from AMD website, the host hangs
            during install<br>
            and after that, it runs about 2-3minutes after boot until it
            hangs.<br>
            With driver from windows update, it hangs when I run any
            game.<br>
            <br>
            Any ideas what to try next, how to find out what's wrong?<br>
            <br>
            Qemu commandline:<br>
            <br>
            LC_ALL=C<br>
            PATH=/usr/local/sbin:/usr/<wbr>local/bin:/usr/sbin:/usr/bin:/<wbr>sbin:/bin<br>
            QEMU_AUDIO_DRV=pa /usr/bin/taskset -c 4-7,20-23<br>
            /usr/bin/qemu-system-x86_64 \<br>
                -name 12-wingame \<br>
                -machine pc-i440fx-2.8,accel=kvm,usb=<wbr>off \<br>
                -cpu host \<br>
                -object<br>
            memory-backend-file,id=mem0,<wbr>size=16G,mem-path=/dev/<wbr>hugepages1g,share=off
            \<br>
                -numa node,nodeid=0,memdev=mem0 \<br>
                -m 16G \<br>
                -realtime mlock=off \<br>
                -smp sockets=1,cores=4,threads=2 \<br>
                -uuid 4baaaaaa-aaf5-aaaaaa-919d-<wbr>aaaaaaacaaaa \<br>
                -nographic -no-user-config -nodefaults -no-hpet \<br>
                -rtc base=localtime,driftfix=slew \<br>
                -global kvm-pit.lost_tick_policy=<wbr>discard \<br>
                -boot d \<br>
                -drive<br>
            file=/dev/Z-ssd/qemu/12-<wbr>wingame,if=none,id=drive-<wbr>virtio-disk0,format=raw,cache=<wbr>none,aio=native<br>
            \<br>
                -drive<br>
            file=/dev/Z-ssd/data/games-<wbr>blizzard,if=none,id=drive-<wbr>virtio-disk1,format=raw,cache=<wbr>none,aio=native<br>
            \<br>
                -device virtio-scsi-pci,bus=pci.0,<wbr>addr=0x5 \<br>
                -device scsi-hd,drive=drive-virtio-<wbr>disk0 \<br>
                -device scsi-hd,drive=drive-virtio-<wbr>disk1 \<br>
                -netdev tap,id=netdev0,ifname=<wbr>V0300t12,script=no,downscript=<wbr>no
            \<br>
                -device<br>
            virtio-net-pci,netdev=netdev0,<wbr>id=net0,mac=42:42:42:00:00:0c,<wbr>bus=pci.0,addr=0x6<br>
            \<br>
                -device<br>
            vfio-pci,host=02:00.0,id=<wbr>hostdev6,bus=pci.0,<wbr>multifunction=on,addr=0x3,x-<wbr>vga=on,romfile=/root/roms/<wbr>Sapphire.RX480.4096.161002.rom<br>
            \<br>
                -device vfio-pci,host=02:00.1,id=<wbr>hostdev7,bus=pci.0,addr=0x3.<wbr>0x1
            \<br>
                -device vfio-pci,host=07:00.0,id=<wbr>hostdev2,bus=pci.0,addr=0x4
            \<br>
                -vga none \<br>
                -soundhw hda \<br>
                -device virtio-rng-pci \<br>
                -chardev stdio,id=seabios \<br>
                -device isa-debugcon,iobase=0x402,<wbr>chardev=seabios \<br>
                -msg timestamp=on \<br>
                >>/var/log/kvm/12-wingame.<wbr>stdout
            2>>/var/log/kvm/12-wingame.<wbr>stderr &<br>
            <br>
            Usually I don't manage to get any error, though once the
            host managed to<br>
            spit out this to console (when it crashed after 2 minutes
            with amd driver)<br>
            <br>
            INFO: rcu_sched detected stalls on CPUs/tasks:<br>
            [ 1558.573332]     2-...: (0 ticks this GP) idle=a16/0/0<br>
            softirq=17601/17601 fqs=1<br>
            [ 1558.573400]     17-...: (1 GPs behind) idle=9c8/0/0<br>
            softirq=13311/13311 fqs=1<br>
            [ 1558.573452]     20-...: (24 GPs behind) idle=be0/0/0<br>
            softirq=30971/30972 fqs=1<br>
            [ 1558.573505]     21-...: (4 GPs behind) idle=4a0/0/0<br>
            softirq=26182/26183 fqs=1<br>
            [ 1558.573557]     23-...: (0 ticks this GP)
            idle=b45/140000000000000/0<br>
            softirq=30549/30549 fqs=1<br>
            [ 1558.573615]     (detected by 14, t=5252 jiffies, g=47014,
            c=47013,<br>
            q=40045)<br>
            [ 1558.573670] Task dump for CPU 2:<br>
            [ 1558.573672] swapper/2       R  running task        0   
             0      1<br>
            0x00200008<br>
            [ 1558.573680]  0000000000000083 640fb4432252d28b
            0000016601c54f00<br>
            0000000000000002<br>
            [ 1558.573685]  ffffffffb78b2320 0000000000000004
            ffffffffb7205d60<br>
            ffffffffb78b2320<br>
            [ 1558.573689]  ffffc24a4028a0d0 ffffffffb78b2518
            0000000000000005<br>
            ffffffffb70cbb2a<br>
            [ 1558.573693] Call Trace:<br>
            [ 1558.573705]  [<ffffffffb7205d60>] ?
            intel_idle+0x100/0x110<br>
            [ 1558.573712]  [<ffffffffb70cbb2a>] ?
            cpuidle_enter_state+0xea/0x2b0<br>
            [ 1558.573717]  [<ffffffffb6cb9504>] ?
            cpu_startup_entry+0x154/0x240<br>
            [ 1558.573721]  [<ffffffffb6c4805d>] ?
            start_secondary+0x14d/0x190<br>
            [ 1558.573724] Task dump for CPU 17:<br>
            [ 1558.573726] swapper/17      R  running task        0   
             0      1<br>
            0x00200008<br>
            [ 1558.573729]  0000000000000083 fc4308ad94b8ed74
            0000016749d5af00<br>
            0000000000000011<br>
            [ 1558.573734]  ffffffffb78b2320 0000000000000004
            ffffffffb7205d60<br>
            ffffffffb78b2320<br>
            [ 1558.573737]  ffffc24a4044a0d0 ffffffffb78b2518
            0000000000000005<br>
            ffffffffb70cbb2a<br>
            [ 1558.573741] Call Trace:<br>
            [ 1558.573746]  [<ffffffffb7205d60>] ?
            intel_idle+0x100/0x110<br>
            [ 1558.573750]  [<ffffffffb70cbb2a>] ?
            cpuidle_enter_state+0xea/0x2b0<br>
            [ 1558.573753]  [<ffffffffb6cb9504>] ?
            cpu_startup_entry+0x154/0x240<br>
            [ 1558.573756]  [<ffffffffb6c4805d>] ?
            start_secondary+0x14d/0x190<br>
            [ 1558.573758] Task dump for CPU 20:<br>
            [ 1558.573759] swapper/20      R  running task        0   
             0      1<br>
            0x00200008<br>
            [ 1558.573763]  0000000000000083 39fde3c30b22afa7
            0000016b9477af00<br>
            0000000000000014<br>
            [ 1558.573767]  ffffffffb78b2320 0000000000000004
            ffffffffb7205d60<br>
            ffffffffb78b2320<br>
            [ 1558.573771]  ffffc24a4050a0d0 ffffffffb78b2518
            0000000000000005<br>
            ffffffffb70cbb2a<br>
            [ 1558.573774] Call Trace:<br>
            [ 1558.573778]  [<ffffffffb7205d60>] ?
            intel_idle+0x100/0x110<br>
            [ 1558.573782]  [<ffffffffb70cbb2a>] ?
            cpuidle_enter_state+0xea/0x2b0<br>
            [ 1558.573785]  [<ffffffffb6cb9504>] ?
            cpu_startup_entry+0x154/0x240<br>
            [ 1558.573788]  [<ffffffffb6c4805d>] ?
            start_secondary+0x14d/0x190<br>
            [ 1558.573790] Task dump for CPU 21:<br>
            [ 1558.573792] swapper/21      R  running task        0   
             0      1<br>
            0x00200008<br>
            [ 1558.573795]  0000000000000083 6b8f35123dc25bdb
            0000016b9477af00<br>
            0000000000000015<br>
            [ 1558.573799]  ffffffffb78b2320 0000000000000004
            ffffffffb7205d60<br>
            ffffffffb78b2320<br>
            [ 1558.573803]  ffffc24a4054a0d0 ffffffffb78b2518
            0000000000000005<br>
            ffffffffb70cbb2a<br>
            [ 1558.573806] Call Trace:<br>
            [ 1558.573810]  [<ffffffffb7205d60>] ?
            intel_idle+0x100/0x110<br>
            [ 1558.573814]  [<ffffffffb70cbb2a>] ?
            cpuidle_enter_state+0xea/0x2b0<br>
            [ 1558.573817]  [<ffffffffb6cb9504>] ?
            cpu_startup_entry+0x154/0x240<br>
            [ 1558.573820]  [<ffffffffb6c4805d>] ?
            start_secondary+0x14d/0x190<br>
            [ 1558.573822] Task dump for CPU 23:<br>
            [ 1558.573824] qemu-system-x86 R  running task        0
            18608      1<br>
            0x00000800<br>
            [ 1558.573827]  0000000000000000 ffffffffc1551560
            0000000000000000<br>
            0000000000000000<br>
            [ 1558.573831]  ffff9404e1c00040 ffffffffc153d9a7
            0000000000000000<br>
            ffff9404e1c02760<br>
            [ 1558.573835]  ffffffffc1519882 0000000000000000
            ffff9404e1c02760<br>
            0000000000000004<br>
            [ 1558.573839] Call Trace:<br>
            [ 1558.573882]  [<ffffffffc153d9a7>] ?
            x86_emulate_insn+0x257/0xcf0 [kvm]<br>
            [ 1558.573909]  [<ffffffffc1519882>] ?<br>
            emulator_pio_in_emulated+<wbr>0x102/0x190 [kvm]<br>
            [ 1558.573937]  [<ffffffffc1539d31>] ?
            writeback+0x61/0x210 [kvm]<br>
            [ 1558.573962]  [<ffffffffc1535e1d>] ?
            writeback_registers+0x4d/0x60 [kvm]<br>
            [ 1558.573972]  [<ffffffffc09dc21f>] ?
            atomic_switch_perf_msrs+0x6f/<wbr>0xa0<br>
            [kvm_intel]<br>
            [ 1558.574011]  [<ffffffffc15252e3>] ?<br>
            kvm_arch_vcpu_ioctl_run+0x6b3/<wbr>0x1600 [kvm]<br>
            [ 1558.574035]  [<ffffffffc151f2fb>] ?
            kvm_arch_vcpu_load+0x5b/0x270 [kvm]<br>
            [ 1558.574039]  [<ffffffffb6c30765>] ?
            __kernel_fpu_end+0x35/0x100<br>
            [ 1558.574059]  [<ffffffffc150b4b5>] ?
            kvm_vcpu_ioctl+0x315/0x5d0 [kvm]<br>
            [ 1558.574063]  [<ffffffffb6ca1800>] ?
            wake_up_q+0x70/0x70<br>
            [ 1558.574066]  [<ffffffffb6cb8799>] ?
            __wake_up_common+0x49/0x80<br>
            [ 1558.574069]  [<ffffffffb6e1603f>] ?
            do_vfs_ioctl+0x9f/0x600<br>
            [ 1558.574092]  [<ffffffffc151b898>] ?
            kvm_on_user_return+0x68/0xa0 [kvm]<br>
            [ 1558.574094]  [<ffffffffb6e16614>] ?
            SyS_ioctl+0x74/0x80<br>
            [ 1558.574111]  [<ffffffffb720627b>] ?
            system_call_fast_compare_end+<wbr>0xc/0x9b<br>
            [ 1558.574116] rcu_sched kthread starved for 5248 jiffies!
            g47014 c47013<br>
            f0x2 RCU_GP_WAIT_FQS(3) ->state=0x100<br>
            [ 1558.574186] rcu_sched       W    0     8      2
            0x00000000<br>
            [ 1558.574189]  ffff9414d1facc00 0000000000000000
            ffff9404f8c3e080<br>
            ffff9404ffad8240<br>
            [ 1558.574193]  ffff9404f8c6f0c0 ffffa25a400b7db0
            ffffffffb72015d3<br>
            ffffa25a400b7de0<br>
            [ 1558.574197]  000000010004b899 ffff9404ffad8240
            0000000000000003<br>
            ffff9404f8c3e080<br>
            [ 1558.574201] Call Trace:<br>
            [ 1558.574205]  [<ffffffffb72015d3>] ?
            __schedule+0x233/0x6d0<br>
            [ 1558.574208]  [<ffffffffb7201aa2>] ?
            schedule+0x32/0x80<br>
            [ 1558.574211]  [<ffffffffb7204dae>] ?
            schedule_timeout+0x17e/0x310<br>
            [ 1558.574217]  [<ffffffffb6ce3e50>] ?
            del_timer_sync+0x50/0x50<br>
            [ 1558.574220]  [<ffffffffb6cdd605>] ?
            rcu_gp_kthread+0x505/0x850<br>
            [ 1558.574223]  [<ffffffffb6cb8799>] ?
            __wake_up_common+0x49/0x80<br>
            [ 1558.574226]  [<ffffffffb6cdd100>] ?
            rcu_note_context_switch+0xe0/<wbr>0xe0<br>
            [ 1558.574230]  [<ffffffffb6c965d7>] ?
            kthread+0xd7/0xf0<br>
            [ 1558.574234]  [<ffffffffb6c96500>] ?
            kthread_park+0x60/0x60<br>
            [ 1558.574238]  [<ffffffffb72064f5>] ?
            ret_from_fork+0x25/0x30<br>
            <br>
            Thanks,<br>
            Gh.<br>
            <br>
            <br>
            ______________________________<wbr>_________________<br>
            vfio-users mailing list<br>
            <a href="mailto:vfio-users@redhat.com"
              moz-do-not-send="true">vfio-users@redhat.com</a><br>
            <a href="https://www.redhat.com/mailman/listinfo/vfio-users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://www.redhat.com/<wbr>mailman/listinfo/vfio-users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>