summaryrefslogtreecommitdiffstats
path: root/sys/i386/xen
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/xen')
-rw-r--r--sys/i386/xen/xen_machdep.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/i386/xen/xen_machdep.c b/sys/i386/xen/xen_machdep.c
index 2d46f6e..a9180fc 100644
--- a/sys/i386/xen/xen_machdep.c
+++ b/sys/i386/xen/xen_machdep.c
@@ -1177,6 +1177,27 @@ trap_info_t trap_table[] = {
{ 0, 0, 0, 0 }
};
+/* Perform a multicall and check that individual calls succeeded. */
+int
+HYPERVISOR_multicall(struct multicall_entry * call_list, int nr_calls)
+{
+ int ret = 0;
+ int i;
+
+ /* Perform the multicall. */
+ PANIC_IF(_HYPERVISOR_multicall(call_list, nr_calls));
+
+ /* Check the results of individual hypercalls. */
+ for (i = 0; i < nr_calls; i++)
+ if (unlikely(call_list[i].result < 0))
+ ret++;
+ if (unlikely(ret > 0))
+ panic("%d multicall(s) failed: cpu %d\n",
+ ret, smp_processor_id());
+
+ /* If we didn't panic already, everything succeeded. */
+ return (0);
+}
/********** CODE WORTH KEEPING ABOVE HERE *****************/
OpenPOWER on IntegriCloud