From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Andre Przywara <andre.przywara@arm.com>,
Christoffer Dall <cdall@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] target/arm/helper: document potential CNTV register bear trap
Date: Thu, 22 Jun 2017 13:34:42 +0100 [thread overview]
Message-ID: <CAFEAcA_cUBfzUyCs60e3O9TpqyvXTmkU9Uh25EL1Vy23Lw0fXw@mail.gmail.com> (raw)
In-Reply-To: <20170622111845.5296-1-alex.bennee@linaro.org>
On 22 June 2017 at 12:18, Alex Bennée <alex.bennee@linaro.org> wrote:
> The ARM KVM encodings have been inadvertently switched for
> CNTV_CVAL_EL0/CNTVCT_EL0 in the register API since its introduction.
> Fortunately this doesn't currently mater as the reset values for both
> are the same. However if this ever changes things will break in
> interesting ways.
Augh.
> Migration is currently unaffected as we just use
> cpu->cpreg_vmstate_indexes/cpreg_vmstate_values verbatim. However this
> would break if we ever supported migration between KVM and TCG models.
>
> For now we just warn future generations who may touch this code.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Andre Przywara <andre.przywara@arm.com>
> Cc: Christoffer Dall <cdall@linaro.org>
> ---
> target/arm/helper.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 2594faa9b8..e7a0e39583 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -211,6 +211,11 @@ static bool raw_accessors_invalid(const ARMCPRegInfo *ri)
> return true;
> }
>
> +/*
> + * FIXME: the KVM API has switched encodings for
> + * CNTV_CVAL_EL0/CNTVCT_EL0 which need to be fixed if we want to
> + * change the reset values or support KVM<->TCG migration.
> + */
I don't really like just peppering the code with FIXMEs like this.
How much work would it be to determine what the actual required fix
is (whether kernel side or QEMU side) and implement it?
thanks
-- PMM
next prev parent reply other threads:[~2017-06-22 12:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 11:18 [Qemu-devel] [PATCH] target/arm/helper: document potential CNTV register bear trap Alex Bennée
2017-06-22 12:34 ` Peter Maydell [this message]
2017-06-22 13:28 ` Alex Bennée
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=CAFEAcA_cUBfzUyCs60e3O9TpqyvXTmkU9Uh25EL1Vy23Lw0fXw@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=andre.przywara@arm.com \
--cc=cdall@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).