From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Fuad Tabba <fuad.tabba@linux.dev>,
maz@kernel.org, oupton@kernel.org, kvmarm@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: catalin.marinas@arm.com, will@kernel.org, joey.gouly@arm.com,
seiden@linux.ibm.com, yuzenghui@huawei.com, mark.rutland@arm.com,
vdonnefort@google.com, qperret@google.com,
Sascha.Bischoff@arm.com, steven.price@arm.com, tabba@google.com
Subject: Re: [PATCH v2 1/5] KVM: arm64: Reject the GICv5 CPU interface hypercalls under pKVM
Date: Mon, 12 Oct 2026 11:43:05 +0100 [thread overview]
Message-ID: <b941a0c8-6d17-4a21-9eb7-30ad06bd6748@arm.com> (raw)
In-Reply-To: <20261011143648.211337-2-fuad.tabba@linux.dev>
On 11/10/2026 15:36, Fuad Tabba wrote:
> __vgic_v5_save_apr() and __vgic_v5_restore_vmcr_apr() remain callable
> once pKVM has finalised. pKVM never registers a GICv5 vgic, so neither
> has a valid caller in protected mode, and on a GICv3 machine both reach
> a register that is UNDEFINED at EL2 and panic the hypervisor.
>
> Move both into the band the dispatcher rejects once pKVM has finalised.
>
> Fixes: af325e87af5da ("KVM: arm64: gic-v5: Add vgic-v5 save/restore hyp interface")
> Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev>
> ---
> arch/arm64/include/asm/kvm_asm.h | 4 ++--
> arch/arm64/kvm/hyp/nvhe/hyp-main.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h
> index e5b92ac09e69e..ea319c496bb26 100644
> --- a/arch/arm64/include/asm/kvm_asm.h
> +++ b/arch/arm64/include/asm/kvm_asm.h
> @@ -62,6 +62,8 @@ enum __kvm_host_smccc_func {
> __KVM_HOST_SMCCC_FUNC___kvm_enable_ssbs,
> __KVM_HOST_SMCCC_FUNC___vgic_v3_init_lrs,
> __KVM_HOST_SMCCC_FUNC___vgic_v3_get_gic_config,
> + __KVM_HOST_SMCCC_FUNC___vgic_v5_save_apr,
> + __KVM_HOST_SMCCC_FUNC___vgic_v5_restore_vmcr_apr,
>
> MARKER(__KVM_HOST_SMCCC_FUNC_MIN_PKVM),
>
Any calls above are rejected after pKVM is initialized, so the calls are
indeed rejected.
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
next prev parent reply other threads:[~2026-10-12 10:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 14:36 [PATCH v2 0/5] KVM: arm64: pKVM host hypercall and GICv5 CPU interface fixes Fuad Tabba
2026-10-11 14:36 ` [PATCH v2 1/5] KVM: arm64: Reject the GICv5 CPU interface hypercalls under pKVM Fuad Tabba
2026-10-12 10:43 ` Suzuki K Poulose [this message]
2026-10-11 14:36 ` [PATCH v2 2/5] KVM: arm64: Reject the stage-2 flush " Fuad Tabba
2026-10-12 12:03 ` Suzuki K Poulose
2026-10-11 14:36 ` [PATCH v2 3/5] KVM: arm64: Validate the host-provided vgic model in pKVM Fuad Tabba
2026-10-12 12:15 ` Suzuki K Poulose
2026-10-11 14:36 ` [PATCH v2 4/5] KVM: arm64: vgic: Do not access the GICv5 CPU interface from EL1 Fuad Tabba
2026-10-11 15:10 ` Marc Zyngier
2026-10-11 15:26 ` Fuad Tabba
2026-10-11 14:36 ` [PATCH v2 5/5] KVM: arm64: Fix stale VGICv3 comments in the nVHE world switch 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=b941a0c8-6d17-4a21-9eb7-30ad06bd6748@arm.com \
--to=suzuki.poulose@arm.com \
--cc=Sascha.Bischoff@arm.com \
--cc=catalin.marinas@arm.com \
--cc=fuad.tabba@linux.dev \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=oupton@kernel.org \
--cc=qperret@google.com \
--cc=seiden@linux.ibm.com \
--cc=steven.price@arm.com \
--cc=tabba@google.com \
--cc=vdonnefort@google.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
all inboxes | Powered by JetHome®