All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	rshriram@cs.ubc.ca, yanghy@cn.fujitsu.com,
	ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com,
	ian.campbell@citrix.com, wei.liu2@citrix.com
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
Date: Thu, 23 Apr 2015 10:24:04 +0100	[thread overview]
Message-ID: <5538BA34.4090105@citrix.com> (raw)
In-Reply-To: <1429757358-8271-1-git-send-email-boris.ostrovsky@oracle.com>

On 23/04/15 03:49, Boris Ostrovsky wrote:
> When resuming, the guest needs to check whether the port has changed. HVM
> guests use this parameter to get the port number.
>
> (We can't always use xenstore where this value is also written: for example
> on Linux the console is resumed very early, before the store is up).
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

This bug is also present in migration v2 but mitigated in our case
because of the binary we use to call xc_domain_restore() which also sets
the evtchn up.

I believe libxl is also fine for the same reason, but I will fix it
nevertheless.

~Andrew

> ---
>  tools/libxc/xc_domain_restore.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c
> index 2ab9f46..f9dfd2d 100644
> --- a/tools/libxc/xc_domain_restore.c
> +++ b/tools/libxc/xc_domain_restore.c
> @@ -2328,7 +2328,10 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom,
>                                      HVM_PARAM_PAE_ENABLED, pae))
>           || (frc = xc_hvm_param_set(xch, dom,
>                                      HVM_PARAM_STORE_EVTCHN,
> -                                    store_evtchn)) )
> +                                    store_evtchn))
> +         || (frc = xc_hvm_param_set(xch, dom,
> +                                    HVM_PARAM_CONSOLE_EVTCHN,
> +                                    console_evtchn)) )
>      {
>          PERROR("error setting HVM params: %i", frc);
>          goto out;

  reply	other threads:[~2015-04-23  9:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23  2:49 [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore Boris Ostrovsky
2015-04-23  9:24 ` Andrew Cooper [this message]
2015-04-23 14:02   ` Konrad Rzeszutek Wilk
2015-05-05 12:27     ` Ian Campbell
2015-04-23 14:15 ` Wei Liu

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=5538BA34.4090105@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=rshriram@cs.ubc.ca \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --cc=yanghy@cn.fujitsu.com \
    /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.