<div dir="ltr">"options kvm ignore_msrs=1"<br><div><br></div><div>On the wiki page as it stands now there is a warning, "Silently ignoring unknown MSR accesses could potentially break other software within the VM or other VMs." I'm not clear on all of the ramifications, though it came up on the mailing list before. I basically decided "not important enough for me to do it" and forgot all the details. But I wouldn't remove this warning or suggest this as a performance gain unless the risks have been eliminated (or are only applicable to specific edge cases or something).</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 12, 2016 at 2:35 PM, Blank Field <span dir="ltr"><<a href="mailto:ihatethisfield@gmail.com" target="_blank">ihatethisfield@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">TL;DR point 2. is wrong, pcie-port, vfio-pci or pci-stub are allowed, see "IOMMU groups inside and out" blog post.</p><div class="HOEnZb"><div class="h5">
<div class="gmail_quote">On Apr 12, 2016 11:30 PM, "Bronek Kozicki" <<a href="mailto:brok@spamcop.net" target="_blank">brok@spamcop.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/04/2016 20:36, Nicolas Roy-Renaud wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've already rewritten the first two sections ("Prerequisites" and<br>
"Setting up IOMMU"), and the rest of the article should essentially<br>
follow the same basic structure and style. Replies here or on the wiki's<br>
discussion page would be much appreciated.<br>
</blockquote>
<br>
Hope Alex can clear any misconception I am about to present below<br>
<br>
<br>
1. I am using option iommu=pt, under impression this is expected to improve performance (my CPU is Xeon IvyBridge)<br>
<br>
2. does PCI bridge have to be in a separate IOMMU group than passed-through device?<br>
<br>
3. would be nice to provide hints for headless host. FWIW, I use combination of<br>
3.1. kernel options:<br>
console=ttyS0,115200N8R nomodest video=vesa:off video=efifb:off vga=normal<br>
3.2.following line in /etc/modprobe.d/vfio.conf:<br>
options vfio-pci disable_vga=1<br>
3.3. large list of blacklisted modules (all framebuffers and nvidia and AMD drivers) in /etc/modprobe.d/blacklist.conf:<br>
# This host is headless, prevent any modules from attaching to video hardware<br>
# NVIDIA<br>
blacklist nouveau<br>
blacklist nvidia<br>
# AMD<br>
blacklist radeon<br>
blacklist amdgpu<br>
blacklist amdkfd<br>
blacklist fglrx<br>
# HDMI sound on a GPU<br>
blacklist snd_hda_intel<br>
# Framebuffers (ALL of them)<br>
blacklist vesafb<br>
blacklist aty128fb<br>
blacklist atyfb<br>
blacklist radeonfb<br>
blacklist cirrusfb<br>
blacklist cyber2000fb<br>
blacklist cyblafb<br>
blacklist gx1fb<br>
blacklist hgafb<br>
blacklist i810fb<br>
blacklist intelfb<br>
blacklist kyrofb<br>
blacklist lxfb<br>
blacklist matroxfb_base<br>
blacklist neofb<br>
blacklist nvidiafb<br>
blacklist pm2fb<br>
blacklist rivafb<br>
blacklist s1d13xxxfb<br>
blacklist savagefb<br>
blacklist sisfb<br>
blacklist sstfb<br>
blacklist tdfxfb<br>
blacklist tridentfb<br>
blacklist vfb<br>
blacklist viafb<br>
blacklist vt8623fb<br>
blacklist udlfb<br>
<br>
4. ignore_msrs=1 also helps running Linux guests<br>
<br>
5. do not use qemu:arg for binding host device to guest, here is example how to do it properly:<br>
    <hostdev mode='subsystem' type='pci' managed='yes'><br>
      <driver name='vfio'/><br>
      <source><br>
        <address domain='0x0000' bus='0x82' slot='0x00' function='0x0'/><br>
      </source><br>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/><br>
    </hostdev><br>
5.1. for nVidia Quadro, add just below </source ...><br>
<rom bar='off'/><br>
<br>
6. if guest is started from BIOS rather than UEFI, keep the above <hostdev ...> but replace emulator with a script, e.g.<br>
# virsh dumpxml gdynia-vfio1 | grep emulator<br>
    <emulator>/usr/bin/<a href="http://qemu-system-x86_64.xvga.sh" rel="noreferrer" target="_blank">qemu-system-x86_64.xvga.sh</a></emulator><br>
# cat /usr/bin/<a href="http://qemu-system-x86_64.xvga.sh" rel="noreferrer" target="_blank">qemu-system-x86_64.xvga.sh</a><br>
#!/bin/sh<br>
exec nice --adjustment=-5 /usr/bin/qemu-system-x86_64 `echo "$@" | \<br>
    sed 's/-device vfio-pci,host=82:00.0/-device vfio-pci,host=82:00.0,x-vga=on/g' | \<br>
    sed 's/-device vfio-pci,host=03:00.0/-device vfio-pci,host=03:00.0,x-vga=on/g'`<br>
<br>
<br>
7. performance optimizations<br>
7.1. use huge pages<br>
7.2. use isolcpus<br>
7.3. use vCPU pinnig<br>
7.4. use virtio-scsi with multiple queues (depending on number of available CPUs, after removing these dedicated to guest)<br>
7.5. use multiple queues for virtio-net<br>
7.6. for Linux  guests, use P9 for mounting host filesystems in guest<br>
<br>
<br>
<br>
<br>
B.<br>
<br>
_______________________________________________<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/listinfo/vfio-users</a><br>
</blockquote></div>
</div></div><br>_______________________________________________<br>
vfio-users mailing list<br>
<a href="mailto:vfio-users@redhat.com">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/listinfo/vfio-users</a><br>
<br></blockquote></div><br></div>