[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qom-cpu for-next 0/2] QOM CPUState, part 12: CPU
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH qom-cpu for-next 0/2] QOM CPUState, part 12: CPU loops, revisited |
Date: |
Wed, 14 Aug 2013 13:49:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Am 30.07.2013 18:55, schrieb Andreas Färber:
> Hello everyone,
>
> A short CPUState series for a change: This mini-series replaces our home-grown
> CPU list (first_cpu global and CPUState::next_cpu) with a QTAILQ.
>
> To avoid repeated QTAILQ_FOREACH(foo, cpus, node) I am proposing a wrapper
> CPU_FOREACH(foo) to hide the implementation details, as requested by mst,
> while keeping inline loops, as requested by Markus.
>
> The bulk of patch 1 is mechanical for/while loop conversions, except for:
> 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.
>
> Patch 2 is controversial: It drops qemu_for_each_cpu() on Markus' request.
> I'm including it as RFC to showcase what exactly those suggestions involve.
> Converting from for (cpu = ...) to CPU_FOREACH(cpu) is obviously much more
> straightforward than converting between function and loop, therefore with
> patch 1 in mind, it seems best to still use for loops, which since recently
> no longer require CPUArchState, the original trigger for qemu_for_each_cpu().
>
> 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
>
> Regards,
> Andreas
>
> 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().
>
> Cc: Markus Armbruster <address@hidden>
> Cc: Michael S. Tsirkin <address@hidden>
> Cc: Anthony Liguori <address@hidden>
> Cc: Blue Swirl <address@hidden>
> Cc: Aurélien Jarno <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Eduardo Habkost <address@hidden>
> Cc: Igor Mammedov <address@hidden>
> Cc: Riku Voipio <address@hidden>
>
> Andreas Färber (2):
> cpu: Use QTAILQ for CPU list
> cpu: Replace qemu_for_each_cpu()
>
> 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(-)
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-devel] [PATCH qom-cpu for-next 0/2] QOM CPUState, part 12: CPU loops, revisited,
Andreas Färber <=