On Thu, 2025-04-24 at 11:09 +0800, Yan Zhao wrote: > Introduce a "prefetch" parameter to the private_max_mapping_level hook and > enforce the max mapping level of a prefetch fault for private memory to be > 4KB. This is a preparation to enable the ignoring huge page splitting in > the fault path. > > If a prefetch fault results in a 2MB huge leaf in the mirror page table, > there may not be a vCPU available to accept the corresponding 2MB huge leaf > in the S-EPT if the TD is not configured to receive #VE for page > acceptance. > Can you elaborate on this case more. A vCPU may not be available? What does that mean? > Consequently, if a vCPU accepts the page at 4KB level, it will > trigger an EPT violation to split the 2MB huge leaf generated by the > prefetch fault. The case is KVM_PRE_FAULT_MEMORY faults in 2MB, then guest accepts at 4k (which it is not supposed to do)? Then maybe the kvm_vm_dead() case I suggested in the other patch could handle this case too, and this patch could be dropped? > > Since handling the BUSY error from SEAMCALLs for huge page splitting is > more comprehensive in the fault path, which is with kvm->mmu_lock held for > reading, force the max mapping level of a prefetch fault of private memory > to be 4KB to prevent potential splitting.