From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9ZZd-00016S-Ev for qemu-devel@nongnu.org; Wed, 14 Aug 2013 07:49:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V9ZZY-0004Kv-Vt for qemu-devel@nongnu.org; Wed, 14 Aug 2013 07:49:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:35316 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V9ZZY-0004Kc-NJ for qemu-devel@nongnu.org; Wed, 14 Aug 2013 07:49:04 -0400 Message-ID: <520B6EAC.10006@suse.de> Date: Wed, 14 Aug 2013 13:49:00 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1375203359-17562-1-git-send-email-afaerber@suse.de> In-Reply-To: <1375203359-17562-1-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu for-next 0/2] QOM CPUState, part 12: CPU loops, revisited List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Riku Voipio , Markus Armbruster , Alexander Graf , Blue Swirl , Anthony Liguori , Paolo Bonzini , Igor Mammedov , =?UTF-8?B?QXVyw6lsaWVuIEphcm5v?= Am 30.07.2013 18:55, schrieb Andreas F=C3=A4rber: > Hello everyone, >=20 > A short CPUState series for a change: This mini-series replaces our hom= e-grown > CPU list (first_cpu global and CPUState::next_cpu) with a QTAILQ. >=20 > To avoid repeated QTAILQ_FOREACH(foo, cpus, node) I am proposing a wrap= per > CPU_FOREACH(foo) to hide the implementation details, as requested by ms= t, > while keeping inline loops, as requested by Markus. >=20 > The bulk of patch 1 is mechanical for/while loop conversions, except fo= r: > exec.c: QTAILQ_INSERT_TAIL() > linux-user/syscall.c: QTAILQ_REMOVE() -- untested! Ping! The 1.7 merge window is approaching and Michael has ack'ed adopting the macros introduced in patch 1/2, but that patch has no review or test reports yet. Riku? Peter? Alex? Latest rebased version on qom-cpu-12 branch. Regards, Andreas > Having such a stable API will help with vCPU hot-unplug. >=20 > Patch 2 is controversial: It drops qemu_for_each_cpu() on Markus' reque= st. > I'm including it as RFC to showcase what exactly those suggestions invo= lve. > Converting from for (cpu =3D ...) to CPU_FOREACH(cpu) is obviously much= more > straightforward than converting between function and loop, therefore wi= th > patch 1 in mind, it seems best to still use for loops, which since rece= ntly > no longer require CPUArchState, the original trigger for qemu_for_each_= cpu(). >=20 > Available for testing at: > git://github.com/afaerber/qemu-cpu.git qom-cpu-12.v1 > https://github.com/afaerber/qemu-cpu/commits/qom-cpu-12.v1 >=20 > Regards, > Andreas >=20 > From CPUState part 10 v1: > * Instead of replacing every loop with qemu_for_each_cpu() > replace loops with CPU_FOREACH() macro, based on QTAILQ_FOREACH(). >=20 > Cc: Markus Armbruster > Cc: Michael S. Tsirkin > Cc: Anthony Liguori > Cc: Blue Swirl > Cc: Aur=C3=A9lien Jarno > Cc: Paolo Bonzini > Cc: Eduardo Habkost > Cc: Igor Mammedov > Cc: Riku Voipio >=20 > Andreas F=C3=A4rber (2): > cpu: Use QTAILQ for CPU list > cpu: Replace qemu_for_each_cpu() >=20 > arch_init.c | 11 ++++----- > cpus.c | 58 ++++++++++++++++++++-------------------= -------- > cputlb.c | 2 +- > dump.c | 10 ++++---- > exec.c | 33 ++++++++------------------- > gdbstub.c | 14 ++++++------ > hw/acpi/piix4.c | 20 ++++++++-------- > hw/arm/boot.c | 2 +- > hw/i386/kvm/clock.c | 2 +- > hw/i386/kvmvapic.c | 2 +- > hw/i386/pc.c | 3 +-- > hw/ppc/e500.c | 2 +- > hw/ppc/ppc.c | 2 +- > hw/ppc/spapr.c | 4 ++-- > include/qom/cpu.h | 20 ++++++++-------- > kvm-all.c | 8 +++---- > linux-user/elfload.c | 2 +- > linux-user/main.c | 10 +++++--- > linux-user/syscall.c | 17 ++------------ > memory_mapping.c | 5 ++-- > monitor.c | 2 +- > qom/cpu.c | 30 ++++++++---------------- > target-i386/helper.c | 3 +-- > target-i386/misc_helper.c | 2 +- > target-mips/op_helper.c | 10 ++++---- > target-ppc/excp_helper.c | 2 +- > translate-all.c | 4 ++-- > 27 files changed, 113 insertions(+), 167 deletions(-) >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg