From: Will Deacon <will@kernel.org>
To: kvmarm@lists.cs.columbia.edu
Cc: Marc Zyngier <maz@kernel.org>,
kernel-team@android.com, Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] KVM: arm64: Remove redundant hyp_assert_lock_held() assertions
Date: Thu, 9 Jun 2022 13:12:22 +0100 [thread overview]
Message-ID: <20220609121223.2551-6-will@kernel.org> (raw)
In-Reply-To: <20220609121223.2551-1-will@kernel.org>
host_stage2_try() asserts that the KVM host lock is held, so there's no
need to duplicate the assertion in its wrappers.
Signed-off-by: Will Deacon <will@kernel.org>
---
arch/arm64/kvm/hyp/nvhe/mem_protect.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
index 78edf077fa3b..1e78acf9662e 100644
--- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c
+++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
@@ -314,15 +314,11 @@ static int host_stage2_adjust_range(u64 addr, struct kvm_mem_range *range)
int host_stage2_idmap_locked(phys_addr_t addr, u64 size,
enum kvm_pgtable_prot prot)
{
- hyp_assert_lock_held(&host_kvm.lock);
-
return host_stage2_try(__host_stage2_idmap, addr, addr + size, prot);
}
int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, u8 owner_id)
{
- hyp_assert_lock_held(&host_kvm.lock);
-
return host_stage2_try(kvm_pgtable_stage2_set_owner, &host_kvm.pgt,
addr, size, &host_s2_pool, owner_id);
}
--
2.36.1.255.ge46751e96f-goog
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org>
To: kvmarm@lists.cs.columbia.edu
Cc: Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
Alexandru Elisei <alexandru.elisei@arm.com>,
kernel-team@android.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] KVM: arm64: Remove redundant hyp_assert_lock_held() assertions
Date: Thu, 9 Jun 2022 13:12:22 +0100 [thread overview]
Message-ID: <20220609121223.2551-6-will@kernel.org> (raw)
In-Reply-To: <20220609121223.2551-1-will@kernel.org>
host_stage2_try() asserts that the KVM host lock is held, so there's no
need to duplicate the assertion in its wrappers.
Signed-off-by: Will Deacon <will@kernel.org>
---
arch/arm64/kvm/hyp/nvhe/mem_protect.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/arch/arm64/kvm/hyp/nvhe/mem_protect.c b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
index 78edf077fa3b..1e78acf9662e 100644
--- a/arch/arm64/kvm/hyp/nvhe/mem_protect.c
+++ b/arch/arm64/kvm/hyp/nvhe/mem_protect.c
@@ -314,15 +314,11 @@ static int host_stage2_adjust_range(u64 addr, struct kvm_mem_range *range)
int host_stage2_idmap_locked(phys_addr_t addr, u64 size,
enum kvm_pgtable_prot prot)
{
- hyp_assert_lock_held(&host_kvm.lock);
-
return host_stage2_try(__host_stage2_idmap, addr, addr + size, prot);
}
int host_stage2_set_owner_locked(phys_addr_t addr, u64 size, u8 owner_id)
{
- hyp_assert_lock_held(&host_kvm.lock);
-
return host_stage2_try(kvm_pgtable_stage2_set_owner, &host_kvm.pgt,
addr, size, &host_s2_pool, owner_id);
}
--
2.36.1.255.ge46751e96f-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-09 12:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 12:12 [PATCH 0/6] KVM/arm64: Minor/trivial fixes from pKVM mega-patch Will Deacon
2022-06-09 12:12 ` Will Deacon
2022-06-09 12:12 ` [PATCH 1/6] KVM: arm64: Return error from kvm_arch_init_vm() on allocation failure Will Deacon
2022-06-09 12:12 ` Will Deacon
2022-06-09 12:12 ` [PATCH 2/6] KVM: arm64: Handle all ID registers trapped for a protected VM Will Deacon
2022-06-09 12:12 ` Will Deacon
2022-06-14 5:57 ` Reiji Watanabe
2022-06-14 5:57 ` Reiji Watanabe
2022-06-09 12:12 ` [PATCH 3/6] KVM: arm64: Ignore 'kvm-arm.mode=protected' when using VHE Will Deacon
2022-06-09 12:12 ` Will Deacon
2022-06-09 12:12 ` [PATCH 4/6] KVM: arm64: Extend comment in has_vhe() Will Deacon
2022-06-09 12:12 ` Will Deacon
2022-06-09 12:12 ` Will Deacon [this message]
2022-06-09 12:12 ` [PATCH 5/6] KVM: arm64: Remove redundant hyp_assert_lock_held() assertions Will Deacon
2022-06-09 12:12 ` [PATCH 6/6] KVM: arm64: Drop stale comment Will Deacon
2022-06-09 12:12 ` Will Deacon
2022-06-09 12:19 ` [PATCH 0/6] KVM/arm64: Minor/trivial fixes from pKVM mega-patch Marc Zyngier
2022-06-09 12:19 ` Marc Zyngier
2022-06-09 12:26 ` Marc Zyngier
2022-06-09 12:26 ` Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220609121223.2551-6-will@kernel.org \
--to=will@kernel.org \
--cc=kernel-team@android.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.