From: Ian Campbell Subject: Re: [RFC v3 1/6] xen/arm: Add basic save/restore support for ARM Date: Wed, 14 May 2014 11:37:20 +0100 Message-ID: <1400063840.29366.14.camel@kazak.uk.xensource.com> References: <1399583908-21755-1-git-send-email-w1.huang@samsung.com> <1399583908-21755-2-git-send-email-w1.huang@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1399583908-21755-2-git-send-email-w1.huang@samsung.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: Wei Huang Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, julien.grall@linaro.org, tim@xen.org, jaeyong.yoo@samsung.com, xen-devel@lists.xen.org, jbeulich@suse.com, ian.jackson@eu.citrix.com, yjhyun.yoo@samsung.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-05-08 at 16:18 -0500, Wei Huang wrote: > This patch implements a basic framework for ARM guest > save/restore. It defines a HVM save header for ARM guests > and correponding arch_ save/load functions. These functions "corresponding" > are hooked up with domain control hypercalls (gethvmcontext > and sethvmcontext). The hypercalls become a common code path to > both x86 and ARM. As a result of merging, the x86 specific > header saving code is moved to x86 sub-directory. > > Signed-off-by: Evgeny Fedotov > Signed-off-by: Wei Huang Other than the comments already made by others this is looking good to me. > [...] > +#define HVM_ARM_FILE_MAGIC 0x92385520 OOI where did that number come from? (often these are a few ASCII characters etc, I'm just curious) > +#define HVM_ARM_FILE_VERSION 0x00000001 > + > +/* Note: For compilation purpose hvm_save_header name is the same as x86, > + * but layout is different. */ > +struct hvm_save_header > +{ > + uint32_t magic; /* Must be HVM_ARM_FILE_MAGIC */ > + uint32_t version; /* File format version */ > + uint32_t cpuinfo; /* Record MIDR_EL1 info of saving machine */ Is the size of this struct the same for arm32 and arm64? Ian.