Source
281
281
282
282
return 0;
283
283
}
284
284
285
285
static int mc_queue_handle(uint32_t flags)
286
286
{
287
287
struct xen_mc mc_op;
288
288
int ret = 0;
289
289
290
290
mc_op.cmd = XEN_MC_fetch;
291
-
mc_op.interface_version = XEN_MCA_INTERFACE_VERSION;
292
291
set_xen_guest_handle(mc_op.u.mc_fetch.data, &g_mi);
293
292
do {
294
293
mc_op.u.mc_fetch.flags = flags;
295
294
ret = HYPERVISOR_mca(&mc_op);
296
295
if (ret) {
297
296
pr_err("Failed to fetch %surgent error log\n",
298
297
flags == XEN_MC_URGENT ? "" : "non");
299
298
break;
300
299
}
301
300
351
350
352
351
static int bind_virq_for_mce(void)
353
352
{
354
353
int ret;
355
354
struct xen_mc mc_op;
356
355
357
356
memset(&mc_op, 0, sizeof(struct xen_mc));
358
357
359
358
/* Fetch physical CPU Numbers */
360
359
mc_op.cmd = XEN_MC_physcpuinfo;
361
-
mc_op.interface_version = XEN_MCA_INTERFACE_VERSION;
362
360
set_xen_guest_handle(mc_op.u.mc_physcpuinfo.info, g_physinfo);
363
361
ret = HYPERVISOR_mca(&mc_op);
364
362
if (ret) {
365
363
pr_err("Failed to get CPU numbers\n");
366
364
return ret;
367
365
}
368
366
369
367
/* Fetch each CPU Physical Info for later reference*/
370
368
ncpus = mc_op.u.mc_physcpuinfo.ncpus;
371
369
g_physinfo = kcalloc(ncpus, sizeof(struct mcinfo_logical_cpu),