linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	Oliver Upton <oliver.upton@linux.dev>,
	Joey Gouly <joey.gouly@arm.com>, Fuad Tabba <tabba@google.com>,
	kvmarm@lists.linux.dev
Subject: Re: [PATCH 1/2] KVM: arm64: Just advertise SEIS as 0 when emulating ICC_CTLR_EL1
Date: Tue, 22 Oct 2024 17:27:48 +0100	[thread overview]
Message-ID: <867ca03xx7.wl-maz@kernel.org> (raw)
In-Reply-To: <20241022144016.27350-2-will@kernel.org>

On Tue, 22 Oct 2024 15:40:15 +0100,
Will Deacon <will@kernel.org> wrote:
> 
> ICC_CTLR_EL1 accesses from a guest are trapped and emulated on systems
> with broken SEIS support and without FEAT_GICv3_TDIR. On such systems,
> we mask SEIS support in 'kvm_vgic_global_state.ich_vtr_el2' and so the
> value of ICC_CTLR_EL1.SEIS visible to the guest is always zero.
>
> Simplify the ICC_CTLR_EL1 read emulation to return 0 for the SEIS field,
> rather than reading an always-zero value from the global state.
> 
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Signed-off-by: Will Deacon <will@kernel.org>
> ---
>  arch/arm64/kvm/hyp/vgic-v3-sr.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/arch/arm64/kvm/hyp/vgic-v3-sr.c b/arch/arm64/kvm/hyp/vgic-v3-sr.c
> index 18d4677002b1..3f9741e51d41 100644
> --- a/arch/arm64/kvm/hyp/vgic-v3-sr.c
> +++ b/arch/arm64/kvm/hyp/vgic-v3-sr.c
> @@ -1012,9 +1012,6 @@ static void __vgic_v3_read_ctlr(struct kvm_vcpu *vcpu, u32 vmcr, int rt)
>  	val = ((vtr >> 29) & 7) << ICC_CTLR_EL1_PRI_BITS_SHIFT;
>  	/* IDbits */
>  	val |= ((vtr >> 23) & 7) << ICC_CTLR_EL1_ID_BITS_SHIFT;
> -	/* SEIS */
> -	if (kvm_vgic_global_state.ich_vtr_el2 & ICH_VTR_SEIS_MASK)
> -		val |= BIT(ICC_CTLR_EL1_SEIS_SHIFT);
>  	/* A3V */
>  	val |= ((vtr >> 21) & 1) << ICC_CTLR_EL1_A3V_SHIFT;
>  	/* EOImode */

Reviewed-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.


  reply	other threads:[~2024-10-22 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 14:40 [PATCH 0/2] KVM: arm64: Simplify handling of GICv3 hardware with broken SEIS Will Deacon
2024-10-22 14:40 ` [PATCH 1/2] KVM: arm64: Just advertise SEIS as 0 when emulating ICC_CTLR_EL1 Will Deacon
2024-10-22 16:27   ` Marc Zyngier [this message]
2024-10-22 14:40 ` [PATCH 2/2] KVM: arm64: Don't map 'kvm_vgic_global_state' at EL2 with pKVM Will Deacon
2024-10-22 17:01   ` Marc Zyngier
2024-10-23 16:39     ` Will Deacon
2024-10-23 16:53       ` Marc Zyngier
2024-10-25 22:16 ` [PATCH 0/2] KVM: arm64: Simplify handling of GICv3 hardware with broken SEIS 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=867ca03xx7.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oliver.upton@linux.dev \
    --cc=tabba@google.com \
    --cc=will@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).