all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Christoph Heiss <c.heiss@proxmox.com>
Subject: Re: [pve-devel] [PATCH common 4/4] sysfs: use new PVE::RS::VFIO::Nvidia module to retrieve vGPU info
Date: Wed, 21 Jan 2026 09:08:45 +0100	[thread overview]
Message-ID: <f4d4fd90-003c-40c7-8320-29ec9d149395@proxmox.com> (raw)
In-Reply-To: <e90b747b-366a-420b-b808-f08d2934ee74@proxmox.com>



On 1/20/26 4:00 PM, Thomas Lamprecht wrote:
> Am 20.01.26 um 14:12 schrieb Christoph Heiss:
>> pci_dev_physfn_id() is used to obtain the parent device of a virtual
>> function, i.e. the physical function.
>>
>> Needed for retrieving information about Nvidia vGPU devices via
>> proxmox-ve-vfio, as libnvidia-ml functions only work with physical
>> functions.
>>
>> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
>> ---
>>   src/PVE/SysFSTools.pm | 45 ++++++++++++++++++++++++++++++-------------
>>   1 file changed, 32 insertions(+), 13 deletions(-)
>>
>> diff --git a/src/PVE/SysFSTools.pm b/src/PVE/SysFSTools.pm
>> index a00fbcb..89e57b9 100644
>> --- a/src/PVE/SysFSTools.pm
>> +++ b/src/PVE/SysFSTools.pm
>> @@ -4,8 +4,10 @@ use strict;
>>   use warnings;
>>   
>>   use IO::File;
>> +use File::Basename;
>>   
>>   use PVE::Tools qw(file_read_firstline dir_glob_foreach);
>> +use PVE::RS::VFIO::Nvidia;
> 
> we do not depend on libpve-rs-perl in libpve-common-perl, and if easily possible
> I'd strongly favor keeping it that way, bootstrapping and handling bigger package
> bumps with newer versioned dependencies or break/depends bumps is already quite
> a bit of work as is, such stuff does not make it easier, especially if adding
> a new dependencies is not recorded in d/control's packaging definition.
> 
> Can this move to some non-leaf package instead? Where are the users of this, only
> qemu-server or other too (pve-manager?)?
> 
>
hmm.. as far as i can see it, we need to use that module in sysfstools
where we get info about mdevs. This is used in qemu-server
and (currently) pve-manager

If we don't want to have that dep here, we have IMO the following 
possiblities:

* split the relevant part out (e.g. into qemu-server, still reachable
   from pve-manager).

* move the whole of sysfstools somewhere else
   this is needed in guest-common, pve-manager and qemu-server,
   so imho guest-common would be the next best place?
   though we could also create a seperate package for that too.

   Note that pve-storage still includes PVE::SysFSTools, but does not
   actually need it anymore, so we should remove it there anyway


Advantage of the second method (though more work) would be to make
pve-common smaller.

We could also think about producing more than one debian package from
pve-common, similar to how we do it with the 'proxmox' rust crate,
not sure how practical that is though.

In summary I think simply moving the mdev/vgpu stuff to qemu-server
makes the most sense for now.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2026-01-21  8:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20 13:13 [pve-devel] [PATCH proxmox-{ve, perl}-rs/common 0/4] use native libnvidia-ml library for " Christoph Heiss
2026-01-20 13:13 ` [pve-devel] [PATCH proxmox-ve-rs 1/4] vfio: add crate for interacting with vfio host devices Christoph Heiss
2026-01-20 13:13 ` [pve-devel] [PATCH proxmox-ve-rs 2/4] vfio: add rust-native interface for accessing NVIDIA vGPU info Christoph Heiss
2026-01-20 13:13 ` [pve-devel] [PATCH proxmox-perl-rs 3/4] pve: add bindings for proxmox-ve-vfio Christoph Heiss
2026-01-20 13:13 ` [pve-devel] [PATCH common 4/4] sysfs: use new PVE::RS::VFIO::Nvidia module to retrieve vGPU info Christoph Heiss
2026-01-20 15:00   ` Thomas Lamprecht
2026-01-21  8:08     ` Dominik Csapak [this message]
2026-01-21 13:06       ` Christoph Heiss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4d4fd90-003c-40c7-8320-29ec9d149395@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal