<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 2016-02-16 16:14, Ben J wrote:<br>
    <blockquote
cite="mid:CAJ86UyewMktUowLop2rSyJo3-ybAg3p__=KcfZ_TqfRPqLkaiQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <p dir="ltr">Are you running any graphics drivers on the host
        system at all? If so, try blacklisting all of them and launching
        your VM from the system's base graphics. I've had this error and
        it seems to be caused by the driver for a different card somehow
        claiming it. Even if you have the card claimed by vfio it's
        still possible for it to interfere.</p>
      <div class="gmail_quote">On Feb 16, 2016 2:37 PM, "Nicolas
        Roy-Renaud" <<a moz-do-not-send="true"
          href="mailto:nicolas.roy-renaud.1@ens.etsmtl.ca">nicolas.roy-renaud.1@ens.etsmtl.ca</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> I've been wanting to
            report this one for a while, but I was hoping I could gather
            some more information first to have a clear idea of what's
            wrong. Hopefully some people on the mailing list will be
            able to help us solve this.<br>
            <br>
            The guest GPU I'm using on my current VFIO machine is an
            Asus-made GTX 970 (GTX970-DC2OC-4GD5). Although the BIOS is
            supposed to support UEFI (none of those on TechPowerUp do,
            but running GPU-Z on a base-metal Windows install proves
            mine actually does), whenever I try to perform a firmare
            dump from linux with the vfio driver or boot a VM that
            should claim this card, I get an "<code>Invalid ROM contents</code>"
            error. Last month, someone else came here asking about a
            similar issue, and I realized after asking a few questions
            that he was trying to pass an Asus-made GTX 750
            (GTX750TI-PH-2GD5). As it turned out, he was experiencing
            the exact same issue I had before and managed to work around
            it using the same procedure.<br>
            <br>
            As it turns out, the problem can be avoided when mounting
            the card on a live VM, which somehow bypasses the ROM check
            and runs without a hitch on my machine.<br>
            <br>
            This has me believe that it might be a problem that's
            specific to Asus cards (and perhaps only their Nvidia cards
            or even just their Maxwell cards), but I'm not sure where
            the problem could possibly come from and whether it's
            related to vfio itself or if it's an issue on Asus' end.
            Either way, I'd need help from someone who's more familiar
            with vfio than I am to help diagnose the issue, or possibly
            someone else with the same isue so we could evaluate how
            widespread the problem actually is.<br>
          </div>
          <br>
          _______________________________________________<br>
          vfio-users mailing list<br>
          <a moz-do-not-send="true" href="mailto:vfio-users@redhat.com">vfio-users@redhat.com</a><br>
          <a moz-do-not-send="true"
            href="https://www.redhat.com/mailman/listinfo/vfio-users"
            rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/vfio-users</a><br>
          <br>
        </blockquote>
      </div>
    </blockquote>
    Hi, sorry if it took a while to reply.<br>
    <br>
    I've just tried running the VM with nouveau blacklisted (I normally
    use nouveau to drive a GT210 for my host, I haven't installed the
    blob on it since my last clean install) and after removing the
    module from my kernel image so it doesn't get loaded at boot. As of
    now, none of the screens connected to the computer turn on (the VM
    screen stays frozen on the gummiboot menu once Linux starts, but
    that's normal), and lspci reports this :<br>
    <blockquote>
      <pre>01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)</pre>
      <pre>    Subsystem: ASUSTeK Computer Inc. Device [1043:8508]</pre>
      <pre>    Kernel driver in use: vfio-pci</pre>
      <pre>    Kernel modules: nouveau</pre>
      <pre>01:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)</pre>
      <pre>    Subsystem: ASUSTeK Computer Inc. Device [1043:8508]</pre>
      <pre>    Kernel driver in use: vfio-pci</pre>
      <pre>    Kernel modules: snd_hda_intel</pre>
      <pre>06:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce G210] [10de:0a60] (rev a2)</pre>
      <pre>    Subsystem: PC Partner Limited / Sapphire Technology Device [174b:2180]</pre>
      <pre>    Kernel modules: nouveau</pre>
      <pre>06:00.1 Audio device [0403]: NVIDIA Corporation High Definition Audio Controller [10de:0be3] (rev a1)</pre>
      <pre>    Subsystem: PC Partner Limited / Sapphire Technology Device [174b:2180]</pre>
      <pre>    Kernel driver in use: snd_hda_intel</pre>
      <pre>    Kernel modules: snd_hda_intel</pre>
    </blockquote>
    Nevertheless, this is what I get when I try booting up my VM:<br>
    <blockquote>
      <pre>[   92.552660] tun: Universal TUN/TAP device driver, 1.6</pre>
      <pre>[   92.552664] tun: (C) 1999-2004 Max Krasnyansky <a class="moz-txt-link-rfc2396E" href="mailto:maxk@qualcomm.com"><maxk@qualcomm.com></a></pre>
      <pre>[   92.609290] device vnet0 entered promiscuous mode</pre>
      <pre>[   92.622575] br0: port 2(vnet0) entered forwarding state</pre>
      <pre>[   92.622586] br0: port 2(vnet0) entered forwarding state</pre>
      <pre>[   93.552472] vfio-pci 0000:01:00.1: enabling device (0000 -> 0002)</pre>
      <pre>[   93.569216] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x1e@0x258</pre>
      <pre>[   93.569226] vfio_ecap_init: 0000:01:00.0 hiding ecap 0x19@0x900</pre>
      <pre>[   95.396073] vfio-pci 0000:01:00.0: Invalid ROM contents</pre>
      <pre>[   95.396161] vfio-pci 0000:01:00.0: Invalid ROM contents</pre>
      <pre>[   97.021048] kvm: zapping shadow pages for mmio generation wraparound</pre>
      <pre>[   97.063786] kvm: zapping shadow pages for mmio generation wraparound</pre>
    </blockquote>
    So that doesn't seem to be the problem.<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 2016-02-16 14:56, Hristo Iliev
      wrote:<br>
    </div>
    <blockquote
      cite="mid:FC9C2631-BD82-4D3A-B056-FADC83F5274B@hiliev.eu"
      type="cite">
      On 16.02.2016, at 20:24, Nicolas Roy-Renaud <<a
        moz-do-not-send="true"
        href="mailto:nicolas.roy-renaud.1@ens.etsmtl.ca" class=""><a class="moz-txt-link-abbreviated" href="mailto:nicolas.roy-renaud.1@ens.etsmtl.ca">nicolas.roy-renaud.1@ens.etsmtl.ca</a></a>>
      wrote:<br class="">
      <div>
        <blockquote type="cite" class=""><br
            class="Apple-interchange-newline">
          <div class="">
            <div bgcolor="#FFFFFF" text="#000000" class=""> I've been
              wanting to report this one for a while, but I was hoping I
              could gather some more information first to have a clear
              idea of what's wrong. Hopefully some people on the mailing
              list will be able to help us solve this.<br class="">
              <br class="">
              The guest GPU I'm using on my current VFIO machine is an
              Asus-made GTX 970 (GTX970-DC2OC-4GD5). Although the BIOS
              is supposed to support UEFI (none of those on TechPowerUp
              do, but running GPU-Z on a base-metal Windows install
              proves mine actually does), whenever I try to perform a
              firmare dump from linux with the vfio driver or boot a VM
              that should claim this card, I get an "<code class="">Invalid
                ROM contents</code>" error. Last month, someone else
              came here asking about a similar issue, and I realized
              after asking a few questions that he was trying to pass an
              Asus-made GTX 750 (GTX750TI-PH-2GD5). As it turned out, he
              was experiencing the exact same issue I had before and
              managed to work around it using the same procedure.<br
                class="">
              <br class="">
              As it turns out, the problem can be avoided when mounting
              the card on a live VM, which somehow bypasses the ROM
              check and runs without a hitch on my machine.<br class="">
              <br class="">
              This has me believe that it might be a problem that's
              specific to Asus cards (and perhaps only their Nvidia
              cards or even just their Maxwell cards), but I'm not sure
              where the problem could possibly come from and whether
              it's related to vfio itself or if it's an issue on Asus'
              end. Either way, I'd need help from someone who's more
              familiar with vfio than I am to help diagnose the issue,
              or possibly someone else with the same isue so we could
              evaluate how widespread the problem actually is.<br
                class="">
            </div>
          </div>
        </blockquote>
        <div><br class="">
        </div>
        Hi Nicolas,</div>
      <div><br class="">
      </div>
      <div>My GPU is the the same as yours - ASUS STRIX
        GTX970-DC2OC-4GD5. I’ve never experienced the problem you are
        describing. The card has been working flawlessly with OVMF in
        both my old Win 8.1 VM and then with my newer Win 10 VM. Both
        VMs are vanilla virt-manager creations, i.e. no fancy VGA ROM
        files or special command-line parameters for qemu.</div>
      <div><br class="">
      </div>
      <div>Could it be due to e.g. a different GPU BIOS version? Have
        you reflashed/upgraded yours?</div>
      <div><br class="">
      </div>
      <div>Cheers,</div>
      <div>Hristo</div>
      <div><br class="">
        <blockquote type="cite" class="">
          <div class="">_______________________________________________<br
              class="">
            vfio-users mailing list<br class="">
            <a moz-do-not-send="true"
              href="mailto:vfio-users@redhat.com" class="">vfio-users@redhat.com</a><br
              class="">
            <a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/vfio-users">https://www.redhat.com/mailman/listinfo/vfio-users</a><br
              class="">
          </div>
        </blockquote>
      </div>
      <br class="">
    </blockquote>
    <br>
    That's extremely curious, might I ask what distro you're running on?
    I was using stock libvirt and qemu from the arch repos, then I read
    somewhere that a recent patch for qemu allowed you to pass it an
    argument that would spoof hypervisor information so that the nvidia
    drivers wouldn't notice you're using one, but don't have to disable
    any of the timers and other performance improvements so I switched
    to git. Those don't seem related, though, the "Invalid ROM contents"
    error seems to come from vfio-pci. The firmware I'm using is the
    stock one that came with my card, but it doesn't seem to match any
    of those on techpowerup. I'll be attaching it here in case someone
    wants to diff it.<br>
  </body>
</html>