[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/9 V5] memory, exec: switch file ram allocation
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 1/9 V5] memory, exec: switch file ram allocation functions to 'flags' parameters |
Date: |
Thu, 31 May 2018 13:46:45 +0100 |
User-agent: |
Mutt/1.9.5 (2018-04-13) |
On Thu, May 10, 2018 at 10:08:50AM +0800, address@hidden wrote:
> diff --git a/include/exec/memory.h b/include/exec/memory.h
> index 31eae0a..0460313 100644
> --- a/include/exec/memory.h
> +++ b/include/exec/memory.h
> @@ -507,6 +507,9 @@ void memory_region_init_resizeable_ram(MemoryRegion *mr,
> void *host),
> Error **errp);
> #ifdef __linux__
> +
> +#define QEMU_RAM_SHARE (1UL << 0)
Please expose RAMBlock flags instead of redefining this flag and call
the argument ram_flags. Ultimately MemoryRegion doesn't store this or
care about it. The value simply gets passed to the RAMBlock code.
> +
> +/**
> + * qemu_ram_alloc_from_file,
> + * qemu_ram_alloc_from_fd: Allocate a ram block from the specified back
> + * file or device
> + *
> + * Parameters:
> + * @size: the size in bytes of the ram block
> + * @mr: the memory region where the ram block is
> + * @flags: specify the properties of the ram block, which can be one
> + * or bit-or of following values
> + * - QEMU_RAM_SHARE: mmap the back file or device with MAP_SHARED
s/back//
signature.asc
Description: PGP signature
- [Qemu-devel] [PATCH V5 0/9] nvdimm: guarantee persistence of QEMU writes to persistent memory, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 1/9 V5] memory, exec: switch file ram allocation functions to 'flags' parameters, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 2/9 V5] hostmem-file: add the 'pmem' option, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 3/9 V5] configure: add libpmem support, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 4/9 V5] mem/nvdimm: ensure write persistence to PMEM in label emulation, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 5/9 V5] migration/ram: ensure write persistence on loading zero pages to PMEM, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 6/9 V5] migration/ram: ensure write persistence on loading normal pages to PMEM, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 7/9 V5] migration/ram: ensure write persistence on loading compressed pages to PMEM, junyan . he, 2018/05/09
- [Qemu-devel] [PATCH 8/9 V5] migration/ram: ensure write persistence on loading xbzrle pages to PMEM, junyan . he, 2018/05/09