1 /* SPDX-License-Identifier: MIT 2 * 3 * hvm_op.h 4 * 5 * Copyright (c) 2007, Keir Fraser 6 */ 7 8 #ifndef __XEN_PUBLIC_HVM_HVM_OP_H__ 9 #define __XEN_PUBLIC_HVM_HVM_OP_H__ 10 11 /* Get/set subcommands: the second argument of the hypercall is a 12 * pointer to a xen_hvm_param struct. 13 */ 14 #define HVMOP_set_param 0 15 #define HVMOP_get_param 1 16 struct xen_hvm_param { 17 domid_t domid; /* IN */ 18 u32 index; /* IN */ 19 u64 value; /* IN/OUT */ 20 }; 21 22 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_param); 23 24 /* Hint from PV drivers for pagetable destruction. */ 25 #define HVMOP_pagetable_dying 9 26 struct xen_hvm_pagetable_dying { 27 /* Domain with a pagetable about to be destroyed. */ 28 domid_t domid; 29 /* guest physical address of the toplevel pagetable dying */ 30 aligned_u64 gpa; 31 }; 32 33 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_pagetable_dying); 34 35 enum hvmmem_type_t { 36 HVMMEM_ram_rw, /* Normal read/write guest RAM */ 37 HVMMEM_ram_ro, /* Read-only; writes are discarded */ 38 HVMMEM_mmio_dm, /* Reads and write go to the device model */ 39 }; 40 41 #define HVMOP_get_mem_type 15 42 /* Return hvmmem_type_t for the specified pfn. */ 43 struct xen_hvm_get_mem_type { 44 /* Domain to be queried. */ 45 domid_t domid; 46 /* OUT variable. */ 47 u16 mem_type; 48 u16 pad[2]; /* align next field on 8-byte boundary */ 49 /* IN variable. */ 50 u64 pfn; 51 }; 52 53 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_get_mem_type); 54 55 #endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */ 56