Announcement

Collapse
No announcement yet.

AMD/Ryzen NPT Fix Discovered For Better Pass-Through Graphics Performance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by Creak View Post
    I have an AMD FX CPU and an RX 480 GPU, I've tried to have GPU passthrough on a VM, but it didn't work. Could that bug be linked to my problem? Or it's simply that my setup can't handle GPU passthrough?
    Yes. It's a 10 year old bug. This isn't something new because of the Ryzen architecture. The difference between PCI-E 2.x and 3 isn't the problem We don't even saturate 2.x bus never mind 3.

    Comment


    • #12
      Originally posted by GraysonPeddie View Post
      I have a question concerning the GPU passthrough. How can I get my mouse and keyboard to interact with the VM without having a second USB mouse and keyboard? I tried using a keyboard-mouse switcher (a KVM without video) and switching back to the VM causes the keyboard and mouse to malfunction. I don't have Linux handy, but I remember that every time I unplug my mouse and keyboard, the ID number increments and I did not want that to happen. I'm at World Services for the Blind with only a Windows laptop as I'm getting certified in A+ and Network+, but my question about VM in Linux with PCIe passthrough still stands.
      You can get KVM with DDM. That one prevents the disconnects and dont emulate mouse/keyboard.

      Comment


      • #13
        Here is the original thread about this https://www.reddit.com/r/VFIO/commen...ssed_on_iommu/



        Paolo (from RedHat) already made a official patch here: https://patchwork.kernel.org/patch/10027523/

        For many years some users of assigned devices have reported worse
        performance on AMD processors with NPT than on AMD without NPT,
        Intel or bare metal.

        The reason turned out to be that SVM is discarding the guest PAT
        setting and uses the default (PA0=PA4=WB, PA1=PA5=WT, PA2=PA6=UC-,
        PA3=UC). The guest might be using a different setting, and
        especially might want write combining but isn't getting it
        (instead getting slow UC or UC- accesses).

        Thanks a lot to [email protected] for noticing the relation
        to the g_pat setting. The patch has been tested also by a bunch
        of people on VFIO users forums.

        Fixes: 709ddebf81cb40e3c36c6109a7892e8b93a09464
        Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=196409
        Cc: [email protected]
        Last edited by vortex; 27 October 2017, 01:26 PM.

        Comment


        • #14
          Originally posted by GraysonPeddie View Post
          I have a question concerning the GPU passthrough. How can I get my mouse and keyboard to interact with the VM without having a second USB mouse and keyboard? I tried using a keyboard-mouse switcher (a KVM without video) and switching back to the VM causes the keyboard and mouse to malfunction. I don't have Linux handy, but I remember that every time I unplug my mouse and keyboard, the ID number increments and I did not want that to happen. I'm at World Services for the Blind with only a Windows laptop as I'm getting certified in A+ and Network+, but my question about VM in Linux with PCIe passthrough still stands.
          I second the suggestion to use Synergy. Have the usb passthrough so the mouse and keyboard is on the Windows guest, run Synergy server on the Windows, and Synergy client on the host, to minimize latency.

          BTW, Synergy is free. No need to pay unless you want their pre-compiled binaries. It's free as in GPL2.

          Comment


          • #15
            Hm, sad to hear that Vega is having GPU reset problems. Is RX 480 having the same problems too? One of the reasons why I want to replace my current GPU is because it's not capable of passthrough, would be nice if the replacement was...

            Comment


            • #16
              And suddenly current-gen Ryzen systems become viable for my use-case. I'll probably still wait from Zen+ or Zen2, but...... I might bet it now.

              Originally posted by GraysonPeddie View Post
              I have a question concerning the GPU passthrough. How can I get my mouse and keyboard to interact with the VM without having a second USB mouse and keyboard? I tried using a keyboard-mouse switcher (a KVM without video) and switching back to the VM causes the keyboard and mouse to malfunction. I don't have Linux handy, but I remember that every time I unplug my mouse and keyboard, the ID number increments and I did not want that to happen. I'm at World Services for the Blind with only a Windows laptop as I'm getting certified in A+ and Network+, but my question about VM in Linux with PCIe passthrough still stands.
              Like someone suggested, Synergy works. There is also the ability to do some nifty event passthrough stuff, the details of which I can't remember right now. It's in my libvirt config at home. I'll try to remember to grab a copy of the config changes and find some references for you.

              Comment


              • #17
                Originally posted by nuetzel View Post
                GREAT finding and much appreciated for _server_ workloads.
                It's not used only on servers. There are some gamers doing that to pass through the GPU to a Windows VM running in KVM or something.

                Comment


                • #18
                  Originally posted by Creak View Post
                  I have an AMD FX CPU and an RX 480 GPU, I've tried to have GPU passthrough on a VM, but it didn't work. Could that bug be linked to my problem? Or it's simply that my setup can't handle GPU passthrough?
                  What tutorial you followed? You enabled AMD-Vi or IOMMU in the BIOS/UEFI?

                  You saw the IOMMU enabled in dmesg?

                  See this tutorial https://heiko-sieger.info/running-wi...a-passthrough/

                  Comment


                  • #19
                    Originally posted by sarnex View Post
                    It was Geoff who changed the value, I'm only the messenger
                    Oops, typo fixed. Thanks.
                    Test signature

                    Comment


                    • #20
                      Originally posted by vortex View Post
                      Here is the original thread about this https://www.reddit.com/r/VFIO/commen...ssed_on_iommu/

                      Paolo (from RedHat) already made a official patch here: https://patchwork.kernel.org/patch/10027523/
                      Excellent.

                      Also answers my "who is Paulo ?" question from when the manager of our server BU SW team said they would "work with Paulo to get a proper fix".
                      Last edited by bridgman; 27 October 2017, 07:13 PM.
                      Test signature

                      Comment

                      Working...
                      X