From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.librecores.org (lists.librecores.org [88.198.125.70]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BF11C433EF for ; Tue, 7 Jun 2022 12:12:14 +0000 (UTC) Received: from [172.31.1.100] (localhost.localdomain [127.0.0.1]) by mail.librecores.org (Postfix) with ESMTP id C2E8724917; Tue, 7 Jun 2022 14:12:13 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mail.librecores.org (Postfix) with ESMTPS id 0D72E24917 for ; Tue, 7 Jun 2022 14:12:12 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id q140so621096pgq.6 for ; Tue, 07 Jun 2022 05:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GijARRYnxL8YO0+sEq7CgmOSfAqFvvakkFBsv6at5Ao=; b=QjzQzhgN46s/kESurvy5S4WXixwl3Jm+2nFPnTlxnjoSrWHmBxRXLsMr3HMecO2Vnr lfVnS8JFp0oF1rJXEjgZEkvnIK3V1pb+p2LJLKQCKwpe1GJTL5x9JAVxRpf5ZZSmyFC8 Qh91hc5xUPBJfy0S1PAulnlR8qZAEFmhM6vCI8l+iCJmD8MzC3lj2njzB1l0jgKRoVLj +J6d+GMrx8b4RUDTxxHQNafJTXpvnQGSbkhaqCIebWwJEFADOyWOQumc0WlnZasuDu85 uC1xwpDV4Vg2XPBCEjsn4vm412qsUYFOKz9mZyIPWK5l3s30sdhQltu2bDmO8pbGa9PK kiVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GijARRYnxL8YO0+sEq7CgmOSfAqFvvakkFBsv6at5Ao=; b=dWXnSXW4Nlw9V8f7XFhzkBU50OeFiLpHTCDYDmoHiMfCJmqYZgZioUiDtmHxmJZxNc 7U1gSX51YL4c/uqtF3/u5wzsigRyQppZVXRM2SBMHn8UMMKh2Z0fKqi6pj73qFAp75Oo weJ4yVuovQIZlqGC3+yiUoGoagbGrNbzn2XVYb4w6Qh18I0luXk/6VZR3IuOF07CVgq9 Z7tYvkrsjQYbH9yEUVJFCkO07c2hDxbNaD3EgdEV4wOzxhLPwK1uS12h+l8w2h3+Tj3Q qFLUDnWc/FeqF40QwDyq292KPlX5V18+04KnPoRdMacdLTpWc2o2tfI0ZLMQE21VHzFY Y8Zg== X-Gm-Message-State: AOAM530D2NLn/6iQVUrdJhGoyReJIQjTve73PnSoG3hKCzyrDJUItgBa VZb0JjJgH3QCSWtFdUSMMg4= X-Google-Smtp-Source: ABdhPJwCSCn5Byw+9714s59/vTRyhGwy+WF9gUTl/b+De7VI8bPEHCvQiZzq5tYWiT59Mdr5aE1XgA== X-Received: by 2002:a63:f003:0:b0:3db:84d3:743d with SMTP id k3-20020a63f003000000b003db84d3743dmr25232916pgh.97.1654603930382; Tue, 07 Jun 2022 05:12:10 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id jh13-20020a170903328d00b0015eab1b097dsm12335643plb.22.2022.06.07.05.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 05:12:09 -0700 (PDT) Date: Tue, 7 Jun 2022 21:12:07 +0900 From: Stafford Horne To: Peter Maydell Subject: Re: [RFC PATCH 3/3] hw/openrisc: Add the OpenRISC virtual machine Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: openrisc@lists.librecores.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussion around the OpenRISC processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Jason A. Donenfeld" , Arnd Bergmann , QEMU Development , Openrisc Errors-To: openrisc-bounces@lists.librecores.org Sender: "OpenRISC" On Tue, Jun 07, 2022 at 11:43:08AM +0100, Peter Maydell wrote: > So I don't have a strong view on whether these devices should > be DEVICE_NATIVE_ENDIAN or DEVICE_LITTLE_ENDIAN (except that > my impression is that a DEVICE_LITTLE_ENDIAN device on a > big-endian system is a bit weird, because it means the guest > has to byteswap everything. You see that with PCI devices because > the PCI spec mandates LE, but not often elsewhere). > > If there's an official-ish spec for how goldfish devices are > supposed to behave (does anybody have a pointer to one?) and it says > "always little-endian" then that would probably suggest that fixing > m68k would be nice if we can. I think there are some conflicting thoughts on this. In Geert's he mentioned: Using Goldfish devices as little-endian devices should be fine. In Arnd's mail he mentions: https://lore.kernel.org/lkml/CAK8P3a1oN8NrUjkh2X8jHQbyz42Xo6GSa=5n0gD6vQcXRjmq1Q@mail.gmail.com/#t ... the device was clearly defined as having little-endian registers, Based on that I was thinking that switching to DEVICE_LITTLE_ENDIAN would make sense. However, in a followup mail from Laurent we see: https://lore.kernel.org/lkml/cb884368-0226-e913-80d2-62d2b7b2e761@vivier.eu/ The reference document[1] doesn't define the endianness of goldfish. [1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT The documentation does not clearly specify it. So maybe maybe or1k should just be updated on the linux side and add gf_ioread32/gf_iowrite32 big-endian accessors. -Stafford From mboxrd@z Thu Jan 1 00:00:00 1970 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E44D0C43334 for ; Tue, 7 Jun 2022 12:44:52 +0000 (UTC) Received: from localhost ([::1]:44184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyYZn-0003PD-77 for qemu-devel@archiver.kernel.org; Tue, 07 Jun 2022 08:44:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54066) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyY4E-0007Gz-8Z for qemu-devel@nongnu.org; Tue, 07 Jun 2022 08:12:14 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:44937) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyY4B-0005jw-VE for qemu-devel@nongnu.org; Tue, 07 Jun 2022 08:12:14 -0400 Received: by mail-pg1-x52a.google.com with SMTP id c18so7350475pgh.11 for ; Tue, 07 Jun 2022 05:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=GijARRYnxL8YO0+sEq7CgmOSfAqFvvakkFBsv6at5Ao=; b=QjzQzhgN46s/kESurvy5S4WXixwl3Jm+2nFPnTlxnjoSrWHmBxRXLsMr3HMecO2Vnr lfVnS8JFp0oF1rJXEjgZEkvnIK3V1pb+p2LJLKQCKwpe1GJTL5x9JAVxRpf5ZZSmyFC8 Qh91hc5xUPBJfy0S1PAulnlR8qZAEFmhM6vCI8l+iCJmD8MzC3lj2njzB1l0jgKRoVLj +J6d+GMrx8b4RUDTxxHQNafJTXpvnQGSbkhaqCIebWwJEFADOyWOQumc0WlnZasuDu85 uC1xwpDV4Vg2XPBCEjsn4vm412qsUYFOKz9mZyIPWK5l3s30sdhQltu2bDmO8pbGa9PK kiVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=GijARRYnxL8YO0+sEq7CgmOSfAqFvvakkFBsv6at5Ao=; b=w4roO+VOsAjb3vA6+bWc+bMDa59F2GaCmu+kPBf9u2EzF7zGAFE8nIkz0wv4pwUf5K /iXJiCT5HT38c6I9R1GhsTvmRqkuCBeb2jJNm9mmHPFmNRiuXPnGToFAHew9m3C5vtkJ NGPdjeMnhHI3rUJrv7ZZo4Mry0Ne865hYTxR6mGNEbx6AcadB7UcVbIRjIHBYM965CEv 6TZx4ojI1F6kW/J1/sEzAOYHjK8az5rkVH5Qr2GQCb8E6XR4yabSQ4pRekoF4XGYzS44 y6xfBYTfvKS63zXVcT0iEnCmCkojZcKtjpxXt7ed8bVXAM1TOSUrGYNLWqSc1U5Cp39L 9b+Q== X-Gm-Message-State: AOAM531bk0YE070YjWdmr8bcDxZ9/t3Fj0hCpSkegjgD40KNVlhQcPqo mdYI/YMKEekXfCDo0pMXIF4= X-Google-Smtp-Source: ABdhPJwCSCn5Byw+9714s59/vTRyhGwy+WF9gUTl/b+De7VI8bPEHCvQiZzq5tYWiT59Mdr5aE1XgA== X-Received: by 2002:a63:f003:0:b0:3db:84d3:743d with SMTP id k3-20020a63f003000000b003db84d3743dmr25232916pgh.97.1654603930382; Tue, 07 Jun 2022 05:12:10 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id jh13-20020a170903328d00b0015eab1b097dsm12335643plb.22.2022.06.07.05.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 05:12:09 -0700 (PDT) Date: Tue, 7 Jun 2022 21:12:07 +0900 From: Stafford Horne To: Peter Maydell Cc: Arnd Bergmann , Geert Uytterhoeven , Joel Stanley , "Jason A. Donenfeld" , Openrisc , QEMU Development Subject: Re: [RFC PATCH 3/3] hw/openrisc: Add the OpenRISC virtual machine Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=shorne@gmail.com; helo=mail-pg1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Jun 07, 2022 at 11:43:08AM +0100, Peter Maydell wrote: > So I don't have a strong view on whether these devices should > be DEVICE_NATIVE_ENDIAN or DEVICE_LITTLE_ENDIAN (except that > my impression is that a DEVICE_LITTLE_ENDIAN device on a > big-endian system is a bit weird, because it means the guest > has to byteswap everything. You see that with PCI devices because > the PCI spec mandates LE, but not often elsewhere). > > If there's an official-ish spec for how goldfish devices are > supposed to behave (does anybody have a pointer to one?) and it says > "always little-endian" then that would probably suggest that fixing > m68k would be nice if we can. I think there are some conflicting thoughts on this. In Geert's he mentioned: Using Goldfish devices as little-endian devices should be fine. In Arnd's mail he mentions: https://lore.kernel.org/lkml/CAK8P3a1oN8NrUjkh2X8jHQbyz42Xo6GSa=5n0gD6vQcXRjmq1Q@mail.gmail.com/#t ... the device was clearly defined as having little-endian registers, Based on that I was thinking that switching to DEVICE_LITTLE_ENDIAN would make sense. However, in a followup mail from Laurent we see: https://lore.kernel.org/lkml/cb884368-0226-e913-80d2-62d2b7b2e761@vivier.eu/ The reference document[1] doesn't define the endianness of goldfish. [1] https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT The documentation does not clearly specify it. So maybe maybe or1k should just be updated on the linux side and add gf_ioread32/gf_iowrite32 big-endian accessors. -Stafford