[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-cpu v3 0/6] QOM CPUState VMStateDescriptions
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-cpu v3 0/6] QOM CPUState VMStateDescriptions |
Date: |
Mon, 25 Feb 2013 19:22:44 +0100 |
Hello,
In response to patches from Juan [1], this series implements a declarative way
for CPUs to register their CPU-specific VMStateDescription.
v3 dropped alpha and openrisc, leaving only x86 as prereq for my qom-cpu-9 and
lm32 as proof of concept for leave-CPUArchState-untouched-if-not-needed.
Available here:
git://github.com/afaerber/qemu-cpu.git qom-cpu-vmstate.v3
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-vmstate.v3
Preview of QOM CPUState part 9 v2 as follow-up to the x86 patch:
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-9
>From v1:
What triggered this series was moving the halted and interrupt_request fields
from CPU_COMMON to CPUState:
https://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg00203.html
Since both are in vmstate_cpu_common, they needed to be moved together, and
"cpu_common" will need to operate on CPUState then. At the same time x86
can no longer access the halted field from CPUX86State via VMSTATE_ macros,
so either we need to drop uses of such fields (i.e., version 5) or make it
possible to access CPUState fields in x86 VMState through parent_obj field.
Further, in explaining intended uses of S390CPU vs. CPUS390XState I was
reminded that VMState is currently a limiting factor for placing fields into
CPUState-derived types rather than into CPU*State.
Regards,
Andreas
[1] https://lists.nongnu.org/archive/html/qemu-devel/2012-05/msg00524.html
v2 -> v3:
* Inlined vmstate_register() into vmstate.h rather than adding stub (Eduardo).
* Introduced cpu_class_set_vmsd() function/macro (Juan).
=> Lets us drop #include "migration/vmstate.h" in target-lm32/cpu.c.
* Used VMSTATE_STRUCT() to leave CPULM32State unchanged for now (Juan).
* Dropped alpha and openrisc patches.
=> To be redone with DeviceClass::vmsd and embedded cpu_common state.
v1 -> v2:
* Add vmstate_register() and vmstate_dummy stubs to avoid #ifdefs (Eduardo).
Cc: Juan Quintela <address@hidden>
Cc: Michael Roth <address@hidden>
Cc: Anthony Liguori <address@hidden>
Cc: Blue Swirl <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Igor Mammedov <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Michael Walle <address@hidden>
Cc: Jia Liu <address@hidden>
Andreas Färber (6):
vmstate: Make vmstate_register() static inline
stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY
cpu: Register VMStateDescription through CPUState
cpu: Introduce cpu_class_set_vmsd()
target-i386: Update VMStateDescription to X86CPU
target-lm32: Update VMStateDescription to LM32CPU
exec.c | 11 ++-
include/migration/vmstate.h | 16 +++-
include/qom/cpu.h | 20 ++++
savevm.c | 7 --
stubs/vmstate.c | 2 +
target-i386/cpu-qom.h | 4 +
target-i386/cpu.c | 2 +
target-i386/cpu.h | 2 -
target-i386/machine.c | 215 +++++++++++++++++++++----------------------
target-lm32/cpu-qom.h | 4 +
target-lm32/cpu.c | 2 +
target-lm32/cpu.h | 2 -
target-lm32/machine.c | 25 ++---
13 Dateien geändert, 177 Zeilen hinzugefügt(+), 135 Zeilen entfernt(-)
--
1.7.10.4
- [Qemu-devel] [PATCH qom-cpu v3 0/6] QOM CPUState VMStateDescriptions,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-cpu v3 3/6] cpu: Register VMStateDescription through CPUState, Andreas Färber, 2013/02/25
- [Qemu-devel] [PATCH qom-cpu v3 6/6] target-lm32: Update VMStateDescription to LM32CPU, Andreas Färber, 2013/02/25
- [Qemu-devel] [PATCH qom-cpu v3 5/6] target-i386: Update VMStateDescription to X86CPU, Andreas Färber, 2013/02/25
- [Qemu-devel] [PATCH qom-cpu v3 2/6] stubs: Add a vmstate_dummy struct for CONFIG_USER_ONLY, Andreas Färber, 2013/02/25
- [Qemu-devel] [PATCH qom-cpu v3 4/6] cpu: Introduce cpu_class_set_vmsd(), Andreas Färber, 2013/02/25
- [Qemu-devel] [PATCH qom-cpu v3 1/6] vmstate: Make vmstate_register() static inline, Andreas Färber, 2013/02/25