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=-17.0 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 5B6F6C433F5 for ; Tue, 14 Sep 2021 16:19:27 +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 DE28060F70 for ; Tue, 14 Sep 2021 16:19:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DE28060F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:36238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQB9Z-0003IM-Um for qemu-devel@archiver.kernel.org; Tue, 14 Sep 2021 12:19:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQAnD-0006q0-0K for qemu-devel@nongnu.org; Tue, 14 Sep 2021 11:56:19 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQAnB-0005yz-6O for qemu-devel@nongnu.org; Tue, 14 Sep 2021 11:56:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631634974; 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=DvbaR4siX+UmcDyt9P9szfpUDo4ZhL/40dNM542qLYQ=; b=FXjqHXziAhH3EgN08UBhpRrmB0urQYnzgotkkJLL23z9TtEktJG3Cab1OGwSs2ItYVao1c xlwGUScoo+E/JJLZ5UnTOco3AiWLL0a+r7ylkrtOfXerIKzU1HtxFJz9j2aEDBS10o2mJZ QA9xIS5eBtSwVYnQEtNyQVdACN9QU0w= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-305-7SnGvkviP72fgzrLK5a6tg-1; Tue, 14 Sep 2021 11:56:14 -0400 X-MC-Unique: 7SnGvkviP72fgzrLK5a6tg-1 Received: by mail-wr1-f72.google.com with SMTP id r15-20020adfce8f000000b0015df1098ccbso2880527wrn.4 for ; Tue, 14 Sep 2021 08:56:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DvbaR4siX+UmcDyt9P9szfpUDo4ZhL/40dNM542qLYQ=; b=agzqsngJlFh4QIOglx+1HeyhSSSlDUVJLngv2GQPQeUrFnEAKkCIYV9p1ozYc9L1JD Fb+9d2E6hgv2EjE3bIpdODdNhp+p62LEcJaG6MJ4RY46gqvx+TYC0vyxCtxE+uIpm3K9 kWjFczk7sXCuhJIlEk3YdEh+rP6lgF2sge0bYIedd8bWQsQam5EeRTTSWBtjdNAKO00N /CuRtoHxl4Ipx4BrbLuP00ERbBFxIkyvklZrF/5cH5MUr+EiIvGXk7/cJkT8T8aC1nVi lt0n4NBrbXwJyb734co5QEXck2dWT23DayhFniwjzREUeiyJ/6rDSZSgLZrbft5pEBNb exUQ== X-Gm-Message-State: AOAM533csNCYZWC944NcxYeOMDcqxJjDK4InRzfu2+YEsv1rgPuR4MKG vD8CtnUU51giP38t3njyrAnw2+PsvUlROMi8cgQ/Q03YLcI6VQIOdiQRVfNopSn060wH1+pV640 FWFgxvFh8lK6MP6w= X-Received: by 2002:a05:6000:1627:: with SMTP id v7mr20154796wrb.54.1631634972780; Tue, 14 Sep 2021 08:56:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNaTpfNg3kUtFXOB98x/es5Ijv4KcIKwCxhmgBMiCVuz438BDqxoQhUP1UaqTtREtabfcV6g== X-Received: by 2002:a05:6000:1627:: with SMTP id v7mr20154741wrb.54.1631634972545; Tue, 14 Sep 2021 08:56:12 -0700 (PDT) Received: from [192.168.1.36] (14.red-83-35-25.dynamicip.rima-tde.net. [83.35.25.14]) by smtp.gmail.com with ESMTPSA id r25sm11735205wrc.26.2021.09.14.08.56.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:56:11 -0700 (PDT) Subject: Re: [PATCH v2 42/53] hw/core: introduce a 'format_tlb' callback To: =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= , qemu-devel@nongnu.org References: <20210914142042.1655100-1-berrange@redhat.com> <20210914142042.1655100-43-berrange@redhat.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <818d439f-337e-a73c-9e22-fbf8a119435f@redhat.com> Date: Tue, 14 Sep 2021 17:56:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210914142042.1655100-43-berrange@redhat.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -51 X-Spam_score: -5.2 X-Spam_bar: ----- X-Spam_report: (-5.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.398, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.969, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Cornelia Huck , David Hildenbrand , Bin Meng , Mark Cave-Ayland , Yuval Shaia , Max Filippov , Taylor Simpson , Alistair Francis , Gerd Hoffmann , Eric Blake , Marek Vasut , Yoshinori Sato , Markus Armbruster , Halil Pasic , Christian Borntraeger , qemu-ppc@nongnu.org, Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Greg Kurz , "Dr. David Alan Gilbert" , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Michael Rolnik , Peter Xu , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Bastian Koppelmann , Chris Wulff , Laurent Vivier , Palmer Dabbelt , Paolo Bonzini , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 9/14/21 4:20 PM, Daniel P. Berrangé wrote: > This will allow us to reduce duplication between the different targets > implementing the 'info tlb' command. > > Signed-off-by: Daniel P. Berrangé > --- > hw/core/cpu-common.c | 9 +++++++++ > include/hw/core/cpu.h | 11 +++++++++++ > 2 files changed, 20 insertions(+) > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h > index 4c47e1df18..64fc57c8d9 100644 > --- a/include/hw/core/cpu.h > +++ b/include/hw/core/cpu.h > * @has_work: Callback for checking if there is work to do. > * @memory_rw_debug: Callback for GDB memory access. > * @format_state: Callback for formatting state. > + * @format_tlb: Callback for formatting memory mappings > * @get_arch_id: Callback for getting architecture-dependent CPU ID. > * @set_pc: Callback for setting the Program Counter register. This > * should have the semantics used by the target architecture when > @@ -136,6 +137,7 @@ struct CPUClass { > int (*memory_rw_debug)(CPUState *cpu, vaddr addr, > uint8_t *buf, int len, bool is_write); > void (*format_state)(CPUState *cpu, GString *buf, int flags); > + void (*format_tlb)(CPUState *cpu, GString *buf); Doesn't this belong to SysemuCPUOps?