On 23 May 2014 19:10, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 23/05/2014 19:59, Peter Maydell ha scritto:
>
>> On 2 May 2014 15:33, Paolo Bonzini <pbonz...@redhat.com> wrote:
>> I was looking at cleaning up the horrible ifdef ladder a little
>> lower in this function, and I noticed this code had been
>> added recently. Why is TARGET_I386 a special case here?
>
>
> Because a hypervisor (cpu_svm_check_intercept_param) can block the
> interrupt.  Note that CPU_INTERRUPT_INIT is actually the same bit as
> CPU_INTERRUPT_RESET.

Ugh. This suggests reset is probably not really generic...

> The whole #ifdef mess should probably be changed to a function in cpu.c, now
> that we don't have AREG0 constraints anymore.

Well, I'm planning to move the bodies of all the ifdefs into
a cpu_check_interrupts() provided by the target's cpu.h[*].
This x86 bit is just awkward because it means there's
x86 stuff both before and after the generic reset code.

[*] not a cpu method since it seemed like it would be
a bad idea to have a function pointer call every
time round the main loop when there's a blocked
interrupt...

thanks
-- PMM

Reply via email to