public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH qemu-server] fix #4553: nvidia vgpu: reuse smbios uuid for '-uuid' parameter
Date: Thu, 16 Mar 2023 09:18:10 +0100	[thread overview]
Message-ID: <20230316081810.mc7lozw2jcssydc6@casey.proxmox.com> (raw)
In-Reply-To: <20230227153427.1115209-1-d.csapak@proxmox.com>

applied, thanks

On Mon, Feb 27, 2023 at 04:34:27PM +0100, Dominik Csapak wrote:
> instead of using the mdev uuid. The nvidia driver does not actually care
> that it's the same as the mdev, and in qemu the uuid parameter
> overwrites the smbios1 uuid internally, so we should have been reusing
> that in the first place.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> when i was writing the uuid appending in the first place, i was sure
> that the nvidia driver needed the mdev uuid, but i was wrong
> 
> also i wrongly assumed the '-uuid' parameter does not do anything to the
> guest, but it overwrites the smbios uuid. seems i misread the qemu source
> code then.. (the man/help pages are not very helpful in that regard)
> 
>  PVE/QemuServer.pm | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 096e7f0d..b5836f7a 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5851,9 +5851,14 @@ sub vm_start_nolock {
>  	    for my $dev ($d->{pciid}->@*) {
>  		my $info = PVE::QemuServer::PCI::prepare_pci_device($vmid, $dev->{id}, $id, $d->{mdev});
>  
> -		# nvidia grid needs the uuid of the mdev as qemu parameter
> +		# nvidia grid needs the qemu parameter '-uuid' set
> +		# use smbios uuid or mdev uuid as fallback for that
>  		if ($d->{mdev} && !defined($uuid) && $info->{vendor} eq '10de') {
> -		    $uuid = PVE::QemuServer::PCI::generate_mdev_uuid($vmid, $id);
> +		    if (defined($conf->{smbios1})) {
> +			my $smbios_conf = parse_smbios1($conf->{smbios1});
> +			$uuid = $smbios_conf->{uuid} if defined($smbios_conf->{uuid});
> +		    }
> +		    $uuid = PVE::QemuServer::PCI::generate_mdev_uuid($vmid, $id) if !defined($uuid);
>  		}
>  	    }
>  	}
> -- 
> 2.30.2




      reply	other threads:[~2023-03-16  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 15:34 [pve-devel] " Dominik Csapak
2023-03-16  8:18 ` Wolfgang Bumiller [this message]

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=20230316081810.mc7lozw2jcssydc6@casey.proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=d.csapak@proxmox.com \
    --cc=pve-devel@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal