mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
kvm: x86: Use separate exception_injected CPUState field
Marcelo correctly remarked that there are usage conflicts between QEMU core code and KVM /wrt exception_index. So spend a separate field and also save/restore it properly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
02c2b87fff
commit
31827373f0
3 changed files with 5 additions and 3 deletions
|
@ -720,8 +720,8 @@ static int kvm_put_vcpu_events(CPUState *env)
|
|||
return 0;
|
||||
}
|
||||
|
||||
events.exception.injected = (env->exception_index >= 0);
|
||||
events.exception.nr = env->exception_index;
|
||||
events.exception.injected = (env->exception_injected >= 0);
|
||||
events.exception.nr = env->exception_injected;
|
||||
events.exception.has_error_code = env->has_error_code;
|
||||
events.exception.error_code = env->error_code;
|
||||
|
||||
|
@ -755,7 +755,7 @@ static int kvm_get_vcpu_events(CPUState *env)
|
|||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
env->exception_index =
|
||||
env->exception_injected =
|
||||
events.exception.injected ? events.exception.nr : -1;
|
||||
env->has_error_code = events.exception.has_error_code;
|
||||
env->error_code = events.exception.error_code;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue