mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-28 22:10:33 +00:00
56eb90af39
Because we need to make sure the pmem kind memory data is synced after migration, we choose to call pmem_persist() when the migration finish. This will make sure the data of pmem is safe and will not lose if power is off. Signed-off-by: Junyan He <junyan.he@intel.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
37 lines
800 B
C
37 lines
800 B
C
/*
|
|
* QEMU header file 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.
|
|
*/
|
|
|
|
#ifndef QEMU_PMEM_H
|
|
#define 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)
|
|
{
|
|
/* If 'pmem' option is 'on', we should always have libpmem support,
|
|
or qemu will report a error and exit, never come here. */
|
|
g_assert_not_reached();
|
|
return NULL;
|
|
}
|
|
|
|
static inline void
|
|
pmem_persist(const void *addr, size_t len)
|
|
{
|
|
g_assert_not_reached();
|
|
}
|
|
|
|
#endif /* CONFIG_LIBPMEM */
|
|
|
|
#endif /* !QEMU_PMEM_H */
|