qemu-devel
[Top][All Lists]
Advanced

[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: Wed, 14 Jan 2015 10:49:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


On 14/01/2015 10:07, Pavel Dovgaluk wrote:
>> From: Paolo Bonzini [mailto:address@hidden
>> On 12/01/2015 13:40, Pavel Dovgaluk wrote:
>>>>>
>>>>> Perhaps check the replay_interrupt() outside, in an && with "if
>>>>> (unlikely(interrupt_request))"?
>>> You mean that I should wrap whole condition into "unlikely"?
>>>
>>
>> No, I wanted to have a single check of "replay_interrupt()" and/or
>> "replay_has_interrupt()".
>>
>> BTW, I think this is incorrect:
>>
>>> +                    if ((replay_mode != REPLAY_MODE_PLAY
>>> +                            || replay_has_interrupt())
>>> +                        && cc->cpu_exec_interrupt(cpu, interrupt_request)) 
>>> {
>>> +                        replay_interrupt();
>>
>> because cc->cpu_exec_interrupt() can exit with cpu_loop_exit(cpu).
> 
> Haven't found any. Do you have an example?

Yes:

    cpu_svm_check_intercept_param ->
    helper_svm_check_intercept_param ->
    helper_vmexit -> cpu_loop_exit

>>     if (replay_mode == REPLAY_MODE_PLAY && !replay_has_interrupt()) {
>>         /* do nothing */
>>     } else if (interrupt_request & CPU_INTERRUPT_HALT) {
>>         replay_interrupt();
>>         ...
>>         cpu_loop_exit(cpu);
>>     } else if (interrupt_request & CPU_INTERRUPT_INIT) {
>>         replay_interrupt();
>>         ...
>>         cpu_loop_exit(cpu);
>>     } else {
>>         replay_interrupt();
>>         if (cc->cpu_exec_interrupt(cpu, interrupt_request)) {
>>             next_tb = 0;
>>         }
>>     }
> 
> Is it normal that processing of the reset request does not execute 
> cpu_loop_exit(cpu)?

I think it is okay.  INIT executes cpu_loop_exit() on x86 because
processors other than the boot processor are halted after they receive INIT.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]