Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2842811pxk; Tue, 15 Sep 2020 03:58:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAtA3t/7UWHWTe6xLEe4ETeY2Yoc1ONME7p0cIcCcpKelTZ2xg3hSrbtg3DSeYIaLJhUwQ X-Received: by 2002:aa7:d144:: with SMTP id r4mr21821077edo.303.1600167493894; Tue, 15 Sep 2020 03:58:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600167493; cv=none; d=google.com; s=arc-20160816; b=m3Sj5PlKh7OS5tRrnKVAnl8tXWKxanW8QAo28RRVMmYMaZiP8+8uYM1ilwUwS39WDT ADC++VrYu+yOKPZKvvCTlh1c1oPnNtn0Eeea00HFIAlvmwdhBPGj+B0nSo43l2NXR6C0 S+WD+EOlhq+JRrm9gt84EXiIJ7XkrA6Ujq57hLF0e1S7v2Ny6Q5/fboo4JRd6Va/vJFA pScd9kxbtTxbYEklkb7pcp9yaUPn6U1CBOtnFpKJ9dXWYkUHO8EmR58CuIXLn7ZDlMYx gAy2Vf3BPo2ZEJ1OZ50yjK1Vski8j6fRxGCoZuwdWZbfhwuiErLXR/HpLYZEVkl+yk3y oqtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=jwkMsDqbHDpkmL1DX5NgTbbCQ3AjMnA4hImq/0BH+g8=; b=iyMN/M9k4en2W7X8z7OJI8NwDD3WeOIt9l0YYs333Tkt7n6vNEBOiIj9zsrlbLHuTf F+2tnXYqnAp9ihTLXVWWq82Omf9Fm1yud20SUTI/sEU2O3KMgWmQQ1G9oQ11rA6Hgbjr msI/MWC9wvpeq8ZtaBdGc/TkaLEzHKvikBGhW1apAq8cPRR1B+XvJkHtkdvfA+J0/8jJ /fgT/Eoxb/pF3WkFJTm7R7aSP2a0A4Lm7F10k/3gkkSTgf4VP954UsohzLdUbKr1bOzr Onxgb0S6Szz/kvAjAMTazldxUX0RD5vnO2ojO5LTz8E2g+yLr6p3Kalfi+fXoQlSwf1N YSXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Z1en/Msu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si8898238ejq.411.2020.09.15.03.57.51; Tue, 15 Sep 2020 03:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Z1en/Msu"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbgIOK5M (ORCPT + 99 others); Tue, 15 Sep 2020 06:57:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbgIOK5H (ORCPT ); Tue, 15 Sep 2020 06:57:07 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A56A7C06174A for ; Tue, 15 Sep 2020 03:57:06 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id m15so1141963pls.8 for ; Tue, 15 Sep 2020 03:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jwkMsDqbHDpkmL1DX5NgTbbCQ3AjMnA4hImq/0BH+g8=; b=Z1en/MsuS0FkLwP9QiKP4RDKQ4lDQrtoQcNhaQbkkWLL0C7dop77EY6E35zFR3KEPv tHy4ymOajbSYRNFipuUxO/ue+Ey0xOrnD0w+KURVDA8S9vTK9qYklTQFqXpb12xuHvmJ +sZj50iAni6pL8qSngd1dy/Wfa9or7UJIURMLST69b/CWmTFoNeAHdC7npkdyK/qLhs5 tKLUukQJlbpxfnW+5tksh44wwjw8nOtwhDxh1qVUHDQw2XdjjF0Mb35LJGYGqo9hkvMa cb3KTdqAxVTD6vI4qGGWAWVq0ld7iPOHwXP9XTjoo5PzX1x5PFL57t9yku8TRVsyqTrX XreA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jwkMsDqbHDpkmL1DX5NgTbbCQ3AjMnA4hImq/0BH+g8=; b=o1Y4JeIt4ighq1iiqrr5/CJGryNn6rgYf6xJGnjPkMMdh6WzZ0nKNq8l2qCztH8FSe 8ehMaZeNWPQ4L/r2c6tWJrXj8y5sAOQ3SJKYeWjv1pGOMpyfWf8XJb6cZQb9Enko1bmZ 01ImTnjs/vK+ivelCP6IneUAh1KEFezK4A7UCq2iJS2SCO2E+B/gv5jXPtuuL3/LWrH3 MOIGX0eTAJ0es0M6TNfXJL6PodZmDdNC3h41WeygT5Q/uUYgsZesiKNszfqHVibVSWLT k6Vd1QPIVBVivj2RS6K34dNuY/BlSYTzPYM6NqeOocAJkhzihB2+n96oa6Nh118t294I v3iA== X-Gm-Message-State: AOAM533EisDgUwsFsDJmCR5pBiGA8Sza3UfaEQ3FLBGvwaisAppYXEWa 8JBM8kdQZFopZBNYLhzadSY= X-Received: by 2002:a17:90b:d89:: with SMTP id bg9mr3429765pjb.26.1600167425864; Tue, 15 Sep 2020 03:57:05 -0700 (PDT) Received: from localhost ([2409:10:2e40:5100:6e29:95ff:fe2d:8f34]) by smtp.gmail.com with ESMTPSA id s28sm13471235pfd.111.2020.09.15.03.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 03:57:04 -0700 (PDT) Date: Tue, 15 Sep 2020 19:57:02 +0900 From: Sergey Senozhatsky To: Leo Yan Cc: Sergey Senozhatsky , Peter Zijlstra , Will Deacon , John Garry , Mathieu Poirier , Namhyung Kim , Suleiman Souhlal , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2] perf kvm: add kvm-stat for arm64 Message-ID: <20200915105702.GA604@jagdpanzerIV.localdomain> References: <20200915091140.152775-1-sergey.senozhatsky@gmail.com> <20200915103644.GA32758@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915103644.GA32758@leoy-ThinkPad-X240s> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On (20/09/15 18:36), Leo Yan wrote: > > +#define HVC_STUB_ERR 0xbadca11 > > + > > +/* Per asm/kvm_asm.h */ > > +#define ARM_EXCEPTION_IRQ 0 > > +#define ARM_EXCEPTION_EL1_SERROR 1 > > +#define ARM_EXCEPTION_TRAP 2 > > +#define ARM_EXCEPTION_IL 3 > > Nitpick: from completeness, we also can give out KVM exiting reason > for 'ARM_EXCEPTION_IL'. OK, let me take a look. > > +define_exit_reasons_table(arm64_exit_reasons, kvm_arm_exception_type); > > +define_exit_reasons_table(arm64_trap_exit_reasons, kvm_arm_exception_class); > > + > > +const char *kvm_trap_exit_reason = "esr_ec"; > > +const char *vcpu_id_str = "id"; > > +const int decode_str_len = 20; > > +const char *kvm_exit_reason = "ret"; > > +const char *kvm_entry_trace = "kvm:kvm_entry"; > > +const char *kvm_exit_trace = "kvm:kvm_exit"; > > + > > +const char *kvm_events_tp[] = { > > + "kvm:kvm_entry", > > + "kvm:kvm_exit", > > I think Arm64 needs to support event 'kvm_mmio'. It's good to use a > new patch for support this event? Yes, I guess a follow up kvm_mmio patch would be a better option. > > +int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid __maybe_unused) > > +{ > > + kvm->exit_reasons = arm64_exit_reasons; > > Since the "kvm->exit_reasons" will be always set in the function > event_get_key(), seems to me here can remove this assignment. Yes, this assignment is a leftover. -ss