[qubes-users] Xen Visibility under Qubes?

I’m trying really hard to find a way for Qubes to be the solution to my next PC build (hardware assembly has been delayed a bit, so I have a little time, but not a lot); I’d much rather go the Qubes route than the Linux/Xen route. But once I commit the time to figure out how to do one solution, I’ll not likely start all over again to change direction. So I’d like to do it right the first time.

I absolutely do not want to dual boot to get a windows VM with GPU passthrough running. I could live with just one, could live with adding in a usb card for that VM’s sole use, could live with a hardware KVM to direct my keyboard and mouse to that VM, and can push the “inputs” button on the monitor when I want to see the GPU output.

Xen can do passthrough as is, though the learning curve for its configuration is daunting.

I understand the resistance Joanna et al have to the concept, but I’m determined to get one such VM running with passthrough.

So…

It seems to me that if Xen is sufficiently visible under Qubes that I can issue XI commands, then I can do what I need without help from the Qubes devs.

So my question is: Is this so? How visible is Xen to manipulation under qubes? Does it use the config files documented in Xen forum posts etc, or XI commands, or something similar sufficient that I can set hide values for BDF and such?

Thanks!

Not everything Xen-specific will run on Qubes OS. E.g. we have some
patches for Xen that get rid of the stinky qemu out of Dom0 [1].

Not sure what "XI commands" are, BTW.

joanna.

[1]

I'm trying really hard to find a way for Qubes to be the solution to my
next PC build (hardware assembly has been delayed a bit, so I have a little
time, but not a lot); I'd much rather go the Qubes route than the Linux/Xen
route. But once I commit the time to figure out how to do one solution,
I'll not likely start all over again to change direction. So I'd like to do
it right the first time.

I absolutely do not want to dual boot to get a windows VM with GPU
passthrough running. I could live with just one, could live with adding in
a usb card for that VM's sole use, could live with a hardware KVM to direct
my keyboard and mouse to that VM, and can push the "inputs" button on the
monitor when I want to see the GPU output.

Xen can do passthrough as is, though the learning curve for its
configuration is daunting.

I understand the resistance Joanna et al have to the concept, but I'm
determined to get one such VM running with passthrough.

So...

It seems to me that if Xen is sufficiently visible under Qubes that I can
issue XI commands, then I can do what I need without help from the Qubes
devs.

So my question is: Is this so? How visible is Xen to manipulation under
qubes? Does it use the config files documented in Xen forum posts etc, or
XI commands, or something similar sufficient that I can set hide values for
BDF and such?

Thanks!

Not everything Xen-specific will run on Qubes OS. E.g. we have some
patches for Xen that get rid of the stinky qemu out of Dom0 [1].

Also keep in mind that Qubes R2 currently uses Xen 4.1, which doesn't have
full support for GPU passthrough.
But standard config changes should works (you can override VM config file with
qvm-start --custom-config option)

Not sure what "XI commands" are, BTW.

Perhaps XL?

Not sure what “XI commands” are, BTW.

Perhaps XL?

Yes, XL, sorry.

I’ll go look for howto’s specific to 4.1, thanks.

But standard config changes should works (you can override VM config file with
qvm-start --custom-config option)

Okay, I’ve been reading the beginner’s guide, and understand the qvm-start command with --custom-config=filename references a file I can create somewhere, containing “stuff”.

I’m guessing the “stuff” resembles this sort of thing (pasted from another howto), rather than XM or XL commands or something:

kernel = "/usr/lib/xen-4.0/boot/hvmloader"
builder='hvm'
memory = 4096
vcpus=4
name = "ovm-1734"
vif = ['bridge=xenbr0']
(and so on)

Can you point me to a link listing all the parameters I can put in here, understood by your version of xen?

If I use Qubes Manager or a qvm-create command to build a domain, does that generate a file of this sort I can find somewhere and examine to figure out what I want to change when creating my passthrough’ed domain?

Thanks!

But standard config changes should works (you can override VM config file
with
qvm-start --custom-config option)

Okay, I've been reading the beginner's guide, and understand the qvm-start

command with --custom-config=filename references a file I can create
somewhere, containing "stuff".

I'm guessing the "stuff" resembles this sort of thing (pasted from another
howto), rather than XM or XL commands or something:

kernel = "/usr/lib/xen-4.0/boot/hvmloader"
builder='hvm'
memory = 4096
vcpus=4
name = "ovm-1734"
vif = ['bridge=xenbr0']
(and so on)

Can you point me to a link listing all the parameters I can put in here,
understood by your version of xen?

Check Xen documentation. Not sure if they manage separate doc for 4.1, but
here is some good starting point:

If I use Qubes Manager or a qvm-create command to build a domain, does that
generate a file of this sort I can find somewhere and examine to figure out
what I want to change when creating my passthrough'ed domain?

Yes, default file is created, you can check its path with qvm-prefs (sth like
/var/lib/qubes/appvms/personal/personal.conf). I strongly recommend starting
from this generated file.

Bonus: not sure if you installed Qubes yet, so I'm attaching sample configs:
first for PV domain ("testvm"), second for HVM ("win7-pvtest").

(Attachment testvm.conf is missing)

(Attachment win7-pvtest.conf is missing)

Can you point me to a link listing all the parameters I can put in here,
understood by your version of xen?

Check Xen documentation. Not sure if they manage separate doc for 4.1, but
here is some good starting point:
http://wiki.xen.org/wiki/Xen_Configuration_File_Options

Okay. The changes you made in Xen for Qubes do not affect the available keyword/value pairs visible in that file. got it.

If I use Qubes Manager or a qvm-create command to build a domain, does that
generate a file of this sort I can find somewhere and examine to figure out
what I want to change when creating my passthrough’ed domain?

Yes, default file is created, you can check its path with qvm-prefs (sth like
/var/lib/qubes/appvms/personal/personal.conf). I strongly recommend starting
from this generated file.

Bonus: not sure if you installed Qubes yet, so I’m attaching sample configs:
first for PV domain (“testvm”), second for HVM (“win7-pvtest”).

Hardware build has seen some delays, so I haven’t had to make the final choice Qubes or Linux/Xen just yet. Pretty soon. Thanks for the sample files!