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 840B0C433F5 for ; Tue, 14 Sep 2021 17:20: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 1C79C61130 for ; Tue, 14 Sep 2021 17:20:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1C79C61130 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]:55606 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQC6c-0007sN-6J for qemu-devel@archiver.kernel.org; Tue, 14 Sep 2021 13:20:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQC4i-0004x7-Qx for qemu-devel@nongnu.org; Tue, 14 Sep 2021 13:18:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQC4f-0002nG-7a for qemu-devel@nongnu.org; Tue, 14 Sep 2021 13:18:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631639904; 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=03+IhxGmmMXDrS25Dg26nDJdPBLM1fFGiWN16fXUPNs=; b=aANjXwI5g2tiGgBEyl3X85Aqobg8nmd3p7D5+bbuKrR8EFP7qozMNf+Mt9ZhEdQBoLZdwZ Krxl5XqZhIr0w+62bt//efh6Dnr7wU2tuU7LaLyOK7tLsUOOlV/MGbWuL93Bc3rWQa88L9 gGxq5xuH5GtEC0aNn4+UC6NO1tOXJcs= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-16-p6QzJCYlMCmf3sVCCvI7vQ-1; Tue, 14 Sep 2021 13:18:23 -0400 X-MC-Unique: p6QzJCYlMCmf3sVCCvI7vQ-1 Received: by mail-wm1-f72.google.com with SMTP id h1-20020a05600c350100b002e751bf6733so23371wmq.8 for ; Tue, 14 Sep 2021 10:18:22 -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:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=03+IhxGmmMXDrS25Dg26nDJdPBLM1fFGiWN16fXUPNs=; b=Je5+rEiGvd0bfuubEOZEGRi04LuUsWHpkpmmjji3g4U5qqXi2D2YXvf3/xP21VryG9 LsyC9CHwsdVGThwLjkr3IabC5If2HWDyBhMKpepXLrWypIiNUlMq0bL4eEaTJ8UGcSPN kd3P3iThM8E3kNfyOzpCUSSKqIU59iRRsaWqr4SCoTxvxxVTimIxSJ/+DqcyOjjmgCyI pS1UmE6T1cGX9Djjc3VY5DPktH7Vp/bdYI5+z3hU3XuGydES74NiPJ3x6MtV0VlV6yGc SDobYfydmRam9DCu4/IspmlopcwjIAlHvDvGSIi2v14VtLqcnjr2Xcx9Hm8FGZf6lKTt HIXA== X-Gm-Message-State: AOAM532gi2nCtYkpwSciDxu1kh4YhcVDQgS0aC/zKYDkxRjboS0wmalV fc2eSxbJn0CDnkimkWCWAfLqW0/kQo8E3/DAdhHpwzURb+QsOP/Ns67PsMNjdH6h+Ufwhq7Futl Dn/DGIn8JB8aQ/oE= X-Received: by 2002:a5d:67c8:: with SMTP id n8mr315273wrw.122.1631639901812; Tue, 14 Sep 2021 10:18:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8k5dUCOzApULzgPg7szbogBDqXNvBu/8axQ3t+cvEWsWZU3M6/uMLI+iNxuUIgLe9gYzcCg== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr315250wrw.122.1631639901635; Tue, 14 Sep 2021 10:18:21 -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 z17sm584333wml.24.2021.09.14.10.18.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 10:18:20 -0700 (PDT) Subject: Re: [PATCH v2 29/53] qapi: introduce x-query-registers QMP command From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= To: Eric Blake , =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= , Markus Armbruster , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= References: <20210914142042.1655100-1-berrange@redhat.com> <20210914142042.1655100-30-berrange@redhat.com> <20210914160416.tmk5nuhch2yhfb27@redhat.com> Message-ID: <93be6f97-5dfb-4fab-25c6-363bb9f0e540@redhat.com> Date: Tue, 14 Sep 2021 19:18:18 +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: 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=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -32 X-Spam_score: -3.3 X-Spam_bar: --- X-Spam_report: (-3.3 / 5.0 requ) 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 , qemu-devel@nongnu.org, Peter Xu , Max Filippov , Taylor Simpson , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Marek Vasut , Yoshinori Sato , Halil Pasic , Christian Borntraeger , qemu-ppc@nongnu.org, Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Greg Kurz , Yuval Shaia , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Michael Rolnik , "Dr. David Alan Gilbert" , 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 7:15 PM, Philippe Mathieu-Daudé wrote: > On 9/14/21 6:04 PM, Eric Blake wrote: >> On Tue, Sep 14, 2021 at 03:20:18PM +0100, Daniel P. Berrangé wrote: >>> This is a counterpart to the HMP "info registers" command. It is being >>> added with an "x-" prefix because this QMP command is intended as an >>> ad hoc debugging tool and will thus not be modelled in QAPI as fully >>> structured data, nor will it have long term guaranteed stability. >>> The existing HMP command is rewritten to call the QMP command. >>> >>> Signed-off-by: Daniel P. Berrangé >>> --- > >>> +## >>> +# @HumanReadableText: >>> +# >>> +# @human-readable-text: Formatted output intended for humans. >>> +# >>> +# Since: 6.2.0 >> >> Should be '6.2', not '6.2.0', to match... >> >>> +# >>> +## >>> +{ 'struct': 'HumanReadableText', >>> + 'data': { 'human-readable-text': 'str' } } >>> diff --git a/qapi/machine.json b/qapi/machine.json >>> index 157712f006..8737efa865 100644 >>> --- a/qapi/machine.json >>> +++ b/qapi/machine.json >>> @@ -1312,3 +1312,18 @@ >>> '*cores': 'int', >>> '*threads': 'int', >>> '*maxcpus': 'int' } } >>> + >>> +## >>> +# @x-query-registers: >>> +# >>> +# @cpu: the CPU number to query. If omitted, queries all CPUs >>> +# >>> +# Query information on the CPU registers >>> +# >>> +# Returns: CPU state in an architecture-specific format >>> +# >>> +# Since: 6.2 >> >> ...the prevailing style. >> >> If it were likely that someone might backport just some (but not all) >> added x- commands, it may be wise to separate the creation of >> HumanReadableText into its own patch to backport that but not >> x-query-registers. But I rather suspect anyone backporting this will >> take the series wholesale, so the coupling in this patch is not worth >> worrying about. > > IIUC the problem is this breaks bisection, as you get a QAPI error: > > qapi/qapi-commands-machine.c:123:13: error: > ‘qmp_marshal_output_HumanReadableText’ > defined but not used [-Werror=unused-function] > 123 | static void > qmp_marshal_output_HumanReadableText(HumanReadableText *ret_in, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > See the comment added in commit 1f7b9f3181e > ("qapi/commands: add #if conditions to commands"). Oh we already talked about this together in this thread: https://lore.kernel.org/qemu-devel/20210609202952.r4nb2smrptyckvk2@redhat.com/ > >> >>> +## >>> +{ 'command': 'x-query-registers', >>> + 'data': {'*cpu': 'int' }, >>> + 'returns': 'HumanReadableText' } >>> -- >>> 2.31.1 >>> >> From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mQC4l-00057S-9T for mharc-qemu-riscv@gnu.org; Tue, 14 Sep 2021 13:18:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQC4j-00051m-H1 for qemu-riscv@nongnu.org; Tue, 14 Sep 2021 13:18:29 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40005) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQC4f-0002n7-44 for qemu-riscv@nongnu.org; Tue, 14 Sep 2021 13:18:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631639904; 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=03+IhxGmmMXDrS25Dg26nDJdPBLM1fFGiWN16fXUPNs=; b=aANjXwI5g2tiGgBEyl3X85Aqobg8nmd3p7D5+bbuKrR8EFP7qozMNf+Mt9ZhEdQBoLZdwZ Krxl5XqZhIr0w+62bt//efh6Dnr7wU2tuU7LaLyOK7tLsUOOlV/MGbWuL93Bc3rWQa88L9 gGxq5xuH5GtEC0aNn4+UC6NO1tOXJcs= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-160-9qqxm7U0OxKqQlNpUq-NrQ-1; Tue, 14 Sep 2021 13:18:23 -0400 X-MC-Unique: 9qqxm7U0OxKqQlNpUq-NrQ-1 Received: by mail-wr1-f69.google.com with SMTP id i4-20020a5d5224000000b0015b14db14deso4214460wra.23 for ; Tue, 14 Sep 2021 10:18:22 -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:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=03+IhxGmmMXDrS25Dg26nDJdPBLM1fFGiWN16fXUPNs=; b=OUDTKZliMw22vwElNRORD2oXGzELq4X3nEpAjH4mKcaLPOT95d4QIFHq/SrXc7Kong HTTM0vapfBLVDnxvJ7QCqVmh2qDNBCDRXY8kF51V6mh559ZQvB+QrxPTPuVlNrDZF9Qn IZO0hPsNPMoFC6PPGSEz5rrRTHABLoPPOq/sSlw1ZceOFw1kegKgd6qgxjh8oeQzQ5TA MDfjMniNGdLOypGjF9gO61e7rxe0WdsJTUDv17ORBL5h2S9zPQOMERvAiu5XUATxD69x 0BiAsmQdwyrLx9PhATYKhsxm+rZOFl4xPZmW6u34Ux0uaPZfdrzxcpVxeyeThJgPv3r8 Ck1w== X-Gm-Message-State: AOAM531YLptHP1PzThJp0W/ZXE/tN0If8z4tQI+ofS36jSnjH8LkDb/e 1FIk0cuzqi7IWCePx25Gk/OsOiz5uOhmiwMOzQN7WgPFputt+zaLcnQkpu8PNv9pMwEARTwKNgR dbHOXJREr5avlSBo= X-Received: by 2002:a5d:67c8:: with SMTP id n8mr315269wrw.122.1631639901812; Tue, 14 Sep 2021 10:18:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8k5dUCOzApULzgPg7szbogBDqXNvBu/8axQ3t+cvEWsWZU3M6/uMLI+iNxuUIgLe9gYzcCg== X-Received: by 2002:a5d:67c8:: with SMTP id n8mr315250wrw.122.1631639901635; Tue, 14 Sep 2021 10:18:21 -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 z17sm584333wml.24.2021.09.14.10.18.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 10:18:20 -0700 (PDT) Subject: Re: [PATCH v2 29/53] qapi: introduce x-query-registers QMP command From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= To: Eric Blake , =?UTF-8?Q?Daniel_P=2e_Berrang=c3=a9?= , Markus Armbruster , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= Cc: Peter Maydell , Chris Wulff , David Hildenbrand , Bin Meng , Mark Cave-Ayland , qemu-devel@nongnu.org, Laurent Vivier , Max Filippov , Taylor Simpson , Alistair Francis , Gerd Hoffmann , "Edgar E. Iglesias" , Marek Vasut , Yoshinori Sato , Halil Pasic , Christian Borntraeger , Palmer Dabbelt , Artyom Tarasenko , Laurent Vivier , Thomas Huth , Eduardo Habkost , Richard Henderson , Greg Kurz , Yuval Shaia , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, Michael Rolnik , Peter Xu , Stafford Horne , David Gibson , qemu-riscv@nongnu.org, Bastian Koppelmann , Cornelia Huck , qemu-ppc@nongnu.org, Aurelien Jarno , Paolo Bonzini , Aleksandar Rikalo , "Dr. David Alan Gilbert" References: <20210914142042.1655100-1-berrange@redhat.com> <20210914142042.1655100-30-berrange@redhat.com> <20210914160416.tmk5nuhch2yhfb27@redhat.com> Message-ID: <93be6f97-5dfb-4fab-25c6-363bb9f0e540@redhat.com> Date: Tue, 14 Sep 2021 19:18:18 +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: 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=170.10.133.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 17:18:29 -0000 On 9/14/21 7:15 PM, Philippe Mathieu-Daudé wrote: > On 9/14/21 6:04 PM, Eric Blake wrote: >> On Tue, Sep 14, 2021 at 03:20:18PM +0100, Daniel P. Berrangé wrote: >>> This is a counterpart to the HMP "info registers" command. It is being >>> added with an "x-" prefix because this QMP command is intended as an >>> ad hoc debugging tool and will thus not be modelled in QAPI as fully >>> structured data, nor will it have long term guaranteed stability. >>> The existing HMP command is rewritten to call the QMP command. >>> >>> Signed-off-by: Daniel P. Berrangé >>> --- > >>> +## >>> +# @HumanReadableText: >>> +# >>> +# @human-readable-text: Formatted output intended for humans. >>> +# >>> +# Since: 6.2.0 >> >> Should be '6.2', not '6.2.0', to match... >> >>> +# >>> +## >>> +{ 'struct': 'HumanReadableText', >>> + 'data': { 'human-readable-text': 'str' } } >>> diff --git a/qapi/machine.json b/qapi/machine.json >>> index 157712f006..8737efa865 100644 >>> --- a/qapi/machine.json >>> +++ b/qapi/machine.json >>> @@ -1312,3 +1312,18 @@ >>> '*cores': 'int', >>> '*threads': 'int', >>> '*maxcpus': 'int' } } >>> + >>> +## >>> +# @x-query-registers: >>> +# >>> +# @cpu: the CPU number to query. If omitted, queries all CPUs >>> +# >>> +# Query information on the CPU registers >>> +# >>> +# Returns: CPU state in an architecture-specific format >>> +# >>> +# Since: 6.2 >> >> ...the prevailing style. >> >> If it were likely that someone might backport just some (but not all) >> added x- commands, it may be wise to separate the creation of >> HumanReadableText into its own patch to backport that but not >> x-query-registers. But I rather suspect anyone backporting this will >> take the series wholesale, so the coupling in this patch is not worth >> worrying about. > > IIUC the problem is this breaks bisection, as you get a QAPI error: > > qapi/qapi-commands-machine.c:123:13: error: > ‘qmp_marshal_output_HumanReadableText’ > defined but not used [-Werror=unused-function] > 123 | static void > qmp_marshal_output_HumanReadableText(HumanReadableText *ret_in, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors > > See the comment added in commit 1f7b9f3181e > ("qapi/commands: add #if conditions to commands"). Oh we already talked about this together in this thread: https://lore.kernel.org/qemu-devel/20210609202952.r4nb2smrptyckvk2@redhat.com/ > >> >>> +## >>> +{ 'command': 'x-query-registers', >>> + 'data': {'*cpu': 'int' }, >>> + 'returns': 'HumanReadableText' } >>> -- >>> 2.31.1 >>> >>