From 45e077d75174269d76efbc632419e90fdb7c0662 Mon Sep 17 00:00:00 2001 From: Claudio Fontana Date: Thu, 15 Oct 2020 16:32:15 +0200 Subject: accel/tcg: split CpusAccel into three TCG variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit split up the CpusAccel tcg_cpus into three TCG variants: tcg_cpus_rr (single threaded, round robin cpus) tcg_cpus_icount (same as rr, but with instruction counting enabled) tcg_cpus_mttcg (multi-threaded cpus) Suggested-by: Richard Henderson Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20201015143217.29337-2-cfontana@suse.de> Signed-off-by: Richard Henderson --- accel/tcg/tcg-cpus-rr.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 accel/tcg/tcg-cpus-rr.h (limited to 'accel/tcg/tcg-cpus-rr.h') diff --git a/accel/tcg/tcg-cpus-rr.h b/accel/tcg/tcg-cpus-rr.h new file mode 100644 index 0000000000..1936fd16ab --- /dev/null +++ b/accel/tcg/tcg-cpus-rr.h @@ -0,0 +1,20 @@ +/* + * QEMU TCG Single Threaded vCPUs implementation + * + * Copyright 2020 SUSE LLC + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef TCG_CPUS_RR_H +#define TCG_CPUS_RR_H + +#define TCG_KICK_PERIOD (NANOSECONDS_PER_SECOND / 10) + +/* Kick all RR vCPUs. */ +void qemu_cpu_kick_rr_cpus(CPUState *unused); + +void *tcg_rr_cpu_thread_fn(void *arg); + +#endif /* TCG_CPUS_RR_H */ -- cgit v1.2.3