From: Fuad Tabba <tabba@google.com>
To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Cc: maz@kernel.org, oliver.upton@linux.dev, james.clark@linaro.org,
will@kernel.org, joey.gouly@arm.com, suzuki.poulose@arm.com,
yuzenghui@huawei.com, catalin.marinas@arm.com,
broonie@kernel.org
Subject: [PATCH v1 09/12] KVM: arm64: Remove redundant setting of HCR_EL2 trap bit
Date: Wed, 20 Nov 2024 10:52:51 +0000 [thread overview]
Message-ID: <20241120105254.2842020-10-tabba@google.com> (raw)
In-Reply-To: <20241120105254.2842020-1-tabba@google.com>
In hVHE mode, HCR_E2H should be set for both protected and
non-protected VMs. Since commit 23c9d58cb458 ("KVM: arm64: Fix
initializing traps in protected mode"), this has been fixed, and
the setting of the flag here is redundant.
Signed-off-by: Fuad Tabba <tabba@google.com>
---
arch/arm64/kvm/hyp/nvhe/pkvm.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/kvm/hyp/nvhe/pkvm.c b/arch/arm64/kvm/hyp/nvhe/pkvm.c
index ffa500b500f2..cede527a59d4 100644
--- a/arch/arm64/kvm/hyp/nvhe/pkvm.c
+++ b/arch/arm64/kvm/hyp/nvhe/pkvm.c
@@ -57,9 +57,6 @@ static void pvm_init_traps_hcr(struct kvm_vcpu *vcpu)
/* No support for AArch32. */
val |= HCR_RW;
- if (has_hvhe())
- val |= HCR_E2H;
-
/*
* Always trap:
* - Feature id registers: to control features exposed to guests
--
2.47.0.338.g60cca15819-goog
next prev parent reply other threads:[~2024-11-20 10:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 10:52 [PATCH v1 00/12] KVM: arm64: Rework guest VM fixed feature handling and trapping in pKVM Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 01/12] KVM: arm64: Consolidate allowed and restricted VM feature checks Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 02/12] KVM: arm64: Group setting traps for protected VMs by control register Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 03/12] KVM: arm64: Move checking protected vcpu features to a separate function Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 04/12] KVM: arm64: Use KVM extension checks for allowed protected VM capabilities Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 05/12] KVM: arm64: Initialize feature id registers for protected VMs Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 06/12] KVM: arm64: Set protected VM traps based on its view of feature registers Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 07/12] KVM: arm64: Rework specifying restricted features for protected VMs Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 08/12] KVM: arm64: Remove fixed_config.h header Fuad Tabba
2024-11-20 10:52 ` Fuad Tabba [this message]
2024-11-20 10:52 ` [PATCH v1 10/12] KVM: arm64: Calculate cptr_el2 traps on activating traps Fuad Tabba
2024-11-21 8:32 ` Quentin Perret
2024-11-21 9:41 ` Fuad Tabba
2024-11-21 10:10 ` Quentin Perret
2024-11-21 13:30 ` Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 11/12] KVM: arm64: Update vcpu state with live value of VBAR_EL1 on injecting an exception Fuad Tabba
2024-11-20 10:52 ` [PATCH v1 12/12] fixup! KVM: arm64: Initialize feature id registers for protected VMs Fuad Tabba
2024-11-20 11:01 ` Fuad Tabba
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=20241120105254.2842020-10-tabba@google.com \
--to=tabba@google.com \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.clark@linaro.org \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox