diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2016-02-09 09:28:58 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-02-17 09:59:30 +1100 |
commit | 715c54071a43ab978dc12b9da22a5016203ed284 (patch) | |
tree | e94539962f1fa2894ce2a5bd150a9a2913ead835 /include | |
parent | 808bc3b069fdb5fc660f89e6bc7774eeefdc97ea (diff) | |
download | qemu-715c54071a43ab978dc12b9da22a5016203ed284.zip qemu-715c54071a43ab978dc12b9da22a5016203ed284.tar.gz qemu-715c54071a43ab978dc12b9da22a5016203ed284.tar.bz2 |
pseries: Simplify handling of the hash page table fd
When migrating the 'pseries' machine type with KVM, we use a special fd
to access the hash page table stored within KVM. Usually, this fd is
opened at the beginning of migration, and kept open until the migration
is complete.
However, if there is a guest reset during the migration, the fd can become
stale and we need to re-open it. At the moment we use an 'htab_fd_stale'
flag in sPAPRMachineState to signal this, which is checked in the migration
iterators.
But that's rather ugly. It's simpler to just close and invalidate the
fd on reset, and lazily re-open it in migration if necessary. This patch
implements that change.
This requires a small addition to the machine state's instance_init,
so that htab_fd is initialized to -1 (telling the migration code it
needs to open it) instead of 0, which could be a valid fd.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/ppc/spapr.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 1f9e722..098d85d 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -72,7 +72,6 @@ struct sPAPRMachineState { int htab_save_index; bool htab_first_pass; int htab_fd; - bool htab_fd_stale; /* RTAS state */ QTAILQ_HEAD(, sPAPRConfigureConnectorState) ccs_list; |