summaryrefslogtreecommitdiff
path: root/kvm_vmx.c
diff options
context:
space:
mode:
authorMax Bruning <max@joyent.com>2011-07-12 07:35:09 -0700
committerMax Bruning <max@joyent.com>2011-07-12 07:35:09 -0700
commite44d671a7df88a9bc1e51b809b5a2a32a85b63bb (patch)
tree092979b6d0b7cc05e57aa48d19c116f032ad3dea /kvm_vmx.c
parent81ce4d6b18b89da85c986b24346f2191d5ad2b0e (diff)
downloadillumos-kvm-e44d671a7df88a9bc1e51b809b5a2a32a85b63bb.tar.gz
HVM-477 panic in gfn_to_hva
Diffstat (limited to 'kvm_vmx.c')
-rw-r--r--kvm_vmx.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/kvm_vmx.c b/kvm_vmx.c
index b1c3d90..10a37c5 100644
--- a/kvm_vmx.c
+++ b/kvm_vmx.c
@@ -22,6 +22,7 @@
#include <sys/mach_mmu.h>
#include <asm/cpu.h>
#include <sys/x86_archext.h>
+#include <sys/xc_levels.h>
#include "kvm_bitops.h"
#include "msr.h"
@@ -1322,9 +1323,15 @@ vmclear_local_vcpus(void)
* local_vcpus_link)
* __vcpu_clear(vmx);
*/
- for (vmx = list_head(vcpus_on_cpu[cpu]); vmx;
- vmx = list_next(vcpus_on_cpu[cpu], vmx))
+ vmx = list_head(vcpus_on_cpu[cpu]);
+ if (vmx)
+ n = list_next(vcpus_on_cpu[cpu], vmx);
+ while (vmx) {
__vcpu_clear(vmx);
+ vmx = n;
+ if (vmx)
+ n = list_next(vcpus_on_cpu[cpu], vmx);
+ }
}
/*