1f363d039SEric Auger /* SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause */ 29f583bddSPankaj Gupta /* 39f583bddSPankaj Gupta * Definitions for virtio-pmem devices. 49f583bddSPankaj Gupta * 59f583bddSPankaj Gupta * Copyright (C) 2019 Red Hat, Inc. 69f583bddSPankaj Gupta * 79f583bddSPankaj Gupta * Author(s): Pankaj Gupta <pagupta@redhat.com> 89f583bddSPankaj Gupta */ 99f583bddSPankaj Gupta 10f363d039SEric Auger #ifndef _LINUX_VIRTIO_PMEM_H 11f363d039SEric Auger #define _LINUX_VIRTIO_PMEM_H 129f583bddSPankaj Gupta 139f583bddSPankaj Gupta #include "standard-headers/linux/types.h" 149f583bddSPankaj Gupta #include "standard-headers/linux/virtio_ids.h" 159f583bddSPankaj Gupta #include "standard-headers/linux/virtio_config.h" 169f583bddSPankaj Gupta 17*6a02465fSDaniel Henrique Barboza /* Feature bits */ 18*6a02465fSDaniel Henrique Barboza /* guest physical address range will be indicated as shared memory region 0 */ 19*6a02465fSDaniel Henrique Barboza #define VIRTIO_PMEM_F_SHMEM_REGION 0 20*6a02465fSDaniel Henrique Barboza 21*6a02465fSDaniel Henrique Barboza /* shmid of the shared memory region corresponding to the pmem */ 22*6a02465fSDaniel Henrique Barboza #define VIRTIO_PMEM_SHMEM_REGION_ID 0 23*6a02465fSDaniel Henrique Barboza 249f583bddSPankaj Gupta struct virtio_pmem_config { 259f583bddSPankaj Gupta uint64_t start; 269f583bddSPankaj Gupta uint64_t size; 279f583bddSPankaj Gupta }; 289f583bddSPankaj Gupta 299f583bddSPankaj Gupta #define VIRTIO_PMEM_REQ_TYPE_FLUSH 0 309f583bddSPankaj Gupta 319f583bddSPankaj Gupta struct virtio_pmem_resp { 329f583bddSPankaj Gupta /* Host return status corresponding to flush request */ 339f583bddSPankaj Gupta uint32_t ret; 349f583bddSPankaj Gupta }; 359f583bddSPankaj Gupta 369f583bddSPankaj Gupta struct virtio_pmem_req { 379f583bddSPankaj Gupta /* command type */ 389f583bddSPankaj Gupta uint32_t type; 399f583bddSPankaj Gupta }; 409f583bddSPankaj Gupta 419f583bddSPankaj Gupta #endif 42