From: Marc Zyngier <maz@kernel.org>
To: jiaqingtong97@gmail.com
Cc: Oliver Upton <oliver.upton@linux.dev>,
James Morse <james.morse@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Joey Gouly <joey.gouly@arm.com>,
Jia Qingtong <jiaqingtong@huawei.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: vgic: fix GICR_STATUSR in vgic_v3_rd_registers
Date: Sun, 29 Sep 2024 10:38:35 +0100 [thread overview]
Message-ID: <87v7yevlyc.wl-maz@kernel.org> (raw)
In-Reply-To: <20240929043937.242769-2-jiaqingtong97@gmail.com>
On Sun, 29 Sep 2024 05:39:35 +0100,
jiaqingtong97@gmail.com wrote:
>
> From: Jia Qingtong <jiaqingtong@huawei.com>
>
> vgic_uaccess use bsearch search regs in vgic_io_device.regions, but the
> GICR_STATUSR have wrong order in vgic_v3_rd_registers.
> When check all vgic_register_region, it turned out that only
> vgic_v3_rd_registers has this problem.
>
> It's harmless since vgic_uaccess behaves as RAZ&WI when it can't find the
> specified reg. This is exactly the same as the behavior of the GICR_STATUSR
> register.
>
> So just move GICR_STATUSR to the right place.
That looks correct, but I think we should have some code that ensures
that these tables are correct at boot time, just like we're doing for
the system registers. Or completely remove our reliance on bsearch().
Another thing is that GICD_STATUSR looks pretty wrong. It is handled
as RAO, but we never clear any "error" (it is WI). This has been buggy
since GICv3 save/restore was added, 7 years ago.
Do you mind spinning a series fixing this up?
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2024-09-29 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-29 4:39 [PATCH] KVM: arm64: vgic: fix GICR_STATUSR in vgic_v3_rd_registers jiaqingtong97
2024-09-29 9:38 ` Marc Zyngier [this message]
2024-09-30 6:20 ` Jia Qingtong
2024-09-30 14:45 ` 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=87v7yevlyc.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=james.morse@arm.com \
--cc=jiaqingtong97@gmail.com \
--cc=jiaqingtong@huawei.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.upton@linux.dev \
--cc=suzuki.poulose@arm.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