stage-2 read page fault, e.g. faults in memory as needed, but doesn't break
 CoW.  However, KVM does not mark any newly created stage-2 PTE as Accessed.
 
+In the case of confidential VM types where there is an initial set up of
+private guest memory before the guest is 'finalized'/measured, this ioctl
+should only be issued after completing all the necessary setup to put the
+guest into a 'finalized' state so that the above semantics can be reliably
+ensured.
+
 In some cases, multiple vCPUs might share the page tables.  In this
 case, the ioctl can be called in parallel.
 
 
        u8 vm_type;
        bool has_private_mem;
        bool has_protected_state;
+       bool pre_fault_allowed;
        struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES];
        struct list_head active_mmu_pages;
        struct list_head zapped_obsolete_pages;
 
        u64 end;
        int r;
 
+       if (!vcpu->kvm->arch.pre_fault_allowed)
+               return -EOPNOTSUPP;
+
        /*
         * reload is efficient when called repeatedly, so we can do it on
         * every iteration.
 
        data->gctx_paddr = __psp_pa(sev->snp_context);
        ret = sev_issue_cmd(kvm, SEV_CMD_SNP_LAUNCH_FINISH, data, &argp->error);
 
+       /*
+        * Now that there will be no more SNP_LAUNCH_UPDATE ioctls, private pages
+        * can be given to the guest simply by marking the RMP entry as private.
+        * This can happen on first access and also with KVM_PRE_FAULT_MEMORY.
+        */
+       if (!ret)
+               kvm->arch.pre_fault_allowed = true;
+
        kfree(id_auth);
 
 e_free_id_block:
 
                to_kvm_sev_info(kvm)->need_init = true;
 
                kvm->arch.has_private_mem = (type == KVM_X86_SNP_VM);
+               kvm->arch.pre_fault_allowed = !kvm->arch.has_private_mem;
        }
 
        if (!pause_filter_count || !pause_filter_thresh)
 
        kvm->arch.vm_type = type;
        kvm->arch.has_private_mem =
                (type == KVM_X86_SW_PROTECTED_VM);
+       /* Decided by the vendor code for other VM types.  */
+       kvm->arch.pre_fault_allowed =
+               type == KVM_X86_DEFAULT_VM || type == KVM_X86_SW_PROTECTED_VM;
 
        ret = kvm_page_track_init(kvm);
        if (ret)