From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85DDA21A4D4 for ; Fri, 25 Oct 2024 17:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729875906; cv=none; b=NnWI2PHpMuUtzz9I3cnWmEpA30xR6x1PAmcGDuUrJL+NtmAw2H3isE5jreurQ+ueMwfRjTjvTxgBYcYrrEi80Xo/3+kujw+BQ5OtmGQR59xoQZox4saRt+DtVL0eJs7SGTKa6NmSXewUPB5G+cIBZ+DP3N7eJvHR1799ep+DM2c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729875906; c=relaxed/simple; bh=VAh/4/78mDGKWgIG/y/D4fuPPawGrBhwtluopSQMBjE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=CCh3I2HXIJVHQz5FC0vVHVtXAs3dYaWIqeY54Hf8WucAqJyLBmDeRpc4D+Ybvt+wXXG1KlXYVlZGy4JcFhVYAMuq+6E16FA/Pmh12K/XH/g2agxpV9xPVbR1HvdWCGYhDjMkNmuJcp5DJ6UT+Ojuxuts45+X1lVyXPIkDHByGbk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JNy0FXX4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JNy0FXX4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16391C4CEE3; Fri, 25 Oct 2024 17:05:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729875906; bh=VAh/4/78mDGKWgIG/y/D4fuPPawGrBhwtluopSQMBjE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JNy0FXX4xsONOYlDh5s2CmGeGT+GDA9VoqdO1EcCSbmb6yvktqAly8Cwm+wk7/LET PYPmNfTCnKP1iNCpMseKsv6qG3l5tfK4lNoHOc3D2ABCZ3+y/72XT5ysRwu45aICdf izgbH7mHJiMYcf31kQiNlCOFQJsoycMKUBQZQE7WPgHSaxcToQmY1qaomaxL2qshCu WYYzXNC2csxIfGDGhN/GkbNPwwetYtjAnpJZt0GEfr9hvriYH6mnoZo58CvD6VBNUa fKzpqwnodvXZRAEF3Ek5kY6AiSlGVSLjErUY+SzvjuasM5WVQSjvDfaH1/XkCpZ48G rz1cCwjEXmXAA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t4NkF-006riz-RU; Fri, 25 Oct 2024 18:05:04 +0100 Date: Fri, 25 Oct 2024 18:05:03 +0100 Message-ID: <86frok2jwg.wl-maz@kernel.org> From: Marc Zyngier To: Eric Auger Cc: eric.auger.pro@gmail.com, cohuck@redhat.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, kvmarm@lists.linux.dev, peter.maydell@linaro.org, richard.henderson@linaro.org, alex.bennee@linaro.org, oliver.upton@linux.dev, sebott@redhat.com, shameerali.kolothum.thodi@huawei.com, armbru@redhat.com, berrange@redhat.com, abologna@redhat.com, jdenemar@redhat.com, shahuang@redhat.com, mark.rutland@arm.com, philmd@linaro.org, pbonzini@redhat.com Subject: Re: [RFC 14/21] arm/cpu: Add sysreg generation scripts In-Reply-To: <20241025101959.601048-15-eric.auger@redhat.com> References: <20241025101959.601048-1-eric.auger@redhat.com> <20241025101959.601048-15-eric.auger@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: eric.auger@redhat.com, eric.auger.pro@gmail.com, cohuck@redhat.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, kvmarm@lists.linux.dev, peter.maydell@linaro.org, richard.henderson@linaro.org, alex.bennee@linaro.org, oliver.upton@linux.dev, sebott@redhat.com, shameerali.kolothum.thodi@huawei.com, armbru@redhat.com, berrange@redhat.com, abologna@redhat.com, jdenemar@redhat.com, shahuang@redhat.com, mark.rutland@arm.com, philmd@linaro.org, pbonzini@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Fri, 25 Oct 2024 11:17:33 +0100, Eric Auger wrote: > > Introduce scripts that automate the generation of system register > definitions from a given linux source tree arch/arm64/tools/sysreg. > > Invocation of > ./update-aarch64-sysreg-code.sh $PATH_TO_LINUX_SOURCE_TREE > in scripts directory do generate 2 qemu files: > - target/arm/cpu-sysreg-properties.c > - target/arm/cpu-sysregs.h > > cpu-sysregs.h creates defined for all system registers. > However cpu-sysreg-properties.c only cares about feature ID registers. > > update-aarch64-sysreg-code.sh calls two awk scripts. > gen-cpu-sysreg-properties.awk is inherited from kernel > arch/arm64/tools/gen-sysreg.awk. All credits to Mark Rutland > the original author of this script. You really want to be careful with this. Both the script and the source file describing the registers are submitted to regular outburst of churn (I'm currently sitting on such a series). You really have to be prepared to see things breaking on each import. That file has also been known to contain annoying mistakes, as it is all written by hand. Ideally, this would be directly generated from the ARM XML, which is a public set of files. However, the license attached to this package strictly prohibits its use in QEMU (or anywhere else). One day... Thanks, M. -- Without deviation from the norm, progress is not possible.