Re: kvm-intel kernel panicing 2.6.22 on T7200

Avi Kivity
2007-06-15T10:02:50Z

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

Magicboiz wrote:
> with VNC option, we had better luck: we got an Oops!!:
>
> Jun 14 17:37:35 linux kernel: [ 575.212000] BUG: unable to handle
> kernel NULL pointer dereference at virtual address 00000024
> Jun 14 17:37:35 linux kernel: [ 575.212000] EIP is at mmu_free_roots
> +0x54/0x90 [kvm]
>

Does the attached patch help? (cd to kernel/ and apply with 'patch -p3')

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

[-- Attachment #2: use-zero-consistently-for-missing-shadow-pdpts.patch --]
[-- Type: text/x-patch, Size: 1103 bytes --]

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index ad50cfd..f4cb731 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -859,7 +859,7 @@ static void mmu_free_roots(struct kvm_vcpu *vcpu)
page = page_header(root);
--page->root_count;
}
- vcpu->mmu.pae_root[i] = INVALID_PAGE;
+ vcpu->mmu.pae_root[i] = 0;
}
vcpu->mmu.root_hpa = INVALID_PAGE;
}
@@ -888,12 +888,10 @@ static void mmu_alloc_roots(struct kvm_vcpu *vcpu)
for (i = 0; i < 4; ++i) {
hpa_t root = vcpu->mmu.pae_root[i];

- ASSERT(!VALID_PAGE(root));
+ ASSERT(!root);
if (vcpu->mmu.root_level == PT32E_ROOT_LEVEL) {
- if (!is_present_pte(vcpu->pdptrs[i])) {
- vcpu->mmu.pae_root[i] = 0;
+ if (!is_present_pte(vcpu->pdptrs[i]))
continue;
- }
root_gfn = vcpu->pdptrs[i] >> PAGE_SHIFT;
} else if (vcpu->mmu.root_level == 0)
root_gfn = 0;
@@ -1241,7 +1239,7 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
goto error_1;
vcpu->mmu.pae_root = page_address(page);
for (i = 0; i < 4; ++i)
- vcpu->mmu.pae_root[i] = INVALID_PAGE;
+ vcpu->mmu.pae_root[i] = 0;

return 0;

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org