From: Luc Michel <luc@lmichel.fr>
To: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org,
sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com,
alistair@alistair23.me, richard.henderson@linaro.org,
qemu-devel@nongnu.org, francisco.iglesias@xilinx.com,
frederic.konrad@adacore.com, qemu-arm@nongnu.org
Subject: Re: [PATCH v1 2/6] target/arm: Make rvbar settable after realize
Date: Thu, 3 Feb 2022 21:21:04 +0100 [thread overview]
Message-ID: <Yfw5MBPA0AOPfa3a@sekoia-pc.home.lmichel.fr> (raw)
In-Reply-To: <20220130231206.34035-3-edgar.iglesias@gmail.com>
Hi Edgar,
On 00:12 Mon 31 Jan , Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>
>
> Make the rvbar property settable after realize. This is done
> in preparation to model the ZynqMP's runtime configurable rvbar.
>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
> target/arm/cpu.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/target/arm/cpu.c b/target/arm/cpu.c
> index 5a9c02a256..e30ae088fe 100644
> --- a/target/arm/cpu.c
> +++ b/target/arm/cpu.c
> @@ -1128,9 +1128,6 @@ static Property arm_cpu_reset_cbar_property =
> static Property arm_cpu_reset_hivecs_property =
> DEFINE_PROP_BOOL("reset-hivecs", ARMCPU, reset_hivecs, false);
>
> -static Property arm_cpu_rvbar_property =
> - DEFINE_PROP_UINT64("rvbar", ARMCPU, rvbar, 0);
> -
> #ifndef CONFIG_USER_ONLY
> static Property arm_cpu_has_el2_property =
> DEFINE_PROP_BOOL("has_el2", ARMCPU, has_el2, true);
> @@ -1233,7 +1230,9 @@ void arm_cpu_post_init(Object *obj)
> }
>
> if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
> - qdev_property_add_static(DEVICE(obj), &arm_cpu_rvbar_property);
> + object_property_add_uint64_ptr(obj, "rvbar",
> + &cpu->rvbar,
> + OBJ_PROP_FLAG_READWRITE);
I think you may have a problem here. cpu->rvbar is used to define the
reset value of the rvbar_elx registers in register_cp_regs_for_features.
This is done at realize time. Changing the rvbar property after realize
would fail to update the rvbar_elx register values.
I guess you should also switch to a .readfn instead of a .resetvalue for
those registers.
--
Luc
> }
>
> #ifndef CONFIG_USER_ONLY
> --
> 2.25.1
>
--
next prev parent reply other threads:[~2022-02-03 21:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-30 23:12 [PATCH v1 0/6] hw/arm: zynqmp: Add CRF and APU control to support PSCI Edgar E. Iglesias
2022-01-30 23:12 ` [PATCH v1 1/6] hw/arm/xlnx-zynqmp: Add unimplemented SERDES area Edgar E. Iglesias
2022-01-30 23:37 ` Philippe Mathieu-Daudé via
2022-01-31 15:21 ` Francisco Iglesias
2022-01-31 15:32 ` Peter Maydell
2022-01-31 17:30 ` Edgar E. Iglesias
2022-01-30 23:12 ` [PATCH v1 2/6] target/arm: Make rvbar settable after realize Edgar E. Iglesias
2022-02-03 20:21 ` Luc Michel [this message]
2022-01-30 23:12 ` [PATCH v1 3/6] hw/misc: Add a model of the Xilinx ZynqMP CRF Edgar E. Iglesias
2022-01-30 23:32 ` Philippe Mathieu-Daudé via
2022-01-31 15:35 ` Francisco Iglesias
2022-01-31 17:27 ` Edgar E. Iglesias
2022-01-31 17:51 ` Edgar E. Iglesias
2022-01-30 23:12 ` [PATCH v1 4/6] hw/arm/xlnx-zynqmp: Connect the " Edgar E. Iglesias
2022-01-30 23:33 ` Philippe Mathieu-Daudé via
2022-01-31 15:37 ` Francisco Iglesias
2022-02-03 20:23 ` Luc Michel
2022-01-30 23:12 ` [PATCH v1 5/6] hw/misc: Add a model of the Xilinx ZynqMP APU Control Edgar E. Iglesias
2022-01-30 23:35 ` Philippe Mathieu-Daudé via
2022-01-31 12:17 ` Edgar E. Iglesias
2022-01-31 23:21 ` Philippe Mathieu-Daudé via
2022-01-31 15:46 ` Francisco Iglesias
2022-01-30 23:12 ` [PATCH v1 6/6] hw/arm/xlnx-zynqmp: Connect the " Edgar E. Iglesias
2022-01-30 23:37 ` Philippe Mathieu-Daudé via
2022-01-31 15:48 ` Francisco Iglesias
2022-02-03 20:26 ` Luc Michel
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=Yfw5MBPA0AOPfa3a@sekoia-pc.home.lmichel.fr \
--to=luc@lmichel.fr \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=edgar.iglesias@xilinx.com \
--cc=francisco.iglesias@xilinx.com \
--cc=frasse.iglesias@gmail.com \
--cc=frederic.konrad@adacore.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sai.pavan.boddu@xilinx.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).