From: Wei Liu <wei.liu2@citrix.com>
To: Juergen Gross <jgross@suse.com>
Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] libxc: correct max_pfn calculation for saving domain
Date: Fri, 26 Aug 2016 14:09:53 +0100 [thread overview]
Message-ID: <20160826130953.GX20641@citrix.com> (raw)
In-Reply-To: <1472212735-27445-1-git-send-email-jgross@suse.com>
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
next prev parent reply other threads:[~2016-08-26 13:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-26 11:58 [PATCH] libxc: correct max_pfn calculation for saving domain Juergen Gross
2016-08-26 13:09 ` Wei Liu [this message]
2016-08-30 12:44 ` Wei Liu
2016-08-30 12:58 ` Ian Jackson
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=20160826130953.GX20641@citrix.com \
--to=wei.liu2@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jgross@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).