• Bibo Mao's avatar
    LoongArch: KVM: Optimization for memslot hugepage checking · 7ab6fb50
    Bibo Mao authored
    During shadow mmu page fault, there is checking for huge page for
    specified memslot. Page fault is hot path, check logic can be done
    when memslot is created. Here two flags are added for huge page
    checking, KVM_MEM_HUGEPAGE_CAPABLE and KVM_MEM_HUGEPAGE_INCAPABLE.
    Indeed for an optimized qemu, memslot for DRAM is always huge page
    aligned. The flag is firstly checked during hot page fault path.
    
    Now only huge page flag is supported, there is a long way for super
    page support in LoongArch system. Since super page size is 64G for
    16K pagesize and 1G for 4K pagesize, 64G physical address is rarely
    used and LoongArch kernel needs support super page for 4K. Also memory
    layout of LoongArch qemu VM should be 1G aligned.
    Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    7ab6fb50
mmu.c 25.4 KB