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.eb...@proxmox.com>


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

Reply via email to