* [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
@ 2015-04-23 2:49 Boris Ostrovsky
2015-04-23 9:24 ` Andrew Cooper
2015-04-23 14:15 ` Wei Liu
0 siblings, 2 replies; 5+ messages in thread
From: Boris Ostrovsky @ 2015-04-23 2:49 UTC (permalink / raw)
To: rshriram, yanghy, ian.jackson, stefano.stabellini, ian.campbell,
wei.liu2
Cc: boris.ostrovsky, xen-devel
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>
---
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
2015-04-23 2:49 [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore Boris Ostrovsky
@ 2015-04-23 9:24 ` Andrew Cooper
2015-04-23 14:02 ` Konrad Rzeszutek Wilk
2015-04-23 14:15 ` Wei Liu
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2015-04-23 9:24 UTC (permalink / raw)
To: Boris Ostrovsky, rshriram, yanghy, ian.jackson,
stefano.stabellini, ian.campbell, wei.liu2
Cc: xen-devel
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;
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
2015-04-23 9:24 ` Andrew Cooper
@ 2015-04-23 14:02 ` Konrad Rzeszutek Wilk
2015-05-05 12:27 ` Ian Campbell
0 siblings, 1 reply; 5+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-04-23 14:02 UTC (permalink / raw)
To: Andrew Cooper
Cc: wei.liu2, ian.campbell, stefano.stabellini, ian.jackson,
xen-devel, rshriram, Boris Ostrovsky, yanghy
On Thu, Apr 23, 2015 at 10:24:04AM +0100, Andrew Cooper wrote:
> 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>
And this should be backported to older Xen versions if possible.
>
> 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;
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
2015-04-23 14:02 ` Konrad Rzeszutek Wilk
@ 2015-05-05 12:27 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2015-05-05 12:27 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, ian.jackson
Cc: wei.liu2, stefano.stabellini, Andrew Cooper, xen-devel, rshriram,
Boris Ostrovsky, yanghy
On Thu, 2015-04-23 at 10:02 -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Apr 23, 2015 at 10:24:04AM +0100, Andrew Cooper wrote:
> > 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>
Applied.
> And this should be backported to older Xen versions if possible.
Ian: ^
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore
2015-04-23 2:49 [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore Boris Ostrovsky
2015-04-23 9:24 ` Andrew Cooper
@ 2015-04-23 14:15 ` Wei Liu
1 sibling, 0 replies; 5+ messages in thread
From: Wei Liu @ 2015-04-23 14:15 UTC (permalink / raw)
To: Boris Ostrovsky
Cc: wei.liu2, ian.campbell, stefano.stabellini, ian.jackson,
xen-devel, rshriram, yanghy
On Wed, Apr 22, 2015 at 10:49:18PM -0400, 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>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> 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;
> --
> 1.7.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-05-05 12:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 2:49 [PATCH] tools/libxc: Set HVM_PARAM_CONSOLE_EVTCHN during restore Boris Ostrovsky
2015-04-23 9:24 ` Andrew Cooper
2015-04-23 14:02 ` Konrad Rzeszutek Wilk
2015-05-05 12:27 ` Ian Campbell
2015-04-23 14:15 ` Wei Liu
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.