1 /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */
2 /*
3  * Definitions for virtio-pmem devices.
4  *
5  * Copyright (C) 2019 Red Hat, Inc.
6  *
7  * Author(s): Pankaj Gupta <pagupta@redhat.com>
8  */
9 
10 #ifndef _LINUX_VIRTIO_PMEM_H
11 #define _LINUX_VIRTIO_PMEM_H
12 
13 #include "standard-headers/linux/types.h"
14 #include "standard-headers/linux/virtio_ids.h"
15 #include "standard-headers/linux/virtio_config.h"
16 
17 /* Feature bits */
18 /* guest physical address range will be indicated as shared memory region 0 */
19 #define VIRTIO_PMEM_F_SHMEM_REGION 0
20 
21 /* shmid of the shared memory region corresponding to the pmem */
22 #define VIRTIO_PMEM_SHMEM_REGION_ID 0
23 
24 struct virtio_pmem_config {
25 	uint64_t start;
26 	uint64_t size;
27 };
28 
29 #define VIRTIO_PMEM_REQ_TYPE_FLUSH      0
30 
31 struct virtio_pmem_resp {
32 	/* Host return status corresponding to flush request */
33 	uint32_t ret;
34 };
35 
36 struct virtio_pmem_req {
37 	/* command type */
38 	uint32_t type;
39 };
40 
41 #endif
42