[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions |
Date: |
Mon, 12 Jan 2015 13:34:03 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 12/01/2015 13:00, Pavel Dovgalyuk wrote:
>
> + if (replay_exception()) {
> + cc->do_interrupt(cpu);
> + cpu->exception_index = -1;
I cannot see replay_exception() in the series?
> @@ -419,21 +434,24 @@ int cpu_exec(CPUArchState *env)
> cpu->exception_index = EXCP_DEBUG;
> cpu_loop_exit(cpu);
Why not for EXCP_DEBUG?
> }
> - if (interrupt_request & CPU_INTERRUPT_HALT) {
> + if ((interrupt_request & CPU_INTERRUPT_HALT)
> + && replay_interrupt()) {
> cpu->interrupt_request &= ~CPU_INTERRUPT_HALT;
> cpu->halted = 1;
> cpu->exception_index = EXCP_HLT;
> cpu_loop_exit(cpu);
> }
> #if defined(TARGET_I386)
> - if (interrupt_request & CPU_INTERRUPT_INIT) {
> + if ((interrupt_request & CPU_INTERRUPT_INIT)
> + && replay_interrupt()) {
> cpu_svm_check_intercept_param(env, SVM_EXIT_INIT, 0);
> do_cpu_init(x86_cpu);
> cpu->exception_index = EXCP_HALTED;
> cpu_loop_exit(cpu);
> }
> #else
> - if (interrupt_request & CPU_INTERRUPT_RESET) {
> + if ((interrupt_request & CPU_INTERRUPT_RESET)
> + && replay_interrupt()) {
> cpu_reset(cpu);
> }
> #endif
Perhaps check the replay_interrupt() outside, in an && with "if
(unlikely(interrupt_request))"?
> @@ -441,7 +459,10 @@ int cpu_exec(CPUArchState *env)
> False when the interrupt isn't processed,
> True when it is, and we should restart on a new TB,
> and via longjmp via cpu_loop_exit. */
> - if (cc->cpu_exec_interrupt(cpu, interrupt_request)) {
> + if ((replay_mode != REPLAY_MODE_PLAY
> + || replay_has_interrupt())
> + && cc->cpu_exec_interrupt(cpu, interrupt_request)) {
> + replay_interrupt();
Please put this in a separate function like:
if (replay_mode == REPLAY_MODE_PLAY && !replay_has_interrupt()) {
return false;
}
ret = cc->cpu_exec_interrupt(cpu, interrupt_request);
if (ret) {
replay_interrupt();
}
return ret;
Paolo
> next_tb = 0;
> }
> /* Don't use the cached interrupt_request value,
> @@ -453,7 +474,8 @@ int cpu_exec(CPUArchState *env)
- Re: [Qemu-devel] [RFC PATCH v7 02/21] replay: global variables and function stubs, (continued)
- [Qemu-devel] [RFC PATCH v7 03/21] sysemu: system functions for replay, Pavel Dovgalyuk, 2015/01/12
- [Qemu-devel] [RFC PATCH v7 04/21] replay: internal functions for replay log, Pavel Dovgalyuk, 2015/01/12
- [Qemu-devel] [RFC PATCH v7 05/21] replay: introduce icount event, Pavel Dovgalyuk, 2015/01/12
- [Qemu-devel] [RFC PATCH v7 07/21] cpu: replay instructions sequence, Pavel Dovgalyuk, 2015/01/12
- [Qemu-devel] [RFC PATCH v7 06/21] cpu-exec: allow temporary disabling icount, Pavel Dovgalyuk, 2015/01/12
- [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Pavel Dovgalyuk, 2015/01/12
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions,
Paolo Bonzini <=
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Pavel Dovgaluk, 2015/01/12
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Paolo Bonzini, 2015/01/12
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Pavel Dovgaluk, 2015/01/14
- Message not available
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Paolo Bonzini, 2015/01/14
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Pavel Dovgaluk, 2015/01/14
- Message not available
- Re: [Qemu-devel] [RFC PATCH v7 08/21] replay: interrupts and exceptions, Paolo Bonzini, 2015/01/14
[Qemu-devel] [RFC PATCH v7 10/21] cpus: make icount warp deterministic in replay mode, Pavel Dovgalyuk, 2015/01/12
[Qemu-devel] [RFC PATCH v7 09/21] replay: asynchronous events infrastructure, Pavel Dovgalyuk, 2015/01/12