qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/3] exec.c: Collect AddressSpace related fie


From: Richard Henderson
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]