qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, quintela@redhat.com
Cc: aarcange@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 16/16] postcopy: Add extra check for COPY function
Date: Sun, 26 Feb 2017 20:16:42 +0100	[thread overview]
Message-ID: <7f9d0f8b-5f84-d02c-7c22-6915e12da9ed@redhat.com> (raw)
In-Reply-To: <20170224182844.32452-17-dgilbert@redhat.com>

On 24/02/2017 19:28, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> As an extra sanity check, make sure the region we're registering
> can perform UFFDIO_COPY;  the COPY will fail later but this
> gives a cleaner failure.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
>  migration/postcopy-ram.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c
> index 102fb61..effbeb6 100644
> --- a/migration/postcopy-ram.c
> +++ b/migration/postcopy-ram.c
> @@ -378,6 +378,10 @@ static int ram_block_enable_notify(const char *block_name, void *host_addr,
>          error_report("%s userfault register: %s", __func__, strerror(errno));
>          return -1;
>      }
> +    if (!(reg_struct.ioctls & ((__u64)1 << _UFFDIO_COPY))) {
> +        error_report("%s userfault: Region doesn't support COPY", __func__);
> +        return -1;
> +    }
>  
>      return 0;
>  }
> 
Reviewed-by: Laurent Vivier <lvivier@redhat.com>

      reply	other threads:[~2017-02-26 19:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 18:28 [Qemu-devel] [PATCH v3 00/16] Postcopy: Hugepage support Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 01/16] postcopy: Transmit ram size summary word Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 02/16] postcopy: Transmit and compare individual page sizes Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 03/16] postcopy: Chunk discards for hugepages Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 04/16] exec: ram_block_discard_range Dr. David Alan Gilbert (git)
2017-02-26 19:23   ` Laurent Vivier
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 05/16] postcopy: enhance ram_block_discard_range for hugepages Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 06/16] postcopy: Record largest page size Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 07/16] postcopy: Plumb pagesize down into place helpers Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 08/16] postcopy: Use temporary for placing zero huge pages Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 09/16] postcopy: Load huge pages in one go Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 10/16] postcopy: Mask fault addresses to huge page boundary Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 11/16] postcopy: Send whole huge pages Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 12/16] postcopy: Allow hugepages Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 13/16] postcopy: Update userfaultfd.h header Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 14/16] postcopy: Check for userfault+hugepage feature Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 15/16] postcopy: Add doc about hugepages and postcopy Dr. David Alan Gilbert (git)
2017-02-24 18:28 ` [Qemu-devel] [PATCH v3 16/16] postcopy: Add extra check for COPY function Dr. David Alan Gilbert (git)
2017-02-26 19:16   ` Laurent Vivier [this message]

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=7f9d0f8b-5f84-d02c-7c22-6915e12da9ed@redhat.com \
    --to=lvivier@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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).