Il 13/09/2014 18:44, Richard Henderson ha scritto: > > After the 23 patches, there's one (interesting) ifdef left. > That is, i386 redefining CPU_INTERRUPT_RESET as CPU_INTERRUPT_INIT > for its own purposes. I'm not sure why all that couldn't be done > under whatever hooks cpu_reset allows.
There are two reasons. One is because INIT is intentionally weaker than RESET. For example, it doesn't clear many MSRs and the FPU state. The second is because INIT can be intercepted by the virtual machine monitor if SVM is enabled (KVM doesn't use it, but it is useful for example when the virtual machine monitor is letting the virtual machine use the hardware APIC). The latter could well happen on more targets than just x86, so perhaps we can have a reset_interrupt method that defaults to reset and is overridden by x86? > Failing that, we might be > able to redefine C_I_I as a new CPU_INTERRUPT_TGT_INT_3 bit. That would break migration, though admittedly only in a somewhat remote case. Paolo