From nobody Sun Apr 28 00:26:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1638269642; cv=none; d=zohomail.com; s=zohoarc; b=CAKdKsy2h5PaTl9rWczoqFbSaVYmScv7J1oiYYDbFkGMUjVgMJRoEEU5RrvHkTTlpecwGA9wj72S9+8YIvrjw/yAPi0rJ1UMKp18F3C4jm5J66jENlWSs7SFeRQ51CnXE7ZjKsOIHK4oHVlfgZrDIl9MX70hSdhcI9qLm6DK75E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638269642; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=2ea/xkgifGPROO+9ZW8m4ehGnCUhQ7oIAwFaekA5f3k=; b=TJd9qNaLzLsFYmbrQitBAN8vpBRsl+CtX6bbb6X7CRSyp3+NAOVSzVG78Gr0jcehP8WjUGhUpgRX+2EEtE+VlVwcVUbPWF+KzDQz8yWw7Iv0VoSP0PB2SUOUukI8Hj8lrWWUfaOW96aDb4nXZPpUNY6q488N6x6+B6Q4qUwy/f0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1638269642643594.2013152431936; Tue, 30 Nov 2021 02:54:02 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-514-Re5QZ8ETODmZ6780oy8PAA-1; Tue, 30 Nov 2021 05:53:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D11251006AA1; Tue, 30 Nov 2021 10:53:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6BE25D9DE; Tue, 30 Nov 2021 10:53:52 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 0D0974BB7C; Tue, 30 Nov 2021 10:53:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 1AUArlm3003956 for ; Tue, 30 Nov 2021 05:53:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5BF1C5F4E1; Tue, 30 Nov 2021 10:53:47 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.22.32.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 781B05D6BA; Tue, 30 Nov 2021 10:53:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638269641; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2ea/xkgifGPROO+9ZW8m4ehGnCUhQ7oIAwFaekA5f3k=; b=C45e0qM6aGRepxMU6SjDwNVV7BfnrCE1Fsypwq6FAJw5jmYOS6I4JKatxedeA4k64oSYEB QxY5miH6R7lmCU7fShiansfWpUyTkMztC22tn4qsMiYRKedfQ1+8CIf6c2jTFAa0cJKWqF SLwcILZQqD4mBlqitKvZULwFUiQMNaQ= X-MC-Unique: Re5QZ8ETODmZ6780oy8PAA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH] util: canonicalize 'arm64' arch to 'aarch64' Date: Tue, 30 Nov 2021 10:53:45 +0000 Message-Id: <20211130105345.1789721-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Nathan Vander Wilt , Andrea Bolognani X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1638269644244100001 macOS on Apple silicon reports 'arm64' as the architecture from uname, which we need to canonicalize to VIR_ARCH_AARCH64 / 'aarch64'. Signed-off-by: Daniel P. Berrang=C3=A9 --- NB, I suggest we push this during freeze as it is a trivial bugfix src/util/virarch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/virarch.c b/src/util/virarch.c index f088b6b676..2134dd6a9d 100644 --- a/src/util/virarch.c +++ b/src/util/virarch.c @@ -220,6 +220,8 @@ virArch virArchFromHost(void) arch =3D VIR_ARCH_I686; } else if (STREQ(ut.machine, "amd64")) { arch =3D VIR_ARCH_X86_64; + } else if (STREQ(ut.machine, "arm64")) { + arch =3D VIR_ARCH_AARCH64; } else { /* Otherwise assume the canonical name */ if ((arch =3D virArchFromString(ut.machine)) =3D=3D VIR_ARCH_NONE)= { --=20 2.33.1