From: Yang Hongyang Subject: [PATCH v8 --for 4.6 COLO 03/25] libxc/migration: Specification update for DIRTY_BITMAP records Date: Wed, 15 Jul 2015 17:18:34 +0800 Message-ID: <1436951936-3447-4-git-send-email-yanghy@cn.fujitsu.com> References: <1436951936-3447-1-git-send-email-yanghy@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1436951936-3447-1-git-send-email-yanghy@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, wency@cn.fujitsu.com, andrew.cooper3@citrix.com, yunhong.jiang@intel.com, eddie.dong@intel.com, guijianfeng@cn.fujitsu.com, rshriram@cs.ubc.ca, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Used by secondary to send it's dirty bitmap to primary under COLO. Signed-off-by: Yang Hongyang --- docs/specs/libxc-migration-stream.pandoc | 24 +++++++++++++++++++++++- tools/libxc/xc_sr_common.c | 1 + tools/libxc/xc_sr_stream_format.h | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/specs/libxc-migration-stream.pandoc b/docs/specs/libxc-migration-stream.pandoc index 68fa513..480d357 100644 --- a/docs/specs/libxc-migration-stream.pandoc +++ b/docs/specs/libxc-migration-stream.pandoc @@ -227,7 +227,9 @@ type 0x00000000: END 0x0000000E: CHECKPOINT - 0x0000000F - 0x7FFFFFFF: Reserved for future _mandatory_ + 0x0000000F: DIRTY_BITMAP + + 0x00000010 - 0x7FFFFFFF: Reserved for future _mandatory_ records. 0x80000000 - 0xFFFFFFFF: Reserved for future _optional_ @@ -601,6 +603,26 @@ CHECKPOINT record or an END record. \clearpage +DIRTY_BITMAP +------------ + +A dirty_bitmap record is used for secondary to send it's dirty bitmap +to primary while doing a checkpoint under COLO. This record only exists +in back channel. + + 0 1 2 3 4 5 6 7 octet + +-------------------------------------------------+ + | pfn[0] | + +-------------------------------------------------+ + ... + +-------------------------------------------------+ + | pfn[C-1] | + +-------------------------------------------------+ + +The count of the pfn is: record->length/sizeof(uint64_t). + +\clearpage + Layout ====== diff --git a/tools/libxc/xc_sr_common.c b/tools/libxc/xc_sr_common.c index 945cfa6..becc0f4 100644 --- a/tools/libxc/xc_sr_common.c +++ b/tools/libxc/xc_sr_common.c @@ -35,6 +35,7 @@ static const char *mandatory_rec_types[] = [REC_TYPE_X86_PV_VCPU_MSRS] = "x86 PV vcpu msrs", [REC_TYPE_VERIFY] = "Verify", [REC_TYPE_CHECKPOINT] = "Checkpoint", + [REC_TYPE_DIRTY_BITMAP] = "Dirty bitmap", }; const char *rec_type_to_str(uint32_t type) diff --git a/tools/libxc/xc_sr_stream_format.h b/tools/libxc/xc_sr_stream_format.h index 6d0f8fd..43a0209 100644 --- a/tools/libxc/xc_sr_stream_format.h +++ b/tools/libxc/xc_sr_stream_format.h @@ -75,6 +75,7 @@ struct xc_sr_rhdr #define REC_TYPE_X86_PV_VCPU_MSRS 0x0000000cU #define REC_TYPE_VERIFY 0x0000000dU #define REC_TYPE_CHECKPOINT 0x0000000eU +#define REC_TYPE_DIRTY_BITMAP 0x0000000fU #define REC_TYPE_OPTIONAL 0x80000000U -- 1.9.1