diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-11-24 09:07:10 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2015-11-24 09:07:10 +0000 |
commit | 23d9236482eb9dc600a8fbdf31a66d5a75856dc7 (patch) | |
tree | d5180e7b8093e09c9fa360b01608a6f3bf4cf83d /sys/arch | |
parent | 868f7258f3127b657adf14539c3ed7f0d5ed2566 (diff) |
Don't loop forever trying to handle NP faults in certain failure cases.
reported by Stefan Kempf with supplied patch, thanks.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/vmm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index 55d2801ed44..c069c65cf32 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.6 2015/11/21 11:16:30 mpi Exp $ */ +/* $OpenBSD: vmm.c,v 1.7 2015/11/24 09:07:09 mlarkin Exp $ */ /* * Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org> * @@ -2666,6 +2666,8 @@ vmx_handle_exit(struct vcpu *vcpu, int *result) switch (exit_reason) { case VMX_EXIT_EPT_VIOLATION: *result = vmx_handle_np_fault(vcpu); + if (*result) + handled = 0; break; case VMX_EXIT_CPUID: *result = vmx_handle_cpuid(vcpu); @@ -2881,7 +2883,7 @@ vmx_handle_np_fault(struct vcpu *vcpu) default: printf("unknown memory type %d for GPA 0x%llx\n", gpa_memtype, gpa); - break; + return (EINVAL); } return (ret); |