<div dir="auto">I dont know, it depends of the game and if this part of the code have impact on fps...<div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Kind of thread locks maybe?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 6 Jan 2017 11:23 p.m., "Marius Steffen" <<a href="mailto:marius.steffen@posteo.de">marius.steffen@posteo.de</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">
    <p>I think I've read about this on this mailing list, because when
      playing Crysis 3, my VM kept crashing (more precise: the game
      didn't even start), until I set 'options kvm ignore_msrs=1' in
      modprobe.d .conf file.<br>
      When switching to Win8, will the performance be better?</p>
    <p><br>
    </p>
    <p>Thanks,</p>
    <p>Marius<br>
    </p>
    <br>
    <div class="m_-4091682352409659909moz-cite-prefix">Am 06.01.2017 um 14:52 schrieb Quentin
      Deldycke:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">For adding a bit on this subjects, some games
        (blizzard games, tomb raider at it's launch) use a lot of msrs
        during run.
        <div>It seems this is made for their anti-cheat / hack systems.</div>
        <div><br>
        </div>
        <div>Heroes of the storm, SC2 are spamming these msrs. This
          reduce performance quite hardly.</div>
        <div><br>
        </div>
        <div>Funny thing: This "bug" does not apply to win8 / win7 :)</div>
        <div><br>
        </div>
        <div>For reference we spoke about such in this thread a long
          time ago:</div>
        <div><a href="https://www.redhat.com/archives/vfio-users/2016-May/msg00134.html" target="_blank">https://www.redhat.com/<wbr>archives/vfio-users/2016-May/<wbr>msg00134.html</a><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>The kernel spam of such error at Heroes of the storm login
          screen:</div>
        <div>
          <div>[136995.284205] kvm [6799]: vcpu2, guest rIP:
            0xfffff8016e757733 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR
            0x1, nop</div>
          <div>[136995.284217] kvm [6799]: vcpu2, guest rIP:
            0xfffff8016e757733 kvm_set_msr_common: MSR_IA32_DEBUGCTLMSR
            0x1, nop</div>
          <div>[137000.285330] kvm_get_msr_common: 302015 callbacks
            suppressed</div>
          <div>[137000.285337] kvm [6799]: vcpu5, guest rIP:
            0xfffff8016e75779c ignored rdmsr: 0x1c9</div>
          <div>[137000.285342] kvm [6799]: vcpu5, guest rIP:
            0xfffff8016e7577aa ignored rdmsr: 0x680</div>
          <div>[137000.285344] kvm [6799]: vcpu5, guest rIP:
            0xfffff8016e7577c1 ignored rdmsr: 0x6c0</div>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>
          <div class="m_-4091682352409659909gmail_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 6 January 2017 at 14:07, Thomas
          Lindroth <span dir="ltr"><<a href="mailto:thomas.lindroth@gmail.com" target="_blank">thomas.lindroth@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 01/06/2017 01:00 PM, Marius Steffen wrote:<br>
            </span><span>> Is there anything I can do to a)
              find the cause of this bad performance<br>
              > b) make my VM perform better?<br>
              <br>
            </span>One thing you can try is to run the game with poor
            performance and at the<br>
            same time run "perf kvm --host stat live" on the host. This
            will show how<br>
            many VM-EXIT kvm performs. VM-EXIT means the guest has done
            something the<br>
            hardware virtualisation can't handle, like accessing MSR or
            virtual IO.<br>
            <br>
            Some workloads will perform badly because they cause a lot
            of VM-EXIT.<br>
            Perf will tell you why a VM-EXIT was performed. The more
            common causes are<br>
            IO_INSTRUCTION and EPT_MISCONFIG. IO_INSTRUCTION means the
            guest tried to<br>
            access an x86 ioport and EPT_MISCONFIG seems to be an odd
            name for access<br>
            to memory mapped io. Sometimes a lot of time is spent in HLT
            but that's<br>
            normal. It only means the guest OS has nothing to do and
            goes idle.<br>
            <br>
            By running "perf kvm --host stat live --event=ioport" you
            can check which<br>
            ioport is accessed and "perf kvm --host stat live
            --event=mmio" shows<br>
            which address was accessed for memory mapped io.<br>
            <br>
            If you see that an mmio address is accessed a lot and want
            to find out what<br>
            it is you can run "virsh qemu-monitor-command
            <nameofvm> --hmp 'info mtree'"<br>
            to get a list of the memory layout of the VM. Unfortunately
            I don't know<br>
            of any way to get a similar list of ioports.<br>
            <br>
            As an example on my system some games like Rise of the Tomb
            Raider and<br>
            Assassin's Creed Unity will access ioport 0xb008 more than
            200,000 times/sec<br>
            and those games will have poor performance compared to
            native. Qemu<br>
            hardcode the acpi timer to ioport 0xb008 and those games
            excessively read<br>
            the hardware timer. I haven't figured out any way to work
            around the problem<br>
            but I run games with vsync on and even with the decreased
            performance I get<br>
            60fps in those titles.<br>
            <div class="m_-4091682352409659909HOEnZb">
              <div class="m_-4091682352409659909h5"><br>
                ______________________________<wbr>_________________<br>
                vfio-users mailing list<br>
                <a href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a><br>
                <a href="https://www.redhat.com/mailman/listinfo/vfio-users" rel="noreferrer" target="_blank">https://www.redhat.com/mailman<wbr>/listinfo/vfio-users</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="m_-4091682352409659909mimeAttachmentHeader"></fieldset>
      <br>
      <pre>______________________________<wbr>_________________
vfio-users mailing list
<a class="m_-4091682352409659909moz-txt-link-abbreviated" href="mailto:vfio-users@redhat.com" target="_blank">vfio-users@redhat.com</a>
<a class="m_-4091682352409659909moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/vfio-users" target="_blank">https://www.redhat.com/<wbr>mailman/listinfo/vfio-users</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div></div>