aboutsummaryrefslogtreecommitdiff
path: root/target/i386/cpu.h
diff options
context:
space:
mode:
authorJoao Martins <joao.m.martins@oracle.com>2018-09-17 07:04:54 -0400
committerDavid Woodhouse <dwmw@amazon.co.uk>2023-03-01 09:07:52 +0000
commitb746a77926f6e84bdb35a38a9ee956ac12693757 (patch)
treea6966ad8607bb5ff4c3a00ec45d6fa79b7f596db /target/i386/cpu.h
parentb46f9745b1b5c8dd6ea1bd1361531f966c404f8c (diff)
downloadqemu-b746a77926f6e84bdb35a38a9ee956ac12693757.zip
qemu-b746a77926f6e84bdb35a38a9ee956ac12693757.tar.gz
qemu-b746a77926f6e84bdb35a38a9ee956ac12693757.tar.bz2
i386/xen: handle PV timer hypercalls
Introduce support for one shot and periodic mode of Xen PV timers, whereby timer interrupts come through a special virq event channel with deadlines being set through: 1) set_timer_op hypercall (only oneshot) 2) vcpu_op hypercall for {set,stop}_{singleshot,periodic}_timer hypercalls Signed-off-by: Joao Martins <joao.m.martins@oracle.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Paul Durrant <paul@xen.org>
Diffstat (limited to 'target/i386/cpu.h')
-rw-r--r--target/i386/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 7227a8e..d243e29 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -26,6 +26,7 @@
#include "exec/cpu-defs.h"
#include "qapi/qapi-types-common.h"
#include "qemu/cpu-float.h"
+#include "qemu/timer.h"
#define XEN_NR_VIRQS 24
@@ -1811,6 +1812,10 @@ typedef struct CPUArchState {
bool xen_callback_asserted;
uint16_t xen_virq[XEN_NR_VIRQS];
uint64_t xen_singleshot_timer_ns;
+ QEMUTimer *xen_singleshot_timer;
+ uint64_t xen_periodic_timer_period;
+ QEMUTimer *xen_periodic_timer;
+ QemuMutex xen_timers_lock;
#endif
#if defined(CONFIG_HVF)
HVFX86LazyFlags hvf_lflags;