Received: from eggs.gnu.org ([2001:4830:134:3::10]:53021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zherw-0007GI-Sn for qemu-devel@nongnu.org; Thu, 01 Oct 2015 10:30:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zherv-0000Ph-Pw for qemu-devel@nongnu.org; Thu, 01 Oct 2015 10:30:00 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zherv-0000Lw-Ka for qemu-devel@nongnu.org; Thu, 01 Oct 2015 10:29:59 -0400 From: Peter Maydell Date: Thu, 1 Oct 2015 15:29:47 +0100 Message-Id: <1443709790-25180-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v2 0/3] exec.c: avoid iterating through CPUs in tcg_commit() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , "Edgar E. Iglesias" , patches@linaro.org This patchset is a bit of groundwork heading in the direction of supporting multiple AddressSpaces per CPU. It does actually do something useful (handle a FIXME remark in tcg_commit()) so I've put it out for that reason. Patch 1 is just removing an unnecessary call to cpu_reload_memory_map() to make the cleanup a bit easier. Patch 2 is a comment change to clarify what's going on in cpu_reload_memory_map(). Patch 3 is the actual work here: we collect up the fields that were directly in CPUState but relating to our one-and-only AddressSpace, and put them in a new struct CPUAddressSpace CPUState now has a pointer to an array of these (with only one entry for now). The rearrangement lets us fix the tcg_commit() FIXME remark by going directly to the affected CPUState from the MemoryListener pointer rather than having to search all CPUs for it. Changes v1->v2: just rebased. Peter Maydell (3): exec.c: Don't call cpu_reload_memory_map() from cpu_exec_init() cpu-exec-common.c: Clarify comment about cpu_reload_memory_map()'s RCU operations exec.c: Collect AddressSpace related fields into a CPUAddressSpace struct cpu-exec-common.c | 33 ++++++++++++++-------------- exec.c | 57 ++++++++++++++++++++++++++++++++----------------- include/exec/exec-all.h | 2 +- include/qemu/typedefs.h | 1 + include/qom/cpu.h | 7 ++++-- 5 files changed, 62 insertions(+), 38 deletions(-) -- 1.9.1