]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/xen: Implement EVTCHNOP_bind_virq
authorDavid Woodhouse <dwmw@amazon.co.uk>
Tue, 13 Dec 2022 22:40:56 +0000 (22:40 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Mon, 27 Feb 2023 11:01:28 +0000 (11:01 +0000)
commit368b704f45d40d4924f74e93fdb3bd2d6ba9ce28
treed8ce0135372594c36d2fa5274b5d11bc7c558b8f
parentdec7d72ffd9aeae1afeb9b77f2b173776e94eda1
hw/xen: Implement EVTCHNOP_bind_virq

Add the array of virq ports to each vCPU so that we can deliver timers,
debug ports, etc. Global virqs are allocated against vCPU 0 initially,
but can be migrated to other vCPUs (when we implement that).

The kernel needs to know about VIRQ_TIMER in order to accelerate timers,
so tell it via KVM_XEN_VCPU_ATTR_TYPE_TIMER. Also save/restore the value
of the singleshot timer across migration, as the kernel will handle the
hypercalls automatically now.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
hw/i386/kvm/xen_evtchn.c
hw/i386/kvm/xen_evtchn.h
include/sysemu/kvm_xen.h
target/i386/cpu.h
target/i386/kvm/xen-emu.c
target/i386/machine.c