[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 27/47] icount: set can_do_io outside TB execution
From: |
Pavel Dovgaluk |
Subject: |
Re: [Qemu-devel] [PULL 27/47] icount: set can_do_io outside TB execution |
Date: |
Wed, 17 Dec 2014 11:53:15 +0300 |
> From: Paolo Bonzini [mailto:address@hidden
>
> This patch sets can_do_io function to allow reading icount
> within cpu-exec, but outside TB execution.
Will you apply other icount patches that enables/disables using icount in
particular TBs?
Pavel Dovgalyuk
>
> Signed-off-by: Pavel Dovgalyuk <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> cpu-exec.c | 3 +++
> cpus.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/cpu-exec.c b/cpu-exec.c
> index 4df9856..cce80f0 100644
> --- a/cpu-exec.c
> +++ b/cpu-exec.c
> @@ -168,7 +168,9 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu,
> uint8_t *tb_ptr)
> }
> #endif /* DEBUG_DISAS */
>
> + cpu->can_do_io = 0;
> next_tb = tcg_qemu_tb_exec(env, tb_ptr);
> + cpu->can_do_io = 1;
> trace_exec_tb_exit((void *) (next_tb & ~TB_EXIT_MASK),
> next_tb & TB_EXIT_MASK);
>
> @@ -543,6 +545,7 @@ int cpu_exec(CPUArchState *env)
> cpu = current_cpu;
> env = cpu->env_ptr;
> cc = CPU_GET_CLASS(cpu);
> + cpu->can_do_io = 1;
> #ifdef TARGET_I386
> x86_cpu = X86_CPU(cpu);
> #endif
> diff --git a/cpus.c b/cpus.c
> index 91119bb..615d4ae 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -935,6 +935,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
> qemu_thread_get_self(cpu->thread);
> cpu->thread_id = qemu_get_thread_id();
> cpu->exception_index = -1;
> + cpu->can_do_io = 1;
> current_cpu = cpu;
>
> r = kvm_init_vcpu(cpu);
> @@ -976,6 +977,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
> qemu_thread_get_self(cpu->thread);
> cpu->thread_id = qemu_get_thread_id();
> cpu->exception_index = -1;
> + cpu->can_do_io = 1;
>
> sigemptyset(&waitset);
> sigaddset(&waitset, SIG_IPI);
> @@ -1019,6 +1021,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
> cpu->thread_id = qemu_get_thread_id();
> cpu->created = true;
> cpu->exception_index = -1;
> + cpu->can_do_io = 1;
> }
> qemu_cond_signal(&qemu_cpu_cond);
>
> --
> 1.8.3.1
>
- [Qemu-devel] [PULL 18/47] x86: Fuse g_malloc(); memset() into g_malloc0(), (continued)
- [Qemu-devel] [PULL 18/47] x86: Fuse g_malloc(); memset() into g_malloc0(), Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 17/47] x86: Drop superfluous conditionals around g_free(), Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 19/47] x86: Use g_new() & friends where that makes obvious sense, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 20/47] x86: Drop some superfluous casts from void *, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 21/47] scsi: Drop superfluous conditionals around g_free(), Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 22/47] scsi: Fuse g_malloc(); memset() into g_malloc0(), Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 23/47] scsi: Use g_new() & friends where that makes obvious sense, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 24/47] scsi-disk: provide maximum transfer length, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 26/47] cpu-exec: reset exception_index correctly, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 27/47] icount: set can_do_io outside TB execution, Paolo Bonzini, 2014/12/15
- Re: [Qemu-devel] [PULL 27/47] icount: set can_do_io outside TB execution,
Pavel Dovgaluk <=
- [Qemu-devel] [PULL 25/47] cpu-exec: fix cpu_exec_nocache, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 28/47] icount: introduce cpu_get_icount_raw, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 29/47] cpu-exec: invalidate nocache translation if they are interrupted, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 30/47] timer: introduce new QEMU_CLOCK_VIRTUAL_RT clock, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 31/47] cpus: make icount warp behave well with respect to stop/cont, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 32/47] i386: do not cross the pages boundaries in replay mode, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 34/47] target-i386: add VME to all CPUs, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 33/47] pc: add 2.3 machine types, Paolo Bonzini, 2014/12/15
- [Qemu-devel] [PULL 35/47] target-i386: add f16c and rdrand to Haswell and Broadwell, Paolo Bonzini, 2014/12/15