[PATCH v2] arm64: Add basic JSON register parser
Mark Brown
broonie at kernel.org
Mon Jan 6 10:06:49 PST 2025
On Mon, Jan 06, 2025 at 04:30:18PM +0000, Marc Zyngier wrote:
> The moment you use a general purpose language, you end-up reinventing
> JSON in another way, and I didn't have the courage to do that. Also,
> jq feels like an exotic mix of functional programming and Forth,
> something toxic enough to be irresistible.
Yeah, it's super neat for the inline processing stuff.
> Mark Brown <broonie at kernel.org> wrote:
> > then we can hopefully use that for things like diffing two architecture
> > versions while handling cases where we've intentionally diverged from
> > how the architecture describes things. It'd be nice to have something
> > that'd go through and check for updates to registers we already have
> > mapped and provide an updated sysreg file. It might however just be
> > easier to use something like this and then work with sysreg files using
> > text processing tools.
> My current plan is somehow different: extract all the trapping
> information for each register handled by KVM, and *automatically*
> generate tests that check that KVM is doing the right thing. Or rather
> convince someone to do that.
> Then get rid of all such manually implemented tests from the kernel,
> once and for all.
That would be awesome - there's far too much stuff needs typing in
there. There's a bunch of these places where we either already use
register data or could use it if it required less typing/verification to
do so, the ideas I mentioned were just the first things that popped into
my mind. Having a reliable machine readable data source for this
information is going to be *so* helpful.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250106/e9db0a74/attachment.sig>
More information about the linux-arm-kernel
mailing list