hw/xen: Implement EVTCHNOP_send

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
This commit is contained in:
David Woodhouse 2022-12-14 00:11:07 +00:00
parent f5417856d2
commit cf7679abdd
3 changed files with 194 additions and 0 deletions

View file

@ -909,6 +909,18 @@ static bool kvm_xen_hcall_evtchn_op(struct kvm_xen_exit *exit, X86CPU *cpu,
}
break;
}
case EVTCHNOP_send: {
struct evtchn_send send;
qemu_build_assert(sizeof(send) == 4);
if (kvm_copy_from_gva(cs, arg, &send, sizeof(send))) {
err = -EFAULT;
break;
}
err = xen_evtchn_send_op(&send);
break;
}
default:
return false;
}