During domU creation process the colors selection has to be passed to
the Xen hypercall. This selection is defined as an array. We need thus
to pass the pointer to Xen and make it accessible in its memory space.
This is generally done using what Xen calls GUEST_HANDLE_PARAMS. Add a
new parameter that allows us to pass both the colors array and the
number of elements in it.
Signed-off-by: Luca Miccio <206497@studenti.unimore.it>
Signed-off-by: Marco Solieri <marco.solieri@unimore.it>
typedef struct vcpu_guest_context vcpu_guest_context_t;
DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
+__DEFINE_XEN_GUEST_HANDLE(col, uint32_t);
+
+struct color_guest_config {
+ uint32_t max_colors;
+ XEN_GUEST_HANDLE(col) colors;
+};
+
/*
* struct xen_arch_domainconfig's ABI is covered by
* XEN_DOMCTL_INTERFACE_VERSION.
*
*/
uint32_t clock_frequency;
+
+ struct color_guest_config colors;
};
#endif /* __XEN__ || __XEN_TOOLS__ */