x86: 0.993 graphic: 0.965 KVM: 0.926 device: 0.915 kernel: 0.847 semantic: 0.766 user-level: 0.736 ppc: 0.693 performance: 0.679 architecture: 0.648 files: 0.608 debug: 0.601 peripherals: 0.578 register: 0.553 network: 0.537 mistranslation: 0.537 VMM: 0.492 permissions: 0.462 vnc: 0.421 PID: 0.398 hypervisor: 0.388 TCG: 0.321 risc-v: 0.316 boot: 0.295 socket: 0.209 arm: 0.189 assembly: 0.150 virtual: 0.101 i386: 0.059 Hugepages are not released after windows guest shutdown Description of problem: * Hugepages are not released after windows guest shutdown (tested with server 2019 and 2022), everything is ok with linux guests * Issue is present in both cases: shutdown is initiated by guest, and with the qemu monitor command ``system_shutdown`` * If the guest is configured with 4G as memory size, hugepages not released may vary but in most cases, only 1G are not released * Host is a x86_64 linux system, with 1G hugepages only : kernel cmline contains ``default_hugepagesz=1G hugepagesz=1G hugepages=88`` * I've done many tests with qemu components disabled (network, monitor, vnc), issue is still present with basic command line (launched as root) ``qemu-system-x86_64 -cpu host -enable-kvm -smp 4 -machine type=q35,accel=kvm -m 4G -mem-path /mnt/hugepages -drive id=drv0,file=win.qcow2 -nodefaults`` * Same issue with args in command line, with or without prealloc: -m 4G -mem-path /mnt/hugepages [-mem-prealloc] -m 4G -machine memory-backend=mem0 -object memory-backend-memfd,id=mem0,size=4G,hugetlb=on,hugetlbsize=1G[,prealloc=on] Additional information: * Hugepages release process is audited with command ``cat /proc/meminfo`` * I can't find any online documentation to help to troubleshoot used hugepages : articles suggest to audit /proc/[pid]/smaps, but here, issue is raised after qemu process terminates