diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2022-12-13 17:20:46 +0000 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-01 08:22:50 +0000 |
commit | 190cc3c0edd60876150959ee9f242363e40d168e (patch) | |
tree | c434efc7d91f64ef1185e5c6fb403d938ea3f9a1 /target/i386 | |
parent | 83eb5811342b4e48544ab79dd92a0bb1a2a2cbfb (diff) | |
download | qemu-190cc3c0edd60876150959ee9f242363e40d168e.zip qemu-190cc3c0edd60876150959ee9f242363e40d168e.tar.gz qemu-190cc3c0edd60876150959ee9f242363e40d168e.tar.bz2 |
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>
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/kvm/xen-emu.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index fab7d6b..884e1c9 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -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; } |