* [PATCH] libxc: correct max_pfn calculation for saving domain
@ 2016-08-26 11:58 Juergen Gross
2016-08-26 13:09 ` Wei Liu
0 siblings, 1 reply; 4+ messages in thread
From: Juergen Gross @ 2016-08-26 11:58 UTC (permalink / raw)
To: xen-devel; +Cc: Juergen Gross, wei.liu2, ian.jackson
Commit 91e204d37f44913913776d0a89279721694f8b32 ("libxc: try to find
last used pfn when migrating") introduced a bug for the case of a
domain supporting the virtual mapped linear p2m list: the maximum pfn
of the domain calculated from the p2m memory allocation might be too
low.
Correct this.
Reported-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
---
This is a backport candidate for 4.7
---
tools/libxc/xc_sr_save_x86_pv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/libxc/xc_sr_save_x86_pv.c b/tools/libxc/xc_sr_save_x86_pv.c
index 4a29460..7043409 100644
--- a/tools/libxc/xc_sr_save_x86_pv.c
+++ b/tools/libxc/xc_sr_save_x86_pv.c
@@ -430,6 +430,8 @@ static int map_p2m_list(struct xc_sr_context *ctx, uint64_t p2m_cr3)
if ( level == 2 )
{
+ if ( saved_idx == idx_end )
+ saved_idx++;
max_pfn = ((xen_pfn_t)saved_idx << 9) * fpp - 1;
if ( max_pfn < ctx->x86_pv.max_pfn )
{
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] libxc: correct max_pfn calculation for saving domain
2016-08-26 11:58 [PATCH] libxc: correct max_pfn calculation for saving domain Juergen Gross
@ 2016-08-26 13:09 ` Wei Liu
2016-08-30 12:44 ` Wei Liu
0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-08-26 13:09 UTC (permalink / raw)
To: Juergen Gross; +Cc: wei.liu2, ian.jackson, xen-devel
On Fri, Aug 26, 2016 at 01:58:55PM +0200, Juergen Gross wrote:
> Commit 91e204d37f44913913776d0a89279721694f8b32 ("libxc: try to find
> last used pfn when migrating") introduced a bug for the case of a
> domain supporting the virtual mapped linear p2m list: the maximum pfn
> of the domain calculated from the p2m memory allocation might be too
> low.
>
> Correct this.
>
> Reported-by: Stefan Bader <stefan.bader@canonical.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Stefan Bader <stefan.bader@canonical.com>
Saw in <8afd11f1-3687-4c6f-200b-57eabb26dd73@canonical.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> This is a backport candidate for 4.7
> ---
> tools/libxc/xc_sr_save_x86_pv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/libxc/xc_sr_save_x86_pv.c b/tools/libxc/xc_sr_save_x86_pv.c
> index 4a29460..7043409 100644
> --- a/tools/libxc/xc_sr_save_x86_pv.c
> +++ b/tools/libxc/xc_sr_save_x86_pv.c
> @@ -430,6 +430,8 @@ static int map_p2m_list(struct xc_sr_context *ctx, uint64_t p2m_cr3)
>
> if ( level == 2 )
> {
> + if ( saved_idx == idx_end )
> + saved_idx++;
> max_pfn = ((xen_pfn_t)saved_idx << 9) * fpp - 1;
> if ( max_pfn < ctx->x86_pv.max_pfn )
> {
> --
> 2.6.6
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libxc: correct max_pfn calculation for saving domain
2016-08-26 13:09 ` Wei Liu
@ 2016-08-30 12:44 ` Wei Liu
2016-08-30 12:58 ` Ian Jackson
0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-08-30 12:44 UTC (permalink / raw)
To: Juergen Gross; +Cc: wei.liu2, ian.jackson, xen-devel
On Fri, Aug 26, 2016 at 02:09:53PM +0100, Wei Liu wrote:
> On Fri, Aug 26, 2016 at 01:58:55PM +0200, Juergen Gross wrote:
> > Commit 91e204d37f44913913776d0a89279721694f8b32 ("libxc: try to find
> > last used pfn when migrating") introduced a bug for the case of a
> > domain supporting the virtual mapped linear p2m list: the maximum pfn
> > of the domain calculated from the p2m memory allocation might be too
> > low.
> >
> > Correct this.
> >
> > Reported-by: Stefan Bader <stefan.bader@canonical.com>
> > Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Tested-by: Stefan Bader <stefan.bader@canonical.com>
>
> Saw in <8afd11f1-3687-4c6f-200b-57eabb26dd73@canonical.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
>
Pushed.
Ian, please backport this to Xen 4.7.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libxc: correct max_pfn calculation for saving domain
2016-08-30 12:44 ` Wei Liu
@ 2016-08-30 12:58 ` Ian Jackson
0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2016-08-30 12:58 UTC (permalink / raw)
To: Wei Liu; +Cc: Juergen Gross, xen-devel
Wei Liu writes ("Re: [PATCH] libxc: correct max_pfn calculation for saving domain"):
> Pushed.
>
> Ian, please backport this to Xen 4.7.
Noted, thanks.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-30 12:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 11:58 [PATCH] libxc: correct max_pfn calculation for saving domain Juergen Gross
2016-08-26 13:09 ` Wei Liu
2016-08-30 12:44 ` Wei Liu
2016-08-30 12:58 ` Ian Jackson
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.