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, 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 557B4C2D0C1 for ; Thu, 19 Dec 2019 11:46:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3554224672 for ; Thu, 19 Dec 2019 11:46:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbfLSLqB (ORCPT ); Thu, 19 Dec 2019 06:46:01 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:2108 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726668AbfLSLqB (ORCPT ); Thu, 19 Dec 2019 06:46:01 -0500 Received: from DGGEMM405-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 0245EC08727047931738; Thu, 19 Dec 2019 19:45:58 +0800 (CST) Received: from dggeme755-chm.china.huawei.com (10.3.19.101) by DGGEMM405-HUB.china.huawei.com (10.3.20.213) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Dec 2019 19:45:57 +0800 Received: from [127.0.0.1] (10.173.221.248) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 19 Dec 2019 19:45:56 +0800 Subject: Re: [PATCH 1/5] KVM: arm64: Document PV-lock interface To: Steven Price CC: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , "linux-doc@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "maz@kernel.org" , James Morse , "linux@armlinux.org.uk" , Suzuki Poulose , "julien.thierry.kdev@gmail.com" , "Catalin Marinas" , Mark Rutland , "will@kernel.org" , "daniel.lezcano@linaro.org" References: <20191217135549.3240-1-yezengruan@huawei.com> <20191217135549.3240-2-yezengruan@huawei.com> <20191217142138.GA38811@arm.com> From: yezengruan Message-ID: <49120a3c-405d-d2e3-2a88-ba590feccbcc@huawei.com> Date: Thu, 19 Dec 2019 19:45:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191217142138.GA38811@arm.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.173.221.248] X-ClientProxiedBy: dggeme707-chm.china.huawei.com (10.1.199.103) To dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Steve, On 2019/12/17 22:21, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:45PM +0000, yezengruan@huawei.com wrote: >> From: Zengruan Ye >> >> Introduce a paravirtualization interface for KVM/arm64 to obtain the vcpu >> is currently running or not. >> >> A hypercall interface is provided for the guest to interrogate the >> hypervisor's support for this interface and the location of the shared >> memory structures. >> >> Signed-off-by: Zengruan Ye >> --- >> Documentation/virt/kvm/arm/pvlock.rst | 31 +++++++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> create mode 100644 Documentation/virt/kvm/arm/pvlock.rst >> >> diff --git a/Documentation/virt/kvm/arm/pvlock.rst b/Documentation/virt/kvm/arm/pvlock.rst >> new file mode 100644 >> index 000000000000..eec0c36edf17 >> --- /dev/null >> +++ b/Documentation/virt/kvm/arm/pvlock.rst >> @@ -0,0 +1,31 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> + >> +Paravirtualized lock support for arm64 >> +====================================== >> + >> +KVM/arm64 provids some hypervisor service calls to support a paravirtualized >> +guest obtaining the vcpu is currently running or not. >> + >> +Two new SMCCC compatible hypercalls are defined: >> + >> +* PV_LOCK_FEATURES: 0xC5000040 >> +* PV_LOCK_PREEMPTED: 0xC5000041 > > These values are in the "Standard Hypervisor Service Calls" section of > SMCCC - so is there a document that describes this features such that > other OSes or hypervisors can implement it? I'm also not entirely sure > of the process of ensuring that the IDs picked are non-conflicting. > > Otherwise if this is a KVM specific interface this should probably > belong within the "Vendor Specific Hypervisor Service Calls" section > along with some probing that the hypervisor is actually KVM. Although I > don't see anything KVM specific. Thanks for pointing it out to me! Actually, I also don't see any documents or KVM specific that describes this features. The values in the "Vendor Specific Hypervisor Service Calls" section may be more appropriate, such as the following * PV_LOCK_FEATURES: 0xC6000020 * PV_LOCK_PREEMPTED: 0xC6000021 Please let me know if you have any suggestions. > >> + >> +The existence of the PV_LOCK hypercall should be probed using the SMCCC 1.1 >> +ARCH_FEATURES mechanism before calling it. >> + >> +PV_LOCK_FEATURES >> + ============= ======== ========== >> + Function ID: (uint32) 0xC5000040 >> + PV_call_id: (uint32) The function to query for support. >> + Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the relevant >> + PV-lock feature is supported by the hypervisor. >> + ============= ======== ========== >> + >> +PV_LOCK_PREEMPTED >> + ============= ======== ========== >> + Function ID: (uint32) 0xC5000041 >> + Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the IPA of >> + this vcpu's pv data structure is configured by >> + the hypervisor. >> + ============= ======== ========== > >>>From the code it looks like there's another argument for this SMC - the > physical address (or IPA) of a struct pvlock_vcpu_state. This structure > also needs to be described as it is part of the ABI. Will update. > > Steve > > . > Thanks, Zengruan 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, 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 2C184C43603 for ; Thu, 19 Dec 2019 11:46:08 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id A313D24672 for ; Thu, 19 Dec 2019 11:46:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A313D24672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com 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 1A8924A4F7; Thu, 19 Dec 2019 06:46:06 -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 3xdpm39ijxbI; Thu, 19 Dec 2019 06:46:04 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D6DF34A500; Thu, 19 Dec 2019 06:46:04 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 5395E4A49F for ; Thu, 19 Dec 2019 06:46:04 -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 tYCMf6OQ2pk2 for ; Thu, 19 Dec 2019 06:46:02 -0500 (EST) Received: from huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 8EACB4A418 for ; Thu, 19 Dec 2019 06:46:02 -0500 (EST) Received: from DGGEMM405-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 0245EC08727047931738; Thu, 19 Dec 2019 19:45:58 +0800 (CST) Received: from dggeme755-chm.china.huawei.com (10.3.19.101) by DGGEMM405-HUB.china.huawei.com (10.3.20.213) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Dec 2019 19:45:57 +0800 Received: from [127.0.0.1] (10.173.221.248) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 19 Dec 2019 19:45:56 +0800 Subject: Re: [PATCH 1/5] KVM: arm64: Document PV-lock interface To: Steven Price References: <20191217135549.3240-1-yezengruan@huawei.com> <20191217135549.3240-2-yezengruan@huawei.com> <20191217142138.GA38811@arm.com> From: yezengruan Message-ID: <49120a3c-405d-d2e3-2a88-ba590feccbcc@huawei.com> Date: Thu, 19 Dec 2019 19:45:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191217142138.GA38811@arm.com> Content-Language: en-US X-Originating-IP: [10.173.221.248] X-ClientProxiedBy: dggeme707-chm.china.huawei.com (10.1.199.103) To dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected Cc: "daniel.lezcano@linaro.org" , "kvm@vger.kernel.org" , "linux-doc@vger.kernel.org" , "maz@kernel.org" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , Catalin Marinas , "linux@armlinux.org.uk" , "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 Hi Steve, On 2019/12/17 22:21, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:45PM +0000, yezengruan@huawei.com wrote: >> From: Zengruan Ye >> >> Introduce a paravirtualization interface for KVM/arm64 to obtain the vcpu >> is currently running or not. >> >> A hypercall interface is provided for the guest to interrogate the >> hypervisor's support for this interface and the location of the shared >> memory structures. >> >> Signed-off-by: Zengruan Ye >> --- >> Documentation/virt/kvm/arm/pvlock.rst | 31 +++++++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> create mode 100644 Documentation/virt/kvm/arm/pvlock.rst >> >> diff --git a/Documentation/virt/kvm/arm/pvlock.rst b/Documentation/virt/kvm/arm/pvlock.rst >> new file mode 100644 >> index 000000000000..eec0c36edf17 >> --- /dev/null >> +++ b/Documentation/virt/kvm/arm/pvlock.rst >> @@ -0,0 +1,31 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> + >> +Paravirtualized lock support for arm64 >> +====================================== >> + >> +KVM/arm64 provids some hypervisor service calls to support a paravirtualized >> +guest obtaining the vcpu is currently running or not. >> + >> +Two new SMCCC compatible hypercalls are defined: >> + >> +* PV_LOCK_FEATURES: 0xC5000040 >> +* PV_LOCK_PREEMPTED: 0xC5000041 > > These values are in the "Standard Hypervisor Service Calls" section of > SMCCC - so is there a document that describes this features such that > other OSes or hypervisors can implement it? I'm also not entirely sure > of the process of ensuring that the IDs picked are non-conflicting. > > Otherwise if this is a KVM specific interface this should probably > belong within the "Vendor Specific Hypervisor Service Calls" section > along with some probing that the hypervisor is actually KVM. Although I > don't see anything KVM specific. Thanks for pointing it out to me! Actually, I also don't see any documents or KVM specific that describes this features. The values in the "Vendor Specific Hypervisor Service Calls" section may be more appropriate, such as the following * PV_LOCK_FEATURES: 0xC6000020 * PV_LOCK_PREEMPTED: 0xC6000021 Please let me know if you have any suggestions. > >> + >> +The existence of the PV_LOCK hypercall should be probed using the SMCCC 1.1 >> +ARCH_FEATURES mechanism before calling it. >> + >> +PV_LOCK_FEATURES >> + ============= ======== ========== >> + Function ID: (uint32) 0xC5000040 >> + PV_call_id: (uint32) The function to query for support. >> + Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the relevant >> + PV-lock feature is supported by the hypervisor. >> + ============= ======== ========== >> + >> +PV_LOCK_PREEMPTED >> + ============= ======== ========== >> + Function ID: (uint32) 0xC5000041 >> + Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the IPA of >> + this vcpu's pv data structure is configured by >> + the hypervisor. >> + ============= ======== ========== > >>>From the code it looks like there's another argument for this SMC - the > physical address (or IPA) of a struct pvlock_vcpu_state. This structure > also needs to be described as it is part of the ABI. Will update. > > Steve > > . > Thanks, Zengruan _______________________________________________ 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,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 2EAB3C43603 for ; Thu, 19 Dec 2019 11:46:27 +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 F37B824672 for ; Thu, 19 Dec 2019 11:46:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mOJ7bYpz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F37B824672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com 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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fBJKNdvJcHwbZFbpqR0gVx9MqeusHa5xtivSv2Tk30I=; b=mOJ7bYpzErdTzK VEjc6HVICRGItcbo76P7/+WqKENBCz9DuKT+3abWXgs1pj0Tvs/xeJNaDyxAzeHrei173oEZtPJhy aDD1k9IyxxKH+EjyVWUGDDE3YzmZyPEDtH/QdYWxjTqqCtxYOSjfgLMgvZ0dx0HAozLWgrW6X83vt 98FkPA+AYefFlVJXI1BGb4+fCUmBjoRkr4Yz5dRWO5H8exb8SnO0ohUxsXFQ0JSDoj9kOuE6hHg1C 2PqgRlH2hGSfR+BwCtLDbo82XnXNddDja/u93TASpqS9z0/kM6I5Nt8TbsMn6J4/PY/5qdy3XdqMm 7pf6fJu+Atq+izxR5aKA==; 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 1ihuG2-00074e-VE; Thu, 19 Dec 2019 11:46:18 +0000 Received: from szxga03-in.huawei.com ([45.249.212.189] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihuFy-00072U-HF for linux-arm-kernel@lists.infradead.org; Thu, 19 Dec 2019 11:46:17 +0000 Received: from DGGEMM405-HUB.china.huawei.com (unknown [172.30.72.54]) by Forcepoint Email with ESMTP id 0245EC08727047931738; Thu, 19 Dec 2019 19:45:58 +0800 (CST) Received: from dggeme755-chm.china.huawei.com (10.3.19.101) by DGGEMM405-HUB.china.huawei.com (10.3.20.213) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Dec 2019 19:45:57 +0800 Received: from [127.0.0.1] (10.173.221.248) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 19 Dec 2019 19:45:56 +0800 Subject: Re: [PATCH 1/5] KVM: arm64: Document PV-lock interface To: Steven Price References: <20191217135549.3240-1-yezengruan@huawei.com> <20191217135549.3240-2-yezengruan@huawei.com> <20191217142138.GA38811@arm.com> From: yezengruan Message-ID: <49120a3c-405d-d2e3-2a88-ba590feccbcc@huawei.com> Date: Thu, 19 Dec 2019 19:45:55 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 MIME-Version: 1.0 In-Reply-To: <20191217142138.GA38811@arm.com> Content-Language: en-US X-Originating-IP: [10.173.221.248] X-ClientProxiedBy: dggeme707-chm.china.huawei.com (10.1.199.103) To dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191219_034614_741886_3E493EAF X-CRM114-Status: GOOD ( 19.15 ) 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 , "daniel.lezcano@linaro.org" , "kvm@vger.kernel.org" , "linux-doc@vger.kernel.org" , "maz@kernel.org" , Suzuki Poulose , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , James Morse , "julien.thierry.kdev@gmail.com" , Catalin Marinas , "linux@armlinux.org.uk" , "will@kernel.org" , "kvmarm@lists.cs.columbia.edu" , "linux-arm-kernel@lists.infradead.org" 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 Hi Steve, On 2019/12/17 22:21, Steven Price wrote: > On Tue, Dec 17, 2019 at 01:55:45PM +0000, yezengruan@huawei.com wrote: >> From: Zengruan Ye >> >> Introduce a paravirtualization interface for KVM/arm64 to obtain the vcpu >> is currently running or not. >> >> A hypercall interface is provided for the guest to interrogate the >> hypervisor's support for this interface and the location of the shared >> memory structures. >> >> Signed-off-by: Zengruan Ye >> --- >> Documentation/virt/kvm/arm/pvlock.rst | 31 +++++++++++++++++++++++++++ >> 1 file changed, 31 insertions(+) >> create mode 100644 Documentation/virt/kvm/arm/pvlock.rst >> >> diff --git a/Documentation/virt/kvm/arm/pvlock.rst b/Documentation/virt/kvm/arm/pvlock.rst >> new file mode 100644 >> index 000000000000..eec0c36edf17 >> --- /dev/null >> +++ b/Documentation/virt/kvm/arm/pvlock.rst >> @@ -0,0 +1,31 @@ >> +.. SPDX-License-Identifier: GPL-2.0 >> + >> +Paravirtualized lock support for arm64 >> +====================================== >> + >> +KVM/arm64 provids some hypervisor service calls to support a paravirtualized >> +guest obtaining the vcpu is currently running or not. >> + >> +Two new SMCCC compatible hypercalls are defined: >> + >> +* PV_LOCK_FEATURES: 0xC5000040 >> +* PV_LOCK_PREEMPTED: 0xC5000041 > > These values are in the "Standard Hypervisor Service Calls" section of > SMCCC - so is there a document that describes this features such that > other OSes or hypervisors can implement it? I'm also not entirely sure > of the process of ensuring that the IDs picked are non-conflicting. > > Otherwise if this is a KVM specific interface this should probably > belong within the "Vendor Specific Hypervisor Service Calls" section > along with some probing that the hypervisor is actually KVM. Although I > don't see anything KVM specific. Thanks for pointing it out to me! Actually, I also don't see any documents or KVM specific that describes this features. The values in the "Vendor Specific Hypervisor Service Calls" section may be more appropriate, such as the following * PV_LOCK_FEATURES: 0xC6000020 * PV_LOCK_PREEMPTED: 0xC6000021 Please let me know if you have any suggestions. > >> + >> +The existence of the PV_LOCK hypercall should be probed using the SMCCC 1.1 >> +ARCH_FEATURES mechanism before calling it. >> + >> +PV_LOCK_FEATURES >> + ============= ======== ========== >> + Function ID: (uint32) 0xC5000040 >> + PV_call_id: (uint32) The function to query for support. >> + Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the relevant >> + PV-lock feature is supported by the hypervisor. >> + ============= ======== ========== >> + >> +PV_LOCK_PREEMPTED >> + ============= ======== ========== >> + Function ID: (uint32) 0xC5000041 >> + Return value: (int64) NOT_SUPPORTED (-1) or SUCCESS (0) if the IPA of >> + this vcpu's pv data structure is configured by >> + the hypervisor. >> + ============= ======== ========== > >>>From the code it looks like there's another argument for this SMC - the > physical address (or IPA) of a struct pvlock_vcpu_state. This structure > also needs to be described as it is part of the ABI. Will update. > > Steve > > . > Thanks, Zengruan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel