|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/HVM: Avoid cache flush operations during hvm_load
>>> On 01.06.15 at 17:26, <ross.lagerwall@xxxxxxxxxx> wrote:
> --- a/xen/common/hvm/save.c
> +++ b/xen/common/hvm/save.c
This being an x86-specific problem I would think this would better be
addressed in x86-specific code. If it was to stay here, a proper
arch hook should be introduced (even if ARM isn't using this code
right now) and ...
> @@ -230,13 +233,14 @@ int hvm_load(struct domain *d, hvm_domain_context_t *h)
> printk(XENLOG_G_ERR
> "HVM%d restore: save did not end with a null entry\n",
> d->domain_id);
> - return -1;
> + ret = -1;
> + goto out;
> }
>
> /* Read the typecode of the next entry and check for the end-marker
> */
> desc = (struct hvm_save_descriptor *)(&h->data[h->cur]);
> if ( desc->typecode == 0 )
> - return 0;
> + goto out;
>
> /* Find the handler for this entry */
> if ( (desc->typecode > HVM_SAVE_CODE_MAX) ||
> @@ -244,7 +248,8 @@ int hvm_load(struct domain *d, hvm_domain_context_t *h)
> {
> printk(XENLOG_G_ERR "HVM%d restore: unknown entry typecode %u\n",
> d->domain_id, desc->typecode);
> - return -1;
> + ret = -1;
> + goto out;
> }
>
> /* Load the entry */
> @@ -254,11 +259,17 @@ int hvm_load(struct domain *d, hvm_domain_context_t *h)
> {
> printk(XENLOG_G_ERR "HVM%d restore: failed to load entry
> %u/%u\n",
> d->domain_id, desc->typecode, desc->instance);
> - return -1;
> + ret = -1;
> + goto out;
> }
> }
... all of the goto-s should become break-s, ...
> - /* Not reached */
> + ASSERT_UNREACHABLE();
> +
> +out:
... eliminating the need for both of these.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |