From nobody Tue Dec 16 03:21:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1747315314; cv=none; d=zohomail.com; s=zohoarc; b=CEpqdnNdr/ZoIKWogg15eNsLjE0Ffx/sM3azKjC2kp+gARUZBlqGwM0MK2uS30TexEDY6KQGREZzMQLieaXmK4I7KfRDHx9dL3pnprYrpp04/lQyM8K48zUtJWU2X7zgsHkL/nG/HqB4G6vwtldR33XLusfq2rhc1QK1blBZub0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747315314; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EaeNKiOOemve9IbW+AchKk2dKkD+8+vWm8PKCOXYIAo=; b=m98T2XySp5K4JrhrUG1lVuXB3tlF32I7kEdF2LOpCfFxH3JSecLPYkSlNM+1FWsp1wpcV7Ysrf+Yv37ygXJ7lJakhApCdOAUCk6p3XliiNwJCXSgx276gxAfuzpFnxMhNf/OOzJu/pdK1bDAy07xxT3YU5vsO9tMcceQD2/N0UU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747315314509862.9221811626477; Thu, 15 May 2025 06:21:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFYVx-0008Kh-KX; Thu, 15 May 2025 09:20:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYVu-0008Jv-2P for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYVr-0003be-Vn for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:41 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-673-Y-r30376PCysHXRiaqjnSA-1; Thu, 15 May 2025 09:20:38 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 383A218011D3; Thu, 15 May 2025 13:20:36 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.27]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CE6BB1956094; Thu, 15 May 2025 13:20:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747315239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EaeNKiOOemve9IbW+AchKk2dKkD+8+vWm8PKCOXYIAo=; b=B7xc8MttW9yXEhca+qZCAIQ+tlQSbbWpQWxOU3N+S8rly0a5z08WecimT++ZKAdHirM8kV 5QazqSzoT0TKmtTfoXGvdebO3z1acHXHqy8huWLyETEB2ufrOVxEk0+VYIy7Sur8PXVBDM N9JKkVGnBZImBWyJ8dHdPj1tfrCY2aY= X-MC-Unique: Y-r30376PCysHXRiaqjnSA-1 X-Mimecast-MFC-AGG-ID: Y-r30376PCysHXRiaqjnSA_1747315236 From: Thomas Huth To: "Edgar E. Iglesias" , qemu-devel@nongnu.org Cc: Alistair Francis , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH 1/4] hw/microblaze: Add endianness property to the petalogix_s3adsp1800 machine Date: Thu, 15 May 2025 15:20:16 +0200 Message-ID: <20250515132019.569365-2-thuth@redhat.com> In-Reply-To: <20250515132019.569365-1-thuth@redhat.com> References: <20250515132019.569365-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.686, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1747315315320116600 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Since the microblaze target can now handle both endianness, big and little, we should provide a config knob for the user to select the desired endianness. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/microblaze/petalogix_s3adsp1800_mmu.c | 41 +++++++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petal= ogix_s3adsp1800_mmu.c index 032f6f70eac..edc5d0dcfd0 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -58,9 +58,20 @@ #define TYPE_PETALOGIX_S3ADSP1800_MACHINE \ MACHINE_TYPE_NAME("petalogix-s3adsp1800") =20 +struct S3Adsp1800MachineState { + MachineState parent_class; + + EndianMode endianness; +}; + +OBJECT_DECLARE_TYPE(S3Adsp1800MachineState, MachineClass, + PETALOGIX_S3ADSP1800_MACHINE) + + static void petalogix_s3adsp1800_init(MachineState *machine) { + S3Adsp1800MachineState *psms =3D PETALOGIX_S3ADSP1800_MACHINE(machine); ram_addr_t ram_size =3D machine->ram_size; DeviceState *dev; MicroBlazeCPU *cpu; @@ -71,13 +82,12 @@ petalogix_s3adsp1800_init(MachineState *machine) MemoryRegion *phys_ram =3D g_new(MemoryRegion, 1); qemu_irq irq[32]; MemoryRegion *sysmem =3D get_system_memory(); - EndianMode endianness =3D TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG - : ENDIAN_MODE_LITTLE; + EndianMode endianness =3D psms->endianness; =20 cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); object_property_set_str(OBJECT(cpu), "version", "7.10.d", &error_abort= ); object_property_set_bool(OBJECT(cpu), "little-endian", - !TARGET_BIG_ENDIAN, &error_abort); + endianness =3D=3D ENDIAN_MODE_LITTLE, &error_= abort); qdev_realize(DEVICE(cpu), NULL, &error_abort); =20 /* Attach emulated BRAM through the LMB. */ @@ -135,20 +145,41 @@ petalogix_s3adsp1800_init(MachineState *machine) =20 create_unimplemented_device("xps_gpio", GPIO_BASEADDR, 0x10000); =20 - microblaze_load_kernel(cpu, !TARGET_BIG_ENDIAN, ddr_base, ram_size, - machine->initrd_filename, + microblaze_load_kernel(cpu, endianness =3D=3D ENDIAN_MODE_LITTLE, ddr_= base, + ram_size, machine->initrd_filename, BINARY_DEVICE_TREE_FILE, NULL); } =20 +static int machine_get_endianness(Object *obj, Error **errp G_GNUC_UNUSED) +{ + S3Adsp1800MachineState *ms =3D PETALOGIX_S3ADSP1800_MACHINE(obj); + return ms->endianness; +} + +static void machine_set_endianness(Object *obj, int endianness, Error **er= rp) +{ + S3Adsp1800MachineState *ms =3D PETALOGIX_S3ADSP1800_MACHINE(obj); + ms->endianness =3D endianness; +} + static void petalogix_s3adsp1800_machine_class_init(ObjectClass *oc, const void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); + ObjectProperty *prop; =20 mc->desc =3D "PetaLogix linux refdesign for xilinx Spartan 3ADSP1800"; mc->init =3D petalogix_s3adsp1800_init; mc->is_default =3D true; + + prop =3D object_class_property_add_enum(oc, "endianness", "EndianMode", + &EndianMode_lookup, + machine_get_endianness, + machine_set_endianness); + object_property_set_default_str(prop, TARGET_BIG_ENDIAN ? "big" : "lit= tle"); + object_class_property_set_description(oc, "endianness", + "Defines whether the machine runs in big or little endian mode= "); } =20 static const TypeInfo petalogix_s3adsp1800_machine_types[] =3D { --=20 2.49.0 From nobody Tue Dec 16 03:21:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1747315323; cv=none; d=zohomail.com; s=zohoarc; b=nKhARNKTkcwkY/Xlu74/Fdsx0Ez8kalei8LIYpvpNO1/y/hmGsVEVydLloxX77QA36cNaSANqVxubGLtCBrS8hRQQ6uMI2vIQHUZYel0fZP96WLk+k3dzEP711N71F/MvG222bQdYjiQhrBIA97AoJgCFnRQUzmNEk0mmYLDJ40= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747315323; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6PxA0XKCVx8Lt+/MFyfb4RNvjMzl4cOYRTInU7JAYUE=; b=nPKVkKGAawbyAynC7HxW+Cn40/jstDufNaXuWxGjaLVHLxvDrCBcA7hdKEe0RuZVOKEgBEkR75Ft+I27iMDF7kxRCDRonmY5jnW1IZDlgGH5N4uW9Qu/1haxqGcc2OfkCbWLJJEwqV2/ehW2e07d3E/T15c+78qAjQaM00cy+6I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747315323741967.6945756973662; Thu, 15 May 2025 06:22:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFYW1-0008LF-Er; Thu, 15 May 2025 09:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYW0-0008Ky-Ah for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:48 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYVy-0003c6-Fk for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:48 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-283-k8nomAaSPX6fY1Yh86I61Q-1; Thu, 15 May 2025 09:20:42 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C0BFF180099F; Thu, 15 May 2025 13:20:39 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.27]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 03C9B1956094; Thu, 15 May 2025 13:20:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747315245; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=6PxA0XKCVx8Lt+/MFyfb4RNvjMzl4cOYRTInU7JAYUE=; b=Bq675dP+B1+c4dA9o2wq3m1pHMAT8Pmt0CilXct3q1H9SGRgK7qyvaaJQ9qJ87PVYtS5av wjLXC+e3WvC1lpyhk5Uy305gV07wI9LO2XSfg6TrGiNnOwbvwCXyfGPFdn2cuiqqU/QxpJ P82CZcQLpRH52RfwX4B21zJ0m7Gl4tQ= X-MC-Unique: k8nomAaSPX6fY1Yh86I61Q-1 X-Mimecast-MFC-AGG-ID: k8nomAaSPX6fY1Yh86I61Q_1747315241 From: Thomas Huth To: "Edgar E. Iglesias" , qemu-devel@nongnu.org Cc: Alistair Francis , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH 2/4] tests/functional: Test both microblaze s3adsp1800 endianness variants Date: Thu, 15 May 2025 15:20:17 +0200 Message-ID: <20250515132019.569365-3-thuth@redhat.com> In-Reply-To: <20250515132019.569365-1-thuth@redhat.com> References: <20250515132019.569365-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.686, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1747315325304116600 From: Thomas Huth Now that the endianness of the petalogix-s3adsp1800 can be configured, we should test that the cross-endianness also works as expected, thus test the big endian variant on the little endian target and vice versa. (based on an original idea from Philippe Mathieu-Daud=C3=A9) Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/functional/test_microblaze_s3adsp1800.py | 17 ++++++++++++----- .../functional/test_microblazeel_s3adsp1800.py | 5 ++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/functional/test_microblaze_s3adsp1800.py b/tests/functio= nal/test_microblaze_s3adsp1800.py index c93fa14232b..c5e60b555c6 100755 --- a/tests/functional/test_microblaze_s3adsp1800.py +++ b/tests/functional/test_microblaze_s3adsp1800.py @@ -25,12 +25,14 @@ class MicroblazeMachine(QemuSystemTest): ('http://www.qemu-advent-calendar.org/2023/download/day13.tar.gz'), 'b9b3d43c5dd79db88ada495cc6e0d1f591153fe41355e925d791fbf44de50c22') =20 - def do_ballerina_be_test(self, machine): - self.set_machine(machine) + def do_ballerina_be_test(self, force_endianness=3DFalse): + self.set_machine('petalogix-s3adsp1800') self.archive_extract(self.ASSET_IMAGE_BE) self.vm.set_console() self.vm.add_args('-kernel', self.scratch_file('day17', 'ballerina.bin')) + if force_endianness: + self.vm.add_args('-M', 'endianness=3Dbig') self.vm.launch() wait_for_console_pattern(self, 'This architecture does not have ' 'kernel memory protection') @@ -39,12 +41,14 @@ def do_ballerina_be_test(self, machine): # message, that's why we don't test for a later string here. This # needs some investigation by a microblaze wizard one day... =20 - def do_xmaton_le_test(self, machine): + def do_xmaton_le_test(self, force_endianness=3DFalse): self.require_netdev('user') - self.set_machine(machine) + self.set_machine('petalogix-s3adsp1800') self.archive_extract(self.ASSET_IMAGE_LE) self.vm.set_console() self.vm.add_args('-kernel', self.scratch_file('day13', 'xmaton.bin= ')) + if force_endianness: + self.vm.add_args('-M', 'endianness=3Dlittle') tftproot =3D self.scratch_file('day13') self.vm.add_args('-nic', f'user,tftp=3D{tftproot}') self.vm.launch() @@ -61,7 +65,10 @@ class MicroblazeBigEndianMachine(MicroblazeMachine): ASSET_IMAGE_BE =3D MicroblazeMachine.ASSET_IMAGE_BE =20 def test_microblaze_s3adsp1800_legacy_be(self): - self.do_ballerina_be_test('petalogix-s3adsp1800') + self.do_ballerina_be_test() + + def test_microblaze_s3adsp1800_legacy_le(self): + self.do_xmaton_le_test(force_endianness=3DTrue) =20 =20 if __name__ =3D=3D '__main__': diff --git a/tests/functional/test_microblazeel_s3adsp1800.py b/tests/funct= ional/test_microblazeel_s3adsp1800.py index ab59941d57a..9de27d09b75 100755 --- a/tests/functional/test_microblazeel_s3adsp1800.py +++ b/tests/functional/test_microblazeel_s3adsp1800.py @@ -15,7 +15,10 @@ class MicroblazeLittleEndianMachine(MicroblazeMachine): ASSET_IMAGE_LE =3D MicroblazeMachine.ASSET_IMAGE_LE =20 def test_microblaze_s3adsp1800_legacy_le(self): - self.do_xmaton_le_test('petalogix-s3adsp1800') + self.do_xmaton_le_test() + + def test_microblaze_s3adsp1800_legacy_be(self): + self.do_ballerina_be_test(force_endianness=3DTrue) =20 =20 if __name__ =3D=3D '__main__': --=20 2.49.0 From nobody Tue Dec 16 03:21:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1747315313; cv=none; d=zohomail.com; s=zohoarc; b=Tm8G3MC94r3OQKETpkWR1yO8xFLVp+NddSQ+ZPoQc5GyoWfIkmcU8eHMGirZ9hZ+vsrWtK/Uuh6k5QME0OAURD9hxhZTxz1DQ2h+W6OKxg3YP4bL3oMsTsB7vQLmIwlBMgGf987IZYJrtD7r2A26O2HlhgJn894RUga5X/BUbOA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747315313; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bsPvKqQeupdE8tFJ1vrETwxErtldfRrw89xt2bmiH/w=; b=WzQ5E640JijSUgfMD+PiWIV3fCbCdA1zqeQbKDyaVcRR+9lxTEcQeM1Q/4jDuOujpTbrAQnv3FisBkAwuHh7QvWWgJgxrXIv9dogMXMPe4KlUldl/8Q7bXc9QwL7wy3sBYE6OzmDhHVxFizZuKPTv28L//ZVDPy5X+3MKlb5R9Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747315313318557.0000954978788; Thu, 15 May 2025 06:21:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFYW5-0008M2-QO; Thu, 15 May 2025 09:20:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYW3-0008LX-FU for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYW1-0003cf-IG for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:51 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-363-b5YLguFcPFOxCqgLeUIUOw-1; Thu, 15 May 2025 09:20:45 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1BA05180045B; Thu, 15 May 2025 13:20:44 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.27]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7B5581956094; Thu, 15 May 2025 13:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747315248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bsPvKqQeupdE8tFJ1vrETwxErtldfRrw89xt2bmiH/w=; b=ihKcgBWpwAw8eZcGQvgXidnTzf7PytWHHlH+AtxNBUzAFoyQhxXJ39d3zz9ew2LZ2ilxCK H4rBqveloq0TgmP3c1Z/gS50+bwR7kvT5kjakXJ4NNXYFBTTmtfS45dO3zHh0SEYVBXPsI DX2k0CHpIATKuM+EXsi4Ej15BSxNdTQ= X-MC-Unique: b5YLguFcPFOxCqgLeUIUOw-1 X-Mimecast-MFC-AGG-ID: b5YLguFcPFOxCqgLeUIUOw_1747315244 From: Thomas Huth To: "Edgar E. Iglesias" , qemu-devel@nongnu.org Cc: Alistair Francis , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH 3/4] hw/microblaze: Remove the big-endian variants of ml605 and xlnx-zynqmp-pmu Date: Thu, 15 May 2025 15:20:18 +0200 Message-ID: <20250515132019.569365-4-thuth@redhat.com> In-Reply-To: <20250515132019.569365-1-thuth@redhat.com> References: <20250515132019.569365-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.686, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1747315315387116600 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Both machines were added with little-endian in mind only (the "endianness" CPU property was hard-wired to "true", see commits 133d23b3ad1 and a88bbb006a52), so the variants that showed up on the big endian target likely never worked. We deprecated these non-working machine variants two releases ago, and so far nobody complained, so it should be fine now to disable them. Hard-wire the machines to little endian now. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- docs/about/deprecated.rst | 6 ------ docs/about/removed-features.rst | 9 +++++++++ hw/microblaze/petalogix_ml605_mmu.c | 15 ++++----------- hw/microblaze/xlnx-zynqmp-pmu.c | 7 +------ 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 1a1b423030c..8c5fe6fb274 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -293,12 +293,6 @@ deprecated; use the new name ``dtb-randomness`` instea= d. The new name better reflects the way this property affects all random data within the device tree blob, not just the ``kaslr-seed`` node. =20 -Big-Endian variants of MicroBlaze ``petalogix-ml605`` and ``xlnx-zynqmp-pm= u`` machines (since 9.2) -''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= '''''''''''''''''''''''' - -Both ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` were added for little end= ian -CPUs. Big endian support is not tested. - Mips ``mipssim`` machine (since 10.0) ''''''''''''''''''''''''''''''''''''' =20 diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.= rst index 063284d4f8a..9df5aba0bb6 100644 --- a/docs/about/removed-features.rst +++ b/docs/about/removed-features.rst @@ -1082,6 +1082,15 @@ This machine was removed because PPC 405 CPU have no= known users, firmware images are not available, OpenWRT dropped support in 2019, U-Boot in 2017, and Linux in 2024. =20 +Big-Endian variants of ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` machine= s (removed in 10.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''= ''''''''''''''''''' + +Both the MicroBlaze ``petalogix-ml605`` and ``xlnx-zynqmp-pmu`` machines +were added for little endian CPUs. Big endian support was never tested +and likely never worked. Starting with QEMU v10.1, the machines are now +only available as little-endian machines. + + linux-user mode CPUs -------------------- =20 diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_= ml605_mmu.c index bea6b689fd1..6e923c49cfc 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -80,8 +80,6 @@ petalogix_ml605_init(MachineState *machine) MemoryRegion *phys_lmb_bram =3D g_new(MemoryRegion, 1); MemoryRegion *phys_ram =3D g_new(MemoryRegion, 1); qemu_irq irq[32]; - EndianMode endianness =3D TARGET_BIG_ENDIAN ? ENDIAN_MODE_BIG - : ENDIAN_MODE_LITTLE; =20 /* init CPUs */ cpu =3D MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU)); @@ -113,7 +111,7 @@ petalogix_ml605_init(MachineState *machine) =20 =20 dev =3D qdev_new("xlnx.xps-intc"); - qdev_prop_set_enum(dev, "endianness", endianness); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint32(dev, "kind-of-intr", 1 << TIMER_IRQ); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, INTC_BASEADDR); @@ -129,7 +127,7 @@ petalogix_ml605_init(MachineState *machine) =20 /* 2 timers at irq 2 @ 100 Mhz. */ dev =3D qdev_new("xlnx.xps-timer"); - qdev_prop_set_enum(dev, "endianness", endianness); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint32(dev, "one-timer-only", 0); qdev_prop_set_uint32(dev, "clock-frequency", 100 * 1000000); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); @@ -177,7 +175,7 @@ petalogix_ml605_init(MachineState *machine) SSIBus *spi; =20 dev =3D qdev_new("xlnx.xps-spi"); - qdev_prop_set_enum(dev, "endianness", endianness); + qdev_prop_set_enum(dev, "endianness", ENDIAN_MODE_LITTLE); qdev_prop_set_uint8(dev, "num-ss-bits", NUM_SPI_FLASHES); busdev =3D SYS_BUS_DEVICE(dev); sysbus_realize_and_unref(busdev, &error_fatal); @@ -218,12 +216,7 @@ petalogix_ml605_init(MachineState *machine) =20 static void petalogix_ml605_machine_init(MachineClass *mc) { - if (TARGET_BIG_ENDIAN) { - mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (big endi= an)"; - mc->deprecation_reason =3D "big endian support is not tested"; - } else { - mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (little e= ndian)"; - } + mc->desc =3D "PetaLogix linux refdesign for xilinx ml605 (little endia= n)"; mc->init =3D petalogix_ml605_init; } =20 diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pm= u.c index ed40b5f2e05..e909802bb74 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -181,12 +181,7 @@ static void xlnx_zynqmp_pmu_init(MachineState *machine) =20 static void xlnx_zynqmp_pmu_machine_init(MachineClass *mc) { - if (TARGET_BIG_ENDIAN) { - mc->desc =3D "Xilinx ZynqMP PMU machine (big endian)"; - mc->deprecation_reason =3D "big endian support is not tested"; - } else { - mc->desc =3D "Xilinx ZynqMP PMU machine (little endian)"; - } + mc->desc =3D "Xilinx ZynqMP PMU machine (little endian)"; mc->init =3D xlnx_zynqmp_pmu_init; } =20 --=20 2.49.0 From nobody Tue Dec 16 03:21:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1747315313; cv=none; d=zohomail.com; s=zohoarc; b=CPkG5zr+iY0G9XvV0AIkw+JNMZkSLv9St3l5hQPHbRTe8khKxZsMScv/4L9H7xVsgNDmMpsyP//m2r76aL/qAPd7pKHuC/1OaplV7a0TXu+9kusMzNNJJf9J7Rt4HY+NXXY3rM4NqH5cHOzNnRo1zVTNjzDPP6a7SN+VsyAq7Tg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747315313; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bnVivZM19jdzg1O8bSO3P81+CUwSDqL4m+zqp5qD/Rg=; b=VJewIcDj2spMtqXrtJXpQQ2DPdx5neFzPKEtIBoenp3N24fCM832UnNgmJRTzDFsQc0zCCOciQlkuKCVe6QWfzBD+m+WLNRlzD0fcRkagxA5Y6UitQN7aVo8eWQ6nPk1fu83piW/avxm3tS+ja80sIg1Cw+hj6Se1VkvgCSHWoo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747315313163712.7975470735338; Thu, 15 May 2025 06:21:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFYWB-0008MZ-AC; Thu, 15 May 2025 09:20:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYW9-0008M5-IX for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFYW7-0003d3-Sq for qemu-devel@nongnu.org; Thu, 15 May 2025 09:20:57 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-668-U1OdYs3wMWGd8y91hlAaOw-1; Thu, 15 May 2025 09:20:49 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 42A1E18003FC; Thu, 15 May 2025 13:20:48 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.45.224.27]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D5BBA1956094; Thu, 15 May 2025 13:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747315254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bnVivZM19jdzg1O8bSO3P81+CUwSDqL4m+zqp5qD/Rg=; b=AOK7ZfaAGUPaGhTbJORdJGyTS3MHil0gczT0TORDlALRcNbH2OfaeYqgew4Gs6eft9tors 1Rr+kM734HgUq7gyHnbIYUUMMV7543P8nd8F/aVCcYh2tGKtmq+9FBvqclt3JmyF/eVxqc sgu5iaWhbkdQ8YcVfOzKI4WPg0jLrl0= X-MC-Unique: U1OdYs3wMWGd8y91hlAaOw-1 X-Mimecast-MFC-AGG-ID: U1OdYs3wMWGd8y91hlAaOw_1747315248 From: Thomas Huth To: "Edgar E. Iglesias" , qemu-devel@nongnu.org Cc: Alistair Francis , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Subject: [PATCH 4/4] docs: Deprecate the qemu-system-microblazeel binary Date: Thu, 15 May 2025 15:20:19 +0200 Message-ID: <20250515132019.569365-5-thuth@redhat.com> In-Reply-To: <20250515132019.569365-1-thuth@redhat.com> References: <20250515132019.569365-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -37 X-Spam_score: -3.8 X-Spam_bar: --- X-Spam_report: (-3.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.686, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1747315315251116600 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The (former big-endian only) binary qemu-system-microblaze can handle both endiannesses nowadays, so we don't need the separate qemu-system-microblazeel binary for little endian anymore. Let's deprecate it to avoid unnecessary compilation and test time in the future. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- docs/about/deprecated.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 8c5fe6fb274..0dfcad5d029 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -323,6 +323,19 @@ machine must ensure that they're setting the ``spike``= machine in the command line (``-M spike``). =20 =20 +System emulator binaries +------------------------ + +``qemu-system-microblazeel`` (since 10.1) +''''''''''''''''''''''''''''''''''''''''' + +The ``qemu-system-microblaze`` binary can emulate little-endian machines +now, too, so the separate binary ``qemu-system-microblazeel`` (with the +``el`` suffix) for little-endian targets is not required anymore. The +``petalogix-s3adsp1800`` machine can now be switched to little endian by +setting its ``endianness`` property to ``little``. + + Backend options --------------- =20 --=20 2.49.0