mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
Handle init/sipi in a main cpu exec loop. (v2)
This should fix compilation problem in case of CONFIG_USER_ONLY. Currently INIT/SIPI is handled in the context of CPU that sends IPI. This patch changes this to handle them like all other events in a main cpu exec loop. When KVM will gain thread per vcpu capability it will be much more clear to handle those event by cpu thread itself and not modify one cpu's state from the context of the other. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
6eaa684746
commit
b09ea7d55c
6 changed files with 64 additions and 12 deletions
|
@ -380,7 +380,14 @@ int cpu_exec(CPUState *env1)
|
|||
}
|
||||
#endif
|
||||
#if defined(TARGET_I386)
|
||||
if (env->hflags2 & HF2_GIF_MASK) {
|
||||
if (interrupt_request & CPU_INTERRUPT_INIT) {
|
||||
svm_check_intercept(SVM_EXIT_INIT);
|
||||
do_cpu_init(env);
|
||||
env->exception_index = EXCP_HALTED;
|
||||
cpu_loop_exit();
|
||||
} else if (interrupt_request & CPU_INTERRUPT_SIPI) {
|
||||
do_cpu_sipi(env);
|
||||
} else if (env->hflags2 & HF2_GIF_MASK) {
|
||||
if ((interrupt_request & CPU_INTERRUPT_SMI) &&
|
||||
!(env->hflags & HF_SMM_MASK)) {
|
||||
svm_check_intercept(SVM_EXIT_SMI);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue