From patchwork Thu May 8 21:18:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 29868 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6321020534 for ; Thu, 8 May 2014 21:24:01 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id r10sf12038446pdi.2 for ; Thu, 08 May 2014 14:24:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=PjnOwskSjiTRFY0rVBD1flIFo2ghIoBrukX+XdAFGK8=; b=ga8Z5hZ3dg2V3dXTYcB6srY6cwSto778n2nYhQLr+RZlTX2MMtw8POY3VKaOJ9D6FA T1KrDi/VpTCUMXmorZlm7pyhMJeEjONLDmA9LrGGTFzcnGegXkm78miqBfLJJ7IFib90 0faz81KPQokdZB2owWI44dz4GP2EpNcitb6sQhvG21yRxtW0HqFZvvNVDNHEc/emPMTp 5OQmr+rA1ebuFgAoO6tx5lLVbPuaPqcN3+l65o85atABXxR1A3i5QLpF3rAMvSYwmAJ4 eb9nSFgfSCMXA/RLAE4apWZXU2zQRM/cdC7pxGrX11yrPhZNdohe5YJadjp2t5pzf63R +cZA== X-Gm-Message-State: ALoCoQkYjCvJqqdQHYrMWj3ujM1b4QFm/P9+s65MQ5kG9zzBQAmQBbDiyNuMSVWU/wZIiweYshpE X-Received: by 10.66.169.231 with SMTP id ah7mr557334pac.40.1399584240504; Thu, 08 May 2014 14:24:00 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.36 with SMTP id f33ls45387qga.19.gmail; Thu, 08 May 2014 14:24:00 -0700 (PDT) X-Received: by 10.58.34.143 with SMTP id z15mr2465521vei.52.1399584240314; Thu, 08 May 2014 14:24:00 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id fo15si382769vcb.63.2014.05.08.14.24.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 May 2014 14:24:00 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ib6so4043435vcb.5 for ; Thu, 08 May 2014 14:24:00 -0700 (PDT) X-Received: by 10.58.230.103 with SMTP id sx7mr4707085vec.28.1399584240182; Thu, 08 May 2014 14:24:00 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp26234vcb; Thu, 8 May 2014 14:23:59 -0700 (PDT) X-Received: by 10.140.38.148 with SMTP id t20mr8342264qgt.33.1399584239630; Thu, 08 May 2014 14:23:59 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id n4si1165768qga.2.2014.05.08.14.23.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 08 May 2014 14:23:59 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WiVl3-0000Yj-Gg; Thu, 08 May 2014 21:21:37 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WiVl1-0000YX-Rg for xen-devel@lists.xen.org; Thu, 08 May 2014 21:21:36 +0000 Received: from [85.158.139.211:31748] by server-14.bemta-5.messagelabs.com id 13/8F-15696-F55FB635; Thu, 08 May 2014 21:21:35 +0000 X-Env-Sender: w1.huang@samsung.com X-Msg-Ref: server-9.tower-206.messagelabs.com!1399584090!3151758!2 X-Originating-IP: [203.254.224.24] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjAzLjI1NC4yMjQuMjQgPT4gMzY1MDA2\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22254 invoked from network); 8 May 2014 21:21:33 -0000 Received: from mailout1.samsung.com (HELO mailout1.samsung.com) (203.254.224.24) by server-9.tower-206.messagelabs.com with DES-CBC3-SHA encrypted SMTP; 8 May 2014 21:21:33 -0000 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5900ARGXZWA590@mailout1.samsung.com> for xen-devel@lists.xen.org; Fri, 09 May 2014 06:21:32 +0900 (KST) X-AuditID: cbfee61a-b7f2b6d000006c4d-40-536bf55cffc1 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id F9.22.27725.C55FB635; Fri, 09 May 2014 06:21:32 +0900 (KST) Received: from weihp.spa.sarc.sas ([105.140.31.10]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N59002IGXZLDK90@mmp1.samsung.com>; Fri, 09 May 2014 06:21:32 +0900 (KST) From: Wei Huang To: xen-devel@lists.xen.org Date: Thu, 08 May 2014 16:18:23 -0500 Message-id: <1399583908-21755-2-git-send-email-w1.huang@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399583908-21755-1-git-send-email-w1.huang@samsung.com> References: <1399583908-21755-1-git-send-email-w1.huang@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKLMWRmVeSWpSXmKPExsVy+t9jAd2Yr9nBBu9uq1osfryL3eJNbweL xcVrr5gsbvTeYrP4uechm8X0P3fYLPZ9XsVi8fPORUaLr82rGC1en/vIbLHk42IWi45/09gc eDxeT57A6LH9iYjHnWt72DyO7v7N5NG3ZRWjx/otV1k8Tt+axRbAHsVlk5Kak1mWWqRvl8CV 8fxaUcGy3IoTW9YwNzAe9O9i5OSQEDCRmLfrHRuELSZx4d56IJuLQ0hgEaPEsSNvmSGcZiaJ R8sus4NUsQmoSZy6+J8FxBYRkJa49vkyI0gRs8BHRonDs/rAEsICrhL3e/YwgdgsAqoSN5r/ AdkcHLwCLhKT1xeBmBICChJzJtmAVHCCVE+bxwhiCwFVvLr2jnUCI+8CRoZVjKKpBckFxUnp uYZ6xYm5xaV56XrJ+bmbGMGB+UxqB+PKBotDjAIcjEo8vC+mZAcLsSaWFVfmHmKU4GBWEuF9 sQwoxJuSWFmVWpQfX1Sak1p8iFGag0VJnPdAq3WgkEB6YklqdmpqQWoRTJaJg1OqgbHr4U+W o99t5Rlq1uUfVLJNPWdb6NN8XFz43J0vn8RNC4MUPzHpKdrq2rfe2fUy0Oj+gwaGC4rZ3u0h Hn76vLmvO+ycwlZGZNr+3OB/6Xbg42vPQ0POcicxcjZPnBEYpMA5z/aubXX/8wf9RRfnHbpe wvvz4fQGJbls/oV3bzy+NIV7s7WxsBJLcUaioRZzUXEiAEOCqsBIAgAA Cc: keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, julien.grall@linaro.org, tim@xen.org, jaeyong.yoo@samsung.com, jbeulich@suse.com, ian.jackson@eu.citrix.com, yjhyun.yoo@samsung.com Subject: [Xen-devel] [RFC v3 1/6] xen/arm: Add basic save/restore support for ARM X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: w1.huang@samsung.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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 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 Acked-by: Jan Beulich --- xen/arch/arm/Makefile | 1 + xen/arch/arm/save.c | 68 +++++++++++++++++++++++++ xen/arch/x86/domctl.c | 85 ------------------------------- xen/arch/x86/hvm/save.c | 12 +++++ xen/common/Makefile | 2 +- xen/common/domctl.c | 86 ++++++++++++++++++++++++++++++++ xen/common/hvm/save.c | 11 ---- xen/include/asm-arm/hvm/support.h | 29 +++++++++++ xen/include/public/arch-arm/hvm/save.h | 19 +++++++ 9 files changed, 216 insertions(+), 97 deletions(-) create mode 100644 xen/arch/arm/save.c create mode 100644 xen/include/asm-arm/hvm/support.h diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 63e0460..d9a328c 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -33,6 +33,7 @@ obj-y += hvm.o obj-y += device.o obj-y += decode.o obj-y += processor.o +obj-y += save.o #obj-bin-y += ....o diff --git a/xen/arch/arm/save.c b/xen/arch/arm/save.c new file mode 100644 index 0000000..c4a6215 --- /dev/null +++ b/xen/arch/arm/save.c @@ -0,0 +1,68 @@ +/* + * hvm/save.c: Save and restore HVM guest's emulated hardware state for ARM. + * + * Copyright (c) 2014 Samsung Electronics. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + */ +#include +#include +#include + +void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr) +{ + hdr->magic = HVM_ARM_FILE_MAGIC; + hdr->version = HVM_ARM_FILE_VERSION; + hdr->cpuinfo = READ_SYSREG32(MIDR_EL1); +} + +int arch_hvm_load(struct domain *d, struct hvm_save_header *hdr) +{ + uint32_t cpuinfo; + + if ( hdr->magic != HVM_ARM_FILE_MAGIC ) + { + printk(XENLOG_G_ERR "HVM%d restore: bad magic number %#"PRIx32"\n", + d->domain_id, hdr->magic); + return -EINVAL; + } + + if ( hdr->version != HVM_ARM_FILE_VERSION ) + { + printk(XENLOG_G_ERR "HVM%d restore: unsupported version %u\n", + d->domain_id, hdr->version); + return -EINVAL; + } + + cpuinfo = READ_SYSREG32(MIDR_EL1); + if ( hdr->cpuinfo != cpuinfo ) + { + printk(XENLOG_G_ERR "HVM%d restore: VM saved on one CPU " + "(%#"PRIx32") and restored on another (%#"PRIx32").\n", + d->domain_id, hdr->cpuinfo, cpuinfo); + return -EINVAL; + } + + return 0; +} + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index d792e87..06a19b0 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -401,91 +401,6 @@ long arch_do_domctl( } break; - case XEN_DOMCTL_sethvmcontext: - { - struct hvm_domain_context c = { .size = domctl->u.hvmcontext.size }; - - ret = -EINVAL; - if ( !is_hvm_domain(d) ) - goto sethvmcontext_out; - - ret = -ENOMEM; - if ( (c.data = xmalloc_bytes(c.size)) == NULL ) - goto sethvmcontext_out; - - ret = -EFAULT; - if ( copy_from_guest(c.data, domctl->u.hvmcontext.buffer, c.size) != 0) - goto sethvmcontext_out; - - domain_pause(d); - ret = hvm_load(d, &c); - domain_unpause(d); - - sethvmcontext_out: - if ( c.data != NULL ) - xfree(c.data); - } - break; - - case XEN_DOMCTL_gethvmcontext: - { - struct hvm_domain_context c = { 0 }; - - ret = -EINVAL; - if ( !is_hvm_domain(d) ) - goto gethvmcontext_out; - - c.size = hvm_save_size(d); - - if ( guest_handle_is_null(domctl->u.hvmcontext.buffer) ) - { - /* Client is querying for the correct buffer size */ - domctl->u.hvmcontext.size = c.size; - ret = 0; - goto gethvmcontext_out; - } - - /* Check that the client has a big enough buffer */ - ret = -ENOSPC; - if ( domctl->u.hvmcontext.size < c.size ) - goto gethvmcontext_out; - - /* Allocate our own marshalling buffer */ - ret = -ENOMEM; - if ( (c.data = xmalloc_bytes(c.size)) == NULL ) - goto gethvmcontext_out; - - domain_pause(d); - ret = hvm_save(d, &c); - domain_unpause(d); - - domctl->u.hvmcontext.size = c.cur; - if ( copy_to_guest(domctl->u.hvmcontext.buffer, c.data, c.size) != 0 ) - ret = -EFAULT; - - gethvmcontext_out: - copyback = 1; - - if ( c.data != NULL ) - xfree(c.data); - } - break; - - case XEN_DOMCTL_gethvmcontext_partial: - { - ret = -EINVAL; - if ( !is_hvm_domain(d) ) - break; - - domain_pause(d); - ret = hvm_save_one(d, domctl->u.hvmcontext_partial.type, - domctl->u.hvmcontext_partial.instance, - domctl->u.hvmcontext_partial.buffer); - domain_unpause(d); - } - break; - - case XEN_DOMCTL_set_address_size: { switch ( domctl->u.address_size.size ) diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c index 6af19be..0d6da5c 100644 --- a/xen/arch/x86/hvm/save.c +++ b/xen/arch/x86/hvm/save.c @@ -27,6 +27,18 @@ void arch_hvm_save(struct domain *d, struct hvm_save_header *hdr) { uint32_t eax, ebx, ecx, edx; + char *c; + + /* Save magic and version info */ + hdr->magic = HVM_FILE_MAGIC; + hdr->version = HVM_FILE_VERSION; + + /* Save xen changeset */ + c = strrchr(xen_changeset(), ':'); + if ( c ) + hdr->changeset = simple_strtoll(c, NULL, 16); + else + hdr->changeset = -1ULL; /* Unknown */ /* Save some CPUID bits */ cpuid(1, &eax, &ebx, &ecx, &edx); diff --git a/xen/common/Makefile b/xen/common/Makefile index 3683ae3..13b781f 100644 --- a/xen/common/Makefile +++ b/xen/common/Makefile @@ -62,7 +62,7 @@ obj-$(CONFIG_XENCOMM) += xencomm.o subdir-$(CONFIG_COMPAT) += compat -subdir-$(x86_64) += hvm +subdir-y += hvm subdir-$(coverage) += gcov diff --git a/xen/common/domctl.c b/xen/common/domctl.c index af3614b..66358e4 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -885,6 +887,90 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) } break; + case XEN_DOMCTL_sethvmcontext: + { + struct hvm_domain_context c = { .size = op->u.hvmcontext.size }; + + ret = -EINVAL; + if ( (d == current->domain) /* no domain_pause() */ + || !is_hvm_domain(d) ) + goto sethvmcontext_out; + + ret = -ENOMEM; + if ( (c.data = xmalloc_bytes(c.size)) == NULL ) + goto sethvmcontext_out; + + ret = -EFAULT; + if ( copy_from_guest(c.data, op->u.hvmcontext.buffer, c.size) ) + goto sethvmcontext_out; + + domain_pause(d); + ret = hvm_load(d, &c); + domain_unpause(d); + + sethvmcontext_out: + xfree(c.data); + } + break; + + case XEN_DOMCTL_gethvmcontext: + { + struct hvm_domain_context c = { 0 }; + + ret = -EINVAL; + if ( (d == current->domain) /* no domain_pause() */ + || !is_hvm_domain(d) ) + goto gethvmcontext_out; + + c.size = hvm_save_size(d); + + if ( guest_handle_is_null(op->u.hvmcontext.buffer) ) + { + /* Client is querying for the correct buffer size */ + op->u.hvmcontext.size = c.size; + ret = 0; + goto gethvmcontext_out; + } + + /* Check that the client has a big enough buffer */ + ret = -ENOSPC; + if ( op->u.hvmcontext.size < c.size ) + goto gethvmcontext_out; + + /* Allocate our own marshalling buffer */ + ret = -ENOMEM; + if ( (c.data = xmalloc_bytes(c.size)) == NULL ) + goto gethvmcontext_out; + + domain_pause(d); + ret = hvm_save(d, &c); + domain_unpause(d); + + op->u.hvmcontext.size = c.cur; + if ( copy_to_guest(op->u.hvmcontext.buffer, c.data, c.size) ) + ret = -EFAULT; + + gethvmcontext_out: + copyback = 1; + xfree(c.data); + } + break; + + case XEN_DOMCTL_gethvmcontext_partial: + { + ret = -EINVAL; + if ( (d == current->domain) /* no domain_pause() */ + || !is_hvm_domain(d) ) + break; + + domain_pause(d); + ret = hvm_save_one(d, op->u.hvmcontext_partial.type, + op->u.hvmcontext_partial.instance, + op->u.hvmcontext_partial.buffer); + domain_unpause(d); + } + break; + default: ret = arch_do_domctl(op, d, u_domctl); break; diff --git a/xen/common/hvm/save.c b/xen/common/hvm/save.c index 6c16399..0b303ff 100644 --- a/xen/common/hvm/save.c +++ b/xen/common/hvm/save.c @@ -140,7 +140,6 @@ int hvm_save_one(struct domain *d, uint16_t typecode, uint16_t instance, int hvm_save(struct domain *d, hvm_domain_context_t *h) { - char *c; struct hvm_save_header hdr; struct hvm_save_end end; hvm_save_handler handler; @@ -149,16 +148,6 @@ int hvm_save(struct domain *d, hvm_domain_context_t *h) if ( d->is_dying ) return -EINVAL; - hdr.magic = HVM_FILE_MAGIC; - hdr.version = HVM_FILE_VERSION; - - /* Save xen changeset */ - c = strrchr(xen_changeset(), ':'); - if ( c ) - hdr.changeset = simple_strtoll(c, NULL, 16); - else - hdr.changeset = -1ULL; /* Unknown */ - arch_hvm_save(d, &hdr); if ( hvm_save_entry(HEADER, 0, h, &hdr) != 0 ) diff --git a/xen/include/asm-arm/hvm/support.h b/xen/include/asm-arm/hvm/support.h new file mode 100644 index 0000000..fa5fe75 --- /dev/null +++ b/xen/include/asm-arm/hvm/support.h @@ -0,0 +1,29 @@ +/* + * HVM support routines + * + * Copyright (c) 2014, Samsung Electronics. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along with + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place - Suite 330, Boston, MA 02111-1307 USA. + */ + +#ifndef __ASM_ARM_HVM_SUPPORT_H__ +#define __ASM_ARM_HVM_SUPPORT_H__ + +#include +#include +#include +#include +#include + +#endif /* __ASM_ARM_HVM_SUPPORT_H__ */ diff --git a/xen/include/public/arch-arm/hvm/save.h b/xen/include/public/arch-arm/hvm/save.h index 75b8e65..8312e7b 100644 --- a/xen/include/public/arch-arm/hvm/save.h +++ b/xen/include/public/arch-arm/hvm/save.h @@ -3,6 +3,7 @@ * be saved along with the domain's memory and device-model state. * * Copyright (c) 2012 Citrix Systems Ltd. + * Copyright (c) 2014 Samsung Electronics. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to @@ -26,6 +27,24 @@ #ifndef __XEN_PUBLIC_HVM_SAVE_ARM_H__ #define __XEN_PUBLIC_HVM_SAVE_ARM_H__ +#define HVM_ARM_FILE_MAGIC 0x92385520 +#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 */ +}; +DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header); + +/* + * Largest type-code in use + */ +#define HVM_SAVE_CODE_MAX 1 + #endif /*