From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: David Vrabel <david.vrabel@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4 8/9] tools/libxc: x86 hvm save implementation
Date: Wed, 7 May 2014 16:39:40 +0100 [thread overview]
Message-ID: <536A53BC.5050903@citrix.com> (raw)
In-Reply-To: <1399472089.13430.111.camel@kazak.uk.xensource.com>
On 07/05/14 15:14, Ian Campbell wrote:
> On Wed, 2014-04-30 at 19:36 +0100, Andrew Cooper wrote:
>> +static int write_hvm_params(struct context *ctx)
>> +{
>> + static const unsigned int params[] = {
>> + HVM_PARAM_STORE_PFN,
>> + HVM_PARAM_IOREQ_PFN,
>> + HVM_PARAM_BUFIOREQ_PFN,
>> + HVM_PARAM_PAGING_RING_PFN,
>> + HVM_PARAM_ACCESS_RING_PFN,
>> + HVM_PARAM_SHARING_RING_PFN,
>> + HVM_PARAM_VM86_TSS,
>> + HVM_PARAM_CONSOLE_PFN,
>> + HVM_PARAM_ACPI_IOPORTS_LOCATION,
>> + HVM_PARAM_VIRIDIAN,
>> + HVM_PARAM_IDENT_PT,
>> + HVM_PARAM_PAE_ENABLED,
>> + };
>> + static const unsigned int num_params = ARRAY_SIZE(params);
> Blank line between statics and regular please.
>
>> + xc_interface *xch = ctx->xch;
>> + struct rec_hvm_params_entry *entries;
>> + struct rec_hvm_params hdr = {
>> + .count = 0,
>> + };
>> + struct record rec = {
>> + .type = REC_TYPE_hvm_params,
>> + .length = sizeof(hdr),
>> + .data = &hdr,
>> + };
>> + unsigned int i;
>> + int rc;
>> +
>> + entries = malloc(num_params * sizeof(*entries));
> It's small enough that I think you could get away with
> struct rec_hvm_params_entry entries[num_params];
I would agree. (Not my code originally). I shall fix this up without
malloc.
>
>
>> + if ( !entries )
>> + {
>> + PERROR("HVM params record");
> "Allocating..." (or goes away)
>
>> + /* Write an END record */
>> + rc = write_record(ctx, &end);
> Didn't I see a helper for this earlier on? Could it not be in common
> code in any case?
>
> Ian.
>
Probably should be.
~Andrew
next prev parent reply other threads:[~2014-05-07 15:39 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-30 18:36 [PATCH v4 0/9] Migration Stream v2 Andrew Cooper
2014-04-30 18:36 ` [PATCH v4 1/9] libxc: add DECLARE_HYPERCALL_BUFFER_SHADOW() Andrew Cooper
2014-05-07 11:45 ` Ian Campbell
2014-05-07 12:00 ` David Vrabel
2014-05-07 12:06 ` Ian Campbell
2014-04-30 18:36 ` [PATCH v4 2/9] [HACK] tools/libxc: save/restore v2 framework Andrew Cooper
2014-04-30 18:36 ` [PATCH v4 3/9] tools/libxc: Stream specification and some common code Andrew Cooper
2014-05-07 11:57 ` Ian Campbell
2014-05-07 12:06 ` David Vrabel
2014-05-07 12:14 ` Andrew Cooper
2014-05-07 13:07 ` Ian Campbell
2014-05-07 13:20 ` Andrew Cooper
2014-04-30 18:36 ` [PATCH v4 4/9] tools/libxc: Scripts for inspection/valdiation of legacy and new streams Andrew Cooper
2014-05-07 12:03 ` Ian Campbell
2014-05-07 12:08 ` David Vrabel
2014-05-07 12:27 ` Andrew Cooper
2014-04-30 18:36 ` [PATCH v4 5/9] tools/libxc: common code Andrew Cooper
2014-05-07 13:03 ` Ian Campbell
2014-05-07 14:38 ` Andrew Cooper
2014-05-07 16:08 ` Ian Campbell
2014-05-07 16:30 ` Andrew Cooper
2014-05-07 16:35 ` Ian Campbell
2014-05-08 8:29 ` David Vrabel
2014-04-30 18:36 ` [PATCH v4 6/9] tools/libxc: x86 pv save implementation Andrew Cooper
2014-05-07 13:58 ` Ian Campbell
2014-05-07 15:20 ` Andrew Cooper
2014-05-07 16:15 ` Ian Campbell
2014-04-30 18:36 ` [PATCH v4 7/9] tools/libxc: x86 pv restore implementation Andrew Cooper
2014-05-07 14:10 ` Ian Campbell
2014-05-07 15:37 ` Andrew Cooper
2014-05-07 16:17 ` Ian Campbell
2014-04-30 18:36 ` [PATCH v4 8/9] tools/libxc: x86 hvm save implementation Andrew Cooper
2014-05-07 14:14 ` Ian Campbell
2014-05-07 15:39 ` Andrew Cooper [this message]
2014-04-30 18:36 ` [PATCH v4 9/9] tools/libxc: x86 hvm restore implementation Andrew Cooper
2014-05-07 14:15 ` Ian Campbell
2014-05-01 16:41 ` [PATCH v4 0/9] Migration Stream v2 Konrad Rzeszutek Wilk
2014-05-01 17:32 ` Andrew Cooper
2014-05-07 14:23 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536A53BC.5050903@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=david.vrabel@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.