hw/xen: Implement EVTCHNOP_bind_vcpu

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 19:27:38 +00:00
parent 8432788104
commit 306670461b
3 changed files with 54 additions and 0 deletions

View file

@ -952,6 +952,18 @@ static bool kvm_xen_hcall_evtchn_op(struct kvm_xen_exit *exit, X86CPU *cpu,
}
break;
}
case EVTCHNOP_bind_vcpu: {
struct evtchn_bind_vcpu vcpu;
qemu_build_assert(sizeof(vcpu) == 8);
if (kvm_copy_from_gva(cs, arg, &vcpu, sizeof(vcpu))) {
err = -EFAULT;
break;
}
err = xen_evtchn_bind_vcpu_op(&vcpu);
break;
}
default:
return false;
}