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 71BCEC2B9F4 for ; Thu, 17 Jun 2021 11:46:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AEE461410 for ; Thu, 17 Jun 2021 11:46:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231593AbhFQLsX (ORCPT ); Thu, 17 Jun 2021 07:48:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:42676 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232172AbhFQLsV (ORCPT ); Thu, 17 Jun 2021 07:48:21 -0400 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-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-301-2hmfxm1vNaaM5Ihq1834wA-1; Thu, 17 Jun 2021 07:46:11 -0400 X-MC-Unique: 2hmfxm1vNaaM5Ihq1834wA-1 Received: by mail-ed1-f71.google.com with SMTP id y7-20020aa7ce870000b029038fd7cdcf3bso1335796edv.15 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=syPzWhCV2MvuYJyHv+Mxs4aBMHkkTKI7lO8Ad9+YRiFy6xoa0uyrKXTesWqsEHu5sE dGa/nwCEkPNPDDEb9jiuQkpFPuts45LLaXrUuHreFEqhD23gXbLP6CaajfIVinYdV3g3 qhoGNvNafep93tRTWrpq8MUkXr7OpWI5p+zwYuh2SNUC4ab9FBuZHQ01mEj7XcShnhEc JfVbqvpyJ9LsQceWd+UgmQ+8aR4AT2iXkXutwisdwdbBmwwxWPimXCvz9Sj1r7MvxS+X wWYfL8jDgKf2EyvXODW21kGWJqNQ2ym92F5090IPEWF4Nhk5yo624eUQvTXnGQclspcw reBw== X-Gm-Message-State: AOAM532/R8e5ToqPImqnYKWKT60/DQ5k5oZJhqQa8tBTdcGPzc/DoZXL aEMSSkQbcf4vPjgdQoWOJrGDf6wz4FOyrWkexnQTehGyQ6hy3tQD6VTdEY8MoLDYE7Lu5z0el8p b61B2+lKUrDxZ X-Received: by 2002:aa7:cf0d:: with SMTP id a13mr5826480edy.384.1623930370635; 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: kvm@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