Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/xen/hvm.c
Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | xen_hvm_set_callback(device_t dev) | ||||
if (xen_vector_callback_enabled) | if (xen_vector_callback_enabled) | ||||
return; | return; | ||||
xhp.domid = DOMID_SELF; | xhp.domid = DOMID_SELF; | ||||
xhp.index = HVM_PARAM_CALLBACK_IRQ; | xhp.index = HVM_PARAM_CALLBACK_IRQ; | ||||
if (xen_feature(XENFEAT_hvm_callback_vector) != 0) { | if (xen_feature(XENFEAT_hvm_callback_vector) != 0) { | ||||
int error; | int error; | ||||
xhp.value = HVM_CALLBACK_VECTOR(IDT_EVTCHN); | xhp.value = HVM_CALLBACK_VECTOR(IDT_HYPERVISOR); | ||||
error = HYPERVISOR_hvm_op(HVMOP_set_param, &xhp); | error = HYPERVISOR_hvm_op(HVMOP_set_param, &xhp); | ||||
if (error == 0) { | if (error == 0) { | ||||
xen_vector_callback_enabled = 1; | xen_vector_callback_enabled = 1; | ||||
return; | return; | ||||
} | } | ||||
printf("Xen HVM callback vector registration failed (%d). " | printf("Xen HVM callback vector registration failed (%d). " | ||||
"Falling back to emulated device interrupt\n", error); | "Falling back to emulated device interrupt\n", error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |