Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/xen
File: privcmd.h
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR MIT) */
[0] Fix | Delete
/******************************************************************************
[1] Fix | Delete
* privcmd.h
[2] Fix | Delete
*
[3] Fix | Delete
* Interface to /proc/xen/privcmd.
[4] Fix | Delete
*
[5] Fix | Delete
* Copyright (c) 2003-2005, K A Fraser
[6] Fix | Delete
*
[7] Fix | Delete
* This program is free software; you can redistribute it and/or
[8] Fix | Delete
* modify it under the terms of the GNU General Public License version 2
[9] Fix | Delete
* as published by the Free Software Foundation; or, when distributed
[10] Fix | Delete
* separately from the Linux kernel or incorporated into other
[11] Fix | Delete
* software packages, subject to the following license:
[12] Fix | Delete
*
[13] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a copy
[14] Fix | Delete
* of this source file (the "Software"), to deal in the Software without
[15] Fix | Delete
* restriction, including without limitation the rights to use, copy, modify,
[16] Fix | Delete
* merge, publish, distribute, sublicense, and/or sell copies of the Software,
[17] Fix | Delete
* and to permit persons to whom the Software is furnished to do so, subject to
[18] Fix | Delete
* the following conditions:
[19] Fix | Delete
*
[20] Fix | Delete
* The above copyright notice and this permission notice shall be included in
[21] Fix | Delete
* all copies or substantial portions of the Software.
[22] Fix | Delete
*
[23] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
[24] Fix | Delete
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
[25] Fix | Delete
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
[26] Fix | Delete
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
[27] Fix | Delete
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
[28] Fix | Delete
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
[29] Fix | Delete
* IN THE SOFTWARE.
[30] Fix | Delete
*/
[31] Fix | Delete
[32] Fix | Delete
#ifndef __LINUX_PUBLIC_PRIVCMD_H__
[33] Fix | Delete
#define __LINUX_PUBLIC_PRIVCMD_H__
[34] Fix | Delete
[35] Fix | Delete
#include <linux/types.h>
[36] Fix | Delete
[37] Fix | Delete
#include <xen/interface/xen.h>
[38] Fix | Delete
[39] Fix | Delete
struct privcmd_hypercall {
[40] Fix | Delete
__u64 op;
[41] Fix | Delete
__u64 arg[5];
[42] Fix | Delete
};
[43] Fix | Delete
[44] Fix | Delete
struct privcmd_mmap_entry {
[45] Fix | Delete
__u64 va;
[46] Fix | Delete
/*
[47] Fix | Delete
* This should be a GFN. It's not possible to change the name because
[48] Fix | Delete
* it's exposed to the user-space.
[49] Fix | Delete
*/
[50] Fix | Delete
__u64 mfn;
[51] Fix | Delete
__u64 npages;
[52] Fix | Delete
};
[53] Fix | Delete
[54] Fix | Delete
struct privcmd_mmap {
[55] Fix | Delete
int num;
[56] Fix | Delete
domid_t dom; /* target domain */
[57] Fix | Delete
struct privcmd_mmap_entry *entry;
[58] Fix | Delete
};
[59] Fix | Delete
[60] Fix | Delete
struct privcmd_mmapbatch {
[61] Fix | Delete
int num; /* number of pages to populate */
[62] Fix | Delete
domid_t dom; /* target domain */
[63] Fix | Delete
__u64 addr; /* virtual address */
[64] Fix | Delete
xen_pfn_t *arr; /* array of mfns - or'd with
[65] Fix | Delete
PRIVCMD_MMAPBATCH_*_ERROR on err */
[66] Fix | Delete
};
[67] Fix | Delete
[68] Fix | Delete
#define PRIVCMD_MMAPBATCH_MFN_ERROR 0xf0000000U
[69] Fix | Delete
#define PRIVCMD_MMAPBATCH_PAGED_ERROR 0x80000000U
[70] Fix | Delete
[71] Fix | Delete
struct privcmd_mmapbatch_v2 {
[72] Fix | Delete
unsigned int num; /* number of pages to populate */
[73] Fix | Delete
domid_t dom; /* target domain */
[74] Fix | Delete
__u64 addr; /* virtual address */
[75] Fix | Delete
const xen_pfn_t *arr; /* array of mfns */
[76] Fix | Delete
int *err; /* array of error codes */
[77] Fix | Delete
};
[78] Fix | Delete
[79] Fix | Delete
struct privcmd_dm_op_buf {
[80] Fix | Delete
void *uptr;
[81] Fix | Delete
size_t size;
[82] Fix | Delete
};
[83] Fix | Delete
[84] Fix | Delete
struct privcmd_dm_op {
[85] Fix | Delete
domid_t dom;
[86] Fix | Delete
__u16 num;
[87] Fix | Delete
const struct privcmd_dm_op_buf *ubufs;
[88] Fix | Delete
};
[89] Fix | Delete
[90] Fix | Delete
struct privcmd_mmap_resource {
[91] Fix | Delete
domid_t dom;
[92] Fix | Delete
__u32 type;
[93] Fix | Delete
__u32 id;
[94] Fix | Delete
__u32 idx;
[95] Fix | Delete
__u64 num;
[96] Fix | Delete
__u64 addr;
[97] Fix | Delete
};
[98] Fix | Delete
[99] Fix | Delete
/*
[100] Fix | Delete
* @cmd: IOCTL_PRIVCMD_HYPERCALL
[101] Fix | Delete
* @arg: &privcmd_hypercall_t
[102] Fix | Delete
* Return: Value returned from execution of the specified hypercall.
[103] Fix | Delete
*
[104] Fix | Delete
* @cmd: IOCTL_PRIVCMD_MMAPBATCH_V2
[105] Fix | Delete
* @arg: &struct privcmd_mmapbatch_v2
[106] Fix | Delete
* Return: 0 on success (i.e., arg->err contains valid error codes for
[107] Fix | Delete
* each frame). On an error other than a failed frame remap, -1 is
[108] Fix | Delete
* returned and errno is set to EINVAL, EFAULT etc. As an exception,
[109] Fix | Delete
* if the operation was otherwise successful but any frame failed with
[110] Fix | Delete
* -ENOENT, then -1 is returned and errno is set to ENOENT.
[111] Fix | Delete
*/
[112] Fix | Delete
#define IOCTL_PRIVCMD_HYPERCALL \
[113] Fix | Delete
_IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
[114] Fix | Delete
#define IOCTL_PRIVCMD_MMAP \
[115] Fix | Delete
_IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
[116] Fix | Delete
#define IOCTL_PRIVCMD_MMAPBATCH \
[117] Fix | Delete
_IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
[118] Fix | Delete
#define IOCTL_PRIVCMD_MMAPBATCH_V2 \
[119] Fix | Delete
_IOC(_IOC_NONE, 'P', 4, sizeof(struct privcmd_mmapbatch_v2))
[120] Fix | Delete
#define IOCTL_PRIVCMD_DM_OP \
[121] Fix | Delete
_IOC(_IOC_NONE, 'P', 5, sizeof(struct privcmd_dm_op))
[122] Fix | Delete
#define IOCTL_PRIVCMD_RESTRICT \
[123] Fix | Delete
_IOC(_IOC_NONE, 'P', 6, sizeof(domid_t))
[124] Fix | Delete
#define IOCTL_PRIVCMD_MMAP_RESOURCE \
[125] Fix | Delete
_IOC(_IOC_NONE, 'P', 7, sizeof(struct privcmd_mmap_resource))
[126] Fix | Delete
[127] Fix | Delete
#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
[128] Fix | Delete
[129] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function