Message ID | 20230127113932.166089-6-suzuki.poulose@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp787308wrn; Fri, 27 Jan 2023 03:44:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXvcSbGm+KS5EaQ0Vz8cSKEnt3FQzPcfnn1DRU+P3/3hAjp7oo9rJIXswJHQSUbSUuLh7kkW X-Received: by 2002:a05:6a20:3d23:b0:b0:4c16:10a6 with SMTP id y35-20020a056a203d2300b000b04c1610a6mr52736277pzi.0.1674819840146; Fri, 27 Jan 2023 03:44:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674819840; cv=none; d=google.com; s=arc-20160816; b=cAnoPjY2N0cyEmPEfnF/QDoDLosXqEpYet9fbSFUn/RVfb9l3KIhRxsNuNmRA0tFCk 0EH2ha9cXp4tMYBcnu7XY0k0OdrbK+pX6ApizGUqdj2LzT4eUXJ1aqqCkv06v+LHkGXu U4j5qdsRwddVzStXA8db3M1frcfJ7JEFN8IuySyoCIK3JFKstOF6YoMkNqHpHkKC8IjX pUGwjVwU50+CT09xhaoenjpM9V6ejKLn8gvkIGdAum8lq9wkGE0dTfKblhATX62q7II6 dPZiZGv4YIGocjapxAMBPLSabL+YcDr5HFzRHZDgW2o4y6J0b2BzY9pk9tZ7phXLHmIB fD/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=84sfHZoRfLpS3lGGYLyZQlR4dPkp/LvqJgaPIu9wwv8=; b=j0sV8us6EWmy57/HVTR2gGwA23WZMOGGTS9sZ0PaPJpWQss/SRwE9t2Jgz29WrXpc2 asGLRMS7LDr45M3jJ8Sc929miuqNwj3hLlMAo79J/4LWqf61oou8nThN7wr4iKrTwSFi JFucGDRp1safNRYMbYBCOCuzJz0/7zJcGg6yIU/p3w7F4waeT9OVPxbhZjm0cmX9tMtU oPF/FzDiB64ZlzGu3avVSqzPt9RhMKZbwIZIZqLDWioL0vHAYVk8BeiyE2/W0jAFzvy2 tOwntCOVRZKDhlprzCVqwgzanvzBNmu0WL8/sY8DzgDOPEpNvTMt+pP/jaCmAWEGp36u YA7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z29-20020a637e1d000000b004e0d688fb7bsi782475pgc.706.2023.01.27.03.43.47; Fri, 27 Jan 2023 03:44:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232781AbjA0LlR (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Fri, 27 Jan 2023 06:41:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233857AbjA0LlK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Jan 2023 06:41:10 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 94271F77F; Fri, 27 Jan 2023 03:40:41 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2471D1684; Fri, 27 Jan 2023 03:40:45 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 911713F64C; Fri, 27 Jan 2023 03:40:00 -0800 (PST) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: kvm@vger.kernel.org, kvmarm@lists.linux.dev Cc: suzuki.poulose@arm.com, Alexandru Elisei <alexandru.elisei@arm.com>, Andrew Jones <andrew.jones@linux.dev>, Christoffer Dall <christoffer.dall@arm.com>, Fuad Tabba <tabba@google.com>, Jean-Philippe Brucker <jean-philippe@linaro.org>, Joey Gouly <Joey.Gouly@arm.com>, Marc Zyngier <maz@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Oliver Upton <oliver.upton@linux.dev>, Paolo Bonzini <pbonzini@redhat.com>, Quentin Perret <qperret@google.com>, Steven Price <steven.price@arm.com>, Thomas Huth <thuth@redhat.com>, Will Deacon <will@kernel.org>, Zenghui Yu <yuzenghui@huawei.com>, linux-coco@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [RFC kvmtool 05/31] arm64: Check pvtime support against the KVM instance Date: Fri, 27 Jan 2023 11:39:06 +0000 Message-Id: <20230127113932.166089-6-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230127113932.166089-1-suzuki.poulose@arm.com> References: <20230127112248.136810-1-suzuki.poulose@arm.com> <20230127113932.166089-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756175888587412376?= X-GMAIL-MSGID: =?utf-8?q?1756175888587412376?= |
Series |
arm64: Support for Arm Confidential Compute Architecture
|
|
Commit Message
Suzuki K Poulose
Jan. 27, 2023, 11:39 a.m. UTC
KVM_CAP_STEAL_TIME can be checked against a VM instance.
To allow controlling the feature depending on the VM type,
use the cap against the VM.
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
arm/aarch64/pvtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arm/aarch64/pvtime.c b/arm/aarch64/pvtime.c index 2933ac7c..839aa8a7 100644 --- a/arm/aarch64/pvtime.c +++ b/arm/aarch64/pvtime.c @@ -58,8 +58,8 @@ int kvm_cpu__setup_pvtime(struct kvm_cpu *vcpu) if (kvm_cfg->no_pvtime) return 0; - has_stolen_time = kvm__supports_extension(vcpu->kvm, - KVM_CAP_STEAL_TIME); + has_stolen_time = kvm__supports_vm_extension(vcpu->kvm, + KVM_CAP_STEAL_TIME); if (!has_stolen_time) { kvm_cfg->no_pvtime = true; return 0;