/******************************************************************************1* privcmd.h2*3* Interface to /proc/xen/privcmd.4*5* Copyright (c) 2003-2005, K A Fraser6*7* This program is free software; you can redistribute it and/or8* modify it under the terms of the GNU General Public License version 29* as published by the Free Software Foundation; or, when distributed10* separately from the Linux kernel or incorporated into other11* software packages, subject to the following license:12*13* Permission is hereby granted, free of charge, to any person obtaining a copy14* of this source file (the "Software"), to deal in the Software without15* restriction, including without limitation the rights to use, copy, modify,16* merge, publish, distribute, sublicense, and/or sell copies of the Software,17* and to permit persons to whom the Software is furnished to do so, subject to18* the following conditions:19*20* The above copyright notice and this permission notice shall be included in21* all copies or substantial portions of the Software.22*23* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR24* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,25* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE26* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER27* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING28* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS29* IN THE SOFTWARE.30*/3132#ifndef __LINUX_PUBLIC_PRIVCMD_H__33#define __LINUX_PUBLIC_PRIVCMD_H__3435#include <linux/types.h>36#include <linux/compiler.h>3738typedef unsigned long xen_pfn_t;3940struct privcmd_hypercall {41__u64 op;42__u64 arg[5];43};4445struct privcmd_mmap_entry {46__u64 va;47__u64 mfn;48__u64 npages;49};5051struct privcmd_mmap {52int num;53domid_t dom; /* target domain */54struct privcmd_mmap_entry __user *entry;55};5657struct privcmd_mmapbatch {58int num; /* number of pages to populate */59domid_t dom; /* target domain */60__u64 addr; /* virtual address */61xen_pfn_t __user *arr; /* array of mfns - top nibble set on err */62};6364/*65* @cmd: IOCTL_PRIVCMD_HYPERCALL66* @arg: &privcmd_hypercall_t67* Return: Value returned from execution of the specified hypercall.68*/69#define IOCTL_PRIVCMD_HYPERCALL \70_IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))71#define IOCTL_PRIVCMD_MMAP \72_IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))73#define IOCTL_PRIVCMD_MMAPBATCH \74_IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))7576#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */777879