From: Marc Zyngier <maz@kernel.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH 2/2] kvm/arm64: don't log IMP DEF sysreg traps
Date: Fri, 06 Dec 2019 19:35:56 +0000 [thread overview]
Message-ID: <86h82dz1pf.wl-maz@kernel.org> (raw)
In-Reply-To: <20191205180652.18671-3-mark.rutland@arm.com>
On Thu, 05 Dec 2019 18:06:52 +0000,
Mark Rutland <mark.rutland@arm.com> wrote:
>
> We don't intend to support IMPLEMENATION DEFINED system registers, but
> have to trap them (and emulate them as UNDEFINED). These traps aren't
> interesting to the system administrator or to the KVM developers, so
> let's not bother logging when we do so.
>
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Alexandru Elisei <alexandru.elisei@arm.com>
> Cc: James Morse <james.morse@arm.com>
> Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Cc: kvmarm@lists.cs.columbia.edu
> ---
> arch/arm64/kvm/sys_regs.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index d128abd38656..61f019104841 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -2233,6 +2233,12 @@ int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run)
> NULL, 0);
> }
>
> +static bool is_imp_def_sys_reg(struct sys_reg_params *params)
> +{
> + // See ARM DDI 0487E.a, section D12.3.2
> + return params->Op0 == 3 && (params->CRn & 0b1011) == 0b1011;
> +}
> +
> static int emulate_sys_reg(struct kvm_vcpu *vcpu,
> struct sys_reg_params *params)
> {
> @@ -2248,6 +2254,8 @@ static int emulate_sys_reg(struct kvm_vcpu *vcpu,
>
> if (likely(r)) {
> perform_access(vcpu, params, r);
> + } else if (is_imp_def_sysreg(params)) {
Meh. Doesn't compile... :-(
Fixing it locally.
M.
--
Jazz is not dead, it just smells funny.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2019-12-06 19:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-05 18:06 [PATCH 0/2] kvm/arm64: unimplemented sysreg improvements Mark Rutland
2019-12-05 18:06 ` [PATCH 1/2] kvm/arm64: sanely ratelimit sysreg messages Mark Rutland
2019-12-05 18:06 ` [PATCH 2/2] kvm/arm64: don't log IMP DEF sysreg traps Mark Rutland
2019-12-06 19:35 ` Marc Zyngier [this message]
2019-12-09 10:32 ` Mark Rutland
2019-12-06 11:44 ` [PATCH 0/2] kvm/arm64: unimplemented sysreg improvements 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=86h82dz1pf.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@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;
as well as URLs for NNTP newsgroup(s).