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=-1.1 required=3.0 tests=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 313E8C33CAD for ; Mon, 13 Jan 2020 11:16:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3CFE207FF for ; Mon, 13 Jan 2020 11:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578914190; bh=oQgIRZE3Ca1zvjHWdut6CuVqEaxiZSV5sbQvWLbrvag=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=aieZM34GqKrSSsUZ0eL1BRB7e8svarNieM5KVNpbgzgiQ6PpBNMUj2yvd2RtTVthg nRI/fNAmiEH2dcAkpss0ZwYEg7QBkvpskfnWfT4lyA3WishrWe/PQHmP5p0EDPdj7p qE/w8fG5jtWeZXT+gcPy3oW1rbZtqZqb2SOD9jQw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728670AbgAMLQ3 (ORCPT ); Mon, 13 Jan 2020 06:16:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:39780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbgAMLQ2 (ORCPT ); Mon, 13 Jan 2020 06:16:28 -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 E34BD207E0; Mon, 13 Jan 2020 11:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578914188; bh=oQgIRZE3Ca1zvjHWdut6CuVqEaxiZSV5sbQvWLbrvag=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e3TcvGj31AwlkiLT/c2UDThap+MfQ1EwwdLbheey2cC7to/q4SOcYLDkg406rEFf0 LXe9K5ORlRbmcMY05oDtY9CrSsLFr2i4qGS1k3/8tFudNQUDC1T087p4NcCBMYiguz L0ETEtO7VrTs+z8DDuIoxk2Czw4BqJLM9CJopX2A= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iqxhq-0002vN-8G; Mon, 13 Jan 2020 11:16:26 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 13 Jan 2020 11:16:26 +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 , Steven Price , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, Steve Capper , Kaly Xin , Justin He , nd Subject: Re: [RFC PATCH v9 6/8] psci: Add hvc call service for ptp_kvm. In-Reply-To: References: <20191210034026.45229-1-jianyong.wu@arm.com> <20191210034026.45229-7-jianyong.wu@arm.com> <7383dc06897bba253f174cd21a19b5c0@kernel.org> <099a26ffef5d554b88a5e33d7f2a6e3a@kernel.org> Message-ID: <22ba1283a7b82f018c1fdf85414e5bfe@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 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, 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, Kaly.Xin@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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jianyong, On 2020-01-13 10:30, Jianyong Wu wrote: > Hi Marc, > >> -----Original Message----- >> From: Marc Zyngier >> Sent: Friday, January 10, 2020 6:56 PM >> NV breaks that assumtion, because the guest hypervisor is using the >> physical >> counter. Also, let's not forget that the hypercall isn't Linux >> specific. >> I can write my own non-Linux guest and still use this hypercall. >> Nothing in >> there says that I can't use the physical counter if I want to. >> >> So somehow, you need to convey the the hypervisor the notion of >> *which* >> counter the guest uses. >> >> Does it make sense? Or am I missing something? >> > I know what you say. Let me try to solve this problem. > Step 0, summary out all the conditions we should process, which will > sever as branch condition.(now only normal virt and nested virt, I > think) No. You shouldn't think of the various use cases, but of which time references a guest can use. You don't need nested virt to use the physical counter, for example. > Step 1, figure out the set of reference counter value used by guest > in all condition. That should be for the guest to tell you when it calls into the PV service. > Step 2, determine which reference counter value will be used by guest > in a certain condition in hypercall. > In step 1, can we give the set only 2 elements that one is physical > counter the other is virtual counter? I don't think returning the two values is useful. Just return what the guest asks for. > For step 2, I have no idea for that now. can you give me some hint > about it? Just expand your SMC call to take a parameter indicating the reference counter, and return the sampled (or computed) value corresponding to that counter. M. -- Jazz is not dead. It just smells funny... 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=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 81C32C33CAE for ; Mon, 13 Jan 2020 11:16:33 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id F3AA1207FF for ; Mon, 13 Jan 2020 11:16:32 +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="e3TcvGj3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F3AA1207FF 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 99BD54AED4; Mon, 13 Jan 2020 06:16:32 -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 pLc6bKUKbP7g; Mon, 13 Jan 2020 06:16:31 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 7F1AA4AEEB; Mon, 13 Jan 2020 06:16:31 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 351904AED8 for ; Mon, 13 Jan 2020 06:16:30 -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 onVg8IL5fW+w for ; Mon, 13 Jan 2020 06:16:29 -0500 (EST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 1A3B24AED4 for ; Mon, 13 Jan 2020 06:16:29 -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 E34BD207E0; Mon, 13 Jan 2020 11:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578914188; bh=oQgIRZE3Ca1zvjHWdut6CuVqEaxiZSV5sbQvWLbrvag=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e3TcvGj31AwlkiLT/c2UDThap+MfQ1EwwdLbheey2cC7to/q4SOcYLDkg406rEFf0 LXe9K5ORlRbmcMY05oDtY9CrSsLFr2i4qGS1k3/8tFudNQUDC1T087p4NcCBMYiguz L0ETEtO7VrTs+z8DDuIoxk2Czw4BqJLM9CJopX2A= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iqxhq-0002vN-8G; Mon, 13 Jan 2020 11:16:26 +0000 MIME-Version: 1.0 Date: Mon, 13 Jan 2020 11:16:26 +0000 From: Marc Zyngier To: Jianyong Wu Subject: Re: [RFC PATCH v9 6/8] psci: Add hvc call service for ptp_kvm. In-Reply-To: References: <20191210034026.45229-1-jianyong.wu@arm.com> <20191210034026.45229-7-jianyong.wu@arm.com> <7383dc06897bba253f174cd21a19b5c0@kernel.org> <099a26ffef5d554b88a5e33d7f2a6e3a@kernel.org> Message-ID: <22ba1283a7b82f018c1fdf85414e5bfe@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 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, 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, Kaly.Xin@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 , 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 Hi Jianyong, On 2020-01-13 10:30, Jianyong Wu wrote: > Hi Marc, > >> -----Original Message----- >> From: Marc Zyngier >> Sent: Friday, January 10, 2020 6:56 PM >> NV breaks that assumtion, because the guest hypervisor is using the >> physical >> counter. Also, let's not forget that the hypercall isn't Linux >> specific. >> I can write my own non-Linux guest and still use this hypercall. >> Nothing in >> there says that I can't use the physical counter if I want to. >> >> So somehow, you need to convey the the hypervisor the notion of >> *which* >> counter the guest uses. >> >> Does it make sense? Or am I missing something? >> > I know what you say. Let me try to solve this problem. > Step 0, summary out all the conditions we should process, which will > sever as branch condition.(now only normal virt and nested virt, I > think) No. You shouldn't think of the various use cases, but of which time references a guest can use. You don't need nested virt to use the physical counter, for example. > Step 1, figure out the set of reference counter value used by guest > in all condition. That should be for the guest to tell you when it calls into the PV service. > Step 2, determine which reference counter value will be used by guest > in a certain condition in hypercall. > In step 1, can we give the set only 2 elements that one is physical > counter the other is virtual counter? I don't think returning the two values is useful. Just return what the guest asks for. > For step 2, I have no idea for that now. can you give me some hint > about it? Just expand your SMC call to take a parameter indicating the reference counter, and return the sampled (or computed) value corresponding to that counter. 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=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,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 C8E9BC47409 for ; Mon, 13 Jan 2020 11:16:32 +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 A02FB2084D for ; Mon, 13 Jan 2020 11:16:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ML1K9JsN"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="e3TcvGj3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A02FB2084D 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+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-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=L6m/nn/yE1YmZjoP87oY4qN1Z2ja/8v5ZE0CZQqiIUk=; b=ML1K9JsNPPEZZ7lVMehrrfblr MwD1Twh3HiWoO/duYkX8KCBulcC8P6qqxll1A4JfWPNF6nl3o2ovSNABGzN1d/QV/VlSYTefCDq5G jQvQF6pRy7UKDSkx3VBxdD13biBCp5xUnkXtyHdk354G0CG2ihM7q8QB+0mZT2bWmof6A+mbTwApL AfEf2WDqGv1OBYzAIh6Ei6zUeXTCQ3SWZZ2BJhJ3XAJyJGUau4LY2LnDnZDacOvoo6w/MA8eGRznY mfM6FeuABzdn4hiBoMV1z1tx3K2dYpOdmmN2wAbnfZjvtNbiCL6eaA/kTN7IeNw1VuCRHDDmOpQ7m Lfw3+udZw==; 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 1iqxhw-0004Mi-74; Mon, 13 Jan 2020 11:16:32 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iqxhs-0004La-El for linux-arm-kernel@lists.infradead.org; Mon, 13 Jan 2020 11:16:30 +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 E34BD207E0; Mon, 13 Jan 2020 11:16:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578914188; bh=oQgIRZE3Ca1zvjHWdut6CuVqEaxiZSV5sbQvWLbrvag=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e3TcvGj31AwlkiLT/c2UDThap+MfQ1EwwdLbheey2cC7to/q4SOcYLDkg406rEFf0 LXe9K5ORlRbmcMY05oDtY9CrSsLFr2i4qGS1k3/8tFudNQUDC1T087p4NcCBMYiguz L0ETEtO7VrTs+z8DDuIoxk2Czw4BqJLM9CJopX2A= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iqxhq-0002vN-8G; Mon, 13 Jan 2020 11:16:26 +0000 MIME-Version: 1.0 Date: Mon, 13 Jan 2020 11:16:26 +0000 From: Marc Zyngier To: Jianyong Wu Subject: Re: [RFC PATCH v9 6/8] psci: Add hvc call service for ptp_kvm. In-Reply-To: References: <20191210034026.45229-1-jianyong.wu@arm.com> <20191210034026.45229-7-jianyong.wu@arm.com> <7383dc06897bba253f174cd21a19b5c0@kernel.org> <099a26ffef5d554b88a5e33d7f2a6e3a@kernel.org> Message-ID: <22ba1283a7b82f018c1fdf85414e5bfe@kernel.org> X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.8 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, 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, Kaly.Xin@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-20200113_031628_537958_BC2459A7 X-CRM114-Status: GOOD ( 16.26 ) 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 , Kaly Xin , 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+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Jianyong, On 2020-01-13 10:30, Jianyong Wu wrote: > Hi Marc, > >> -----Original Message----- >> From: Marc Zyngier >> Sent: Friday, January 10, 2020 6:56 PM >> NV breaks that assumtion, because the guest hypervisor is using the >> physical >> counter. Also, let's not forget that the hypercall isn't Linux >> specific. >> I can write my own non-Linux guest and still use this hypercall. >> Nothing in >> there says that I can't use the physical counter if I want to. >> >> So somehow, you need to convey the the hypervisor the notion of >> *which* >> counter the guest uses. >> >> Does it make sense? Or am I missing something? >> > I know what you say. Let me try to solve this problem. > Step 0, summary out all the conditions we should process, which will > sever as branch condition.(now only normal virt and nested virt, I > think) No. You shouldn't think of the various use cases, but of which time references a guest can use. You don't need nested virt to use the physical counter, for example. > Step 1, figure out the set of reference counter value used by guest > in all condition. That should be for the guest to tell you when it calls into the PV service. > Step 2, determine which reference counter value will be used by guest > in a certain condition in hypercall. > In step 1, can we give the set only 2 elements that one is physical > counter the other is virtual counter? I don't think returning the two values is useful. Just return what the guest asks for. > For step 2, I have no idea for that now. can you give me some hint > about it? Just expand your SMC call to take a parameter indicating the reference counter, and return the sampled (or computed) value corresponding to that counter. 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