[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v10 02/11] xen: introduce implementation of save/restore of 'domain context'
- To: Paul Durrant <paul@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 25 Jan 2021 18:36:36 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IOYoIDSK0P2GkjU1P1GC4WT0gJ0EZt7GNNdp5dKqK4w=; b=Xj7DB9DWeQNKdrNozxwUsbLlVTOdiO7JRFhRLic19o72MBFJ0hctA0wId2gFhvtonD1joZM0kj11z0JPJEpq/0nPMHx5RwZvvGeokvkktbA2Fc/lyT6drKrTd03UBZHcB1sef4sDIbgwlKi8MmFJQG6LPPeVmSfi0v4gGwcRWqb9tH0+labDbcMGYIDb++DsxJrda0UQo8J7OCFeEf9CfhI3I19675prZOsbClhR2DdJKr5YyQuLA11BgxA4fQMiuR+jPlV55fuJuGZLCrpFWo05TI6ImswM9BNwetXvAdo4CP5Dgjei1QSj2nKBen/E4yTg5UyPhpVjEICn8BGEiw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYx8RO+n4llnRGvmrCpRJqB0dxcfYQKLp3jvIq1hx6p3EDcfuvORbjPix/3QZStKSeuWZxnplgMAHeEFIvDsIGif9C9v+sOIGo4JRIFcd9nIp2pGiboooX1EQifa+45chh0PO80Hr6qHoWSc/nS8i/qkoXdbF9MVWQoQWSK1XWNwwDY+rE+HpsLRNDO6vo2HCO1Fid4QDpOU/v1CmV3ypLAlRGd2wgzVwK1+zMJVqA0v6uwmXElrBLFHeVpIqGmIVYKhVlkPnE4mXEG07WBlnw4hWQlsSEaif9TXVdw34zmo/nbjnyGRkWahdS1db6C9wT2J83xQgEqTgZiT/pMFuw==
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Paul Durrant <pdurrant@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Mon, 25 Jan 2021 18:36:53 +0000
- Ironport-sdr: 3LiHmbV7q4drLVWZcqoRDG3qhyssf/NxufV/KI3+2T/dYV4YpRrTdDnUNJAoyErsu+yyQLL4sY aajCJz3ZwSves95+Gd5Px7Mcfw8vuqlb+OqaqKMO7h6oQeIKOKicKMCezyGcIVXKaGHs6EuwXy +mah+6CI0cc00aitQi89260oTWEEJjgn44JxM+Pfe8Q/QQFZGtfkWw7Rb4Rg0U1amUtr4l8uhn ACbB1NT75kP7LAYY/m2nHf/TKj0DjUXNJ/XmWAuJ9cowc9MPmU4PgzraYIesa3KDrPi3ebryBj Y6I=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 08/10/2020 19:57, Paul Durrant wrote:
> diff --git a/xen/common/save.c b/xen/common/save.c
> new file mode 100644
> index 0000000000..9287b20198
> --- /dev/null
> +++ b/xen/common/save.c
> @@ -0,0 +1,339 @@
>
> +static int load_start(struct domain *d, struct domain_ctxt_state *c)
> +{
> + static struct domain_context_start s;
> + unsigned int i;
> + int rc = domain_load_ctxt_rec(c, DOMAIN_CONTEXT_START, &i, &s,
> sizeof(s));
> +
> + if ( rc )
> + return rc;
> +
> + if ( i )
> + return -EINVAL;
> +
> + /*
> + * Make sure we are not attempting to load an image generated by a newer
> + * version of Xen.
> + */
> + if ( s.xen_major > XEN_VERSION && s.xen_minor > XEN_SUBVERSION )
major > XEN_VERSON || (major == XEN_VERSION && minor > XEN_SUBVERSION)
~Andrew
|