Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp690444pxb; Wed, 25 Aug 2021 12:38:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvp9nm3H6E3hOlD55v5Yom/tYCmX2NaBPm7q9HsOfeOf6g/nPnsywKHOj8JbhadaOBfShC X-Received: by 2002:a17:907:7da5:: with SMTP id oz37mr284879ejc.396.1629920307118; Wed, 25 Aug 2021 12:38:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629920307; cv=none; d=google.com; s=arc-20160816; b=YpI/lgTuFwemC7d99UeH1kcV6W4O3f5H6eAuxY7go9fgxnm5hzHmvVyJdnz+fupMbg b27t+nCr+PmQ/2Ry7aPpGUJ35IfLr8o9BO7Pr1VAbmMTNFT2vjHZeLefMqOIv78o/6sN rwwv0Q/mmg07/A7TdQoQRNoO8ZnqBORRg+dWrA49rMOs9I/ZdZ4TXcaD0wPvbimkKvQn oXA/qB4efJUHo1NrPeKDwxASgKPAeG/AO59Z4xWq2u0lGwap5jqfd7AMwxmr9a5Uhs8n 2bbg8JxPek0xJAkneiwFWEKNABqT032xsGbgXSqjJYojd98SQirTQ2c27DcVzeOaf6TK zK5A== 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:to:from; bh=A1EDUMQ0FvGq8JrpPA28+15BfxHbo/ANmwO6AoBUzt4=; b=Rh40fN27Ilx/gdkgarJPoi3gKcGa82Plv4jcMtRPE5+8RmsirgnVmm+j2HRqyVcItS gdeVHAD3hi6m1UJwN4kIg/rnYeISZCE3fV/VwMfw6/HutDZOzjn/WzkMWI2kybEJ4/VO SJBLdZNx8ptIh0jillzxHvddzErX46emnHCqROBIYsQmr/SRJFmbXIunWads7k56lddh jDNhPoOh5Z8f9crcdYWX9tXXIZcxGfnbQ/iWNdt9KDI/6tJlven3qAwP58Wg0syIRxP6 v5XqCleNtah9Q2/3tGfI7AYONOKIboB83sXsZgOc3gKPusfZt1Dxx2wkdBe/rls/coPq 8TnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v11si796092edr.321.2021.08.25.12.38.03; Wed, 25 Aug 2021 12:38:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S240476AbhHYQSc (ORCPT + 99 others); Wed, 25 Aug 2021 12:18:32 -0400 Received: from foss.arm.com ([217.140.110.172]:54726 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240429AbhHYQSP (ORCPT ); Wed, 25 Aug 2021 12:18:15 -0400 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 D42CB113E; Wed, 25 Aug 2021 09:17:29 -0700 (PDT) Received: from monolith.cable.virginm.net (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 838793F66F; Wed, 25 Aug 2021 09:17:28 -0700 (PDT) From: Alexandru Elisei To: maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, will@kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 11/39] KVM: arm64: Allow userspace to lock and unlock memslots Date: Wed, 25 Aug 2021 17:17:47 +0100 Message-Id: <20210825161815.266051-12-alexandru.elisei@arm.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210825161815.266051-1-alexandru.elisei@arm.com> References: <20210825161815.266051-1-alexandru.elisei@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ioctls have been implemented, allow the userspace to lock and unlock memslots. Signed-off-by: Alexandru Elisei --- arch/arm64/kvm/arm.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c index c47e96ae4f7c..4bd4b8b082a4 100644 --- a/arch/arm64/kvm/arm.c +++ b/arch/arm64/kvm/arm.c @@ -80,11 +80,6 @@ int kvm_arch_check_processor_compat(void *opaque) return 0; } -static int kvm_arm_lock_memslot_supported(void) -{ - return 0; -} - static int kvm_lock_user_memory_region_ioctl(struct kvm *kvm, struct kvm_enable_cap *cap) { @@ -127,8 +122,6 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm, kvm->arch.mte_enabled = true; break; case KVM_CAP_ARM_LOCK_USER_MEMORY_REGION: - if (!kvm_arm_lock_memslot_supported()) - return -EINVAL; r = kvm_lock_user_memory_region_ioctl(kvm, cap); break; default: @@ -306,7 +299,7 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) r = system_has_full_ptr_auth(); break; case KVM_CAP_ARM_LOCK_USER_MEMORY_REGION: - r = kvm_arm_lock_memslot_supported(); + r = 1; break; default: r = 0; -- 2.33.0