TD guest boot up slowly with huge resource
Test Environment
- Host/Guest: CentOS Stream release 9
- Host/Guest kernel version: 5.14.0-362.el9s.x86_64
- Architecture: x86
- QEMU flavor: qemu-system-x86_64(/usr/libexec/qemu-kvm)
- QEMU version: qemu-kvm-8.0.0-14.el9s
Bug description When boot TD guest with large memory, for example 64G, it takes about 30 seconds slower than expected
- QEMU command line:
/usr/libexec/qemu-kvm \
-accel kvm \
-m 64G -smp 64 \
-name process=tdxvm,debug-threads=on \
-cpu host \
-object tdx-guest,id=tdx \
-machine q35,hpet=off,kernel_irqchip=split,memory-encryption=tdx,memory-backend=ram1 \
-object memory-backend-ram,id=ram1,size=64G,private=on \
-nographic -vga none \
-chardev stdio,id=mux,mux=on,signal=off -device virtio-serial -device virtconsole,chardev=mux \
-bios /usr/share/edk2/ovmf/OVMF.inteltdx.fd \
-serial chardev:mux \
-nodefaults \
-device virtio-net-pci,netdev=nic0 -netdev user,id=nic0,hostfwd=tcp::10022-:22 \
-drive file=/home/tdx/centos9.qcow2,if=none,id=virtio-disk0 \
-device virtio-blk-pci,drive=virtio-disk0 \
Edited by fanchen2