On 23/06/17 00:04, Stefano Stabellini wrote:
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 1629f41..26f3d1e 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -885,6 +885,26 @@ int xc_vcpu_getcontext(xc_interface *xch,
uint32_t vcpu,
vcpu_guest_context_any_t *ctxt);
+#if defined (__arm__) || defined(__aarch64__)
+/**
+ * This function initializes the vpl011 emulation and returns
+ * the event to be used by the backend for communicating with
+ * the emulation code.
+ *
+ * @parm xch a handle to an open hypervisor interface
+ * @parm domid the domain to get information from
+ * @parm console_domid the domid of the backend console
+ * @parm gfn the guest pfn to be used as the ring buffer
+ * @parm evtchn the event channel to be used for events
+ * @return 0 on success, negative error on failure
+ */
+int xc_dom_vpl011_init(xc_interface *xch,
+ uint32_t domid,
+ uint32_t console_domid,
+ xen_pfn_t gfn,
+ evtchn_port_t *evtchn);
+#endif
Actually, the pattern is to define the xc_ function on all architecture
but only return ENOSYS where it's not implemented, see
xc_vcpu_get_extstate.
Well, I think the main reason behind if to avoid dummy call to the
hypervisor. But effectively the hypervisor will return a proper error.
As the call is not made in common code, I would make this function
compile on all the platform (there are nothing arch specific in it).
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel