From nobody Sat May 4 18:03:07 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1576863104; cv=none; d=zohomail.com; s=zohoarc; b=BiCZtiLX3t9qjORU5kygrwhlvy/y/kHG9FxokIypFmIzS1u2KxIR4QymSnC533x5/kcPe5FDF3fXvU8M3KJEV8oDlvw/5RXfh8jZH/No2Bx0Oln4sflwVrbg4XjnXLCCM/pA/0Z7GE6BJJLOU2YR/bhVatKwGy7QqNzyzFiORuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576863104; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=wFV7nhoF094aVTz4DboS486Ck3SyA5N5j9z1d2GIz/8=; b=G9v0xCjfDKmZMIU/hWBQhSio8eFqvc/BjGzDyD5UCWGPdnd3CSYyFtEhA6LspJ8WHYitnUKOCuv5AG39CKcSbn2sJRFRMNPihuu4CF56dEdL0vlU8lGZubWfhFrpE6MyVsOnIvLc5WpeFbm8xbp3KgyKq1LTcmd2CgqIoYjhCkE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1576863104495546.4616671652271; Fri, 20 Dec 2019 09:31:44 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iiM79-0008SE-0f; Fri, 20 Dec 2019 17:30:59 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iiM77-0008S7-Iq for xen-devel@lists.xenproject.org; Fri, 20 Dec 2019 17:30:57 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 75b007e8-234e-11ea-a914-bc764e2007e4; Fri, 20 Dec 2019 17:30:48 +0000 (UTC) X-Inumbo-ID: 75b007e8-234e-11ea-a914-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1576863048; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b1QM/hrwUoBtYdRqa+o2vzHZ8dLMRzukDOG9/QYP+5w=; b=CLPTYjXF7HBipy7VejlxvO0wJnSalU6J71JTkLB4XRxnwEUU0GRsNMRy mGZYhoTv+QnLS1C5muI28BIa7RJV3XTkzvIa3tFi/SWWTsG1VsPDxj38T 5LR2jHn8rFoiKMLOkcYNrjPsI6q9/LSN1F2XgaG1TXKGYzbgNYO8KLTDO A=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa4.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: evg/ZR5xkshV6liSbTEcd3fotqPPlT5biMKeh32vwwgLOAHNDHzrW6chSR3ldw00NKRRb6alE3 wONw48FSYwLU1GCLRyIIw0fJPFtit+Zg7CSmzHcQVh/SEPGgiEQM1w9LtWynTGuPzPEXQR9vof fKFniHrEgy1XJAeRSdPXzVFw1D27y5PALe5ImeP+3A1l8Bbkh0nT+lMwjX1XuwxavQGRuLBeiX mYRjj3MUSNk6xvejq9XjrxG8HYrwIz9jUjZMfLgUuZOKWuHYUsLpdDDix/OwME9RPB0yUDxgHP +AM= X-SBRS: 2.7 X-MesageID: 10591013 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,336,1571716800"; d="scan'208";a="10591013" From: Andrew Cooper To: Xen-devel Date: Fri, 20 Dec 2019 17:30:44 +0000 Message-ID: <20191220173044.12714-1-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] libxc/migration: Rename TSC_INFO to X86_TSC_INFO X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Jan Beulich , Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This record is specific to x86, and should have had a prefix to being with. No functional change. Signed-off-by: Andrew Cooper Acked-by: Ian Jackson --- CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Konrad Rzeszutek Wilk CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Marek Marczykowski-G=C3=B3recki --- 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(-) diff --git a/docs/specs/libxc-migration-stream.pandoc b/docs/specs/libxc-mi= gration-stream.pandoc index a365dba0c8..313be3e80d 100644 --- a/docs/specs/libxc-migration-stream.pandoc +++ b/docs/specs/libxc-migration-stream.pandoc @@ -215,7 +215,7 @@ type 0x00000000: END =20 0x00000007: SHARED_INFO =20 - 0x00000008: TSC_INFO + 0x00000008: X86_TSC_INFO =20 0x00000009: HVM_CONTEXT =20 @@ -460,8 +460,8 @@ shared_info Contents of the shared info page. Thi= s record =20 \clearpage =20 -TSC_INFO --------- +X86_TSC_INFO +------------ =20 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 l= ook 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 =20 diff --git a/tools/libxc/xc_sr_common.c b/tools/libxc/xc_sr_common.c index 6b887b3053..370d98d94a 100644 --- a/tools/libxc/xc_sr_common.c +++ b/tools/libxc/xc_sr_common.c @@ -30,7 +30,7 @@ static const char *mandatory_rec_types[] =3D [REC_TYPE_X86_PV_VCPU_EXTENDED] =3D "x86 PV vcpu extended", [REC_TYPE_X86_PV_VCPU_XSAVE] =3D "x86 PV vcpu xsave", [REC_TYPE_SHARED_INFO] =3D "Shared info", - [REC_TYPE_TSC_INFO] =3D "TSC info", + [REC_TYPE_X86_TSC_INFO] =3D "x86 TSC info", [REC_TYPE_HVM_CONTEXT] =3D "HVM context", [REC_TYPE_HVM_PARAMS] =3D "HVM params", [REC_TYPE_TOOLSTACK] =3D "Toolstack", @@ -151,7 +151,7 @@ static void __attribute__((unused)) build_assertions(vo= id) BUILD_BUG_ON(sizeof(struct xc_sr_rec_x86_pv_info) !=3D 8); BUILD_BUG_ON(sizeof(struct xc_sr_rec_x86_pv_p2m_frames) !=3D 8); BUILD_BUG_ON(sizeof(struct xc_sr_rec_x86_pv_vcpu_hdr) !=3D 8); - BUILD_BUG_ON(sizeof(struct xc_sr_rec_tsc_info) !=3D 24); + BUILD_BUG_ON(sizeof(struct xc_sr_rec_x86_tsc_info) !=3D 24); BUILD_BUG_ON(sizeof(struct xc_sr_rec_hvm_params_entry) !=3D 16); BUILD_BUG_ON(sizeof(struct xc_sr_rec_hvm_params) !=3D 8); } diff --git a/tools/libxc/xc_sr_common_x86.c b/tools/libxc/xc_sr_common_x86.c index 98f1cef30f..1dee840a03 100644 --- a/tools/libxc/xc_sr_common_x86.c +++ b/tools/libxc/xc_sr_common_x86.c @@ -1,12 +1,12 @@ #include "xc_sr_common_x86.h" =20 -int write_tsc_info(struct xc_sr_context *ctx) +int write_x86_tsc_info(struct xc_sr_context *ctx) { xc_interface *xch =3D ctx->xch; - struct xc_sr_rec_tsc_info tsc =3D { 0 }; + struct xc_sr_rec_x86_tsc_info tsc =3D {}; struct xc_sr_record rec =3D { - .type =3D REC_TYPE_TSC_INFO, + .type =3D REC_TYPE_X86_TSC_INFO, .length =3D sizeof(tsc), .data =3D &tsc }; @@ -21,14 +21,14 @@ int write_tsc_info(struct xc_sr_context *ctx) return write_record(ctx, &rec); } =20 -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 *re= c) { xc_interface *xch =3D ctx->xch; - struct xc_sr_rec_tsc_info *tsc =3D rec->data; + struct xc_sr_rec_x86_tsc_info *tsc =3D rec->data; =20 if ( rec->length !=3D 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; } diff --git a/tools/libxc/xc_sr_common_x86.h b/tools/libxc/xc_sr_common_x86.h index 1d42da9af2..ebc4355bd1 100644 --- a/tools/libxc/xc_sr_common_x86.h +++ b/tools/libxc/xc_sr_common_x86.h @@ -4,15 +4,15 @@ #include "xc_sr_common.h" =20 /* - * 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 re= cord * into the stream. */ -int write_tsc_info(struct xc_sr_context *ctx); +int write_x86_tsc_info(struct xc_sr_context *ctx); =20 /* - * 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 *re= c); =20 #endif /* diff --git a/tools/libxc/xc_sr_restore_x86_hvm.c b/tools/libxc/xc_sr_restor= e_x86_hvm.c index 9763aaa8dc..4a24dc0137 100644 --- a/tools/libxc/xc_sr_restore_x86_hvm.c +++ b/tools/libxc/xc_sr_restore_x86_hvm.c @@ -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); =20 case REC_TYPE_HVM_CONTEXT: return handle_hvm_context(ctx, rec); diff --git a/tools/libxc/xc_sr_restore_x86_pv.c b/tools/libxc/xc_sr_restore= _x86_pv.c index 70b8d2ad95..b64f79d4d5 100644 --- a/tools/libxc/xc_sr_restore_x86_pv.c +++ b/tools/libxc/xc_sr_restore_x86_pv.c @@ -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); =20 - case REC_TYPE_TSC_INFO: - return handle_tsc_info(ctx, rec); + case REC_TYPE_X86_TSC_INFO: + return handle_x86_tsc_info(ctx, rec); =20 default: return RECORD_NOT_PROCESSED; diff --git a/tools/libxc/xc_sr_save_x86_hvm.c b/tools/libxc/xc_sr_save_x86_= hvm.c index 97a8c49807..90ff35a439 100644 --- a/tools/libxc/xc_sr_save_x86_hvm.c +++ b/tools/libxc/xc_sr_save_x86_hvm.c @@ -195,7 +195,7 @@ static int x86_hvm_end_of_checkpoint(struct xc_sr_conte= xt *ctx) int rc; =20 /* Write the TSC record. */ - rc =3D write_tsc_info(ctx); + rc =3D write_x86_tsc_info(ctx); if ( rc ) return rc; =20 diff --git a/tools/libxc/xc_sr_save_x86_pv.c b/tools/libxc/xc_sr_save_x86_p= v.c index e4b099cfd0..09b6efeee3 100644 --- a/tools/libxc/xc_sr_save_x86_pv.c +++ b/tools/libxc/xc_sr_save_x86_pv.c @@ -1104,7 +1104,7 @@ static int x86_pv_end_of_checkpoint(struct xc_sr_cont= ext *ctx) { int rc; =20 - rc =3D write_tsc_info(ctx); + rc =3D write_x86_tsc_info(ctx); if ( rc ) return rc; =20 diff --git a/tools/libxc/xc_sr_stream_format.h b/tools/libxc/xc_sr_stream_f= ormat.h index 15ff1c7efb..051afa7dcd 100644 --- a/tools/libxc/xc_sr_stream_format.h +++ b/tools/libxc/xc_sr_stream_format.h @@ -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_hdr uint8_t context[0]; }; =20 -/* TSC_INFO */ -struct xc_sr_rec_tsc_info +/* X86_TSC_INFO */ +struct xc_sr_rec_x86_tsc_info { uint32_t mode; uint32_t khz; diff --git a/tools/python/scripts/convert-legacy-stream b/tools/python/scri= pts/convert-legacy-stream index 6b68ef5923..a5da30b1ce 100755 --- a/tools/python/scripts/convert-legacy-stream +++ b/tools/python/scripts/convert-legacy-stream @@ -153,7 +153,7 @@ def write_page_data(pfns, pages): =20 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)) =20 def write_libxc_hvm_params(params): @@ -435,7 +435,7 @@ def read_chunks(vm): =20 elif marker =3D=3D legacy.CHUNK_tsc_info: mode, nsec, khz, incarn =3D unpack_exact("=3DIQII") - 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) =20 diff --git a/tools/python/xen/migration/libxc.py b/tools/python/xen/migrati= on/libxc.py index 0a329c2090..70bcb8d15b 100644 --- a/tools/python/xen/migration/libxc.py +++ b/tools/python/xen/migration/libxc.py @@ -109,8 +109,8 @@ # x86_pv_vcpu_{basic,extended,xsave,msrs} X86_PV_VCPU_HDR_FORMAT =3D "II" =20 -# tsc_info -TSC_INFO_FORMAT =3D "IIQII" +# x86_tsc_info +X86_TSC_INFO_FORMAT =3D "IIQII" =20 # hvm_params HVM_PARAMS_ENTRY_FORMAT =3D "QQ" @@ -354,15 +354,15 @@ def verify_record_shared_info(self, content): def verify_record_tsc_info(self, content): """ tsc info record """ =20 - sz =3D calcsize(TSC_INFO_FORMAT) + sz =3D calcsize(X86_TSC_INFO_FORMAT) =20 if len(content) !=3D sz: raise RecordError("Length should be %u bytes" % (sz, )) =20 - mode, khz, nsec, incarn, res1 =3D unpack(TSC_INFO_FORMAT, content) + mode, khz, nsec, incarn, res1 =3D unpack(X86_TSC_INFO_FORMAT, cont= ent) =20 if res1 !=3D 0: - raise StreamError("Reserved bits set in TSC_INFO: 0x%08x" + raise StreamError("Reserved bits set in X86_TSC_INFO: 0x%08x" % (res1, )) =20 self.info(" Mode %u, %u kHz, %u ns, incarnation %d" diff --git a/tools/python/xen/migration/tests.py b/tools/python/xen/migrati= on/tests.py index 026cf38012..ff2768946b 100644 --- a/tools/python/xen/migration/tests.py +++ b/tools/python/xen/migration/tests.py @@ -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), ): --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel