[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] VGA passthrough with Xen 4.3 and xl toolstack - performance degradation resolved?


  • To: Gordan Bobic <gordan@xxxxxxxxxx>, "xen-users@xxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxx>, David Sutton <kantras@xxxxxxxxx>
  • From: "H. Sieger" <powerhouse.linux@xxxxxxxxx>
  • Date: Fri, 14 Mar 2014 12:37:22 -0700 (PDT)
  • Delivery-date: Fri, 14 Mar 2014 19:38:07 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=MzurlU80EUDiQOZvsdDd2jXC/xGVyEBKQIgqHIifsj4djYX77VkB32t1FEy208ru4uzy++2INlplRaK3xyYEBseUi1aIO0dEUjY0Cmq4yy9HTDh4D3xpkxi4O5j9iFE/TsYQ1bJgBHcGCMWTcl1ejOAsCheQCZWTwJBoAhpY7lQ=;
  • List-id: Xen user discussion <xen-users.lists.xen.org>

The first thing I check before attempting passthrough is pci-list-assignable-devices (or equivalent in xl lingo). Since I use 2 AMD cards, I need the driver for the dom0 card.

xen-pciback is loaded as a module from initramfs using:
echo "xen-pciback passthrough=1 hide=(02:00.0)(02:00.1)" >> /etc/initramfs-tools/modules
I have not tried to build it into the kernel and use a grub command to grab the graphics card, but pciback seems to seize the devices just fine.

Regarding error 22 I guess I would file a bug report but since doing the tests I have changed everything back to my regular hardware and it won't be easy for me switching back and forth. I also hope that some users on the Linux Mint forum will report their experience. By the way, I followed my own how-to here: http://forums.linuxmint.com/viewtopic.php?f=42&t=112013 and http://forums.linuxmint.com/viewtopic.php?f=42&t=112013&start=360#p818716 (this 2nd for Linux Mint 13).


"You still haven't clarified whether you are able to reboot the domU with
the ATI card and still have it working without performance degradation,
BSODs, the card not showing up at all, or crashing the host."

I thought I did - yes, I can reboot the domU with the ATI card and still have it working without any performance degradation, BSODs, or other issues. I did that multiple times (at least 10 times), in several cases running WEI or Unigine for simple benchmarks. Each time I get the same performance in domU as the previous time, and the host (dom0) works just fine. Just as I would expect. I also switched between domU and dom0 to perform various tasks - no issue (I use a USB KVM switch for keyboard/mouse).

I do see your point in checking for radeon driver issues, but I still wonder why in one case it works fine (Xen 4.1.2 with xm) and in the other case (Xen 4.3 with xl or xm) doesn't. Unfortunately I didn't save the logs and debug information. If and when I find some time to try it again I will save the logs and any info that might be helpful.

Thanks for your comments - they are very helpful.


On Friday, March 14, 2014 8:59 PM, Gordan Bobic <gordan@xxxxxxxxxx> wrote:
On 03/14/2014 05:57 PM, H. Sieger wrote:
> 1. I'm using distro packages only. In my first attempt I used Linux Mint
> 16 (based on Ubuntu 13.10), which is the latest stable release. This is
> what I'm currently running on my regular setup with Nvidia Quadro for
> domU and it works fine. It just doesn't work with the AMD 7770.

Can you double check that your initrd isn't loading the radeon
framebuffer driver, and that the driver is blacklisted (along with
fglrx) and neither of those are loaded at the point when the xen-pciback
driver seizes the device?

The problem with ATI isn't on the initial passthrough. If you cannot
even get that to work, then something else is going on.

> However, I am not a 100% sure if the Linux Mint install was completely
> up-to-date. I had installed LM16 some time ago, and I only did some
> package updates. I may have missed the kernel updates (which aren't
> applied automatically with updates and need to be done manually).
> The error 22 - invalid argument you reported is known to me. In fact, I
> replied to a similar bug report here
> <https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1175155/comments/15>. Here
> a quote from the change log I keep with the VGA passthrough how-to:
> 30.04.2013 - warning re xen hypervisor release 4.1.3-3ubuntu1.5 upgrade
>
> As I said above, all my packages come from the distributions' stable
> branch, in this case Ubuntu 13.10 Saucy Salamander (who invents these
> names?) - I don't think Linux Mint changes anything in these packages.

I cam promise you that Xen 4.3.0 + kernel 3.9.9 in dom0 works fine for
VGA passthrough on my system. If you are getting error 22, there is a
good chance there is a regression in the distro package where they
missed a patch (or re-introduced a broken one).

> 2. The second trial with Linux Mint 13 (based on Ubuntu 12.04 LTS
> Precise Pangolin), using the xm toolstack, worked as it should. I was
> able to shutdown and reboot the domU multiple times without any issue -
> no slowdown, no instability, solid as a rock. I did not try the xl
> toolstack with that release, as xl then was still in the diapers.
>
> By the way, I dumped virt-manager because it causes more troubles than
> it does good. I also searched in vain for a config file.

I have up on virt-manager a very long time ago. Anybody needing to do
something like VGA passthrough and expecting to be able to do so with a
pretty GUI is going to be out of luck for a few years yet. VGA
passthrough seems to be strictly for people who know what they are doing
or can afford to pay a 3rd party company to set it all up for them.

> I believe that Xen 4.1.2 with xm toolstack and an old 3.2 kernel is
> still the best way to get VGA passthrough running. The migration to xl
> introduced some issues, so did some of the security patches (the XSA
> patches). So, when you got a working system, don't upgrade if you can
> help it.

You still haven't clarified whether you are able to reboot the domU with
the ATI card and still have it working without performance degradation,
BSODs, the card not showing up at all, or crashing the host.

The latter you can probably avoid if your PCIe bridges support ACS so
the IOMMU forcibly prevents the card from trampling all over something
else's memory areas, but it won't help with general stability - it is
only there to protect the host and other guests from a rogue guest.


Gordan


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.