linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Joey Gouly <joey.gouly@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev,
	kvmarm@lists.linux.dev, Suzuki K Poulose <suzuki.poulose@arm.com>,
	James Morse <james.morse@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [PATCH v1 1/2] KVM: arm64: add nPIR{E0}_EL1 to HFG traps
Date: Thu, 12 Oct 2023 16:33:25 +0100	[thread overview]
Message-ID: <87zg0nlut6.wl-maz@kernel.org> (raw)
In-Reply-To: <20231012123459.2820835-2-joey.gouly@arm.com>

Hi Joey,

Please Cc all the reviewers, not only Oliver and me.

On Thu, 12 Oct 2023 13:34:58 +0100,
Joey Gouly <joey.gouly@arm.com> wrote:
> 
> nPIR_EL1 and nPIREO_EL1 are part of the 'reverse polarity' set of bits, set
> them so that we disable the traps for a guest.

It would have been helpful to indicate where these bits were defined,
as they are not published in the ARM ARM. For the record, they live in
the XML files available at [1]. If we're adding these, we also need to
add the FGT emulation for nested, which doesn't describe these bits:

diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c
index 34075185af8e..f564e9b075d5 100644
--- a/arch/arm64/kvm/emulate-nested.c
+++ b/arch/arm64/kvm/emulate-nested.c
@@ -977,6 +977,8 @@ enum fg_filter_id {
 
 static const struct encoding_to_trap_config encoding_to_fgt[] __initconst = {
 	/* HFGRTR_EL2, HFGWTR_EL2 */
+	SR_FGT(SYS_PIR_EL1,		HFGxTR, nPIR_EL1, 0),
+	SR_FGT(SYS_PIRE0_EL1,		HFGxTR, nPIRE0_EL1, 0),
 	SR_FGT(SYS_TPIDR2_EL0,		HFGxTR, nTPIDR2_EL0, 0),
 	SR_FGT(SYS_SMPRI_EL1,		HFGxTR, nSMPRI_EL1, 0),
 	SR_FGT(SYS_ACCDATA_EL1,		HFGxTR, nACCDATA_EL1, 0),

I'll amend the commit message locally and fold this in.

	M.

[1] https://developer.arm.com/downloads/-/exploration-tools

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-10-12 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12 12:34 [PATCH v1 0/2] KVM: fix issues with Permission Indirection Extension Joey Gouly
2023-10-12 12:34 ` [PATCH v1 1/2] KVM: arm64: add nPIR{E0}_EL1 to HFG traps Joey Gouly
2023-10-12 15:33   ` Marc Zyngier [this message]
2023-10-12 12:34 ` [PATCH v1 2/2] KVM: arm64: POR{E0}_EL1 do not need trap handlers Joey Gouly

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=87zg0nlut6.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oliver.upton@linux.dev \
    --cc=suzuki.poulose@arm.com \
    --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;
as well as URLs for NNTP newsgroup(s).