[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210825161815.266051-12-alexandru.elisei@arm.com>
Date: Wed, 25 Aug 2021 17:17:47 +0100
From: Alexandru Elisei <alexandru.elisei@....com>
To: maz@...nel.org, james.morse@....com, suzuki.poulose@....com,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
will@...nel.org, linux-kernel@...r.kernel.org
Subject: [RFC PATCH v4 11/39] KVM: arm64: Allow userspace to lock and unlock memslots
The ioctls have been implemented, allow the userspace to lock and unlock
memslots.
Signed-off-by: Alexandru Elisei <alexandru.elisei@....com>
---
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
Powered by blists - more mailing lists