diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2022-12-13 13:57:44 +0000 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-01 08:22:50 +0000 |
commit | 83eb5811342b4e48544ab79dd92a0bb1a2a2cbfb (patch) | |
tree | 8a29c4ca5b50c8990b9fc15f168c0e2da45aac6f /target/i386/kvm/xen-emu.c | |
parent | 4858ba2065c8bddf7f1c056eda3a5357588bdd50 (diff) | |
download | qemu-83eb5811342b4e48544ab79dd92a0bb1a2a2cbfb.zip qemu-83eb5811342b4e48544ab79dd92a0bb1a2a2cbfb.tar.gz qemu-83eb5811342b4e48544ab79dd92a0bb1a2a2cbfb.tar.bz2 |
hw/xen: Implement EVTCHNOP_close
It calls an internal close_port() helper which will also be used from
EVTCHNOP_reset and will actually do the work to disconnect/unbind a port
once any of that is actually implemented in the first place.
That in turn calls a free_port() internal function which will be in
error paths after allocation.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'target/i386/kvm/xen-emu.c')
-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 45fac5e..fab7d6b 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -805,6 +805,18 @@ static bool kvm_xen_hcall_evtchn_op(struct kvm_xen_exit *exit, X86CPU *cpu, } break; } + case EVTCHNOP_close: { + struct evtchn_close close; + + qemu_build_assert(sizeof(close) == 4); + if (kvm_copy_from_gva(cs, arg, &close, sizeof(close))) { + err = -EFAULT; + break; + } + + err = xen_evtchn_close_op(&close); + break; + } default: return false; } |