From: Claudio Fontana <cfontana@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: target/arm: "define_arm_cp_regs" and similar for KVM
Date: Tue, 2 Mar 2021 13:04:07 +0100 [thread overview]
Message-ID: <1bd1bf6c-7139-74f1-7579-78895f5f554d@suse.de> (raw)
In-Reply-To: <CAFEAcA9V9vtCeH9=PWdsab7iFA1YxdgB2F6ocLP0COjjP39YVQ@mail.gmail.com>
On 3/2/21 1:02 PM, Peter Maydell wrote:
> On Fri, 26 Feb 2021 at 17:27, Claudio Fontana <cfontana@suse.de> wrote:
>>
>> Hi Peter,
>>
>> I am trying to find out how to split properly KVM and TCG in target/arm, among other things.
>>
>> I skipped or stubbed all define_arm_cp_regs and similar functions,
>>
>> and made a cpregs module that is TCG-only.
>>
>> Thought it is fine, as we have a kvm_arm_init_cpreg_list that throws away everything TCG-related anyway later:
>>
>> target/arm/kvm.c:
>>
>> /* Initialize the ARMCPU cpreg list according to the kernel's
>> * definition of what CPU registers it knows about (and throw away
>> * the previous TCG-created cpreg list).
>> */
>> int kvm_arm_init_cpreg_list(ARMCPU *cpu)
>
> It throws away the cpreg *list*, but not the cpreg hash table.
> That is, we trust KVM for "what sysregs exist and need to be migrated"
> but we still
> use the hashtable to find out what QEMU thinks about them and where it stores
> them in the CPU state structure if it knows about them. So you still
> need to keep the
> define_arm_cp_regs stuff to register sysregs. Not doing so will break
> any bits of the
> code which rely on being able to do "synchronize kernel's idea of
> sysreg state to
> QEMU" and then "read the register value out of the CPU state struct". It'll also
> break visibility of sysregs in the gdbstub.
>
> thanks
> -- PMM
>
Thanks for the confirmation Peter,
I ended up doing that.
Thanks,
Claudio
prev parent reply other threads:[~2021-03-02 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-26 17:27 target/arm: "define_arm_cp_regs" and similar for KVM Claudio Fontana
2021-03-02 12:02 ` Peter Maydell
2021-03-02 12:04 ` Claudio Fontana [this message]
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=1bd1bf6c-7139-74f1-7579-78895f5f554d@suse.de \
--to=cfontana@suse.de \
--cc=peter.maydell@linaro.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).