From: Andrew Jones <drjones@redhat.com>
To: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: maz@kernel.org, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, james.morse@arm.com,
suzuki.poulose@arm.com
Subject: Re: [PATCH v2 2/3] KVM: arm64: Use get_raz_reg() for userspace reads of PMSWINC_EL0
Date: Mon, 11 Oct 2021 14:45:34 +0200 [thread overview]
Message-ID: <20211011124534.m7zzpsv3ymp5xxzo@gator> (raw)
In-Reply-To: <20211011105840.155815-3-alexandru.elisei@arm.com>
On Mon, Oct 11, 2021 at 11:58:39AM +0100, Alexandru Elisei wrote:
> PMSWINC_EL0 is a write-only register and was initially part of the VCPU
> register state, but was later removed in commit 7a3ba3095a32 ("KVM:
> arm64: Remove PMSWINC_EL0 shadow register"). To prevent regressions, the
> register was kept accessible from userspace as Read-As-Zero (RAZ).
>
> The read function that is used to handle userspace reads of this
> register is get_raz_id_reg(), which, while technically correct, as it
> returns 0, it is not semantically correct, as PMSWINC_EL0 is not an ID
> register as the function name suggests.
>
> Add a new function, get_raz_reg(), to use it as the accessor for
> PMSWINC_EL0, as to not conflate get_raz_id_reg() to handle other types
> of registers.
>
> No functional change intended.
>
> Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> ---
> arch/arm64/kvm/sys_regs.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-10-11 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-11 10:58 [PATCH v2 0/3] KVM: arm64: Minor improvements to RAZ register handling Alexandru Elisei
2021-10-11 10:58 ` [PATCH v2 1/3] KVM: arm64: Return early from read_id_reg() if register is RAZ Alexandru Elisei
2021-10-11 10:58 ` [PATCH v2 2/3] KVM: arm64: Use get_raz_reg() for userspace reads of PMSWINC_EL0 Alexandru Elisei
2021-10-11 12:45 ` Andrew Jones [this message]
2021-10-11 10:58 ` [PATCH v2 3/3] KVM: arm64: Replace get_raz_id_reg() with get_raz_reg() Alexandru Elisei
2021-10-11 12:45 ` Andrew Jones
2021-10-11 13:17 ` [PATCH v2 0/3] KVM: arm64: Minor improvements to RAZ register handling Marc Zyngier
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=20211011124534.m7zzpsv3ymp5xxzo@gator \
--to=drjones@redhat.com \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@arm.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=suzuki.poulose@arm.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