v1
2026-09-04
s390 KVM 页分配改 kzalloc · v1
延续 gfp-to-kmalloc:将 s390 KVM 中不需要 struct page 的分配改为 kmalloc/kvmalloc,减少 memdesc 审计面。
原始补丁链接
子 Patch(4)
1/4
KVM: s390: Replace get_zeroed_page() with kzalloc() for the STHYI buffer
KVM s390 handle_sthyi() 响应缓冲区改用 kzalloc()/kfree(),替代 get_zeroed_page()/free_page(),去掉 cast,API 更简洁且性能相当。
2/4
KVM: s390: Replace get_zeroed_page() with kzalloc() for the STSI buffer
KVM s390 handle_stsi() 缓冲区改用 kzalloc()/kfree(),并把 buffer 改为 void* 去除强制转换,替代页面分配器接口,性能无差异。
3/4
KVM: s390: Replace get_zeroed_page() with kzalloc() for the GIB
kvm_s390_gib_init() 分配 GIB 改用 kzalloc(),因为 kmalloc 对 2 的幂大小映射保证页对齐,同时用 kfree() 替换 free_page(),API 更简洁。
4/4
KVM: s390: Replace get_zeroed_page() with kzalloc() for sie_page2 and CMMA
kvm_arch_init_vm() allocates struct sie_page2 that holds the facility list and the crypto control block of a VM and kvm_s390_vcpu_setup_cmma() allocates the CMMA collaborative memory management block