Can't pass through and get Domain-0 to not use a device?

Howdy folks,

I have my GPU in a PCIE slot and I can’t get Domain-0 to not see it and do things with it so that I can add it into the guest for use.

I have my primary GPU in the main x16 slot, and this secondary one in the x1 slot on an adaptor.

I’ve tried adding the GPU and the Sound device, but when I start the guest I just get kernel panic.

Added the “do not see the device” to GRUB.

I’ve even tried attaching the adaptor to the guest, but it says that it can’t do that device it can only attach the actual endpoint.

So I can’t attach 00:01.00 but I can attach 00:01.01 and 00:01.02

00:01.1 is the Display

00:01.2 is the Audio (HDMI)

00:01.0 is the Adaptor

This is very confusing, anyone have any decent thoughts please? I really need to get it working.

Is this on qubes 2?

no, as the version statement says, 4.3.

Oh, I have it on 4.2, my bad, how can I change it to 4.3?

Specifically 4.3.1-RC1

(My main PC.)

It didnt say 4.3 anywhere in your original post.

I have my GPU in a PCIE slot and I can’t get Domain-0 to not see it

You want dom0 to NOT see the GPU?

Have you tried unplugging the GPU? This way dom0 should not see the GPU.

but when I start the guest I just get kernel panic.

Which?

Is the goal now to use the GPU or not..?

Also, why are all the PCIE sets of information different?

LSPCI says…

1:00.0 VGA 1 DISPLAY

1:00.1 VGA 1 AUDIO

29:00.0 PRIMARY VGA 2 DISPLAY

29:00.1 PRIMARY VGA 2 AUDIO

yet Qubes Devices says…
00:01.0→00:00.0 VGA 1 DISPLAY

00:01.1→00:00.1 VGA 1 AUDIO

00:03.0→00:00.0 PRIMARY VGA 2 DISPLAY

00:03.1→00:00.1 PRIMARY VGA 2 AUDIO

in the tags it said version-r42 instead of version-r43, so I didn’t think I had to mention it in the post.

I dont’ want Domain-0 to see it.
I want to attach it to a guest.

Domain-0, the base machine gets a kernel panic and resets the whole machine.

I need to use the GPU in the guest.

the version.

Any more information you need? I have to cook dinner for the family now.so I will return.

Please do not just provide links to images.
Summarise the relevant information in text. This will be easier for
search tools, other users, and any one wishing to help you.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

1 Like

They are images, not links to images as far as I am aware, since they are uploaded directly to the forum.

I did summarise the information, but seeing it as it is displayed sometimes will show that I’m not just messing up my information and saying things that aren’t actually true.

So it is just evidence of the facts.

And also someone else might see another device they may say that I need to add something else or do something else that I hadn’t thought of or known about.

You can hide device from dom0 by using rd.qubes.hide_pci= option on the kernel cmdline (add in /etc/default/grub and then do grub2-mkconfig -o /boot/grub2/grub.cfg). For multiple devices, separate with coma. You can use either addresses as listed by lspci or by qvm-pci - both will work, but the latter are stable across hardware changes (like plugging in another card).

3 Likes

BTW, the above seems to be completely missing in our documentation… anybody wants to contribute? :slight_smile:

It is in the forum, and I had found that here, and I do have that in the config.
But I don’t have the comma, might be the issue. Might be that other persons issue as well since I copied straight from their post.

But what device IDs do I put in? from LSPCI?

multiboot2	/xen-4.19.4.gz placeholder  console=none dom0_mem=min:1024M dom0_mem=max:1024M ucode=scan gnttab_max_frames=2048 gnttab_max_maptrack_frames=4096 iommu=on amd_iommu=on rd.driver.pre=xen-pciback xen-pciback.hide=(0000:01:00.0)(0000:01:00.1) xen-pciback.passthrough=1 xen-pciback.permissive=1 ${xen_rm_opts}

No comma between the brackets, I'm putting it in and trying that now.

When you want to hide NVIDIA from dom0, add to grub:

rd.qubes.hide_pci=01:00.0,01:00.1

then, as marmarek said

[user@dom0 ~]$ grub2-mkconfig -o /boot/grub2/grub.cfg

Reboot. That’s it. Of course, when in BIOS NVIDIA is not set as the default/primary GPU to use. It might also depend on which GPU setting in BIOS you installed Qubes in the first place. When it was NVIDIA exclusively, I am afraid I have some bad news for you.

No brackets either? Wow, the documentation I had read was way off… Okay, will add that into the /boot/grub2/grub.cfg file and try it out without the brackets and the leading 0’s…

I edit the grub configuration file directly. All I have in there is the timeout and the menu entry, I remove all the useless garbage, lol.

Well, I don’t even want to know what “the garbage” was and what you removed… Usually there is nothing there by the default considered as garbage.

And also that needs to be on the dom0 (linux) command line, not xen one. So, GRUB_CMDLINE_LINUX setting, not GRUB_CMDLINE_XEN_DEFAULT.

2 Likes

Where in the configuration does it go?

Module2 vmlinuz?