diff options
author | Alexey Kardashevskiy | 2014-05-01 12:37:09 +0200 |
---|---|---|
committer | Alexander Graf | 2014-06-16 13:24:35 +0200 |
commit | 98a8b52442d3e35c640f21d79cf9551a2e408073 (patch) | |
tree | af80029a8bb77a66768b6671950e1b00a3e441df /include | |
parent | PPC: e500: Move to u-boot as firmware (diff) | |
download | qemu-98a8b52442d3e35c640f21d79cf9551a2e408073.tar.gz qemu-98a8b52442d3e35c640f21d79cf9551a2e408073.tar.xz qemu-98a8b52442d3e35c640f21d79cf9551a2e408073.zip |
spapr: Add support for time base offset migration
This allows guests to have a different timebase origin from the host.
This is needed for migration, where a guest can migrate from one host
to another and the two hosts might have a different timebase origin.
However, the timebase seen by the guest must not go backwards, and
should go forwards only by a small amount corresponding to the time
taken for the migration.
This is only supported for recent POWER hardware which has the TBU40
(timebase upper 40 bits) register. That includes POWER6, 7, 8 but not
970.
This adds kvm_access_one_reg() to access a special register which is not
in env->spr. This requires kvm_set_one_reg/kvm_get_one_reg patch.
The feature must be present in the host kernel.
This bumps vmstate_spapr::version_id and enables new vmstate_ppc_timebase
only for it. Since the vmstate_spapr::minimum_version_id remains
unchanged, migration from older QEMU is supported but without
vmstate_ppc_timebase.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/ppc/spapr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 5fdac1e009..9f8bb89600 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -29,6 +29,7 @@ typedef struct sPAPREnvironment { target_ulong entry_point; uint32_t next_irq; uint64_t rtc_offset; + struct PPCTimebase tb; bool has_graphics; uint32_t epow_irq; |