mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
libs/devicemodel: add dm_op support for FreeBSD
The FreeBSD ioctls have the same fields has the Linux ones, so the same file can be shared between both OSes. No functional change for OSes different than FreeBSD. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Acked-by: Wei Liu <wl@xen.org>
This commit is contained in:
1 parent
4f022a2de7
commit
bbf71e99f0
3 files changed
+17
-2
No files matched your search
@@ -66,12 +66,27 @@ struct ioctl_privcmd_mmapresource {
|
||||
};
|
||||
typedef struct ioctl_privcmd_mmapresource privcmd_mmap_resource_t;
|
||||
|
||||
struct privcmd_dmop_buf {
|
||||
void *uptr; /* pointer to memory (in calling process) */
|
||||
size_t size; /* size of the buffer */
|
||||
};
|
||||
typedef struct privcmd_dmop_buf privcmd_dm_op_buf_t;
|
||||
|
||||
struct ioctl_privcmd_dmop {
|
||||
domid_t dom; /* target domain */
|
||||
unsigned int num; /* num of buffers */
|
||||
const struct privcmd_dmop_buf *ubufs; /* array of buffers */
|
||||
};
|
||||
typedef struct ioctl_privcmd_dmop privcmd_dm_op_t;
|
||||
|
||||
#define IOCTL_PRIVCMD_HYPERCALL \
|
||||
_IOWR('E', 0, struct ioctl_privcmd_hypercall)
|
||||
#define IOCTL_PRIVCMD_MMAPBATCH \
|
||||
_IOWR('E', 1, struct ioctl_privcmd_mmapbatch)
|
||||
#define IOCTL_PRIVCMD_MMAP_RESOURCE \
|
||||
_IOW('E', 2, struct ioctl_privcmd_mmapresource)
|
||||
#define IOCTL_PRIVCMD_DM_OP \
|
||||
_IOW('E', 3, struct ioctl_privcmd_dmop)
|
||||
#define IOCTL_PRIVCMD_RESTRICT \
|
||||
_IOW('E', 4, domid_t)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ MAJOR = 1
|
||||
MINOR = 3
|
||||
|
||||
SRCS-y += core.c
|
||||
SRCS-$(CONFIG_Linux) += linux.c
|
||||
SRCS-$(CONFIG_FreeBSD) += compat.c
|
||||
SRCS-$(CONFIG_Linux) += common.c
|
||||
SRCS-$(CONFIG_FreeBSD) += common.c
|
||||
SRCS-$(CONFIG_SunOS) += compat.c
|
||||
SRCS-$(CONFIG_NetBSD) += compat.c
|
||||
SRCS-$(CONFIG_MiniOS) += compat.c
|
||||
|
||||
File renamed without changes.