public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Friedrich Weber <f.weber@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server 2/2] vm start: warn if using ballooning and PCI(e) passthrough
Date: Tue, 14 Nov 2023 10:13:28 +0100	[thread overview]
Message-ID: <8f60db3b-d76e-430a-8904-f14cb66abc4b@proxmox.com> (raw)
In-Reply-To: <20231113170916.184994-3-f.weber@proxmox.com>

Am 13.11.23 um 18:09 schrieb Friedrich Weber:
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index dbcd568..70983a4 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5789,6 +5789,16 @@ sub vm_start_nolock {
>  	die $err;
>      }
>  
> +    if (
> +	scalar(%$pci_devices)

Style nit: we usually check for scalar(keys ...)

> +	&& defined($conf->{balloon})
> +	&& $conf->{balloon} != 0

It's nice being explicit, but replacing the above two with just
$conf->{balloon}, the whole if expression would fit in one line rather
than six. Either way is fine by me, but the vm_start_nolock function is
already pretty long. Also might make sense to move the PCI stuff into a
helper, if you'd like to give it a shot. But not a requirement for this
patch.

> +	&& $conf->{balloon} != $memory
> +    ) {
> +	log_warn("Ballooning is not possible when using PCI(e) passthrough, "
> +		."VM will use maximum configured memory ($memory MiB).\n");

Trailing newline is not required for log_warn().

Style nit: wrong indentation, we don't usually align text like this. It
should just be one more indentation for the second line.

All just nits, so:
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>




  reply	other threads:[~2023-11-14  9:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 17:09 [pve-devel] [PATCH docs/qemu-server 0/2] Ballooning/PCI passthrough incompatibility: add warning and docs Friedrich Weber
2023-11-13 17:09 ` [pve-devel] [PATCH docs 1/2] pci passthrough: mention incompatibility with ballooning Friedrich Weber
2023-11-14  8:30   ` Fiona Ebner
2023-11-14 10:20     ` Friedrich Weber
2023-11-17 12:37       ` Friedrich Weber
2023-11-13 17:09 ` [pve-devel] [PATCH qemu-server 2/2] vm start: warn if using ballooning and PCI(e) passthrough Friedrich Weber
2023-11-14  9:13   ` Fiona Ebner [this message]
2023-11-14 10:20     ` Friedrich Weber

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=8f60db3b-d76e-430a-8904-f14cb66abc4b@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=f.weber@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