[pve-devel] [PATCH v2 guest-common 1/1] Add foreach_passthrough_device

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 31 10:00:44 CET 2023


On 30/10/2023 14:12, Wolfgang Bumiller wrote:
> On Tue, Oct 24, 2023 at 02:55:54PM +0200, Filip Schauer wrote:
>> +
>> +	    $func->($key, "dev/bus/usb/$bus_id/$device_id", @param);
> 
> So this will do... something :-)
> But unfortunately it won't deal with the *interesting* bits.
> 
> So while I do like the idea of having such mappings, for it to make
> sense we'd also need to figure out the device specific nodes.
> Eg. for input devices we'd want to include `/dev/input/eventXY`, for eg.
> FIDO keys we'd want `/dev/hidraw*` devices.
> 
> I'm not sure how much work we should put into this in the initial
> implementation, the question is mainly whether we want to do it like
> *this* in the first place and how much we plan to support.

Hmm, yeah, let's leave the USB mappings out for now, not really winning
much here.

> 
> Or maybe it would make more sense to have specific entries for hidraw,
> event devices, block devices, ... instead?
> I'm not sure.

A device (node) mapping with a sub-type like block ("disk") devices might
be indeed better then, as that could be re-used for VMs too, e.g., for
passing through a /dev/sda (well, more likely via /dev/disk/by-id/...)
device through. IIUC, that would be also more in line with Dominik's
feedback.

In any way, let's get raw pass-through right first, adding in mappings
should be doable then, we added them only much later for VMs too, so
I'd think one would have to actively try to really make that hard to
do in the future here.





More information about the pve-devel mailing list