diff --git a/common/common.c b/common/common.c index 285b072..29443ce 100644 --- a/common/common.c +++ b/common/common.c @@ -242,7 +242,7 @@ static inline uint64_t *mon_get_ptep_l3(struct kqemu_state *s, if (!(pml4e & PG_PRESENT_MASK)) { if (!alloc) return NULL; - /* allocage a new page */ + /* allocate a new page */ ptr = mon_alloc_page(s, &pdp_page_index); if (!ptr) return NULL; diff --git a/common/kqemu_int.h b/common/kqemu_int.h index d881d85..b2f0b6e 100644 --- a/common/kqemu_int.h +++ b/common/kqemu_int.h @@ -1065,6 +1065,9 @@ static inline void stq_fast(struct kqemu_state *s, unsigned long addr, #define MMU_EXCEPTION(label) \ ".section \"mmu_ex_table\", \"a\"\n"\ ".quad " #label "\n"\ + ".previous\n"\ + ".section \"seg_ex_table\", \"a\"\n"\ + ".quad " #label "\n"\ ".previous\n" #else #define MMU_EXCEPTION(label) \ diff --git a/common/monitor.c b/common/monitor.c index ed46845..b3b72dc 100644 --- a/common/monitor.c +++ b/common/monitor.c @@ -1515,6 +1515,10 @@ static void handle_mon_exception(struct kqemu_state *s, /* division exception from interp */ /* XXX: verify for fxsave/fxrstor */ s->regs = &s->regs1; +#ifdef __x86_64__ + } else if (intno == 0x0d && expected_monitor_exception(pc)) { + raise_exception(s, KQEMU_RET_SOFTMMU); +#endif } else { /* Note: the exception state is reliable only for goto_user handling */