diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/disas/capstone.h | 1 | ||||
| -rw-r--r-- | include/hw/core/cpu.h | 6 | ||||
| -rw-r--r-- | include/qemu/timer.h | 9 |
3 files changed, 16 insertions, 0 deletions
diff --git a/include/disas/capstone.h b/include/disas/capstone.h index e29068dd97..a11985151d 100644 --- a/include/disas/capstone.h +++ b/include/disas/capstone.h @@ -3,6 +3,7 @@ #ifdef CONFIG_CAPSTONE +#define CAPSTONE_AARCH64_COMPAT_HEADER #include <capstone.h> #else diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index e6acfcb59a..d946161717 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1009,6 +1009,12 @@ void cpu_resume(CPUState *cpu); void cpu_remove_sync(CPUState *cpu); /** + * free_queued_cpu_work() - free all items on CPU work queue + * @cpu: The CPU which work queue to free. + */ +void free_queued_cpu_work(CPUState *cpu); + +/** * process_queued_cpu_work() - process all items on CPU work queue * @cpu: The CPU which work queue to process. */ diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 5ce83c7911..fa56ec9481 100644 --- a/include/qemu/timer.h +++ b/include/qemu/timer.h @@ -1016,6 +1016,15 @@ static inline int64_t cpu_get_host_ticks(void) return val; } +#elif defined(__loongarch64) +static inline int64_t cpu_get_host_ticks(void) +{ + uint64_t val; + + asm volatile("rdtime.d %0, $zero" : "=r"(val)); + return val; +} + #else /* The host CPU doesn't have an easily accessible cycle counter. Just return a monotonically increasing value. This will be |