aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2021-09-16 17:53:59 +0200
committerPeter Maydell <peter.maydell@linaro.org>2021-09-21 16:28:26 +0100
commit219c101fa7f9c528458cd6a491af371f01e20cba (patch)
tree4a7910441e98bb2b8d17128f9a5561d61727cf0e /include/sysemu
parenta1477da3ddeb1b76adb71af7b5c46a18120dc952 (diff)
downloadqemu-219c101fa7f9c528458cd6a491af371f01e20cba.zip
qemu-219c101fa7f9c528458cd6a491af371f01e20cba.tar.gz
qemu-219c101fa7f9c528458cd6a491af371f01e20cba.tar.bz2
arm/hvf: Add a WFI handler
Sleep on WFI until the VTIMER is due but allow ourselves to be woken up on IPI. In this implementation IPI is blocked on the CPU thread at startup and pselect() is used to atomically unblock the signal and begin sleeping. The signal is sent unconditionally so there's no need to worry about races between actually sleeping and the "we think we're sleeping" state. It may lead to an extra wakeup but that's better than missing it entirely. Signed-off-by: Peter Collingbourne <pcc@google.com> Signed-off-by: Alexander Graf <agraf@csgraf.de> Acked-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Message-id: 20210916155404.86958-6-agraf@csgraf.de [agraf: Remove unused 'set' variable, always advance PC on WFX trap, support vm stop / continue operations and cntv offsets] Signed-off-by: Alexander Graf <agraf@csgraf.de> Acked-by: Roman Bolshakov <r.bolshakov@yadro.com> Reviewed-by: Sergio Lopez <slp@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/hvf_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sysemu/hvf_int.h b/include/sysemu/hvf_int.h
index 7c245c7..6545f7c 100644
--- a/include/sysemu/hvf_int.h
+++ b/include/sysemu/hvf_int.h
@@ -52,6 +52,7 @@ struct hvf_vcpu_state {
uint64_t fd;
void *exit;
bool vtimer_masked;
+ sigset_t unblock_ipi_mask;
};
void assert_hvf_ok(hv_return_t ret);