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 54534945B6
 for <pve-devel@lists.proxmox.com>; Thu, 22 Feb 2024 10:36:06 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 2CEC95524
 for <pve-devel@lists.proxmox.com>; Thu, 22 Feb 2024 10:35:36 +0100 (CET)
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>; Thu, 22 Feb 2024 10:35:35 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3218C447CF
 for <pve-devel@lists.proxmox.com>; Thu, 22 Feb 2024 10:35:35 +0100 (CET)
Message-ID: <3d29eab1-9f42-4ade-bc1b-f49126509ef8@proxmox.com>
Date: Thu, 22 Feb 2024 10:35:26 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
To: Filip Schauer <f.schauer@proxmox.com>,
 Proxmox VE development discussion <pve-devel@lists.proxmox.com>
References: <20231219094023.25726-1-f.schauer@proxmox.com>
 <20231219094023.25726-6-f.schauer@proxmox.com>
 <c70d600b-fdeb-48bf-b989-8f43be4bae24@proxmox.com>
 <1d79d880-e0f6-4875-ae5b-483a62028a60@proxmox.com>
Content-Language: en-US
From: Fiona Ebner <f.ebner@proxmox.com>
In-Reply-To: <1d79d880-e0f6-4875-ae5b-483a62028a60@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.071 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
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [proxmox.com]
Subject: Re: [pve-devel] [PATCH qemu-server 4/4] cpu config: Unify the
 default value for 'kvm'
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: Thu, 22 Feb 2024 09:36:06 -0000

Am 21.02.24 um 16:39 schrieb Filip Schauer:
> On 19/02/2024 15:47, Fiona Ebner wrote:
>> On an x86_64 host, for guests using a different architecture (i.e.
>> aarch64), hot-plugging is already broken, because we try to hotplug a
>> CPU of type "$cpu-x86_64-cpu,XYZ" which won't work anyways:
>>
>> vcpus: hotplug problem - VM 130 qmp command 'device_add' failed -
>> 'kvm64-x86_64-cpu' is not a valid device model name
>>
>> The actual breaking change is for the host arch being something other
>> than x86_64 (which isn't officially supported) and the VM being
>> x86_64, ...
>>
>>> @@ -414,9 +415,9 @@ sub get_custom_model {
>>>     # Print a QEMU device node for a given VM configuration for
>>> hotplugging CPUs
>>>   sub print_cpu_device {
>>> -    my ($conf, $id) = @_;
>>> +    my ($conf, $arch, $id) = @_;
>>>   -    my $kvm = $conf->{kvm} // 1;
>>> +    my $kvm = $conf->{kvm} // is_native($arch);
>>>       my $cpu = get_default_cpu_type('x86_64', $kvm);
>> ...because in that case, before this patch we got kvm64 here, but with
>> the patch we get qemu64 which would be a problem for live-migration.
> 
> I expressed my opinion on this matter in the following mail:
> 
> https://lists.proxmox.com/pipermail/pve-devel/2023-December/061131.html
> 

Yes, I also think the change is fine. But breaking ARM64 guests on a
x86_64 host would not be fine. The point is CPU hotplug already doesn't
work here, so the commit message should be adapted to mention that.

I saw you completely removed the commit message in v8. Should be added
back with the additional information, but that alone doesn't warrant a
v9, can also be done when applying.