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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 2E7B7C4332F for ; Wed, 22 Sep 2021 14:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 11E4560FC1 for ; Wed, 22 Sep 2021 14:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236290AbhIVOui (ORCPT ); Wed, 22 Sep 2021 10:50:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236164AbhIVOuc (ORCPT ); Wed, 22 Sep 2021 10:50:32 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 195F5C061756 for ; Wed, 22 Sep 2021 07:49:02 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id g14so2951617pfm.1 for ; Wed, 22 Sep 2021 07:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=i17P/LE0kBMgmTnemIWdlFQzqY0Hs2jbI6I1/q7BOVL5p2dtOUMx0v77u9KgBVc6Wn aKV+BPEmJqQFBnpf2JgmIIqtssY8WUcJgn0PyaL+KfSiTDztZbnAplBfnqcfDhlXXfFn BjrKCa5IqUkRjskJLByrIP0vUAdGBFoOpGk78YEBagXPKCi9T3kxBnFA97BcpKw7BZcR bmLTSv6ivPklBCfoVzjL+iJjEelTUzY+vAJf7MF3MbJsLpnqXAXpI4Q3beusWaRqYBkI 4OoNyyAV9qr/c1FTp2tfQsv3gnSyBPHEnLObwapHJkjxKwND1CbJf6lm69JT2lSfnhHf qYCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=31wiLqphgAOpvN4m2GsbVbJy3jECUpRs+adOKiTsS3kpby7quwMRBSY7g7oMLM/87z kSOUIGoHPkd+1PIIE1e+mty/SWNfHIYSPiKKyL5QQz/2+HBmk/0HxyLGC4ZmxSKw1BYd GM0qtlRPnn4JfzuaGUAqzL08aB4vESDYmoAbe0CsoAZtJI44bFOhBLF6uhMy0zvdB9jM VebCGbEQzXSb/dMq8uISbhp3oGudUw7jL6RZg8G9vyMB6sldvP9/L2gwKNLq9s0e4sz/ V0nXiX8ssBPgZ7H8esh32faiTkMydFVI3f+1xw/suKc7u3mifvNJBAE1cD7ufSdPV3ma Di0g== X-Gm-Message-State: AOAM5312QxgaSqEJtro77BuIEhoJ3wiZY7hgckBCDNhOLB0JZxEYQxXY C8t3r32QK6IVNqAg0/b8cJUv4w== X-Google-Smtp-Source: ABdhPJyY3Fv9QcnunPtvdtmn1QYeYqhfMcgkYKWmFqTAaf0DAX+dPQteKaq7uTqZ/uQmOkkrqsksfg== X-Received: by 2002:a62:5fc7:0:b0:438:9e3a:b8c0 with SMTP id t190-20020a625fc7000000b004389e3ab8c0mr22443pfb.74.1632322141372; Wed, 22 Sep 2021 07:49:01 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id x19sm3250084pgk.37.2021.09.22.07.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 07:49:00 -0700 (PDT) Date: Wed, 22 Sep 2021 14:48:56 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , Mark Rutland , Marc Zyngier , Guo Ren , Nick Hu , Greentime Hu , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Albert Ou , Boris Ostrovsky , Juergen Gross , Alexander Shishkin , Jiri Olsa , Namhyung Kim , James Morse , Alexandru Elisei , Suzuki K Poulose , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Stefano Stabellini , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Artem Kashkanov , Like Xu , Zhu Lingshan Subject: Re: [PATCH v3 08/16] perf: Force architectures to opt-in to guest callbacks Message-ID: References: <20210922000533.713300-1-seanjc@google.com> <20210922000533.713300-9-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 22, 2021, Paolo Bonzini wrote: > On 22/09/21 02:05, Sean Christopherson wrote: > > @@ -1273,6 +1274,11 @@ static inline unsigned int perf_guest_handle_intel_pt_intr(void) > > } > > extern void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > extern void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > +#else > > +static inline unsigned int perf_guest_state(void) { return 0; } > > +static inline unsigned long perf_guest_get_ip(void) { return 0; } > > +static inline unsigned int perf_guest_handle_intel_pt_intr(void) { return 0; } > > +#endif /* CONFIG_GUEST_PERF_EVENTS */ > > Reviewed-by: Paolo Bonzini > > Having perf_guest_handle_intel_pt_intr in generic code is a bit off. Of > course it has to be in the struct, but the wrapper might be placed in > arch/x86/include/asm/perf_event.h as well (applies to patch 7 as well). Yeah, I went with this option purely to keep everything bundled together. I have no strong opinion. 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=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1151CC433F5 for ; Wed, 22 Sep 2021 14:49:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A173360FC1 for ; Wed, 22 Sep 2021 14:49:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A173360FC1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Nem3o+yJwLypqsb/IDwNP/dR0xBcO9xUl3NfU7iHcW0=; b=RxkiBFzuvm3/rE gEhdW9bj8RTWTeE62wQMeVdzpJki/X+ZHLqnBOSlpEIi/XaLEqI9mUJ2d3biREIs2gFSwadJ/5FTX uezNdJcleWNh8W+rBJ7LAH3IQ+KqW9jxxL9gLyTtcGd+sLJ2iBc7+L/6SK8+MjdJZ1cZwLHs7qSOI 8zD1GO2G1f5UwC2F9amMedxyqC6yB2RzxUkUnBFg15p2a8HvG9WiRlWQHjtyfm8S/Oub6Fq5tsa+8 80aNRaO0Sq9hejQ9sMaJepZ2EbVHwPUvhFEvuutMbUuxMOFsnemJbw/BZ8T3M3LQUWqCRmV72EHRP xVe7o5rD0OkYjhLu8OuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT3YY-008s7B-97; Wed, 22 Sep 2021 14:49:06 +0000 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT3YU-008s67-NY for linux-riscv@lists.infradead.org; Wed, 22 Sep 2021 14:49:04 +0000 Received: by mail-pf1-x42a.google.com with SMTP id y8so2916612pfa.7 for ; Wed, 22 Sep 2021 07:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=i17P/LE0kBMgmTnemIWdlFQzqY0Hs2jbI6I1/q7BOVL5p2dtOUMx0v77u9KgBVc6Wn aKV+BPEmJqQFBnpf2JgmIIqtssY8WUcJgn0PyaL+KfSiTDztZbnAplBfnqcfDhlXXfFn BjrKCa5IqUkRjskJLByrIP0vUAdGBFoOpGk78YEBagXPKCi9T3kxBnFA97BcpKw7BZcR bmLTSv6ivPklBCfoVzjL+iJjEelTUzY+vAJf7MF3MbJsLpnqXAXpI4Q3beusWaRqYBkI 4OoNyyAV9qr/c1FTp2tfQsv3gnSyBPHEnLObwapHJkjxKwND1CbJf6lm69JT2lSfnhHf qYCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=GTVSRZfny4fJReVuc2T3DMXSR+tpWOdUBmAi/vJcQbY2YavdkJRuBdFHaVJDQpxqLF GV+PBckby+NyAL86rCawNxhIc4ZcBk+mAvLTJHMXylGXGM2mxMS/gJVd9Z2IUTaUkYvx W4aWZMZGDALbuiEmqzOJ/6nhmV1fhmmphZV2qZtPxhqAcoeGFJSUvWU+yviMh4GTxnsV isz/ojnrGqdaNsYavvgV2c0aYl4gi9x0xRVNpEUQyIh58rSN9gS9KFIsC8lcquPgF9Bl L+IN3yS95bzREJBjH4vUtvQLY6rybRR0550Iq+6zGL3APcoHRRdzJetkqLnNA6cyK1L5 KTTA== X-Gm-Message-State: AOAM531tvCWXK71hzU2I85YPz2O6rk0Jc6ivGNAVJKfFp8yX/cY6eBJ3 KrV/f3bqBckZ9vmV+YjKyyB9YA== X-Google-Smtp-Source: ABdhPJyY3Fv9QcnunPtvdtmn1QYeYqhfMcgkYKWmFqTAaf0DAX+dPQteKaq7uTqZ/uQmOkkrqsksfg== X-Received: by 2002:a62:5fc7:0:b0:438:9e3a:b8c0 with SMTP id t190-20020a625fc7000000b004389e3ab8c0mr22443pfb.74.1632322141372; Wed, 22 Sep 2021 07:49:01 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id x19sm3250084pgk.37.2021.09.22.07.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 07:49:00 -0700 (PDT) Date: Wed, 22 Sep 2021 14:48:56 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , Mark Rutland , Marc Zyngier , Guo Ren , Nick Hu , Greentime Hu , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Albert Ou , Boris Ostrovsky , Juergen Gross , Alexander Shishkin , Jiri Olsa , Namhyung Kim , James Morse , Alexandru Elisei , Suzuki K Poulose , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Stefano Stabellini , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Artem Kashkanov , Like Xu , Zhu Lingshan Subject: Re: [PATCH v3 08/16] perf: Force architectures to opt-in to guest callbacks Message-ID: References: <20210922000533.713300-1-seanjc@google.com> <20210922000533.713300-9-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_074902_819005_65811DF7 X-CRM114-Status: GOOD ( 12.43 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Wed, Sep 22, 2021, Paolo Bonzini wrote: > On 22/09/21 02:05, Sean Christopherson wrote: > > @@ -1273,6 +1274,11 @@ static inline unsigned int perf_guest_handle_intel_pt_intr(void) > > } > > extern void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > extern void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > +#else > > +static inline unsigned int perf_guest_state(void) { return 0; } > > +static inline unsigned long perf_guest_get_ip(void) { return 0; } > > +static inline unsigned int perf_guest_handle_intel_pt_intr(void) { return 0; } > > +#endif /* CONFIG_GUEST_PERF_EVENTS */ > > Reviewed-by: Paolo Bonzini > > Having perf_guest_handle_intel_pt_intr in generic code is a bit off. Of > course it has to be in the struct, but the wrapper might be placed in > arch/x86/include/asm/perf_event.h as well (applies to patch 7 as well). Yeah, I went with this option purely to keep everything bundled together. I have no strong opinion. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv 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=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 E29F0C433F5 for ; Wed, 22 Sep 2021 14:51:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B028B61050 for ; Wed, 22 Sep 2021 14:51:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B028B61050 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RLhze3mfraPBZzYYBGewxhFCmBHF0uVHrcCwQXH84t4=; b=bUsbSWijeYLdMM Ebo+aooHTcqSZscZC53B9yfFlVda4iysKZwRqPNs+VabUG+xhvvW23ftlo50cYPVfc8NwKyWxJlbH 5G7R6/s3MAql0UpRnt6FEWKI1vGp0+ZAjmi+pOI6g3D8MeRJBqN8gFKZJz+gEN1lm/71MvRI+eCI8 7SkRsuRIYYM3mH+2nBcabTo8EUydVXIRlMW2llgUyL4Y671Yi0o45c0VRo8yMgRHjIilzzazymYBd IvxYuVCg9oQ0Zo8/sS//LNZnEB/cY3SaydAj19NQtM2B++MZmT9t3tRCHN5nF4V3KGCpFJs2DmHJa qs2VcGJNA19C16D+3vDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT3Ya-008s7K-O2; Wed, 22 Sep 2021 14:49:08 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT3YU-008s69-PK for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 14:49:05 +0000 Received: by mail-pf1-x435.google.com with SMTP id g14so2951618pfm.1 for ; Wed, 22 Sep 2021 07:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=i17P/LE0kBMgmTnemIWdlFQzqY0Hs2jbI6I1/q7BOVL5p2dtOUMx0v77u9KgBVc6Wn aKV+BPEmJqQFBnpf2JgmIIqtssY8WUcJgn0PyaL+KfSiTDztZbnAplBfnqcfDhlXXfFn BjrKCa5IqUkRjskJLByrIP0vUAdGBFoOpGk78YEBagXPKCi9T3kxBnFA97BcpKw7BZcR bmLTSv6ivPklBCfoVzjL+iJjEelTUzY+vAJf7MF3MbJsLpnqXAXpI4Q3beusWaRqYBkI 4OoNyyAV9qr/c1FTp2tfQsv3gnSyBPHEnLObwapHJkjxKwND1CbJf6lm69JT2lSfnhHf qYCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=MLFUlm1THEp2Laz4HdaRBufNtfUsKOh9mi1trHh2jWJ84NUn6gDWuGH9cNxUOD2AU2 9NFMoGL5y/qV2zllnPbeUNDwUg6dhUeyKVWTtzv6L+s1+sRut2fgTMiPils1G/Xp4BbU poa8jS6ljuhA9iJi0nEVJ4HvS8el5K5Kra62mAijJKMCv1DvbljmNzceQh1FaD3o8sU1 9Q6P25NCVduHmCEk2lJKRFeFhlMXZZgEgDLmeeJvzfXaSTVBEh5R7c6+cV0X497rHJ2L Gg2G3rAZOQPwlM2AEpJPjz2zLIhApBr9MZXRUiaBWvLYcKQ4FQA8MvO5SKo1kYx7+0iV Xgwg== X-Gm-Message-State: AOAM533tLxmtiucou+kSzbYntRVhPLJKZXfKZIY4QNp7UPUCospxVjTV AyegvIU+GJOlhSUT8tT77mSa5w== X-Google-Smtp-Source: ABdhPJyY3Fv9QcnunPtvdtmn1QYeYqhfMcgkYKWmFqTAaf0DAX+dPQteKaq7uTqZ/uQmOkkrqsksfg== X-Received: by 2002:a62:5fc7:0:b0:438:9e3a:b8c0 with SMTP id t190-20020a625fc7000000b004389e3ab8c0mr22443pfb.74.1632322141372; Wed, 22 Sep 2021 07:49:01 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id x19sm3250084pgk.37.2021.09.22.07.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 07:49:00 -0700 (PDT) Date: Wed, 22 Sep 2021 14:48:56 +0000 From: Sean Christopherson To: Paolo Bonzini Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Will Deacon , Mark Rutland , Marc Zyngier , Guo Ren , Nick Hu , Greentime Hu , Vincent Chen , Paul Walmsley , Palmer Dabbelt , Albert Ou , Boris Ostrovsky , Juergen Gross , Alexander Shishkin , Jiri Olsa , Namhyung Kim , James Morse , Alexandru Elisei , Suzuki K Poulose , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Stefano Stabellini , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Artem Kashkanov , Like Xu , Zhu Lingshan Subject: Re: [PATCH v3 08/16] perf: Force architectures to opt-in to guest callbacks Message-ID: References: <20210922000533.713300-1-seanjc@google.com> <20210922000533.713300-9-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_074902_839672_47AFA8AF X-CRM114-Status: GOOD ( 14.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 22, 2021, Paolo Bonzini wrote: > On 22/09/21 02:05, Sean Christopherson wrote: > > @@ -1273,6 +1274,11 @@ static inline unsigned int perf_guest_handle_intel_pt_intr(void) > > } > > extern void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > extern void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > +#else > > +static inline unsigned int perf_guest_state(void) { return 0; } > > +static inline unsigned long perf_guest_get_ip(void) { return 0; } > > +static inline unsigned int perf_guest_handle_intel_pt_intr(void) { return 0; } > > +#endif /* CONFIG_GUEST_PERF_EVENTS */ > > Reviewed-by: Paolo Bonzini > > Having perf_guest_handle_intel_pt_intr in generic code is a bit off. Of > course it has to be in the struct, but the wrapper might be placed in > arch/x86/include/asm/perf_event.h as well (applies to patch 7 as well). Yeah, I went with this option purely to keep everything bundled together. I have no strong opinion. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1D4D9C433F5 for ; Wed, 22 Sep 2021 18:11:52 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id A7C8F61038 for ; Wed, 22 Sep 2021 18:11:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A7C8F61038 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 5BF984B0F3; Wed, 22 Sep 2021 14:11:51 -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=@google.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 2kaSnkwvirEd; Wed, 22 Sep 2021 14:11:50 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 439D64B0F1; Wed, 22 Sep 2021 14:11:49 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id AA7634086F for ; Wed, 22 Sep 2021 10:49:03 -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 t9GAoH4u19VZ for ; Wed, 22 Sep 2021 10:49:02 -0400 (EDT) Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 868094079A for ; Wed, 22 Sep 2021 10:49:02 -0400 (EDT) Received: by mail-pf1-f176.google.com with SMTP id w19so2875680pfn.12 for ; Wed, 22 Sep 2021 07:49:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=i17P/LE0kBMgmTnemIWdlFQzqY0Hs2jbI6I1/q7BOVL5p2dtOUMx0v77u9KgBVc6Wn aKV+BPEmJqQFBnpf2JgmIIqtssY8WUcJgn0PyaL+KfSiTDztZbnAplBfnqcfDhlXXfFn BjrKCa5IqUkRjskJLByrIP0vUAdGBFoOpGk78YEBagXPKCi9T3kxBnFA97BcpKw7BZcR bmLTSv6ivPklBCfoVzjL+iJjEelTUzY+vAJf7MF3MbJsLpnqXAXpI4Q3beusWaRqYBkI 4OoNyyAV9qr/c1FTp2tfQsv3gnSyBPHEnLObwapHJkjxKwND1CbJf6lm69JT2lSfnhHf qYCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0sqc+8Rn23i9NIXRc3rzWglOlIsYoDOCKK+U0vVnVf8=; b=wLsYZdU3NII0/DMWB+fWyz1Am54A9i5Zyw7sgnIMz4ZnlddkjwhWiwVyMwLExBcX3l GdxwXzOcVid2qdN0ugM5kEVJAW4OaCz1Q2JdDZdxCPWApQB4tgoCNRJLJBIKC1Zzv9lK oBRZupeIBnkyPF0E+dWWOuT1xzU9fKiAjLjhj0w+aWifMMvqKXsbSx2aE+BEof3ztoy9 NVxxEIy+9pTu/yLVUruJ82/wyxvDcBoMGQq2+VJ/LIp3tH6OSrLxOQ4ouE7y1uUBJzH2 /HLsj37yhqCfRxUSu5vcoR9/aQXM4FsbQWZuLk2r2RSJ/0aUn5yWE5rZcSpsZruF8IRL ABfQ== X-Gm-Message-State: AOAM531PtMQfoiGUoiObG8VDDvh0oVARr7x0hRHwUgHxdektgRgIuF0T /jOc/5Jb3na36w3q76Uxkr8sng== X-Google-Smtp-Source: ABdhPJyY3Fv9QcnunPtvdtmn1QYeYqhfMcgkYKWmFqTAaf0DAX+dPQteKaq7uTqZ/uQmOkkrqsksfg== X-Received: by 2002:a62:5fc7:0:b0:438:9e3a:b8c0 with SMTP id t190-20020a625fc7000000b004389e3ab8c0mr22443pfb.74.1632322141372; Wed, 22 Sep 2021 07:49:01 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id x19sm3250084pgk.37.2021.09.22.07.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Sep 2021 07:49:00 -0700 (PDT) Date: Wed, 22 Sep 2021 14:48:56 +0000 From: Sean Christopherson To: Paolo Bonzini Subject: Re: [PATCH v3 08/16] perf: Force architectures to opt-in to guest callbacks Message-ID: References: <20210922000533.713300-1-seanjc@google.com> <20210922000533.713300-9-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Wed, 22 Sep 2021 14:11:48 -0400 Cc: Wanpeng Li , kvm@vger.kernel.org, Peter Zijlstra , Guo Ren , linux-riscv@lists.infradead.org, Vincent Chen , Jiri Olsa , kvmarm@lists.cs.columbia.edu, Stefano Stabellini , xen-devel@lists.xenproject.org, Marc Zyngier , Joerg Roedel , linux-csky@vger.kernel.org, Alexander Shishkin , Ingo Molnar , Palmer Dabbelt , Like Xu , Albert Ou , Zhu Lingshan , Will Deacon , Arnaldo Carvalho de Melo , Greentime Hu , Paul Walmsley , Namhyung Kim , Boris Ostrovsky , Artem Kashkanov , linux-arm-kernel@lists.infradead.org, Jim Mattson , Juergen Gross , Nick Hu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On Wed, Sep 22, 2021, Paolo Bonzini wrote: > On 22/09/21 02:05, Sean Christopherson wrote: > > @@ -1273,6 +1274,11 @@ static inline unsigned int perf_guest_handle_intel_pt_intr(void) > > } > > extern void perf_register_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > extern void perf_unregister_guest_info_callbacks(struct perf_guest_info_callbacks *cbs); > > +#else > > +static inline unsigned int perf_guest_state(void) { return 0; } > > +static inline unsigned long perf_guest_get_ip(void) { return 0; } > > +static inline unsigned int perf_guest_handle_intel_pt_intr(void) { return 0; } > > +#endif /* CONFIG_GUEST_PERF_EVENTS */ > > Reviewed-by: Paolo Bonzini > > Having perf_guest_handle_intel_pt_intr in generic code is a bit off. Of > course it has to be in the struct, but the wrapper might be placed in > arch/x86/include/asm/perf_event.h as well (applies to patch 7 as well). Yeah, I went with this option purely to keep everything bundled together. I have no strong opinion. _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm