Skip to content
Commit 0dbd0546 authored by Kunwu Chan's avatar Kunwu Chan Committed by Sean Christopherson
Browse files

KVM: x86/mmu: Use KMEM_CACHE instead of kmem_cache_create()



Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.

Note, KMEM_CACHE() uses the required alignment of the struct, '8' as the
alignment, whereas KVM's existing code passes '0'.  In the end, the two
values yield the same result as x86's minimum slab alignment is also '8'
(which is not at all coincidental).

Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Link: https://lore.kernel.org/r/20240116100025.95702-1-chentao@kylinos.cn


[sean: call out alignment behavior]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 41bccc98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment