mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
pseries: savevm support for pseries machine
This adds the necessary pieces to implement savevm / migration for the pseries machine. The most complex part here is migrating the hash table - for the paravirtualized pseries machine the guest's hash page table is not stored within guest memory, but externally and the guest accesses it via hypercalls. This patch uses a hypervisor reserved bit of the HPTE as a dirty bit (tracking changes to the HPTE itself, not the page it references). This is used to implement a live migration style incremental save and restore of the hash table contents. Normally a hash table is 16MB but it can get bigger depending on how much RAM the guest has. Due to its nature, updates to it are random so the live migration style is used for it. In addition it adds VMStateDescription information to save and restore the (few) remaining pieces of state information needed by the pseries machine. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374175984-8930-9-git-send-email-aliguori@us.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
1168ec7da1
commit
4be21d561d
3 changed files with 281 additions and 8 deletions
|
@ -9,6 +9,8 @@ struct sPAPRPHBState;
|
|||
struct sPAPRNVRAM;
|
||||
struct icp_state;
|
||||
|
||||
#define HPTE64_V_HPTE_DIRTY 0x0000000000000040ULL
|
||||
|
||||
typedef struct sPAPREnvironment {
|
||||
struct VIOsPAPRBus *vio_bus;
|
||||
QLIST_HEAD(, sPAPRPHBState) phbs;
|
||||
|
@ -17,20 +19,24 @@ typedef struct sPAPREnvironment {
|
|||
|
||||
hwaddr ram_limit;
|
||||
void *htab;
|
||||
long htab_shift;
|
||||
uint32_t htab_shift;
|
||||
hwaddr rma_size;
|
||||
int vrma_adjust;
|
||||
hwaddr fdt_addr, rtas_addr;
|
||||
long rtas_size;
|
||||
void *fdt_skel;
|
||||
target_ulong entry_point;
|
||||
int next_irq;
|
||||
int rtc_offset;
|
||||
uint32_t next_irq;
|
||||
uint64_t rtc_offset;
|
||||
char *cpu_model;
|
||||
bool has_graphics;
|
||||
|
||||
uint32_t epow_irq;
|
||||
Notifier epow_notifier;
|
||||
|
||||
/* Migration state */
|
||||
int htab_save_index;
|
||||
bool htab_first_pass;
|
||||
} sPAPREnvironment;
|
||||
|
||||
#define H_SUCCESS 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue