1d9c52522SMasahiro Yamada /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */ 26e84200cSPankaj Gupta /* 36e84200cSPankaj Gupta * Definitions for virtio-pmem devices. 46e84200cSPankaj Gupta * 56e84200cSPankaj Gupta * Copyright (C) 2019 Red Hat, Inc. 66e84200cSPankaj Gupta * 76e84200cSPankaj Gupta * Author(s): Pankaj Gupta <pagupta@redhat.com> 86e84200cSPankaj Gupta */ 96e84200cSPankaj Gupta 106e84200cSPankaj Gupta #ifndef _UAPI_LINUX_VIRTIO_PMEM_H 116e84200cSPankaj Gupta #define _UAPI_LINUX_VIRTIO_PMEM_H 126e84200cSPankaj Gupta 136e84200cSPankaj Gupta #include <linux/types.h> 146e84200cSPankaj Gupta #include <linux/virtio_ids.h> 156e84200cSPankaj Gupta #include <linux/virtio_config.h> 166e84200cSPankaj Gupta 17*35967bdcSChangyuan Lyu /* Feature bits */ 18*35967bdcSChangyuan Lyu /* guest physical address range will be indicated as shared memory region 0 */ 19*35967bdcSChangyuan Lyu #define VIRTIO_PMEM_F_SHMEM_REGION 0 20*35967bdcSChangyuan Lyu 21*35967bdcSChangyuan Lyu /* shmid of the shared memory region corresponding to the pmem */ 22*35967bdcSChangyuan Lyu #define VIRTIO_PMEM_SHMEM_REGION_ID 0 23*35967bdcSChangyuan Lyu 246e84200cSPankaj Gupta struct virtio_pmem_config { 25a28feb85SMichael S. Tsirkin __le64 start; 26a28feb85SMichael S. Tsirkin __le64 size; 276e84200cSPankaj Gupta }; 286e84200cSPankaj Gupta 296e84200cSPankaj Gupta #define VIRTIO_PMEM_REQ_TYPE_FLUSH 0 306e84200cSPankaj Gupta 316e84200cSPankaj Gupta struct virtio_pmem_resp { 326e84200cSPankaj Gupta /* Host return status corresponding to flush request */ 338c2e408eSPankaj Gupta __le32 ret; 346e84200cSPankaj Gupta }; 356e84200cSPankaj Gupta 366e84200cSPankaj Gupta struct virtio_pmem_req { 376e84200cSPankaj Gupta /* command type */ 388c2e408eSPankaj Gupta __le32 type; 396e84200cSPankaj Gupta }; 406e84200cSPankaj Gupta 416e84200cSPankaj Gupta #endif 42