SATA III PCIe card for Booting Win7 under Xen
I'm getting relatively disappointing IO performance under Win7 under Xen to my SATA III SSD, connected directly to my main SATA controller. I think I'm having trouble because the Dom0 is needing to get involved in every IO operation.
I suspect I might get better performance if I had a SATA controller I could run over PCI passthrough. Then I could connect the SATA drive to that and have the guest talk directly to the card through the IOMMU.
But I need a controller card that Windows will be able to boot off of (at least after I install applicable Windows drivers). Am I likely to be able to make that work with the PCIe 2.0 x2 SATA III cards I can find for about $20-$40 like this one? If not, are there cards people can recommend? Has anyone done this before? Is my logic just nonsense and this won't help at all?
Posted Oct 23, 2017, 12:33 AM UTC
I've used Xen for a long time and I've never figured out PCI passthrough. Would be interested in seeing if you get this working.
It's not well-documented, but it's also not that hard. I got it working for a GPU and for the sound device, and I can even toggle the sound device back and forth, giving it to the guest when I am running the guest and the host at other times.
The biggest problem I ran into was I got nonsense errors from Xen unless I left a chunk of RAM not allocated to any VM. That is a mystery wrapped in a riddle that I am not remotely qualified to solve.
The Xen error codes are useless; they all consist of stuff like "Failed to do the thing: -3".
I also had no luck pass-through-ing the first GPU and running the host on the second; I had to put the host GPU in the first slot (with all 16 lanes) and pass the guest's GPU through from another, sadly only 8 lane slot. Besides that I just had to put the PCI IDs I wanted to send over in the list for passing through to the VM in its Xen config, and in the GRUB config somewhere to tell the host not to use them.
I also made sure to buy an AMD GPU for this; nVidia writes their drivers to specifically interfere with you doing GPU passthrough.