Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: MIT */
0002 
0003 #ifndef __XEN_PUBLIC_HVM_HVM_OP_H__
0004 #define __XEN_PUBLIC_HVM_HVM_OP_H__
0005 
0006 #include <xen/interface/xen.h>
0007 
0008 /* Get/set subcommands: the second argument of the hypercall is a
0009  * pointer to a xen_hvm_param struct. */
0010 #define HVMOP_set_param           0
0011 #define HVMOP_get_param           1
0012 struct xen_hvm_param {
0013     domid_t  domid;    /* IN */
0014     uint32_t index;    /* IN */
0015     uint64_t value;    /* IN/OUT */
0016 };
0017 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_param);
0018 
0019 /* Hint from PV drivers for pagetable destruction. */
0020 #define HVMOP_pagetable_dying       9
0021 struct xen_hvm_pagetable_dying {
0022     /* Domain with a pagetable about to be destroyed. */
0023     domid_t  domid;
0024     /* guest physical address of the toplevel pagetable dying */
0025     aligned_u64 gpa;
0026 };
0027 typedef struct xen_hvm_pagetable_dying xen_hvm_pagetable_dying_t;
0028 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_pagetable_dying_t);
0029  
0030 enum hvmmem_type_t {
0031     HVMMEM_ram_rw,             /* Normal read/write guest RAM */
0032     HVMMEM_ram_ro,             /* Read-only; writes are discarded */
0033     HVMMEM_mmio_dm,            /* Reads and write go to the device model */
0034 };
0035 
0036 #define HVMOP_get_mem_type    15
0037 /* Return hvmmem_type_t for the specified pfn. */
0038 struct xen_hvm_get_mem_type {
0039     /* Domain to be queried. */
0040     domid_t domid;
0041     /* OUT variable. */
0042     uint16_t mem_type;
0043     uint16_t pad[2]; /* align next field on 8-byte boundary */
0044     /* IN variable. */
0045     uint64_t pfn;
0046 };
0047 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_get_mem_type);
0048 
0049 #if defined(__i386__) || defined(__x86_64__)
0050 
0051 /*
0052  * HVMOP_set_evtchn_upcall_vector: Set a <vector> that should be used for event
0053  *                                 channel upcalls on the specified <vcpu>. If set,
0054  *                                 this vector will be used in preference to the
0055  *                                 domain global callback via (see
0056  *                                 HVM_PARAM_CALLBACK_IRQ).
0057  */
0058 #define HVMOP_set_evtchn_upcall_vector 23
0059 struct xen_hvm_evtchn_upcall_vector {
0060     uint32_t vcpu;
0061     uint8_t vector;
0062 };
0063 typedef struct xen_hvm_evtchn_upcall_vector xen_hvm_evtchn_upcall_vector_t;
0064 DEFINE_GUEST_HANDLE_STRUCT(xen_hvm_evtchn_upcall_vector_t);
0065 
0066 #endif /* defined(__i386__) || defined(__x86_64__) */
0067 
0068 #endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */