]> 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, 30 Jan 2023 19:54:18 +0000 (19:54 +0000)
commit6e1fc943a0538b0754c0eca5b58a49488b4d0c78
tree5194130d4a157e6eb0b1972df1ff102763ce64bb
parent35c657c605a2613296158add2eec4cc8138535ba
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>
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