From patchwork Thu Jan 9 18:11:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 55293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90FCAE77197 for ; Thu, 9 Jan 2025 18:11:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.3930.1736446310697619889 for ; Thu, 09 Jan 2025 10:11:50 -0800 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4EDB513D5 for ; Thu, 9 Jan 2025 10:12:18 -0800 (PST) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9A57D3F59E for ; Thu, 9 Jan 2025 10:11:49 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH] classes/qemu: move QEMU_EXTRAOPTIONS for PPC to the relevant tunes Date: Thu, 9 Jan 2025 18:11:45 +0000 Message-ID: <20250109181145.2057509-1-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Jan 2025 18:11:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/209631 Every other architecture has the QEMU_EXTRAOPTIONS assignments in the tune files, so move the PPC ones too. Leave the MACHINE_ARCH workarounds present for now as these are masking a genuine bug (#15647) that needs to be resolved properly. Signed-off-by: Ross Burton --- meta/classes-recipe/qemu.bbclass | 8 -------- meta/conf/machine/include/powerpc/arch-powerpc64.inc | 1 + meta/conf/machine/include/powerpc/tune-ppc7400.inc | 1 + meta/conf/machine/include/powerpc/tune-ppce500mc.inc | 1 + meta/conf/machine/include/powerpc/tune-ppce500v2.inc | 1 + meta/conf/machine/include/powerpc/tune-ppce5500.inc | 2 ++ meta/conf/machine/include/powerpc/tune-ppce6500.inc | 2 ++ 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/meta/classes-recipe/qemu.bbclass b/meta/classes-recipe/qemu.bbclass index dbb5ee0b666..a375bde8985 100644 --- a/meta/classes-recipe/qemu.bbclass +++ b/meta/classes-recipe/qemu.bbclass @@ -63,14 +63,6 @@ def qemu_run_binary(data, rootfs_path, binary): QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH')) or ""}" QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}" -QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2" -QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc" -QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e500mc" -QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc" -QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc" -QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc" -QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400" -QEMU_EXTRAOPTIONS_powerpc64le = " -cpu POWER9" # Some packages e.g. fwupd sets PACKAGE_ARCH = MACHINE_ARCH and uses meson which # needs right options to usermode qemu QEMU_EXTRAOPTIONS_qemuppc = " -cpu 7400" diff --git a/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/meta/conf/machine/include/powerpc/arch-powerpc64.inc index 2533151869b..af0635a641f 100644 --- a/meta/conf/machine/include/powerpc/arch-powerpc64.inc +++ b/meta/conf/machine/include/powerpc/arch-powerpc64.inc @@ -21,3 +21,4 @@ TUNE_FEATURES:tune-powerpc64le = "m64 fpu-hard" BASE_LIB:tune-powerpc64le = "lib64" TUNE_PKGARCH:tune-powerpc64le = "powerpc64le" PACKAGE_EXTRA_ARCHS:tune-powerpc64le = "powerpc64le" +QEMU_EXTRAOPTIONS_powerpc64le = " -cpu POWER9" diff --git a/meta/conf/machine/include/powerpc/tune-ppc7400.inc b/meta/conf/machine/include/powerpc/tune-ppc7400.inc index 49b94f5ee1c..6d3c158bbb5 100644 --- a/meta/conf/machine/include/powerpc/tune-ppc7400.inc +++ b/meta/conf/machine/include/powerpc/tune-ppc7400.inc @@ -9,3 +9,4 @@ AVAILTUNES += "ppc7400" TUNE_FEATURES:tune-ppc7400 = "m32 fpu-hard ppc7400 altivec bigendian" TUNE_PKGARCH:tune-ppc7400 = "ppc7400" PACKAGE_EXTRA_ARCHS:tune-ppc7400 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppc7400" +QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400" diff --git a/meta/conf/machine/include/powerpc/tune-ppce500mc.inc b/meta/conf/machine/include/powerpc/tune-ppce500mc.inc index 036f8b26315..8c4630b368c 100644 --- a/meta/conf/machine/include/powerpc/tune-ppce500mc.inc +++ b/meta/conf/machine/include/powerpc/tune-ppce500mc.inc @@ -9,6 +9,7 @@ AVAILTUNES += "ppce500mc" TUNE_FEATURES:tune-ppce500mc = "m32 fpu-hard ppce500mc bigendian" TUNE_PKGARCH:tune-ppce500mc = "ppce500mc" PACKAGE_EXTRA_ARCHS:tune-ppce500mc = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppce500mc" +QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc" # pass -mcpu=e500mc for ppce500mc kernel cross compile TARGET_CC_KERNEL_ARCH = "-mcpu=e500mc" diff --git a/meta/conf/machine/include/powerpc/tune-ppce500v2.inc b/meta/conf/machine/include/powerpc/tune-ppce500v2.inc index 461164d818f..204580ee15a 100644 --- a/meta/conf/machine/include/powerpc/tune-ppce500v2.inc +++ b/meta/conf/machine/include/powerpc/tune-ppce500v2.inc @@ -18,3 +18,4 @@ AVAILTUNES += "ppce500v2" TUNE_FEATURES:tune-ppce500v2 = "m32 ppce500v2 bigendian" TUNE_PKGARCH:tune-ppce500v2 = "ppce500v2" PACKAGE_EXTRA_ARCHS:tune-ppce500v2 = "ppce500v2" +QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2" diff --git a/meta/conf/machine/include/powerpc/tune-ppce5500.inc b/meta/conf/machine/include/powerpc/tune-ppce5500.inc index 4915b81ee4d..8976c1612fd 100644 --- a/meta/conf/machine/include/powerpc/tune-ppce5500.inc +++ b/meta/conf/machine/include/powerpc/tune-ppce5500.inc @@ -10,11 +10,13 @@ TUNE_FEATURES:tune-ppce5500 = "m32 fpu-hard e5500 bigendian" BASE_LIB:tune-ppce5500 = "lib" TUNE_PKGARCH:tune-ppce5500 = "ppce5500" PACKAGE_EXTRA_ARCHS:tune-ppce5500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppce5500" +QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e500mc" TUNE_FEATURES:tune-ppc64e5500 = "m64 fpu-hard e5500 bigendian" BASE_LIB:tune-ppc64e5500 = "lib64" TUNE_PKGARCH:tune-ppc64e5500 = "ppc64e5500" PACKAGE_EXTRA_ARCHS:tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64e5500" +QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc" # QEMU usermode fails with invalid instruction error (YOCTO: #10304) MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' qemu-usermode', '', d)}" diff --git a/meta/conf/machine/include/powerpc/tune-ppce6500.inc b/meta/conf/machine/include/powerpc/tune-ppce6500.inc index f6310ab4c44..b0efe1924c5 100644 --- a/meta/conf/machine/include/powerpc/tune-ppce6500.inc +++ b/meta/conf/machine/include/powerpc/tune-ppce6500.inc @@ -10,11 +10,13 @@ TUNE_FEATURES:tune-ppce6500 = "m32 fpu-hard e6500 altivec bigendian" BASE_LIB:tune-ppce6500 = "lib" TUNE_PKGARCH:tune-ppce6500 = "ppce6500" PACKAGE_EXTRA_ARCHS:tune-ppce6500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc} ppce6500" +QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc" TUNE_FEATURES:tune-ppc64e6500 = "m64 fpu-hard e6500 altivec bigendian" BASE_LIB:tune-ppc64e6500 = "lib64" TUNE_PKGARCH:tune-ppc64e6500 = "ppc64e6500" PACKAGE_EXTRA_ARCHS:tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS:tune-powerpc64} ppc64e6500" +QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc" # QEMU usermode fails with invalid instruction error (YOCTO: #10304) MACHINE_FEATURES_BACKFILL_CONSIDERED:append = "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' qemu-usermode', '', d)}"