From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 12ECEB9C39 for ; Tue, 12 Dec 2023 11:40:10 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E74E232B2F for ; Tue, 12 Dec 2023 11:39:39 +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 ; Tue, 12 Dec 2023 11:39:39 +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 F129946072 for ; Tue, 12 Dec 2023 11:39:38 +0100 (CET) Message-ID: <544700e6-14ca-4db8-88b4-117202a972d9@proxmox.com> Date: Tue, 12 Dec 2023 11:39:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: Fiona Ebner , Proxmox VE development discussion References: <20231211141256.27565-1-f.schauer@proxmox.com> <474c3df6-a8ed-4294-8e46-37c3f2008689@proxmox.com> From: Filip Schauer In-Reply-To: <474c3df6-a8ed-4294-8e46-37c3f2008689@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.179 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] Properly identify the CPU architecture of 32-bit VMs X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Dec 2023 10:40:10 -0000 It's actually not a different binary. qemu-system-i386 is a symlink that points to qemu-system-x86_64. But still this does indeed break migration between a node that has this patch applied and another node without the patch. A patch v2 that only adds the check is available here: https://lists.proxmox.com/pipermail/pve-devel/2023-December/061034.html On 11/12/2023 15:37, Fiona Ebner wrote: > Am 11.12.23 um 15:12 schrieb Filip Schauer: >> @@ -3293,11 +3293,12 @@ sub is_native($) { >> >> sub get_vm_arch { >> my ($conf) = @_; >> - return $conf->{arch} // get_host_arch(); >> + return $conf->{arch} // cpu_type_to_arch($conf->{cpu}) // get_host_arch(); >> } >> >> my $default_machines = { >> x86_64 => 'pc', >> + i386 => 'pc', >> aarch64 => 'virt', >> }; >> >> @@ -3390,6 +3391,7 @@ sub get_ovmf_files($$$) { >> >> my $Arch2Qemu = { >> aarch64 => '/usr/bin/qemu-system-aarch64', >> + i386 => '/usr/bin/qemu-system-i386', >> x86_64 => '/usr/bin/qemu-system-x86_64', > Am I understanding correctly that you would automatically pick a > different binary depending on the CPU type? Does that actually work with > KVM and/or live migration, i.e. source was started with > qemu-system-x86_64 and now suddenly on the target with qemu-system-i386? > > And even if it does, I'd rather not add support for running machines > with this binary. Especially if the only reason is to have this new > check. Once the new binary is there, we'd need to support it (even if > it's not prominently exposed). > > If there is no easy way to do the check otherwise, I'd rather wait until > enough users complain and re-consider how to implement the check only then.