diff mbox

do_interrupt64 shouldn't be called when GIF is not set.

Message ID 1397575045-25368-1-git-send-email-hschauhan@nulltrace.org
State New
Headers show

Commit Message

Himanshu Chauhan April 15, 2014, 3:17 p.m. UTC
I am not very sure about the place(s) we would need this. But I think
this is required. Please advise.

When having SVM enabled, the do_interrupt64 shouldn't be
called unless GIF is set otherwise this causes random behaviour
especially bad TR in case guest is running.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
---
 target-i386/seg_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c
index 8c3f92c..c813bb9 100644
--- a/target-i386/seg_helper.c
+++ b/target-i386/seg_helper.c
@@ -1212,7 +1212,7 @@  static void do_interrupt_all(X86CPU *cpu, int intno, int is_int,
         }
 #endif
 #ifdef TARGET_X86_64
-        if (env->hflags & HF_LMA_MASK) {
+        if (env->hflags & HF_LMA_MASK && env->hflags & HF2_GIF_MASK) {
             do_interrupt64(env, intno, is_int, error_code, next_eip, is_hw);
         } else
 #endif