summaryrefslogtreecommitdiffstats
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-28 16:16:54 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-28 16:16:54 +0000
commit872929aa59cba19fd83b98f87929ccda12a2cbbb (patch)
treec48d33acaf7c44d48c35507fba462b84f1022149 /target-i386/helper.c
parent893f986502196aeb43d176161179c3ff22a7e0a8 (diff)
downloadhqemu-872929aa59cba19fd83b98f87929ccda12a2cbbb.zip
hqemu-872929aa59cba19fd83b98f87929ccda12a2cbbb.tar.gz
SVM rework
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4605 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 133754d..7ce3de3 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1096,16 +1096,15 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr,
(env->efer & MSR_EFER_NXE) &&
(env->cr[4] & CR4_PAE_MASK))
error_code |= PG_ERROR_I_D_MASK;
- if (INTERCEPTEDl(_exceptions, 1 << EXCP0E_PAGE)) {
- stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2), addr);
+ if (env->intercept_exceptions & (1 << EXCP0E_PAGE)) {
+ /* cr2 is not modified in case of exceptions */
+ stq_phys(env->vm_vmcb + offsetof(struct vmcb, control.exit_info_2),
+ addr);
} else {
env->cr[2] = addr;
}
env->error_code = error_code;
env->exception_index = EXCP0E_PAGE;
- /* the VMM will handle this */
- if (INTERCEPTEDl(_exceptions, 1 << EXCP0E_PAGE))
- return 2;
return 1;
}
OpenPOWER on IntegriCloud