mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
hw/xen: Implement EVTCHNOP_unmask
This finally comes with a mechanism for actually injecting events into the guest vCPU, with all the atomic-test-and-set that's involved in setting the bit in the shinfo, then the index in the vcpu_info, and injecting either the lapic vector as MSI, or letting KVM inject the bare vector. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
This commit is contained in:
parent
83eb581134
commit
190cc3c0ed
3 changed files with 189 additions and 0 deletions
|
@ -817,6 +817,18 @@ static bool kvm_xen_hcall_evtchn_op(struct kvm_xen_exit *exit, X86CPU *cpu,
|
|||
err = xen_evtchn_close_op(&close);
|
||||
break;
|
||||
}
|
||||
case EVTCHNOP_unmask: {
|
||||
struct evtchn_unmask unmask;
|
||||
|
||||
qemu_build_assert(sizeof(unmask) == 4);
|
||||
if (kvm_copy_from_gva(cs, arg, &unmask, sizeof(unmask))) {
|
||||
err = -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
err = xen_evtchn_unmask_op(&unmask);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue