qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [PATCH v5 3/6] migration: Maintain postcopy faulted addresses
Date: Wed, 21 Oct 2020 18:42:19 +0100	[thread overview]
Message-ID: <20201021174219.GG3671@work-vm> (raw)
In-Reply-To: <20201021155016.GH200400@xz-x1>

* Peter Xu (peterx@redhat.com) wrote:
> On Wed, Oct 21, 2020 at 03:23:45PM +0100, Dr. David Alan Gilbert wrote:
> > > @@ -354,8 +368,33 @@ int migrate_send_rp_message_req_pages(MigrationIncomingState *mis,
> > >  }
> > >  
> > >  int migrate_send_rp_req_pages(MigrationIncomingState *mis,
> > > -                              RAMBlock *rb, ram_addr_t start)
> > > +                              RAMBlock *rb, ram_addr_t start, uint64_t haddr)
> > >  {
> > > +    void *aligned = (void *)(uintptr_t)(haddr & qemu_real_host_page_mask);
> > 
> > Can you remind me, what happens here for hugepages?
> 
> Sure.  Previously it was:
> 
>   (haddr & (-qemu_target_page_size())
> 
> Now it is:
> 
>   (haddr & qemu_real_host_page_mask)
> 
> Basically we changed the psize alignment from guest to host.
> 
> The bug triggered previously on ppc64 where host_psize=64k, then when guest
> psize is smaller, e.g., 4k, we can have some addr that aligned to 4k rather
> than 64k, so we failed later on checking the host psize alignment (because this
> pointer should point to a host page, so it should align with host psize).

But my question is what happens when we have say a 2MB hugepage?

Dave

> -- 
> Peter Xu
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2020-10-21 17:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 22:57 [PATCH v5 0/6] migration/postcopy: Sync faulted addresses after network recovered Peter Xu
2020-10-19 22:57 ` [PATCH v5 1/6] migration: Pass incoming state into qemu_ufd_copy_ioctl() Peter Xu
2020-10-19 22:57 ` [PATCH v5 2/6] migration: Introduce migrate_send_rp_message_req_pages() Peter Xu
2020-10-19 22:57 ` [PATCH v5 3/6] migration: Maintain postcopy faulted addresses Peter Xu
2020-10-21 14:23   ` Dr. David Alan Gilbert
2020-10-21 15:50     ` Peter Xu
2020-10-21 17:42       ` Dr. David Alan Gilbert [this message]
2020-10-21 18:04         ` Peter Xu
2020-10-19 22:57 ` [PATCH v5 4/6] migration: Sync requested pages after postcopy recovery Peter Xu
2020-10-21 14:37   ` Dr. David Alan Gilbert
2020-10-19 22:57 ` [PATCH v5 5/6] migration/postcopy: Release fd before going into 'postcopy-pause' Peter Xu
2020-10-21 18:56   ` Dr. David Alan Gilbert
2020-10-19 22:57 ` [PATCH v5 6/6] migration-test: Only hide error if !QTEST_LOG Peter Xu

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=20201021174219.GG3671@work-vm \
    --to=dgilbert@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.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 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).