qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 41/54] postcopy_ram.c: place_page and helpers


From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH v8 41/54] postcopy_ram.c: place_page and helpers
Date: Wed, 28 Oct 2015 11:28:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

"Dr. David Alan Gilbert (git)" <address@hidden> wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> postcopy_place_page (etc) provide a way for postcopy to place a page
> into guests memory atomically (using the copy ioctl on the ufd).
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> Reviewed-by: Amit Shah <address@hidden>


Reviewed-by: Juan Quintela <address@hidden>

> +int postcopy_place_page_zero(MigrationIncomingState *mis, void *host)
> +{
> +    struct uffdio_zeropage zero_struct;
> +
> +    zero_struct.range.start = (uint64_t)(uintptr_t)host;
> +    zero_struct.range.len = getpagesize();
> +    zero_struct.mode = 0;
> +
> +    if (ioctl(mis->userfault_fd, UFFDIO_ZEROPAGE, &zero_struct)) {
> +        int e = errno;
> +        error_report("%s: %s zero host: %p",
> +                     __func__, strerror(e), host);
> +
> +        return -e;
> +    }
> +
> +    trace_postcopy_place_page_zero(host);
> +    return 0;
> +}

Would this be faster than normal precopy way of just copying a zero page?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]