[v2,00/17] Support CPUID/MSR data in migration streams
mbox series

Message ID 20200127143444.25538-1-andrew.cooper3@citrix.com
Headers show
Series
  • Support CPUID/MSR data in migration streams
Related show

Message

Andrew Cooper Jan. 27, 2020, 2:34 p.m. UTC
Here is v2 of the work to plumb CPUID/MSR data into the migration stream.

Patches 1 and 2 are cleanup.  3-8 are concerned with introducing the
STATIC_DATA_END record.  9-11 are some libxl work to reposition CPUID
construction during domain create.  12-14 are the introduction of the
X86_{CPUID,MSR}_DATA records, and 15-17 are the final adjustments in libxc and
libxl to use them.

This series does have a net change in behaviour for CPUID handing in migrated
domains.  See patch 16 for details.

Some acks are carried forwards from the v1 review.  Others are not.  The
majority change has been to shuffle the order of actions to hopefully make the
logic much more clear to follow.

~Andrew

Andrew Cooper (17):
  tools/libxl: Remove libxl_cpuid_{set,apply_policy}() from the API
  tools/libxl: Simplify callback handling in libxl-save-helper
  tools/migration: Drop IHDR_VERSION constant from libxc and python
  docs/migration Specify migration v3 and STATIC_DATA_END
  python/migration: Update validation logic to understand a v3 stream
  libxc/restore: Support v3 streams and handle STATIC_DATA_END
  libxc/restore: STATIC_DATA_END inference for v2 compatibility
  libxc/save: Write a v3 stream
  tools/libxl: Provide a static_data_done callback for domain restore
  tools/libxl: Plumb a restore boolean down into libxl__build_pre()
  tools/libxl: Re-position CPUID handling during domain construction
  docs/migration: Specify X86_{CPUID,MSR}_POLICY records
  libxc/restore: Handle X86_{CPUID,MSR}_DATA records
  libxc/save: Write X86_{CPUID,MSR}_DATA records
  tools/libx[cl]: Plumb 'missing' through static_data_done() up into libxl
  tools/libxc: Restore CPUID/MSR data found in the migration stream
  docs/xl.cfg: Rewrite cpuid= section

 docs/man/xl.cfg.5.pod.in                   |  74 +++++++++++++-----
 docs/specs/libxc-migration-stream.pandoc   |  81 ++++++++++++++++++-
 tools/libxc/include/xenguest.h             |  11 +++
 tools/libxc/xc_cpuid_x86.c                 |   8 +-
 tools/libxc/xc_sr_common.c                 |   3 +
 tools/libxc/xc_sr_common.h                 |  35 ++++++++-
 tools/libxc/xc_sr_common_x86.c             | 120 +++++++++++++++++++++++++++++
 tools/libxc/xc_sr_common_x86.h             |  25 ++++++
 tools/libxc/xc_sr_restore.c                |  61 ++++++++++++++-
 tools/libxc/xc_sr_restore_x86_hvm.c        |  10 +++
 tools/libxc/xc_sr_restore_x86_pv.c         |  27 +++++++
 tools/libxc/xc_sr_save.c                   |  20 ++++-
 tools/libxc/xc_sr_save_x86_hvm.c           |   6 ++
 tools/libxc/xc_sr_save_x86_pv.c            |  14 +++-
 tools/libxc/xc_sr_stream_format.h          |   4 +-
 tools/libxl/libxl.h                        |  26 ++++++-
 tools/libxl/libxl_cpuid.c                  |   6 +-
 tools/libxl/libxl_create.c                 |  37 ++++++++-
 tools/libxl/libxl_dm.c                     |   2 +-
 tools/libxl/libxl_dom.c                    |  20 +++--
 tools/libxl/libxl_internal.h               |  10 ++-
 tools/libxl/libxl_nocpuid.c                |   6 +-
 tools/libxl/libxl_save_helper.c            |  16 ++--
 tools/libxl/libxl_save_msgs_gen.pl         |   3 +-
 tools/python/scripts/convert-legacy-stream |  13 +++-
 tools/python/scripts/verify-stream-v2      |   2 +-
 tools/python/xen/migration/libxc.py        |  74 ++++++++++++++++--
 27 files changed, 635 insertions(+), 79 deletions(-)