summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Cantrill <bryan@joyent.com>2011-08-24 14:50:51 -0700
committerBryan Cantrill <bryan@joyent.com>2011-08-24 14:50:51 -0700
commitc02ec961594ab5807e49cd85f74c5f767b8da39b (patch)
tree90be37406fd870b27002548206dbc114dc145f57
parent80ebdaa1aa900c31b360e88ae394a48a6fce5486 (diff)
downloadillumos-kvm-c02ec961594ab5807e49cd85f74c5f767b8da39b.tar.gz
HVM-621 assertion failure in rmap_write_protect()
-rw-r--r--kvm_mmu.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/kvm_mmu.c b/kvm_mmu.c
index 2beafe9..de25727 100644
--- a/kvm_mmu.c
+++ b/kvm_mmu.c
@@ -655,8 +655,8 @@ rmap_write_protect(struct kvm *kvm, uint64_t gfn)
spte = rmap_next(kvm, rmapp, NULL);
while (spte) {
- ASSERT(!spte);
- ASSERT(!(*spte & PT_PRESENT_MASK));
+ ASSERT(spte);
+ ASSERT(*spte & PT_PRESENT_MASK);
if (is_writable_pte(*spte)) {
__set_spte(spte, *spte & ~PT_WRITABLE_MASK);
write_protected = 1;
@@ -677,9 +677,9 @@ rmap_write_protect(struct kvm *kvm, uint64_t gfn)
rmapp = gfn_to_rmap(kvm, gfn, i);
spte = rmap_next(kvm, rmapp, NULL);
while (spte) {
- ASSERT(!spte);
- ASSERT(!(*spte & PT_PRESENT_MASK));
- ASSERT((*spte & (PT_PAGE_SIZE_MASK|PT_PRESENT_MASK)) !=
+ ASSERT(spte);
+ ASSERT(*spte & PT_PRESENT_MASK);
+ ASSERT((*spte & (PT_PAGE_SIZE_MASK|PT_PRESENT_MASK)) ==
(PT_PAGE_SIZE_MASK|PT_PRESENT_MASK));
if (is_writable_pte(*spte)) {
@@ -764,7 +764,6 @@ mmu_page_remove_parent_pte(struct kvm_mmu_page *sp, uint64_t *parent_pte)
int i;
if (!sp->multimapped) {
- /* ASSERT(sp->parent_pte != parent_pte); */
sp->parent_pte = NULL;
return;
}