summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-cpu-exec.c
blob: 3971fba6ddfcdd18b83658b6875172ca9c97bc92 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- qemu.orig/cpu-exec.c	Mon Jan 14 11:11:02 2008
+++ qemu/cpu-exec.c	Thu Jan 17 23:03:00 2008
@@ -449,16 +449,18 @@ int cpu_exec(CPUState *env1)
                         (env->eflags & IF_MASK || env->hflags & HF_HIF_MASK) &&
                         !(env->hflags & HF_INHIBIT_IRQ_MASK)) {
                         int intno;
-                        svm_check_intercept(SVM_EXIT_INTR);
                         env->interrupt_request &= ~(CPU_INTERRUPT_HARD | CPU_INTERRUPT_VIRQ);
                         intno = cpu_get_pic_interrupt(env);
-                        if (loglevel & CPU_LOG_TB_IN_ASM) {
-                            fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno);
-                        }
-                        do_interrupt(intno, 0, 0, 0, 1);
-                        /* ensure that no TB jump will be modified as
-                           the program flow was changed */
-                        BREAK_CHAIN;
+	                     if(intno>=0) {
+                            svm_check_intercept(SVM_EXIT_INTR);
+                            if (loglevel & CPU_LOG_TB_IN_ASM) {
+                                fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno);
+                            }
+                            do_interrupt(intno, 0, 0, 0, 1);
+                           /* ensure that no TB jump will be modified as
+                              the program flow was changed */
+                            BREAK_CHAIN;
+                        }
 #if !defined(CONFIG_USER_ONLY)
                     } else if ((interrupt_request & CPU_INTERRUPT_VIRQ) &&
                         (env->eflags & IF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) {