All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] i386 hard interrupt generation bug fix
@ 2008-01-17 15:17 TeLeMan
  0 siblings, 0 replies; only message in thread
From: TeLeMan @ 2008-01-17 15:17 UTC (permalink / raw)
  To: qemu-devel


in cpu-exe.c:
intno=cpu_get_pic_interrupt(env);

intno may be -1, we have to skip this error code.

http://www.nabble.com/file/p14921171/hard_int.patch hard_int.patch: 

--- 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)) {

-- 
View this message in context: http://www.nabble.com/-PATCH--i386-hard-interrupt-generation-bug-fix-tp14921171p14921171.html
Sent from the QEMU - Dev mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-17 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-17 15:17 [Qemu-devel] [PATCH] i386 hard interrupt generation bug fix TeLeMan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.