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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 76EC2C2D0E4 for ; Tue, 24 Nov 2020 09:05:06 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 99C0620857 for ; Tue, 24 Nov 2020 09:05:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VXXFrd6s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99C0620857 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 EE14A4BD62; Tue, 24 Nov 2020 04:05:04 -0500 (EST) 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=@kernel.org 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 3U7BSno7dNY9; Tue, 24 Nov 2020 04:05:03 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 374724BD20; Tue, 24 Nov 2020 04:05:03 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 870594BD18 for ; Tue, 24 Nov 2020 04:05:02 -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 8+wnmHK57n1u for ; Tue, 24 Nov 2020 04:05:01 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 1C48C4BD12 for ; Tue, 24 Nov 2020 04:05:01 -0500 (EST) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B27A82075A; Tue, 24 Nov 2020 09:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606208699; bh=4dd2MKJS6YNqUDm2WfT0Eu4BA+fK0d9nlPFSmVAq7GY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VXXFrd6sYgV0FGjunKo/ajZ40yGekO24Gi7WxGW9SzG9TnexvSCBR/WMuglY2+msF MMltO5oe/o8yrwATRTrpb6cskzP2RWV9wFzKZAjVD1peSe7W/gW3iTjgb4bTVqmUNR YmMs8gsuNfPW+1Ktf/0rTBtKM2RXdF8dhvsQn3zM= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1khUFt-00DC9a-CY; Tue, 24 Nov 2020 09:04:57 +0000 MIME-Version: 1.0 Date: Tue, 24 Nov 2020 09:04:57 +0000 From: Marc Zyngier To: Jianyong Wu Subject: Re: [PATCH v15 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 In-Reply-To: References: <20201111062211.33144-1-jianyong.wu@arm.com> <20201111062211.33144-8-jianyong.wu@arm.com> <7bd3a66253ca4b7adbe2294eb598a23f@kernel.org> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <5dc5480d125ace6566ae616206c3ce3f@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: Jianyong.Wu@arm.com, netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, Suzuki.Poulose@arm.com, Andre.Przywara@arm.com, Steven.Price@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, Justin.He@arm.com, nd@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Justin He , kvm@vger.kernel.org, netdev@vger.kernel.org, richardcochran@gmail.com, linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, Steven Price , Andre Przywara , john.stultz@linaro.org, yangbo.lu@nxp.com, pbonzini@redhat.com, tglx@linutronix.de, nd , 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-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 Jianyong, On 2020-11-24 05:37, Jianyong Wu wrote: > Hi Marc, [...] >> > + >> arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_PTP_FU >> NC_ID, >> > + ARM_PTP_NONE_COUNTER, &hvc_res); >> >> I really don't see the need to use a non-architectural counter ID. >> Using the virtual counter ID should just be fine, and shouldn't lead >> to any >> issue. >> > >> Am I missing something? > > In this function, no counter data is needed. If virtual counter ID is > used here, user may be confused with why we get virtual counter > data and do nothing with it. So I explicitly add a new "NONE" counter > ID to make it clear. > > WDYT? ITIABI (I Think It's A Bad Idea). There are two counters, and the API allows to retrieve the data for any of these two. If the "user" doesn't want to do anything with the data, that's their problem. Here, you can just sue the virtual counter, and that will give you the exact same semantic, without inventing non-architectural state. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ 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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 F0C71C2D0E4 for ; Tue, 24 Nov 2020 09:06:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 4EE1A2075A for ; Tue, 24 Nov 2020 09:06:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="21AI1Hus"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VXXFrd6s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EE1A2075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=91MN9VX9m5USOKUQlNopDtyJ4gRKkh8vGtFDaaYd1Fc=; b=21AI1Husu0r74owqgLZx4IQ5A 9wF3qXFwC5tRFgN+dUbwgNDi58aEjXKQ9JrmrDojR9VyCIQ6Q/eyCDdqlUJFCw6fggCs5nkv4QnWX wYVXtbPQvMEr3evQVniLuyRbN4mondDR5GqxVbL8B8IVHCfeUeEX+Yl5dKWz2omkvxOgFxOuh0SIv +fMUomCveCleCzDeHL5NxSrSiqVDwmxOf8AKmBgGQ2bdkH5HkfqgmO9/+qMdVtvjaj5DUjR4qsB7U S/IFOVseq7quQxheU1lbK6vql9AH+INbwZAEIrKyoggm7+ExedxqG7FJyJhlSf+enjAEvL3ppp8Wu 7aSOd67oA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khUFy-000144-UU; Tue, 24 Nov 2020 09:05:02 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khUFw-000134-LL for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 09:05:01 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B27A82075A; Tue, 24 Nov 2020 09:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606208699; bh=4dd2MKJS6YNqUDm2WfT0Eu4BA+fK0d9nlPFSmVAq7GY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VXXFrd6sYgV0FGjunKo/ajZ40yGekO24Gi7WxGW9SzG9TnexvSCBR/WMuglY2+msF MMltO5oe/o8yrwATRTrpb6cskzP2RWV9wFzKZAjVD1peSe7W/gW3iTjgb4bTVqmUNR YmMs8gsuNfPW+1Ktf/0rTBtKM2RXdF8dhvsQn3zM= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1khUFt-00DC9a-CY; Tue, 24 Nov 2020 09:04:57 +0000 MIME-Version: 1.0 Date: Tue, 24 Nov 2020 09:04:57 +0000 From: Marc Zyngier To: Jianyong Wu Subject: Re: [PATCH v15 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 In-Reply-To: References: <20201111062211.33144-1-jianyong.wu@arm.com> <20201111062211.33144-8-jianyong.wu@arm.com> <7bd3a66253ca4b7adbe2294eb598a23f@kernel.org> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <5dc5480d125ace6566ae616206c3ce3f@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: Jianyong.Wu@arm.com, netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, Suzuki.Poulose@arm.com, Andre.Przywara@arm.com, Steven.Price@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, Justin.He@arm.com, nd@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_040500_877060_A7E62566 X-CRM114-Status: GOOD ( 14.82 ) 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 , Justin He , kvm@vger.kernel.org, Suzuki Poulose , netdev@vger.kernel.org, richardcochran@gmail.com, Steve Capper , linux-kernel@vger.kernel.org, sean.j.christopherson@intel.com, Steven Price , Andre Przywara , john.stultz@linaro.org, yangbo.lu@nxp.com, pbonzini@redhat.com, tglx@linutronix.de, nd , will@kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Jianyong, On 2020-11-24 05:37, Jianyong Wu wrote: > Hi Marc, [...] >> > + >> arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_PTP_FU >> NC_ID, >> > + ARM_PTP_NONE_COUNTER, &hvc_res); >> >> I really don't see the need to use a non-architectural counter ID. >> Using the virtual counter ID should just be fine, and shouldn't lead >> to any >> issue. >> > >> Am I missing something? > > In this function, no counter data is needed. If virtual counter ID is > used here, user may be confused with why we get virtual counter > data and do nothing with it. So I explicitly add a new "NONE" counter > ID to make it clear. > > WDYT? ITIABI (I Think It's A Bad Idea). There are two counters, and the API allows to retrieve the data for any of these two. If the "user" doesn't want to do anything with the data, that's their problem. Here, you can just sue the virtual counter, and that will give you the exact same semantic, without inventing non-architectural state. Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ 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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 1F682C64E7A for ; Tue, 24 Nov 2020 09:05:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3DEC20857 for ; Tue, 24 Nov 2020 09:05:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="VXXFrd6s" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731078AbgKXJFE (ORCPT ); Tue, 24 Nov 2020 04:05:04 -0500 Received: from mail.kernel.org ([198.145.29.99]:60952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731020AbgKXJFA (ORCPT ); Tue, 24 Nov 2020 04:05:00 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B27A82075A; Tue, 24 Nov 2020 09:04:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606208699; bh=4dd2MKJS6YNqUDm2WfT0Eu4BA+fK0d9nlPFSmVAq7GY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VXXFrd6sYgV0FGjunKo/ajZ40yGekO24Gi7WxGW9SzG9TnexvSCBR/WMuglY2+msF MMltO5oe/o8yrwATRTrpb6cskzP2RWV9wFzKZAjVD1peSe7W/gW3iTjgb4bTVqmUNR YmMs8gsuNfPW+1Ktf/0rTBtKM2RXdF8dhvsQn3zM= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1khUFt-00DC9a-CY; Tue, 24 Nov 2020 09:04:57 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 24 Nov 2020 09:04:57 +0000 From: Marc Zyngier To: Jianyong Wu Cc: netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, richardcochran@gmail.com, Mark Rutland , will@kernel.org, Suzuki Poulose , Andre Przywara , Steven Price , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve Capper , Justin He , nd Subject: Re: [PATCH v15 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64 In-Reply-To: References: <20201111062211.33144-1-jianyong.wu@arm.com> <20201111062211.33144-8-jianyong.wu@arm.com> <7bd3a66253ca4b7adbe2294eb598a23f@kernel.org> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <5dc5480d125ace6566ae616206c3ce3f@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: Jianyong.Wu@arm.com, netdev@vger.kernel.org, yangbo.lu@nxp.com, john.stultz@linaro.org, tglx@linutronix.de, pbonzini@redhat.com, sean.j.christopherson@intel.com, richardcochran@gmail.com, Mark.Rutland@arm.com, will@kernel.org, Suzuki.Poulose@arm.com, Andre.Przywara@arm.com, Steven.Price@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, Justin.He@arm.com, nd@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Jianyong, On 2020-11-24 05:37, Jianyong Wu wrote: > Hi Marc, [...] >> > + >> arm_smccc_1_1_invoke(ARM_SMCCC_VENDOR_HYP_KVM_PTP_FU >> NC_ID, >> > + ARM_PTP_NONE_COUNTER, &hvc_res); >> >> I really don't see the need to use a non-architectural counter ID. >> Using the virtual counter ID should just be fine, and shouldn't lead >> to any >> issue. >> > >> Am I missing something? > > In this function, no counter data is needed. If virtual counter ID is > used here, user may be confused with why we get virtual counter > data and do nothing with it. So I explicitly add a new "NONE" counter > ID to make it clear. > > WDYT? ITIABI (I Think It's A Bad Idea). There are two counters, and the API allows to retrieve the data for any of these two. If the "user" doesn't want to do anything with the data, that's their problem. Here, you can just sue the virtual counter, and that will give you the exact same semantic, without inventing non-architectural state. Thanks, M. -- Jazz is not dead. It just smells funny...