From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC2ik-0000Tt-LC for qemu-devel@nongnu.org; Wed, 21 Aug 2013 03:20:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VC2ia-0000yD-6k for qemu-devel@nongnu.org; Wed, 21 Aug 2013 03:20:46 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:59561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VC2iZ-0000xP-BI for qemu-devel@nongnu.org; Wed, 21 Aug 2013 03:20:35 -0400 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Aug 2013 12:40:26 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 079CC394004D for ; Wed, 21 Aug 2013 12:50:21 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7L7KRsk47775988 for ; Wed, 21 Aug 2013 12:50:27 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7L7KTCR026218 for ; Wed, 21 Aug 2013 12:50:30 +0530 From: Lei Li Date: Wed, 21 Aug 2013 15:18:44 +0800 Message-Id: <1377069536-12658-8-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1377069536-12658-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1377069536-12658-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 07/18] arch_init: export RAM_SAVE_xxx flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aarcange@redhat.com, aliguori@us.ibm.com, Lei Li , quintela@redhat.com, mrhines@linux.vnet.ibm.com, lagarcia@br.ibm.com, pbonzini@redhat.com, rcj@linux.vnet.ibm.com Export RAM_SAVE_xxx flags for localhost migration. Signed-off-by: Lei Li --- arch_init.c | 12 ------------ include/migration/migration.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/arch_init.c b/arch_init.c index 68a7ab7..1ea7c29 100644 --- a/arch_init.c +++ b/arch_init.c @@ -108,18 +108,6 @@ static bool mig_throttle_on; static int dirty_rate_high_cnt; static void check_guest_throttling(void); -/***********************************************************/ -/* ram save/restore */ - -#define RAM_SAVE_FLAG_FULL 0x01 /* Obsolete, not used anymore */ -#define RAM_SAVE_FLAG_COMPRESS 0x02 -#define RAM_SAVE_FLAG_MEM_SIZE 0x04 -#define RAM_SAVE_FLAG_PAGE 0x08 -#define RAM_SAVE_FLAG_EOS 0x10 -#define RAM_SAVE_FLAG_CONTINUE 0x20 -#define RAM_SAVE_FLAG_XBZRLE 0x40 -/* 0x80 is reserved in migration.h start with 0x100 next */ - static struct defconfig_file { const char *filename; diff --git a/include/migration/migration.h b/include/migration/migration.h index 6a24e65..5336117 100644 --- a/include/migration/migration.h +++ b/include/migration/migration.h @@ -158,12 +158,26 @@ void ram_control_before_iterate(QEMUFile *f, uint64_t flags); void ram_control_after_iterate(QEMUFile *f, uint64_t flags); void ram_control_load_hook(QEMUFile *f, uint64_t flags); + +/***********************************************************/ +/* ram save/restore */ + +#define RAM_SAVE_FLAG_FULL 0x01 /* Obsolete, not used anymore */ +#define RAM_SAVE_FLAG_COMPRESS 0x02 +#define RAM_SAVE_FLAG_MEM_SIZE 0x04 +#define RAM_SAVE_FLAG_PAGE 0x08 +#define RAM_SAVE_FLAG_EOS 0x10 +#define RAM_SAVE_FLAG_CONTINUE 0x20 +#define RAM_SAVE_FLAG_XBZRLE 0x40 + /* Whenever this is found in the data stream, the flags * will be passed to ram_control_load_hook in the incoming-migration * side. This lets before_ram_iterate/after_ram_iterate add * transport-specific sections to the RAM migration data. */ #define RAM_SAVE_FLAG_HOOK 0x80 +/* Start with 0x100 next */ + #define RAM_SAVE_CONTROL_NOT_SUPP -1000 #define RAM_SAVE_CONTROL_DELAYED -2000 -- 1.7.7.6