From: Friedrich Weber <f.weber@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>,
Proxmox VE development discussion <pve-devel@lists.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 11:20:57 +0100 [thread overview]
Message-ID: <8381eeb8-b4fb-4d92-8ded-ff764407600f@proxmox.com> (raw)
In-Reply-To: <8f60db3b-d76e-430a-8904-f14cb66abc4b@proxmox.com>
Thanks for the review! I'll send a v2.
On 14/11/2023 10:13, Fiona Ebner wrote:
> 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 ...)
Will change this.
>> + && 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.
I opted for being explicit here, but I see the point that the function
is pretty long already and six lines for a relatively unimportant check
is a bit excessive. :) So I'll change this.
> 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.
I'll probably keep it at just adding the warning for this patch series.
>
>> + && $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.
Good catches, thanks!
prev parent reply other threads:[~2023-11-14 10:20 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
2023-11-14 10:20 ` Friedrich Weber [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=8381eeb8-b4fb-4d92-8ded-ff764407600f@proxmox.com \
--to=f.weber@proxmox.com \
--cc=f.ebner@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