Patchwork remove pending exception on vcpu reset.

login
register
mail settings
Submitter Gleb Natapov
Date Jan. 6, 2010, 2:30 p.m.
Message ID <20100106143010.GP4905@redhat.com>
Download mbox | patch
Permalink /patch/42298/
State New
Headers show

Comments

Gleb Natapov - Jan. 6, 2010, 2:30 p.m.
Without this qemu can even start on kvm modules with events support
since default value of exception_injected in zero and this is #DE
exception.
 
Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
			Gleb.
Anthony Liguori - Jan. 11, 2010, 4:01 p.m.
On 01/06/2010 08:30 AM, Gleb Natapov wrote:
> Without this qemu can even start on kvm modules with events support
> since default value of exception_injected in zero and this is #DE
> exception.
>
> Signed-off-by: Gleb Natapov<gleb@redhat.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index de79eb7..4084503 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -227,6 +227,7 @@ int kvm_arch_init_vcpu(CPUState *env)
>
>   void kvm_arch_reset_vcpu(CPUState *env)
>   {
> +    env->exception_injected = -1;
>       env->interrupt_injected = -1;
>       env->nmi_injected = 0;
>       env->nmi_pending = 0;
> --
> 			Gleb.
>
>
>
>

Patch

diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index de79eb7..4084503 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -227,6 +227,7 @@  int kvm_arch_init_vcpu(CPUState *env)
 
 void kvm_arch_reset_vcpu(CPUState *env)
 {
+    env->exception_injected = -1;
     env->interrupt_injected = -1;
     env->nmi_injected = 0;
     env->nmi_pending = 0;