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=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 18ADBC5DF60 for ; Thu, 7 Nov 2019 08:01:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E929A2187F for ; Thu, 7 Nov 2019 08:01:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727481AbfKGIBn (ORCPT ); Thu, 7 Nov 2019 03:01:43 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:46430 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726791AbfKGIBn (ORCPT ); Thu, 7 Nov 2019 03:01:43 -0500 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iScjQ-0000io-4h; Thu, 07 Nov 2019 09:01:28 +0100 Date: Thu, 7 Nov 2019 09:01:26 +0100 (CET) From: Thomas Gleixner To: Jianyong Wu cc: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, pbonzini@redhat.com, sean.j.christopherson@intel.com, maz@kernel.org, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, suzuki.poulose@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve.Capper@arm.com, Kaly.Xin@arm.com, justin.he@arm.com, nd@arm.com Subject: Re: [RFC PATCH v6 5/7] psci: Add hvc call service for ptp_kvm. In-Reply-To: <20191024110209.21328-6-jianyong.wu@arm.com> Message-ID: References: <20191024110209.21328-1-jianyong.wu@arm.com> <20191024110209.21328-6-jianyong.wu@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Oct 2019, Jianyong Wu wrote: > This patch is the base of ptp_kvm for arm64. This patch ... > ptp_kvm modules will call hvc to get this service. > The service offers real time and counter cycle of host for guest. > > Signed-off-by: Jianyong Wu > --- > drivers/clocksource/arm_arch_timer.c | 2 ++ > include/clocksource/arm_arch_timer.h | 4 ++++ > include/linux/arm-smccc.h | 12 ++++++++++++ > virt/kvm/arm/psci.c | 22 ++++++++++++++++++++++ > 4 files changed, 40 insertions(+) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index 07e57a49d1e8..e4ad38042ef6 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -29,6 +29,7 @@ > #include > > #include > +#include Same ordering issue and lack of file. > diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h > index 1d68d5613dae..426d749e8cf8 100644 > --- a/include/clocksource/arm_arch_timer.h > +++ b/include/clocksource/arm_arch_timer.h > @@ -104,6 +104,10 @@ static inline bool arch_timer_evtstrm_available(void) > return false; > } > > +bool is_arm_arch_counter(void *unuse) A global function in a header file? You might want to make this static inline. And while at it please s/unuse/unused/ > +{ > + return false; > +} > #endif > #include > diff --git a/virt/kvm/arm/psci.c b/virt/kvm/arm/psci.c > index 0debf49bf259..339bcbafac7b 100644 > --- a/virt/kvm/arm/psci.c > +++ b/virt/kvm/arm/psci.c > @@ -15,6 +15,7 @@ > #include > > #include > +#include Sigh. > /* > * This is an implementation of the Power State Coordination Interface > @@ -392,6 +393,8 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu) > u32 func_id = smccc_get_function(vcpu); > u32 val[4] = {}; > u32 option; > + u64 cycles; > + struct system_time_snapshot systime_snapshot; Also here you might notice that the variables are not randomly ordered. Thanks, tglx 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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 3FF4EFA372C for ; Thu, 7 Nov 2019 08:01:46 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id C5844206DF for ; Thu, 7 Nov 2019 08:01:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C5844206DF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de 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 27CBC4AC9C; Thu, 7 Nov 2019 03:01:45 -0500 (EST) 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 ogNVSOGqWEMF; Thu, 7 Nov 2019 03:01:44 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0EED24AC9D; Thu, 7 Nov 2019 03:01:44 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D570E4AC85 for ; Thu, 7 Nov 2019 03:01:42 -0500 (EST) 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 X-8qr7v0rqGg for ; Thu, 7 Nov 2019 03:01:42 -0500 (EST) Received: from Galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id E2E5F4ACAB for ; Thu, 7 Nov 2019 03:01:41 -0500 (EST) Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iScjQ-0000io-4h; Thu, 07 Nov 2019 09:01:28 +0100 Date: Thu, 7 Nov 2019 09:01:26 +0100 (CET) From: Thomas Gleixner To: Jianyong Wu Subject: Re: [RFC PATCH v6 5/7] psci: Add hvc call service for ptp_kvm. In-Reply-To: <20191024110209.21328-6-jianyong.wu@arm.com> Message-ID: References: <20191024110209.21328-1-jianyong.wu@arm.com> <20191024110209.21328-6-jianyong.wu@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 Cc: justin.he@arm.com, kvm@vger.kernel.org, maz@kernel.org, richardcochran@gmail.com, yangbo.lu@nxp.com, linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, john.stultz@linaro.org, netdev@vger.kernel.org, pbonzini@redhat.com, nd@arm.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org 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 Thu, 24 Oct 2019, Jianyong Wu wrote: > This patch is the base of ptp_kvm for arm64. This patch ... > ptp_kvm modules will call hvc to get this service. > The service offers real time and counter cycle of host for guest. > > Signed-off-by: Jianyong Wu > --- > drivers/clocksource/arm_arch_timer.c | 2 ++ > include/clocksource/arm_arch_timer.h | 4 ++++ > include/linux/arm-smccc.h | 12 ++++++++++++ > virt/kvm/arm/psci.c | 22 ++++++++++++++++++++++ > 4 files changed, 40 insertions(+) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index 07e57a49d1e8..e4ad38042ef6 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -29,6 +29,7 @@ > #include > > #include > +#include Same ordering issue and lack of file. > diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h > index 1d68d5613dae..426d749e8cf8 100644 > --- a/include/clocksource/arm_arch_timer.h > +++ b/include/clocksource/arm_arch_timer.h > @@ -104,6 +104,10 @@ static inline bool arch_timer_evtstrm_available(void) > return false; > } > > +bool is_arm_arch_counter(void *unuse) A global function in a header file? You might want to make this static inline. And while at it please s/unuse/unused/ > +{ > + return false; > +} > #endif > #include > diff --git a/virt/kvm/arm/psci.c b/virt/kvm/arm/psci.c > index 0debf49bf259..339bcbafac7b 100644 > --- a/virt/kvm/arm/psci.c > +++ b/virt/kvm/arm/psci.c > @@ -15,6 +15,7 @@ > #include > > #include > +#include Sigh. > /* > * This is an implementation of the Power State Coordination Interface > @@ -392,6 +393,8 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu) > u32 func_id = smccc_get_function(vcpu); > u32 val[4] = {}; > u32 option; > + u64 cycles; > + struct system_time_snapshot systime_snapshot; Also here you might notice that the variables are not randomly ordered. Thanks, tglx _______________________________________________ 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 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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 DF65EC5DF61 for ; Thu, 7 Nov 2019 08:01:43 +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 B092B2187F for ; Thu, 7 Nov 2019 08:01:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="geKuD04t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B092B2187F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Message-ID: In-Reply-To:Subject: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=BvzzbsxYN2AI5u+KARggZdrFAdOTBGx6938Vc+hslx4=; b=geKuD04tSO63iG CH7zSUAeYUuqMOYs9N0PDYeG76DKf6ai5fgyWF6He9Vg4k11gSu5MFasgQsHd6lzBbSLRZR+GaomJ Ibi0qnPQg4+TX1J2p15eqIhuw5WNBdKTpJh4TkrBbeWR2gRw+J6O0/sKoNeMZcDiCXVabYxaQWuUq zHY5qZrOsVB5Aq0VVCEbBJ/n4Ab26g9MKlwKXNrgiNjnwyNwWaqy79tupZM0PnrxY0vmo4Yrqd6vl YaQkp8pe+A191yGI4IF/uUCuCPLnxAp5rByprEFgePpvBrVeDlLwPs0vScFuUyqnFGibbmm1KuYTi MvFxL4wlzjZCQlXqP/XQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iScje-0000n8-SH; Thu, 07 Nov 2019 08:01:42 +0000 Received: from galois.linutronix.de ([2a0a:51c0:0:12e:550::1]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iScjb-0000mc-ND for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2019 08:01:41 +0000 Received: from p5b06da22.dip0.t-ipconnect.de ([91.6.218.34] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iScjQ-0000io-4h; Thu, 07 Nov 2019 09:01:28 +0100 Date: Thu, 7 Nov 2019 09:01:26 +0100 (CET) From: Thomas Gleixner To: Jianyong Wu Subject: Re: [RFC PATCH v6 5/7] psci: Add hvc call service for ptp_kvm. In-Reply-To: <20191024110209.21328-6-jianyong.wu@arm.com> Message-ID: References: <20191024110209.21328-1-jianyong.wu@arm.com> <20191024110209.21328-6-jianyong.wu@arm.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191107_000139_898389_51E31DDE X-CRM114-Status: GOOD ( 17.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark.Rutland@arm.com, justin.he@arm.com, kvm@vger.kernel.org, suzuki.poulose@arm.com, maz@kernel.org, richardcochran@gmail.com, yangbo.lu@nxp.com, linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, Kaly.Xin@arm.com, john.stultz@linaro.org, netdev@vger.kernel.org, pbonzini@redhat.com, nd@arm.com, will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Steve.Capper@arm.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 24 Oct 2019, Jianyong Wu wrote: > This patch is the base of ptp_kvm for arm64. This patch ... > ptp_kvm modules will call hvc to get this service. > The service offers real time and counter cycle of host for guest. > > Signed-off-by: Jianyong Wu > --- > drivers/clocksource/arm_arch_timer.c | 2 ++ > include/clocksource/arm_arch_timer.h | 4 ++++ > include/linux/arm-smccc.h | 12 ++++++++++++ > virt/kvm/arm/psci.c | 22 ++++++++++++++++++++++ > 4 files changed, 40 insertions(+) > > diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c > index 07e57a49d1e8..e4ad38042ef6 100644 > --- a/drivers/clocksource/arm_arch_timer.c > +++ b/drivers/clocksource/arm_arch_timer.c > @@ -29,6 +29,7 @@ > #include > > #include > +#include Same ordering issue and lack of file. > diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h > index 1d68d5613dae..426d749e8cf8 100644 > --- a/include/clocksource/arm_arch_timer.h > +++ b/include/clocksource/arm_arch_timer.h > @@ -104,6 +104,10 @@ static inline bool arch_timer_evtstrm_available(void) > return false; > } > > +bool is_arm_arch_counter(void *unuse) A global function in a header file? You might want to make this static inline. And while at it please s/unuse/unused/ > +{ > + return false; > +} > #endif > #include > diff --git a/virt/kvm/arm/psci.c b/virt/kvm/arm/psci.c > index 0debf49bf259..339bcbafac7b 100644 > --- a/virt/kvm/arm/psci.c > +++ b/virt/kvm/arm/psci.c > @@ -15,6 +15,7 @@ > #include > > #include > +#include Sigh. > /* > * This is an implementation of the Power State Coordination Interface > @@ -392,6 +393,8 @@ int kvm_hvc_call_handler(struct kvm_vcpu *vcpu) > u32 func_id = smccc_get_function(vcpu); > u32 val[4] = {}; > u32 option; > + u64 cycles; > + struct system_time_snapshot systime_snapshot; Also here you might notice that the variables are not randomly ordered. Thanks, tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel