int xc_domain_cacheflush(xc_interface *xch, uint32_t domid,
xen_pfn_t start_pfn, xen_pfn_t nr_pfns)
{
+#if defined (__i386__) || defined (__x86_64__)
+ /*
+ * The x86 architecture provides cache coherency guarantees which prevent
+ * the need for this hypercall. Avoid the overhead of making a hypercall
+ * just for Xen to return -ENOSYS.
+ */
+ errno = ENOSYS;
+ return -1;
+#else
DECLARE_DOMCTL;
domctl.cmd = XEN_DOMCTL_cacheflush;
domctl.domain = (domid_t)domid;
domctl.u.cacheflush.start_pfn = start_pfn;
domctl.u.cacheflush.nr_pfns = nr_pfns;
return do_domctl(xch, &domctl);
+#endif
}
int xc_domain_pause(xc_interface *xch,