building kvm-31 against linux-2.6.22-git16

Chris Clayton
2007-07-21T11:26:32Z

Hi,

Due to changes to kmem_cache_create, kvm-31 fails to build against
linux-2.6.22-git16:

CC [M] /home/users/chris/rpm/BUILD/kvm-31/kernel/vmx-debug.o
CC [M] /home/users/chris/rpm/BUILD/kvm-31/kernel/kvm_main.o
CC [M] /home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.o
/home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.c: In
function 'kvm_mmu_module_init':
/home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.c:1314: error: too many
arguments to function 'kmem_cache_create'
/home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.c:1319: error: too many
arguments to function 'kmem_cache_create'
/home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.c:1325: error: too many
arguments to function 'kmem_cache_create'
/home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.c:1331: error: too many
arguments to function 'kmem_cache_create'
make[3]: *** [/home/users/chris/rpm/BUILD/kvm-31/kernel/mmu.o] Error 1

The patch below fixes this:

--- kvm-31/kernel/mmu.c~ 2007-07-21 11:12:45.000000000 +0000
+++ kvm-31/kernel/mmu.c 2007-07-21 11:14:09.000000000 +0000
@@ -1311,24 +1311,24 @@
{
pte_chain_cache = kmem_cache_create("kvm_pte_chain",
sizeof(struct kvm_pte_chain),
- 0, 0, NULL, NULL);
+ 0, 0, NULL);
if (!pte_chain_cache)
goto nomem;
rmap_desc_cache = kmem_cache_create("kvm_rmap_desc",
sizeof(struct kvm_rmap_desc),
- 0, 0, NULL, NULL);
+ 0, 0, NULL);
if (!rmap_desc_cache)
goto nomem;

mmu_page_cache = kmem_cache_create("kvm_mmu_page",
PAGE_SIZE,
- PAGE_SIZE, 0, NULL, NULL);
+ PAGE_SIZE, 0, NULL);
if (!mmu_page_cache)
goto nomem;

mmu_page_header_cache = kmem_cache_create("kvm_mmu_page_header",
sizeof(struct kvm_mmu_page),
- 0, 0, NULL, NULL);
+ 0, 0, NULL);
if (!mmu_page_header_cache)
goto nomem;

Chris

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.