diff options
author | David Woodhouse <dwmw@amazon.co.uk> | 2022-12-13 22:40:56 +0000 |
---|---|---|
committer | David Woodhouse <dwmw@amazon.co.uk> | 2023-03-01 08:22:50 +0000 |
commit | c723d4c15e224e9d058384eecd30559580836c7a (patch) | |
tree | 351ae167553fa0c4ef6eca1fdb40ccab364488c7 /target/i386/machine.c | |
parent | 190cc3c0edd60876150959ee9f242363e40d168e (diff) | |
download | qemu-c723d4c15e224e9d058384eecd30559580836c7a.zip qemu-c723d4c15e224e9d058384eecd30559580836c7a.tar.gz qemu-c723d4c15e224e9d058384eecd30559580836c7a.tar.bz2 |
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>
Diffstat (limited to 'target/i386/machine.c')
-rw-r--r-- | target/i386/machine.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/machine.c b/target/i386/machine.c index a4874ed..603a107 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -1275,6 +1275,8 @@ static const VMStateDescription vmstate_xen_vcpu = { VMSTATE_UINT64(env.xen_vcpu_time_info_gpa, X86CPU), VMSTATE_UINT64(env.xen_vcpu_runstate_gpa, X86CPU), VMSTATE_UINT8(env.xen_vcpu_callback_vector, X86CPU), + VMSTATE_UINT16_ARRAY(env.xen_virq, X86CPU, XEN_NR_VIRQS), + VMSTATE_UINT64(env.xen_singleshot_timer_ns, X86CPU), VMSTATE_END_OF_LIST() } }; |