From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 0EFBB95F4
 for <pve-devel@lists.proxmox.com>; Mon,  4 Sep 2023 13:48:14 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id E5D19E573
 for <pve-devel@lists.proxmox.com>; Mon,  4 Sep 2023 13:48:13 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Mon,  4 Sep 2023 13:48:12 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E9E2D41022;
 Mon,  4 Sep 2023 13:48:11 +0200 (CEST)
Message-ID: <9468de6a-cbd8-9944-ae02-c064439dd66b@proxmox.com>
Date: Mon, 4 Sep 2023 13:48:11 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.15.0
Content-Language: en-US
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
 "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>,
 "aderumier@odiso.com" <aderumier@odiso.com>
References: <20230619072841.38531-1-aderumier@odiso.com>
 <20230619072841.38531-5-aderumier@odiso.com>
 <809ca35e-ba06-4326-b830-734096ed0370@proxmox.com>
 <3e337e38-1a91-8b41-c03c-1f89c8885df7@proxmox.com>
 <43d759a21681a2bdf8454435d7a8d6a62da0b124.camel@groupe-cyllene.com>
 <93a80e5b-9851-471f-84b6-0adc79c4d7d0@proxmox.com>
From: Fiona Ebner <f.ebner@proxmox.com>
In-Reply-To: <93a80e5b-9851-471f-84b6-0adc79c4d7d0@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.657 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -1.473 Looks like a legit reply (A)
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pve-devel] [PATCH v2 pve-manager 2/2] ui: qemu : memoryedit:
 add new max && virtio fields
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Mon, 04 Sep 2023 11:48:14 -0000

Am 04.09.23 um 13:40 schrieb Thomas Lamprecht:
> Am 02/09/2023 um 08:18 schrieb DERUMIER, Alexandre:
>> Le vendredi 01 septembre 2023 à 12:24 +0200, Fiona Ebner a écrit :
>>> Am 01.09.23 um 11:48 schrieb Thomas Lamprecht:
>>>> Am 19/06/2023 um 09:28 schrieb Alexandre Derumier:
>>>>> +               xtype: 'pveMemoryField',
>>>>> +               name: 'max',
>>>>> +               minValue: 65536,
>>>>> +               maxValue: 4194304,
>>>>> +               value: '',
>>>>> +               step: 65536,
>>>>> +               fieldLabel: gettext('Maximum memory') + ' (MiB)',
>>>> This huge step size will be confusing to users, there should be a
>>>> way to have
>>>> smaller steps (e.g., 1 GiB or even 128 MiB).
>>>>
>>>> As even nowadays, with a huge amount of installed memory on a lot
>>>> of servers,
>>>> deciding that a (potentially bad actor) VM can use up 64G or 128G
>>>> is still
>>>> quite the difference on a lot of setups. Fiona is checking the
>>>> backend here
>>>> to see if it might be done with a finer granularity, or what other
>>>> options
>>>> we have here.
>>>>
>> I was not think about max size as a security feature, but more to
>> define the min dimm size to reach this max value.
> 
> Hmm, then I'd might it easier to understand if this is named "DIMM Size"
> or "Minimal DIMM-Size", for the UI we could show the resulting max-memory
> that one can achieve with each DIMM-Size selected.
> 
> The range could be from 128 MB to 64 GB (or higher?), and yeah if we have
> an actual maximum we could also auto-calculate it, if not set explicitly
> by the user.
> 
> But, I'm currently not to deep into this topic, so take my suggestions
> with a grain of salt.

The advantage with 'max' is that it can be used for both, hotplug with
dimms and virtio-mem. Otherwise, we'd need two different sub-options
depending on hotplug method.