From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjlTS-0005J6-Oj for qemu-devel@nongnu.org; Wed, 07 Oct 2015 05:57:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjlTP-0004l1-Jt for qemu-devel@nongnu.org; Wed, 07 Oct 2015 05:57:26 -0400 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:34012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjlTP-0004kk-DU for qemu-devel@nongnu.org; Wed, 07 Oct 2015 05:57:23 -0400 Received: by padhy16 with SMTP id hy16so17099354pad.1 for ; Wed, 07 Oct 2015 02:57:22 -0700 (PDT) Sender: Richard Henderson References: <1443709790-25180-1-git-send-email-peter.maydell@linaro.org> <1443709790-25180-4-git-send-email-peter.maydell@linaro.org> From: Richard Henderson Message-ID: <5614EC78.3090109@twiddle.net> Date: Wed, 7 Oct 2015 20:57:12 +1100 MIME-Version: 1.0 In-Reply-To: <1443709790-25180-4-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 3/3] exec.c: Collect AddressSpace related fields into a CPUAddressSpace struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Paolo Bonzini , patches@linaro.org, "Edgar E. Iglesias" 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~