From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
patches@linaro.org,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] exec.c: Collect AddressSpace related fields into a CPUAddressSpace struct
Date: Wed, 7 Oct 2015 20:57:12 +1100 [thread overview]
Message-ID: <5614EC78.3090109@twiddle.net> (raw)
In-Reply-To: <1443709790-25180-4-git-send-email-peter.maydell@linaro.org>
On 10/02/2015 12:29 AM, Peter Maydell wrote:
> + cpu->cpu_ases = g_new0(CPUAddressSpace, 1);
> + cpu->cpu_ases[0].cpu = cpu;
> + cpu->cpu_ases[0].as = as;
> + cpu->cpu_ases[0].tcg_as_listener.commit = tcg_commit;
> + memory_listener_register(&cpu->cpu_ases[0].tcg_as_listener, as);
> }
What's the plan when it's more than one?
Just thinking about why separate allocation vs embedding an array. Though
possibly with the CPUState member being a pointer to an array within the
TargetCPUClass, or CPUTargetState. Dunno.
All that said, what you've got works.
r~
next prev parent reply other threads:[~2015-10-07 9:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 14:29 [Qemu-devel] [PATCH v2 0/3] exec.c: avoid iterating through CPUs in tcg_commit() Peter Maydell
2015-10-01 14:29 ` [Qemu-devel] [PATCH v2 1/3] exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init() Peter Maydell
2015-10-01 14:29 ` [Qemu-devel] [PATCH v2 2/3] cpu-exec-common.c: Clarify comment about cpu_reload_memory_map()'s RCU operations Peter Maydell
2015-10-01 14:29 ` [Qemu-devel] [PATCH v2 3/3] exec.c: Collect AddressSpace related fields into a CPUAddressSpace struct Peter Maydell
2015-10-03 20:45 ` Edgar E. Iglesias
2015-10-07 9:57 ` Richard Henderson [this message]
2015-10-07 21:13 ` Peter Maydell
2015-10-07 21:39 ` Richard Henderson
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=5614EC78.3090109@twiddle.net \
--to=rth@twiddle.net \
--cc=edgar.iglesias@gmail.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--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).