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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E56F6C433B4 for ; Mon, 12 Apr 2021 09:19:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8518E61207 for ; Mon, 12 Apr 2021 09:19:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8518E61207 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVsja-00035g-MJ for qemu-devel@archiver.kernel.org; Mon, 12 Apr 2021 05:19:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVsbH-0006Fg-7y for qemu-devel@nongnu.org; Mon, 12 Apr 2021 05:11:23 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:39870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVsbC-0002tS-62 for qemu-devel@nongnu.org; Mon, 12 Apr 2021 05:11:19 -0400 Received: by mail-ej1-x62f.google.com with SMTP id v6so17772063ejo.6 for ; Mon, 12 Apr 2021 02:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=L+HGPKmSWLTGqW706W8/aYENoI2653t1drLd1dZ2Ww4=; b=G/Jsc39B4Dfmw1dPeiu3yveDpftVxj0HUulnEAhzfjKMHuxm8CTSBQVJ6jCKHnTjHW pNJ64Fyo6HmpFFLzhiWy05qu65UVBslK2PFwXDl0yCjsYx4KoyASBKysvxVDlbBDWzZF qO4hB6t3ptVptS5c+ccAMyeLhN/G8YiEk3wTKzxELxP3WsB3rLzvivWp+UW1nUDMPtg2 nnx89r0hgB15eLjbznyrqEabAYHQUmRL0Z+7OSAi5lQ4R3CGUm+DnJagl8IWjL1g9L9B zrCJCZ6wsO3HGiSpeLt4xIIKz5Eg9yMjIotw4VgZ2/FNTre0cCU9jceE9NyLqMdwftOt Wabg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L+HGPKmSWLTGqW706W8/aYENoI2653t1drLd1dZ2Ww4=; b=AvBJVeE4TPP9QXsY49JtC42a9lLKQLminLbi2+uyQGqFf/QQWT6ZwNYyY0TGIQVbKf DjrbSSGEPbFw9GGITdeZoGEWp8eE4SCgN/98qWWJnUnhsWkxqDC/uLoX5hcNkH7+9d02 Tv/m+Mealc6rm+4D4P6nwAB0hPKD8WvLxZB20r1jSQlr0CZLh4poSDVINL2sZbZ4fSXW e8d9DcJ3Mtf5aVtRJmh8icm74j1nI0DT/qXrIYmOvGP5nT/TKpiSzXOaFmH3FVvLt471 WpKONQPnpwLP/HWwEXCkBZwYRkMjk4WzfBk2ern2+pbQPRY41wkFmH5SKfUW8TECXMmH VTXg== X-Gm-Message-State: AOAM530shtQpKSU5i0r8kR8Wxs7bRxihIyxfF/hOU2rEwtLUaOeSGj/8 MW6afGg5vBJuv/Dzw1P51vbL96das2Bm1wgkSR0iDg== X-Google-Smtp-Source: ABdhPJxagGT4Il4oKFrwBCZa9502sn6ci84ZWLMuhTQhF1vSBI9/KQyI9L0ZMOpSNoLJDeUdOn2G0fDtrd6GZ81fdqM= X-Received: by 2002:a17:906:c301:: with SMTP id s1mr25817053ejz.382.1618218672861; Mon, 12 Apr 2021 02:11:12 -0700 (PDT) MIME-Version: 1.0 References: <20210326193701.5981-1-cfontana@suse.de> <20210326193701.5981-28-cfontana@suse.de> <87e94d27-a1ec-cd6a-8079-0f975121d479@suse.de> <62c54475-0fe6-042b-cf13-f15490bad525@suse.de> In-Reply-To: <62c54475-0fe6-042b-cf13-f15490bad525@suse.de> From: Peter Maydell Date: Mon, 12 Apr 2021 10:10:28 +0100 Message-ID: Subject: Re: [RFC v12 27/65] target/arm: split a15 cpu model and 32bit class functions to cpu32.c To: Claudio Fontana Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=peter.maydell@linaro.org; helo=mail-ej1-x62f.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, RCVD_IN_DNSWL_NONE=-0.0001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , =?UTF-8?B?QWxleCBCZW5uw6ll?= , Richard Henderson , QEMU Developers , Roman Bolshakov , Paolo Bonzini , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, 12 Apr 2021 at 10:05, Claudio Fontana wrote: > > Hi Peter, > > On 4/8/21 12:36 PM, Peter Maydell wrote: > > On Thu, 8 Apr 2021 at 11:23, Claudio Fontana wrote: > >> Mainly for this code here a question from my side: is the current code actually already "wrong"? > >> > >> I mean, we unconditionally set the aarch64-capable cpu classes to all use aarch64_gdb_arch_name and gdbstub64, > >> but what about an aarch64-capable cpu running in 32bit mode? > > > > This is somewhere between a bug and a missing feature. The 'bug' part is > > that for running a guest on AArch64 KVM with -cpu aarch64=off' (ie a > > 32-bit guest) we should be presenting an aarch32 gdb stub, and we don't. > > Isn't this "easily" solvable? Probably I am missing something obvious.. Fairly, yes. That's why I classify it as "bug". It's just nobody's written the patch. > I mean we could dispatch to the one or to the other according to ->is_aa64()? No, because is_aa64() is the "at runtime, is the CPU currently 32-bit or 64 bit?" check. For gdbstub functions, because gdb cannot handle runtime switching, the check should be a static one of the "what kind of CPU is this?" type. (This is effectively what we do today, except that for the special case of "aarch64=off" we make the wrong choice.) thanks -- PMM