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=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 0F124C2B9F4 for ; Thu, 17 Jun 2021 11:46:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E7F5C6140C for ; Thu, 17 Jun 2021 11:46:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232477AbhFQLs2 (ORCPT ); Thu, 17 Jun 2021 07:48:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33917 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232172AbhFQLs1 (ORCPT ); Thu, 17 Jun 2021 07:48:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623930378; 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=Ujv31ni+pedAzRqkqN94IhUeHH6igQoDkhQGmN9rbYg=; b=hpGILq3r6bD1G/hGAnxtpVY85/dETDg9oac92N2dAmxGLvT8lPxz+2RFP8hD+HOrKk0Fwq Ry+nDIXKwbmI236Uyq61v4oGF2qyL55bcviw953NKjjgx0bt1cb+j7Kq7dHrhKoZYbcfYO G3+W+u7M7OVVaXehD2KY1i5lRu4ZY20= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-80-ZcbWDGCONiSblOY-xYmOvA-1; Thu, 17 Jun 2021 07:46:15 -0400 X-MC-Unique: ZcbWDGCONiSblOY-xYmOvA-1 Received: by mail-ed1-f70.google.com with SMTP id z16-20020aa7d4100000b029038feb83da57so1359509edq.4 for ; Thu, 17 Jun 2021 04:46:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=Ujv31ni+pedAzRqkqN94IhUeHH6igQoDkhQGmN9rbYg=; b=a+tF9P1b/ttAasfP9T5zO6AezgWpXPRUPvoBfU4kQM0C9uocsAkuGiWh+mzhAWCeDv Cp/p2btVgVxoAqsq7qF6l5yxXCnARYUifcv3v9mpvtWrlwtJddkyZsZlllKEZvlqFbXy 3qE/Cd1bdEVGcPak78D8DMGHt+CVMPzslyxraKCzFkrE0EkR7DmKCkFT5fWnQxU8hHDw r0nkUzvsyJzhrOjllzt3UiV01/jnTMPk5fRubajfB9MiDYepZqGf5bYc8DbNoOWfG9bJ mriMR5aXEAP9oXy7/aZ/ctQvbZHqQEeIHGhf7y+QgZ6E0kEbAHC0Fr+kL8lXRYCwjKvb Am+A== X-Gm-Message-State: AOAM5332GFfOb8r4ixebpcwaLQnNT1ySRc3acOGLX1s2PKpIrLvqL4rd y2InnclvuJM2Tbr/pjXtR/EItiQHS1T/HmnVbzBB76ReaKpf/Jsj5qR28e6k3omGhRfYYfD74Kt CmrKgw4yz3sTgS4NFLKfeYw== X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826467edy.384.1623930370629; Thu, 17 Jun 2021 04:46:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGp0u6bbKTpBWAweRlzIakuy+NTS2L7DG9uaEaAYNed1OyNxc+QE79jbRlb3hr0uHlxKTUpw== X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826434edy.384.1623930370434; Thu, 17 Jun 2021 04:46:10 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id t14sm1472804edr.36.2021.06.17.04.46.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 04:46:09 -0700 (PDT) Subject: Re: [PATCH v10 3/5] KVM: stats: Add documentation for binary statistics interface To: Greg KH , "Gustavo A. R. Silva" Cc: Jing Zhang , KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Linuxkselftest , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Huacai Chen , Aleksandar Markovic , Thomas Bogendoerfer , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Peter Shier , Oliver Upton , David Rientjes , Emanuele Giuseppe Esposito , David Matlack , Ricardo Koller , Krish Sadhukhan , Fuad Tabba References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-4-jingzhangos@google.com> <0d959828-da89-bceb-f7cc-35622a60c431@redhat.com> From: Paolo Bonzini Message-ID: <348aa108-076b-04dd-9fd2-e840a7a85f5d@redhat.com> Date: Thu, 17 Jun 2021 13:46:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On 17/06/21 13:42, Greg KH wrote: > On Thu, Jun 17, 2021 at 01:29:22PM +0200, Paolo Bonzini wrote: >> On 17/06/21 07:56, Greg KH wrote: >>> On Thu, Jun 17, 2021 at 04:41:44AM +0000, Jing Zhang wrote: >>>> +string starts at the end of ``struct kvm_stats_desc``. >>>> +The maximum length (including trailing '\0') is indicated by ``name_size`` >>>> +in ``struct kvm_stats_header``. >>> >>> I thought we were replacing [0] arrays with [], are you sure you should >>> be declaring this as [0]? Same for all structures in this document (and >>> code). >> >> In C code [0] is a bit more flexible than []. I think in this particular >> case [] won't work due to how the structures are declared. In the >> documentation [] is certainly clearer. > > Look at all of the patches that Gustavo has been doing all over the tree > for this work, you do not want to make him do this again here. > > Gustavo, is [0] ok for fields like these? I should be able to get back to KVM stuff later today, I'll check myself if [] can be applied and reply. I had queued an early version of these for my local build to play with them but I haven't been able to do a complete review. Paolo 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=-5.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 C84FBC49361 for ; Thu, 17 Jun 2021 11:46:16 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 4744461412 for ; Thu, 17 Jun 2021 11:46:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4744461412 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CA1564A524; Thu, 17 Jun 2021 07:46:15 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CyUTkF9FbSYy; Thu, 17 Jun 2021 07:46:14 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C20E749FB7; Thu, 17 Jun 2021 07:46:14 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 20A5140874 for ; Thu, 17 Jun 2021 07:46:14 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xHYdRBopcVZc for ; Thu, 17 Jun 2021 07:46:13 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3B73840642 for ; Thu, 17 Jun 2021 07:46:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623930373; 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=Ujv31ni+pedAzRqkqN94IhUeHH6igQoDkhQGmN9rbYg=; b=M6L1mTafPswJKarRnC+9Rg9l27Jrnsm2dzFzftOWOU3J6x3FYItDzIioiE1I95G+3C9zZ5 QgGhMN/D5n7yalKArgMLAYiO3P2lac2c9pHsKyRJ9QV4Gu1fhEtLMibrOY4GjKDdKL8JeV GuJyY2yx5BcwDSFHUYo6BGu/vLEkr6M= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-243-0lid0L_CP8WE3pMpXu4f7A-1; Thu, 17 Jun 2021 07:46:11 -0400 X-MC-Unique: 0lid0L_CP8WE3pMpXu4f7A-1 Received: by mail-ed1-f69.google.com with SMTP id y18-20020a0564022712b029038ffac1995eso1351960edd.12 for ; Thu, 17 Jun 2021 04:46:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=Ujv31ni+pedAzRqkqN94IhUeHH6igQoDkhQGmN9rbYg=; b=FRlEJtAgXwWNt5f6ZepfgbXPzVFgeSYTYomqMDqEKVQzhiaQAkxdMTCqZUljrmWb/6 AbNwD6DPL5ych2cOb3SOShqmkVlRTTYmYymkfow+teQW5OwfcatlWBYUFPxA1qBXyAOj IQ0MX1wz6b8dsXEZJTKpBFH/A2Z5tZ3V//L7g3aSNpjizXZTLO72+Hd9o7SE8VTfvXOQ e719cPMas2mSKxbxz9epgXbZmy3BxRwqTzKH+Bl2SOtpS5SSohiYH/2ODwVbVKLCs00T w2f1JfY857C6Hb4M8Zl+75iE4PvL9/HSUGOuSpHqzI0drJLgMoF8ilJpTIOnFDp89tHW J6mA== X-Gm-Message-State: AOAM530Ox0pA8vDbUzhLmmoONNpYfPh/a/3KWPp3k9+v+O6qQAxqVope ueIfB27+Rqe98n9o7zeQPaSg+9fQFribLCJoieWETdfrInUKZbR2i8Pmz+mmFxQS04dT5mJbF7g v8w/6vDOpPQADLdOPRmHLgLqG X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826496edy.384.1623930370812; Thu, 17 Jun 2021 04:46:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGp0u6bbKTpBWAweRlzIakuy+NTS2L7DG9uaEaAYNed1OyNxc+QE79jbRlb3hr0uHlxKTUpw== X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826434edy.384.1623930370434; Thu, 17 Jun 2021 04:46:10 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id t14sm1472804edr.36.2021.06.17.04.46.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Jun 2021 04:46:09 -0700 (PDT) Subject: Re: [PATCH v10 3/5] KVM: stats: Add documentation for binary statistics interface To: Greg KH , "Gustavo A. R. Silva" References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-4-jingzhangos@google.com> <0d959828-da89-bceb-f7cc-35622a60c431@redhat.com> From: Paolo Bonzini Message-ID: <348aa108-076b-04dd-9fd2-e840a7a85f5d@redhat.com> Date: Thu, 17 Jun 2021 13:46:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: KVM , David Hildenbrand , Paul Mackerras , Linuxkselftest , Claudio Imbrenda , Will Deacon , KVMARM , Emanuele Giuseppe Esposito , LinuxS390 , Janosch Frank , Marc Zyngier , Huacai Chen , Christian Borntraeger , Aleksandar Markovic , David Rientjes , KVMPPC , Krish Sadhukhan , David Matlack , Jim Mattson , Thomas Bogendoerfer , Sean Christopherson , Cornelia Huck , Peter Shier , LinuxMIPS , Vitaly Kuznetsov X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 17/06/21 13:42, Greg KH wrote: > On Thu, Jun 17, 2021 at 01:29:22PM +0200, Paolo Bonzini wrote: >> On 17/06/21 07:56, Greg KH wrote: >>> On Thu, Jun 17, 2021 at 04:41:44AM +0000, Jing Zhang wrote: >>>> +string starts at the end of ``struct kvm_stats_desc``. >>>> +The maximum length (including trailing '\0') is indicated by ``name_size`` >>>> +in ``struct kvm_stats_header``. >>> >>> I thought we were replacing [0] arrays with [], are you sure you should >>> be declaring this as [0]? Same for all structures in this document (and >>> code). >> >> In C code [0] is a bit more flexible than []. I think in this particular >> case [] won't work due to how the structures are declared. In the >> documentation [] is certainly clearer. > > Look at all of the patches that Gustavo has been doing all over the tree > for this work, you do not want to make him do this again here. > > Gustavo, is [0] ok for fields like these? I should be able to get back to KVM stuff later today, I'll check myself if [] can be applied and reply. I had queued an early version of these for my local build to play with them but I haven't been able to do a complete review. Paolo _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Date: Thu, 17 Jun 2021 11:46:08 +0000 Subject: Re: [PATCH v10 3/5] KVM: stats: Add documentation for binary statistics interface Message-Id: <348aa108-076b-04dd-9fd2-e840a7a85f5d@redhat.com> List-Id: References: <20210617044146.2667540-1-jingzhangos@google.com> <20210617044146.2667540-4-jingzhangos@google.com> <0d959828-da89-bceb-f7cc-35622a60c431@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Greg KH , "Gustavo A. R. Silva" Cc: Jing Zhang , KVM , KVMARM , LinuxMIPS , KVMPPC , LinuxS390 , Linuxkselftest , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Will Deacon , Huacai Chen , Aleksandar Markovic , Thomas Bogendoerfer , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Peter Shier , Oliver Upton , David Rientjes , Emanuele Giuseppe Esposito , David Matlack , Ricardo Koller , Krish Sadhukhan , Fuad Tabba On 17/06/21 13:42, Greg KH wrote: > On Thu, Jun 17, 2021 at 01:29:22PM +0200, Paolo Bonzini wrote: >> On 17/06/21 07:56, Greg KH wrote: >>> On Thu, Jun 17, 2021 at 04:41:44AM +0000, Jing Zhang wrote: >>>> +string starts at the end of ``struct kvm_stats_desc``. >>>> +The maximum length (including trailing '\0') is indicated by ``name_size`` >>>> +in ``struct kvm_stats_header``. >>> >>> I thought we were replacing [0] arrays with [], are you sure you should >>> be declaring this as [0]? Same for all structures in this document (and >>> code). >> >> In C code [0] is a bit more flexible than []. I think in this particular >> case [] won't work due to how the structures are declared. In the >> documentation [] is certainly clearer. > > Look at all of the patches that Gustavo has been doing all over the tree > for this work, you do not want to make him do this again here. > > Gustavo, is [0] ok for fields like these? I should be able to get back to KVM stuff later today, I'll check myself if [] can be applied and reply. I had queued an early version of these for my local build to play with them but I haven't been able to do a complete review. Paolo