From: Will Deacon <will@kernel.org>
To: "Pierre-Clément Tosi" <ptosi@google.com>
Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Vincent Donnefort <vdonnefort@google.com>
Subject: Re: [PATCH v5 2/8] KVM: arm64: Fix __pkvm_init_switch_pgd call ABI
Date: Thu, 20 Jun 2024 12:37:35 +0100 [thread overview]
Message-ID: <20240620113735.GB4625@willie-the-truck> (raw)
In-Reply-To: <20240610063244.2828978-3-ptosi@google.com>
On Mon, Jun 10, 2024 at 07:32:31AM +0100, Pierre-Clément Tosi wrote:
> Fix the mismatch between the (incorrect) C signature, C call site, and
> asm implementation by aligning all three on an API passing the
> parameters (pgd and SP) separately, instead of as a bundled struct.
>
> Remove the now unnecessary memory accesses while the MMU is off from the
> asm, which simplifies the C caller (as it does not need to convert a VA
> struct pointer to PA) and makes the code slightly more robust by
> offsetting the struct fields from C and properly expressing the call to
> the C compiler (e.g. type checker and kCFI).
>
> Fixes: f320bc742bc2 ("KVM: arm64: Prepare the creation of s1 mappings at EL2")
> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
> ---
> arch/arm64/include/asm/kvm_hyp.h | 4 ++--
> arch/arm64/kvm/hyp/nvhe/hyp-init.S | 24 +++++++++++++-----------
> arch/arm64/kvm/hyp/nvhe/setup.c | 4 ++--
> 3 files changed, 17 insertions(+), 15 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Will
next prev parent reply other threads:[~2024-06-20 11:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 6:32 [PATCH v5 0/8] KVM: arm64: Add support for hypervisor kCFI Pierre-Clément Tosi
2024-06-10 6:32 ` [PATCH v5 1/8] KVM: arm64: Fix clobbered ELR in sync abort/SError Pierre-Clément Tosi
2024-06-10 6:32 ` [PATCH v5 2/8] KVM: arm64: Fix __pkvm_init_switch_pgd call ABI Pierre-Clément Tosi
2024-06-20 11:37 ` Will Deacon [this message]
2024-06-10 6:32 ` [PATCH v5 3/8] KVM: arm64: nVHE: Simplify invalid_host_el2_vect Pierre-Clément Tosi
2024-06-20 11:35 ` Will Deacon
2024-06-10 6:32 ` [PATCH v5 4/8] KVM: arm64: nVHE: gen-hyprel: Skip R_AARCH64_ABS32 Pierre-Clément Tosi
2024-06-10 6:32 ` [PATCH v5 5/8] KVM: arm64: VHE: Mark __hyp_call_panic __noreturn Pierre-Clément Tosi
2024-06-10 6:32 ` [PATCH v5 6/8] arm64: Introduce esr_brk_comment, esr_is_cfi_brk Pierre-Clément Tosi
2024-06-10 6:32 ` [PATCH v5 7/8] KVM: arm64: Introduce print_nvhe_hyp_panic helper Pierre-Clément Tosi
2024-06-10 6:32 ` [PATCH v5 8/8] KVM: arm64: nVHE: Support CONFIG_CFI_CLANG at EL2 Pierre-Clément Tosi
2024-06-20 17:56 ` [PATCH v5 0/8] KVM: arm64: Add support for hypervisor kCFI Oliver Upton
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=20240620113735.GB4625@willie-the-truck \
--to=will@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=ptosi@google.com \
--cc=suzuki.poulose@arm.com \
--cc=vdonnefort@google.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