libxc/migration: Rename TSC_INFO to X86_TSC_INFO
PATCH 1/1 libxc/migration: Rename TSC_INFO to X86_TSC_INFO
This record is specific to x86, and should have had a prefix to being with.
No functional change.
---
CC: George Dunlap <[email protected]>
CC: Ian Jackson <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Konrad Rzeszutek Wilk <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>
CC: Marek Marczykowski-Górecki <[email protected]>
--- docs/specs/libxc-migration-stream.pandoc | 10 +++++----- tools/libxc/xc_sr_common.c | 4 ++-- tools/libxc/xc_sr_common_x86.c | 12 ++++++------ tools/libxc/xc_sr_common_x86.h | 8 ++++---- tools/libxc/xc_sr_restore_x86_hvm.c | 4 ++-- tools/libxc/xc_sr_restore_x86_pv.c | 4 ++-- tools/libxc/xc_sr_save_x86_hvm.c | 2 +- tools/libxc/xc_sr_save_x86_pv.c | 2 +- tools/libxc/xc_sr_stream_format.h | 6 +++--- tools/python/scripts/convert-legacy-stream | 4 ++-- tools/python/xen/migration/libxc.py | 10 +++++----- tools/python/xen/migration/tests.py | 2 +- 12 files changed, 34 insertions(+), 34 deletions(-)
docs/specs/libxc-migration-stream.pandoc +5 -5
@@ -215,7 +215,7 @@ type 0x00000000: END 0x00000007: SHARED_INFO - 0x00000008: TSC_INFO + 0x00000008: X86_TSC_INFO 0x00000009: HVM_CONTEXT
@@ -460,8 +460,8 @@ shared_info Contents of the shared info page. This record \clearpage -TSC_INFO --------- +X86_TSC_INFO +------------ Domain TSC information, as accessed by the XEN_DOMCTL_{get,set}tscinfo hypercall sub-ops.
@@ -646,7 +646,7 @@ A typical save record for an x86 PV guest image would look like: * X86_PV_INFO record * X86_PV_P2M_FRAMES record * Many PAGE_DATA records -* TSC_INFO +* X86_TSC_INFO * SHARED_INFO record * VCPU context records for each online VCPU * X86_PV_VCPU_BASIC record
@@ -672,7 +672,7 @@ A typical save record for an x86 HVM guest image would look like: * Image header * Domain header * Many PAGE_DATA records -* TSC_INFO +* X86_TSC_INFO * HVM_PARAMS * HVM_CONTEXT
tools/libxc/xc_sr_common.c +2 -2
@@ -30,7 +30,7 @@ static const char *mandatory_rec_types[] = [REC_TYPE_X86_PV_VCPU_EXTENDED] = "x86 PV vcpu extended", [REC_TYPE_X86_PV_VCPU_XSAVE] = "x86 PV vcpu xsave", [REC_TYPE_SHARED_INFO] = "Shared info", - [REC_TYPE_TSC_INFO] = "TSC info", + [REC_TYPE_X86_TSC_INFO] = "x86 TSC info", [REC_TYPE_HVM_CONTEXT] = "HVM context", [REC_TYPE_HVM_PARAMS] = "HVM params", [REC_TYPE_TOOLSTACK] = "Toolstack",
@@ -151,7 +151,7 @@ static void __attribute__((unused)) build_assertions(void)BUILD_BUG_ON (sizeof (struct xc_sr_rec_x86_pv_info ) !=8 );BUILD_BUG_ON (sizeof (struct xc_sr_rec_x86_pv_p2m_frames ) !=8 );BUILD_BUG_ON (sizeof (struct xc_sr_rec_x86_pv_vcpu_hdr ) !=8 ); -BUILD_BUG_ON (sizeof (struct xc_sr_rec_tsc_info ) !=24 ); +BUILD_BUG_ON (sizeof (struct xc_sr_rec_x86_tsc_info ) !=24 );BUILD_BUG_ON (sizeof (struct xc_sr_rec_hvm_params_entry ) !=16 );BUILD_BUG_ON (sizeof (struct xc_sr_rec_hvm_params ) !=8 ); }
tools/libxc/xc_sr_common_x86.c +6 -6
@@ -1,12 +1,12 @@#include "xc_sr_common_x86.h" -int write_tsc_info (struct xc_sr_context *ctx) +int write_x86_tsc_info (struct xc_sr_context *ctx) {xc_interface *xch = ctx->xch; -struct xc_sr_rec_tsc_info tsc = {0 }; +struct xc_sr_rec_x86_tsc_info tsc = {};struct xc_sr_record rec = { - .type =REC_TYPE_TSC_INFO , + .type =REC_TYPE_X86_TSC_INFO , .length =sizeof (tsc), .data = &tsc };
@@ -21,14 +21,14 @@ int write_tsc_info(struct xc_sr_context *ctx)return write_record (ctx, &rec); } -int handle_tsc_info (struct xc_sr_context *ctx,struct xc_sr_record *rec) +int handle_x86_tsc_info (struct xc_sr_context *ctx,struct xc_sr_record *rec) {xc_interface *xch = ctx->xch; -struct xc_sr_rec_tsc_info *tsc = rec->data; +struct xc_sr_rec_x86_tsc_info *tsc = rec->data;if ( rec->length !=sizeof (*tsc) ) { -ERROR ("TSC_INFO record wrong size: length %u, expected %zu" , +ERROR ("X86_TSC_INFO record wrong size: length %u, expected %zu" , rec->length,sizeof (*tsc));return -1 ; }
tools/libxc/xc_sr_common_x86.h +4 -4
@@ -4,15 +4,15 @@#include "xc_sr_common.h" /* -* Obtains a domains TSC information from Xen and writes a TSC_INFO record +* Obtains a domains TSC information from Xen and writes a X86_TSC_INFO record * into the stream. */ -int write_tsc_info (struct xc_sr_context *ctx); +int write_x86_tsc_info (struct xc_sr_context *ctx);/* -* Parses a TSC_INFO record and applies the result to the domain. +* Parses a X86_TSC_INFO record and applies the result to the domain. */ -int handle_tsc_info (struct xc_sr_context *ctx,struct xc_sr_record *rec); +int handle_x86_tsc_info (struct xc_sr_context *ctx,struct xc_sr_record *rec);#endif /*
tools/libxc/xc_sr_restore_x86_hvm.c +2 -2
@@ -171,8 +171,8 @@ static int x86_hvm_process_record(struct xc_sr_context *ctx, {switch ( rec->type ) { -case REC_TYPE_TSC_INFO : -return handle_tsc_info (ctx, rec); +case REC_TYPE_X86_TSC_INFO : +return handle_x86_tsc_info (ctx, rec);case REC_TYPE_HVM_CONTEXT :return handle_hvm_context (ctx, rec);
tools/libxc/xc_sr_restore_x86_pv.c +2 -2
@@ -1098,8 +1098,8 @@ static int x86_pv_process_record(struct xc_sr_context *ctx,case REC_TYPE_SHARED_INFO :return handle_shared_info (ctx, rec); -case REC_TYPE_TSC_INFO : -return handle_tsc_info (ctx, rec); +case REC_TYPE_X86_TSC_INFO : +return handle_x86_tsc_info (ctx, rec);default :return RECORD_NOT_PROCESSED ;
tools/libxc/xc_sr_save_x86_hvm.c +1 -1
@@ -195,7 +195,7 @@ static int x86_hvm_end_of_checkpoint(struct xc_sr_context *ctx)int rc;/* Write the TSC record. */ - rc =write_tsc_info (ctx); + rc =write_x86_tsc_info (ctx);if ( rc )return rc;
tools/libxc/xc_sr_save_x86_pv.c +1 -1
@@ -1104,7 +1104,7 @@ static int x86_pv_end_of_checkpoint(struct xc_sr_context *ctx) {int rc; - rc =write_tsc_info (ctx); + rc =write_x86_tsc_info (ctx);if ( rc )return rc;
tools/libxc/xc_sr_stream_format.h +3 -3
@@ -68,7 +68,7 @@ struct xc_sr_rhdr#define REC_TYPE_X86_PV_VCPU_EXTENDED 0x00000005U#define REC_TYPE_X86_PV_VCPU_XSAVE 0x00000006U#define REC_TYPE_SHARED_INFO 0x00000007U -#define REC_TYPE_TSC_INFO 0x00000008U +#define REC_TYPE_X86_TSC_INFO 0x00000008U#define REC_TYPE_HVM_CONTEXT 0x00000009U#define REC_TYPE_HVM_PARAMS 0x0000000aU#define REC_TYPE_TOOLSTACK 0x0000000bU
@@ -114,8 +114,8 @@ struct xc_sr_rec_x86_pv_vcpu_hdruint8_t context[0 ]; }; -/* TSC_INFO */ -struct xc_sr_rec_tsc_info +/* X86_TSC_INFO */ +struct xc_sr_rec_x86_tsc_info {uint32_t mode;uint32_t khz;
tools/python/scripts/convert-legacy-stream +2 -2
@@ -153,7 +153,7 @@ def write_page_data(pfns, pages): def write_libxc_tsc_info(mode, khz, nsec, incarn): write_record(libxc.REC_TYPE_tsc_info, - pack(libxc.TSC_INFO_FORMAT, + pack(libxc.X86_TSC_INFO_FORMAT, mode, khz, nsec, incarn, 0)) def write_libxc_hvm_params(params):
@@ -435,7 +435,7 @@ def read_chunks(vm): elif marker == legacy.CHUNK_tsc_info: mode, nsec, khz, incarn = unpack_exact("=IQII") - info(" TSC_INFO: mode %s, %d ns, %d khz, %d incarn" + info(" X86_TSC_INFO: mode %s, %d ns, %d khz, %d incarn" % (mode, nsec, khz, incarn)) write_libxc_tsc_info(mode, khz, nsec, incarn)
tools/python/xen/migration/libxc.py +5 -5
@@ -109,8 +109,8 @@ # x86_pv_vcpu_{basic,extended,xsave,msrs} X86_PV_VCPU_HDR_FORMAT = "II" -# tsc_info -TSC_INFO_FORMAT = "IIQII" +# x86_tsc_info +X86_TSC_INFO_FORMAT = "IIQII" # hvm_params HVM_PARAMS_ENTRY_FORMAT = "QQ"
@@ -354,15 +354,15 @@ def verify_record_shared_info(self, content): def verify_record_tsc_info(self, content): """ tsc info record """ - sz = calcsize(TSC_INFO_FORMAT) + sz = calcsize(X86_TSC_INFO_FORMAT) if len(content) != sz: raise RecordError("Length should be %u bytes" % (sz, )) - mode, khz, nsec, incarn, res1 = unpack(TSC_INFO_FORMAT, content) + mode, khz, nsec, incarn, res1 = unpack(X86_TSC_INFO_FORMAT, content) if res1 != 0: - raise StreamError("Reserved bits set in TSC_INFO: 0x%08x" + raise StreamError("Reserved bits set in X86_TSC_INFO: 0x%08x" % (res1, )) self.info(" Mode %u, %u kHz, %u ns, incarnation %d"
tools/python/xen/migration/tests.py +1 -1
@@ -23,7 +23,7 @@ def test_format_sizes(self): (libxc.X86_PV_INFO_FORMAT, 8), (libxc.X86_PV_P2M_FRAMES_FORMAT, 8), (libxc.X86_PV_VCPU_HDR_FORMAT, 8), - (libxc.TSC_INFO_FORMAT, 24), + (libxc.X86_TSC_INFO_FORMAT, 24), (libxc.HVM_PARAMS_ENTRY_FORMAT, 16), (libxc.HVM_PARAMS_FORMAT, 8), ):
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Andrew Cooper writes ("[PATCH] libxc/migration: Rename TSC_INFO to X86_TSC_INFO"):
Quoted 1 line
This record is specific to x86, and should have had a prefix to being with.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel