[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/7 V10] mem/nvdimm: ensure write persistence to
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH 5/7 V10] mem/nvdimm: ensure write persistence to PMEM in label emulation |
Date: |
Tue, 17 Jul 2018 10:00:30 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
On 07/16/2018 11:32 PM, address@hidden wrote:
> +++ b/stubs/pmem.c
> @@ -0,0 +1,19 @@
> +/*
> + * Stubs for libpmem.
> + *
> + * Copyright (c) 2018 Intel Corporation.
> + *
> + * Author: Haozhong Zhang <address@hidden>
> + *
> + * This work is licensed under the terms of the GNU GPL, version 2 or later.
> + * See the COPYING file in the top-level directory.
> + */
> +
> +#include <string.h>
> +
> +#include "qemu/pmem.h"
> +
> +void *pmem_memcpy_persist(void *pmemdest, const void *src, size_t len)
> +{
> + return memcpy(pmemdest, src, len);
> +}
>
This will never be used, because you prevented is_pmem
from being set when creating the device.
I also know that you want to avoid an ifdef within nvdimm_write_label_data, but
a more obvious solution might be in qemu/pmem.h,
#ifdef CONFIG_LIBPMEM
#include <libpmem.h>
#else /* !CONFIG_LIBPMEM */
static inline void *
pmem_memcpy_persist(void *pmemdest, const void *src, size_t len)
{
g_assert_not_reached();
}
#endif /* CONFIG_LIBPMEM */
r~
- [Qemu-devel] [PATCH 0/7 V10] nvdimm: guarantee persistence of QEMU writes to persistent memory, junyan . he, 2018/07/17
- [Qemu-devel] [PATCH 1/7 V10] memory, exec: Expose all memory block related flags., junyan . he, 2018/07/17
- [Qemu-devel] [PATCH 3/7 V10] configure: add libpmem support, junyan . he, 2018/07/17
- [Qemu-devel] [PATCH 2/7 V10] memory, exec: switch file ram allocation functions to 'flags' parameters, junyan . he, 2018/07/17
- [Qemu-devel] [PATCH 4/7 V10] hostmem-file: add the 'pmem' option, junyan . he, 2018/07/17
- [Qemu-devel] [PATCH 5/7 V10] mem/nvdimm: ensure write persistence to PMEM in label emulation, junyan . he, 2018/07/17
- Re: [Qemu-devel] [PATCH 5/7 V10] mem/nvdimm: ensure write persistence to PMEM in label emulation,
Richard Henderson <=
- [Qemu-devel] [PATCH 6/7 V10] migration/ram: Add check and info message to nvdimm post copy., junyan . he, 2018/07/17
- [Qemu-devel] [PATCH 7/7 V10] migration/ram: ensure write persistence on loading all data to PMEM., junyan . he, 2018/07/17