From d05e66d217f8f83487c3b1d3015a67316b47645f Mon Sep 17 00:00:00 2001 From: bellard Date: Wed, 20 Aug 2003 21:34:35 +0000 Subject: [PATCH] no error code if hardware interrupt git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@371 c046a42c-6fe2-441c-8c8c-71466251a162 --- cpu-exec.c | 4 ++-- exec-i386.h | 2 +- helper-i386.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index fe165dffdd..39bb933f51 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -170,7 +170,7 @@ int cpu_exec(CPUState *env1) do_interrupt(env->exception_index, env->exception_is_int, env->error_code, - env->exception_next_eip); + env->exception_next_eip, 0); #endif } env->exception_index = -1; @@ -192,7 +192,7 @@ int cpu_exec(CPUState *env1) if (loglevel) { fprintf(logfile, "Servicing hardware INT=0x%02x\n", intno); } - do_interrupt(intno, 0, 0, 0); + do_interrupt(intno, 0, 0, 0, 1); env->interrupt_request &= ~CPU_INTERRUPT_HARD; /* ensure that no TB jump will be modified as the program flow was changed */ diff --git a/exec-i386.h b/exec-i386.h index 03a547fb18..96ad04e8e8 100644 --- a/exec-i386.h +++ b/exec-i386.h @@ -142,7 +142,7 @@ void tlb_fill(unsigned long addr, int is_write, void *retaddr); void __hidden cpu_lock(void); void __hidden cpu_unlock(void); void do_interrupt(int intno, int is_int, int error_code, - unsigned int next_eip); + unsigned int next_eip, int is_hw); void do_interrupt_user(int intno, int is_int, int error_code, unsigned int next_eip); void raise_interrupt(int intno, int is_int, int error_code, diff --git a/helper-i386.c b/helper-i386.c index fba6b5b250..fdbb885b12 100644 --- a/helper-i386.c +++ b/helper-i386.c @@ -185,7 +185,7 @@ static inline int load_segment(uint32_t *e1_ptr, uint32_t *e2_ptr, /* protected mode interrupt */ static void do_interrupt_protected(int intno, int is_int, int error_code, - unsigned int next_eip) + unsigned int next_eip, int is_hw) { SegmentCache *dt; uint8_t *ptr, *ssp; @@ -265,7 +265,7 @@ static void do_interrupt_protected(int intno, int is_int, int error_code, shift = type >> 3; has_error_code = 0; - if (!is_int) { + if (!is_int && !is_hw) { switch(intno) { case 8: case 10: @@ -427,10 +427,10 @@ void do_interrupt_user(int intno, int is_int, int error_code, * instruction. It is only relevant if is_int is TRUE. */ void do_interrupt(int intno, int is_int, int error_code, - unsigned int next_eip) + unsigned int next_eip, int is_hw) { if (env->cr[0] & CR0_PE_MASK) { - do_interrupt_protected(intno, is_int, error_code, next_eip); + do_interrupt_protected(intno, is_int, error_code, next_eip, is_hw); } else { do_interrupt_real(intno, is_int, error_code, next_eip); }