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.6 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 ABE6CC4743C for ; Mon, 21 Jun 2021 23:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8F3B9611BD for ; Mon, 21 Jun 2021 23:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231950AbhFUXiL (ORCPT ); Mon, 21 Jun 2021 19:38:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35147 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231883AbhFUXiK (ORCPT ); Mon, 21 Jun 2021 19:38:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624318555; 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=y4rj5S7DFpUC+3DesUoe15Y9dUe8dzdqWSEsCDEqvgA=; b=APC7UXMuV7Au63FUsCMO9Q282eUDQEYwVP6WEwBIpcNACtEU6q35IBZpXxT0Tl1c8gRw3B ZfTWWxZJEHP3vYgUhWVabQ0OkNLeM2z0aCJDGdDbUN7ynhtmi/BYFTLIMedOMPcQ0i19as MYGb9+SLpvUYyhqYAANmlkVvnTJCfXc= 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-190-n-0dAIZNNhSCv5sLH0p1AA-1; Mon, 21 Jun 2021 19:35:54 -0400 X-MC-Unique: n-0dAIZNNhSCv5sLH0p1AA-1 Received: by mail-wm1-f72.google.com with SMTP id j38-20020a05600c1c26b02901dbf7d18ff8so116235wms.8 for ; Mon, 21 Jun 2021 16:35:54 -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=y4rj5S7DFpUC+3DesUoe15Y9dUe8dzdqWSEsCDEqvgA=; b=g0nT3N0kYepHCX8sQvMcGpaB2ZCz15b3QY/t9tcrz8ipfZZR3578Ewvs/5tag2HKXm BRx1HCBIPMgDE5jwhmffVuOFk9mbo0V4Zu08IR8uHJ87q4zWJeMIsEN/xuKnnVDsPiYd lq8mhA9r515LDrcOpv2aqYwc3OeNmYB8fWfyNNyqfLYiRpRgKqXVLu9/rkXZYa657SU4 5Mutmc2HoC9Fwv0lP7N5Fawt6WdIWa2Bjb+IQ/timYR4PReJpuz2PAcfYpFm4A1okh/Z PjWS+ZSXOiZ5+JDumgWtWGK4mLDLSBN0PkXQXOfj2z0r+AMZtQkzEJw9l+thBkU66orM RJBQ== X-Gm-Message-State: AOAM53188q6LxRtXP5zuEJeqlfx2zU7aTR/mT/QAzv7ZF+llZm9bceFY z9d6WfD9uFZndyPfLOHT/8DIx4GwCQVhaX5+FZedQACEhlDTEaxVezWb8+2AAQALN5He9J4MVGa SUnE05tGk93p53dCmz4T/3Q== X-Received: by 2002:a05:6000:1c5:: with SMTP id t5mr1064342wrx.71.1624318553281; Mon, 21 Jun 2021 16:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhLPASIEPgENpXabVu2lLjBJcoZDTjIn3uO5++5JKzeF1Zgk0yuFtAQij55J0dmy/ecQX5WA== X-Received: by 2002:a05:6000:1c5:: with SMTP id t5mr1064334wrx.71.1624318553129; Mon, 21 Jun 2021 16:35:53 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id u15sm458337wmq.48.2021.06.21.16.35.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 16:35:52 -0700 (PDT) Subject: Re: [PATCH v12 2/7] KVM: stats: Add fd-based API to read binary stats data To: Jing Zhang Cc: 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 , Greg KH References: <20210618222709.1858088-1-jingzhangos@google.com> <20210618222709.1858088-3-jingzhangos@google.com> <0cde024e-a234-9a10-5157-d17ba423939e@redhat.com> From: Paolo Bonzini Message-ID: Date: Tue, 22 Jun 2021 01:35:50 +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-s390@vger.kernel.org On 22/06/21 00:58, Jing Zhang wrote: >> Pass it as an argument? > The num_desc can only be initialized in the same file that defines the > descriptor array. > Looks like we have to have a global variable to save that. The > solution would be similar > to have a statically defined header for each arch. > So, keep the header structure for each arch? Oh, sorry. I missed that there's only one call to kvm_stats_read and it's in common code. The remaining comments are small enough that I can apply them myself. Thanks! 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.1 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 100B9C4743C for ; Mon, 21 Jun 2021 23:36:00 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 819B2611BD for ; Mon, 21 Jun 2021 23:35:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 819B2611BD 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 EFFAB406D3; Mon, 21 Jun 2021 19:35:58 -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 En2fG0zAOtif; Mon, 21 Jun 2021 19:35:58 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 019CE40667; Mon, 21 Jun 2021 19:35:58 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id BC9BD4057F for ; Mon, 21 Jun 2021 19:35:56 -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 50tP5WZjyCV9 for ; Mon, 21 Jun 2021 19:35:55 -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 E1FCF40191 for ; Mon, 21 Jun 2021 19:35:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624318555; 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=y4rj5S7DFpUC+3DesUoe15Y9dUe8dzdqWSEsCDEqvgA=; b=APC7UXMuV7Au63FUsCMO9Q282eUDQEYwVP6WEwBIpcNACtEU6q35IBZpXxT0Tl1c8gRw3B ZfTWWxZJEHP3vYgUhWVabQ0OkNLeM2z0aCJDGdDbUN7ynhtmi/BYFTLIMedOMPcQ0i19as MYGb9+SLpvUYyhqYAANmlkVvnTJCfXc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-503-bHIetWp2PBWs8C7-f6OL3w-1; Mon, 21 Jun 2021 19:35:54 -0400 X-MC-Unique: bHIetWp2PBWs8C7-f6OL3w-1 Received: by mail-wm1-f69.google.com with SMTP id m186-20020a1c26c30000b02901e1c85168f1so35440wmm.2 for ; Mon, 21 Jun 2021 16:35:54 -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=y4rj5S7DFpUC+3DesUoe15Y9dUe8dzdqWSEsCDEqvgA=; b=GM/CCthHzov2zimwQKrvwLDsCDDcto1nABxTEwPa9oVb/eh7LhSxWl4W4/l1Pskny1 8AN3eho5ADfZofJ6RYW/b5MGB7o/gGUMvzex9RUpBOGzpPnzENt7oaGhWB8KxQd/oF65 lzCU1xhcsGWIH+XRVpwDxgTCQUBJMBuIEcYPqt4eD39+D8dTEE0GYM3sRcq51RQWH8E0 1JgzGWi3Tk/FQjCBE/65n2upxhi2ON9LpkBd3ClXCEKJQqBwBPUPJvgUJPXwmCs64ai7 u6IgxlisWCQXh7RvP+6Do7BCUolZzS5SGf4nr9agFwnBzKkIhV3YZy6tS/eZW248iec3 F4Aw== X-Gm-Message-State: AOAM532CpgIXsdLr92PndOd3Ki0GmW1G10m0t3fbMbZxZSBWCEdp2TWP cVGymewsSpEwhu7EMYP/crVB2DKhfg4CDIgii8irWjcI28lo5iAIZ3uufb1naG5UKBSGvxUcHnI gOhv9ATvqJHaBCuSsxcwzhlwQ X-Received: by 2002:a05:6000:1c5:: with SMTP id t5mr1064373wrx.71.1624318553323; Mon, 21 Jun 2021 16:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhLPASIEPgENpXabVu2lLjBJcoZDTjIn3uO5++5JKzeF1Zgk0yuFtAQij55J0dmy/ecQX5WA== X-Received: by 2002:a05:6000:1c5:: with SMTP id t5mr1064334wrx.71.1624318553129; Mon, 21 Jun 2021 16:35:53 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id u15sm458337wmq.48.2021.06.21.16.35.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Jun 2021 16:35:52 -0700 (PDT) Subject: Re: [PATCH v12 2/7] KVM: stats: Add fd-based API to read binary stats data To: Jing Zhang References: <20210618222709.1858088-1-jingzhangos@google.com> <20210618222709.1858088-3-jingzhangos@google.com> <0cde024e-a234-9a10-5157-d17ba423939e@redhat.com> From: Paolo Bonzini Message-ID: Date: Tue, 22 Jun 2021 01:35:50 +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 , Greg KH , 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 22/06/21 00:58, Jing Zhang wrote: >> Pass it as an argument? > The num_desc can only be initialized in the same file that defines the > descriptor array. > Looks like we have to have a global variable to save that. The > solution would be similar > to have a statically defined header for each arch. > So, keep the header structure for each arch? Oh, sorry. I missed that there's only one call to kvm_stats_read and it's in common code. The remaining comments are small enough that I can apply them myself. Thanks! 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: Mon, 21 Jun 2021 23:35:50 +0000 Subject: Re: [PATCH v12 2/7] KVM: stats: Add fd-based API to read binary stats data Message-Id: List-Id: References: <20210618222709.1858088-1-jingzhangos@google.com> <20210618222709.1858088-3-jingzhangos@google.com> <0cde024e-a234-9a10-5157-d17ba423939e@redhat.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jing Zhang Cc: 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 , Greg KH On 22/06/21 00:58, Jing Zhang wrote: >> Pass it as an argument? > The num_desc can only be initialized in the same file that defines the > descriptor array. > Looks like we have to have a global variable to save that. The > solution would be similar > to have a statically defined header for each arch. > So, keep the header structure for each arch? Oh, sorry. I missed that there's only one call to kvm_stats_read and it's in common code. The remaining comments are small enough that I can apply them myself. Thanks! Paolo