mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yan Zhao <yan.y.zhao@intel.com>
To: Ackerley Tng <ackerleytng@google.com>
Cc: <vannapurve@google.com>, <pbonzini@redhat.com>,
	<seanjc@google.com>, <linux-kernel@vger.kernel.org>,
	<kvm@vger.kernel.org>, <x86@kernel.org>,
	<rick.p.edgecombe@intel.com>, <dave.hansen@intel.com>,
	<kirill.shutemov@intel.com>, <tabba@google.com>,
	<quic_eberman@quicinc.com>, <michael.roth@amd.com>,
	<david@redhat.com>, <vbabka@suse.cz>, <jroedel@suse.de>,
	<thomas.lendacky@amd.com>, <pgonda@google.com>,
	<zhiquan1.li@intel.com>, <fan.du@intel.com>, <jun.miao@intel.com>,
	<ira.weiny@intel.com>, <isaku.yamahata@intel.com>,
	<xiaoyao.li@intel.com>, <binbin.wu@linux.intel.com>,
	<chao.p.peng@intel.com>
Subject: Re: [RFC PATCH 08/21] KVM: TDX: Increase/decrease folio ref for huge pages
Date: Thu, 5 Jun 2025 10:42:45 +0800	[thread overview]
Message-ID: <aEEEJbTzlncbRaRA@yzhao56-desk.sh.intel.com> (raw)
In-Reply-To: <diqzfrgfp95d.fsf@ackerleytng-ctop.c.googlers.com>

On Wed, Jun 04, 2025 at 01:02:54PM -0700, Ackerley Tng wrote:
> Yan Zhao <yan.y.zhao@intel.com> writes:
> 
> > On Mon, May 12, 2025 at 09:53:43AM -0700, Vishal Annapurve wrote:
> >> On Sun, May 11, 2025 at 7:18 PM Yan Zhao <yan.y.zhao@intel.com> wrote:
> >> > ...
> >> > >
> >> > > I might be wrongly throwing out some terminologies here then.
> >> > > VM_PFNMAP flag can be set for memory backed by folios/page structs.
> >> > > udmabuf seems to be working with pinned "folios" in the backend.
> >> > >
> >> > > The goal is to get to a stage where guest_memfd is backed by pfn
> >> > > ranges unmanaged by kernel that guest_memfd owns and distributes to
> >> > > userspace, KVM, IOMMU subject to shareability attributes. if the
> >> > OK. So from point of the reset part of kernel, those pfns are not regarded as
> >> > memory.
> >> >
> >> > > shareability changes, the users will get notified and will have to
> >> > > invalidate their mappings. guest_memfd will allow mmaping such ranges
> >> > > with VM_PFNMAP flag set by default in the VMAs to indicate the need of
> >> > > special handling/lack of page structs.
> >> > My concern is a failable invalidation notifer may not be ideal.
> >> > Instead of relying on ref counts (or other mechanisms) to determine whether to
> >> > start shareabilitiy changes, with a failable invalidation notifier, some users
> >> > may fail the invalidation and the shareability change, even after other users
> >> > have successfully unmapped a range.
> >>
> >> Even if one user fails to invalidate its mappings, I don't see a
> >> reason to go ahead with shareability change. Shareability should not
> >> change unless all existing users let go of their soon-to-be-invalid
> >> view of memory.
> 
> Hi Yan,
> 
> While working on the 1G (aka HugeTLB) page support for guest_memfd
> series [1], we took into account conversion failures too. The steps are
> in kvm_gmem_convert_range(). (It might be easier to pull the entire
> series from GitHub [2] because the steps for conversion changed in two
> separate patches.)
> 
> We do need to handle errors across ranges to be converted, possibly from
> different memslots. The goal is to either have the entire conversion
> happen (including page split/merge) or nothing at all when the ioctl
> returns.
> 
> We try to undo the restructuring (whether split or merge) and undo any
> shareability changes on error (barring ENOMEM, in which case we leave a
> WARNing).
As the undo can fail (as the case you leave a WARNing, in patch 38 in [1]), it
can lead to WARNings in kernel with folios not being properly added to the
filemap.

> The part we don't restore is the presence of the pages in the host or
> guest page tables. For that, our idea is that if unmapped, the next
> access will just map it in, so there's no issue there.

I don't think so.

As in patch 38 in [1], on failure, it may fail to
- restore the shareability
- restore the folio's filemap status
- restore the folio's hugetlb stash metadata
- restore the folio's merged/split status

Also, the host page table is not restored.


> > My thinking is that:
> >
> > 1. guest_memfd starts shared-to-private conversion
> > 2. guest_memfd sends invalidation notifications
> >    2.1 invalidate notification --> A --> Unmap and return success
> >    2.2 invalidate notification --> B --> Unmap and return success
> >    2.3 invalidate notification --> C --> return failure
> > 3. guest_memfd finds 2.3 fails, fails shared-to-private conversion and keeps
> >    shareability as shared
> >
> > Though the GFN remains shared after 3, it's unmapped in user A and B in 2.1 and
> > 2.2. Even if additional notifications could be sent to A and B to ask for
> > mapping the GFN back, the map operation might fail. Consequently, A and B might
> > not be able to restore the mapped status of the GFN.
> 
> For conversion we don't attempt to restore mappings anywhere (whether in
> guest or host page tables). What do you think of not restoring the
> mappings?
It could cause problem if the mappings in S-EPT can't be restored.

For TDX private-to-shared conversion, if kvm_gmem_convert_should_proceed() -->
kvm_gmem_unmap_private() --> kvm_mmu_unmap_gfn_range() fails in the end, then
the GFN shareability is restored to private. The next guest access to
the partially unmapped private memory can meet a fatal error: "access before
acceptance".

It could occur in such a scenario:
1. TD issues a TDVMCALL_MAP_GPA to convert a private GFN to shared
2. Conversion fails in KVM.
3. set_memory_decrypted() fails in TD.
4. TD thinks the GFN is still accepted as private and accesses it.


> > For IOMMU mappings, this
> > could result in DMAR failure following a failed attempt to do shared-to-private
> > conversion.
> 
> I believe the current conversion setup guards against this because after
> unmapping from the host, we check for any unexpected refcounts.
Right, it's fine if we check for any unexpected refcounts.


> (This unmapping is not the unmapping we're concerned about, since this is
> shared memory, and unmapping doesn't go through TDX.)
> 
> Coming back to the refcounts, if the IOMMU had mappings, these refcounts
> are "unexpected". The conversion ioctl will return to userspace with an
> error.
> 
> IO can continue to happen, since the memory is still mapped in the
> IOMMU. The memory state is still shared. No issue there.
> 
> In RFCv2 [1], we expect userspace to see the error, then try and remove
> the memory from the IOMMU, and then try conversion again.
I don't think it's right to depend on that userspace could always perform in 
kernel's expected way, i.e. trying conversion until it succeeds.

We need to restore to the previous status (which includes the host page table)
if conversion can't be done.
That said, in my view, a better flow would be:

1. guest_memfd sends a pre-invalidation request to users (users here means the
   consumers in kernel of memory allocated from guest_memfd).

2. Users (A, B, ..., X) perform pre-checks to determine if invalidation can
   proceed. For example, in the case of TDX, this might involve memory
   allocation and page splitting.

3. Based on the pre-check results, guest_memfd either aborts the invalidation or
   proceeds by sending the actual invalidation request.

4. Users (A-X) perform the actual unmap operation, ensuring it cannot fail. For
   TDX, the unmap must succeed unless there are bugs in the KVM or TDX module.
   In such cases, TDX can callback guest_memfd to inform the poison-status of
   the page or elevate the page reference count.

5. guest_memfd completes the invalidation process. If the memory is marked as
   "poison," guest_memfd can handle it accordingly. If the page has an elevated
   reference count, guest_memfd may not need to take special action, as the
   elevated count prevents the OS from reallocating the page.
   (but from your reply below, seems a callback to guest_memfd is a better
   approach).


> The part in concern here is unmapping failures of private pages, for
> private-to-shared conversions, since that part goes through TDX and
> might fail.
IMO, even for TDX, the real unmap must not fail unless there are bugs in the KVM
or TDX module.
So, for page splitting in S-EPT, I prefer to try splitting in the
pre-invalidation phase before conducting any real unmap.


> One other thing about taking refcounts is that in RFCv2,
> private-to-shared conversions assume that there are no refcounts on the
> private pages at all. (See filemap_remove_folio_for_restructuring() in
> [3])
>
> Haven't had a chance to think about all the edge cases, but for now I
> think on unmapping failure, in addition to taking a refcount, we should
> return an error at least up to guest_memfd, so that guest_memfd could
> perhaps keep the refcount on that page, but drop the page from the
> filemap. Another option could be to track messed up addresses and always
> check that on conversion or something - not sure yet.

It looks good to me. See the bullet 4 in my proposed flow above.

> Either way, guest_memfd must know. If guest_memfd is not informed, on a
> next conversion request, the conversion will just spin in
> filemap_remove_folio_for_restructuring().
It makes sense.


> What do you think of this part about informing guest_memfd of the
> failure to unmap?
So, do you want to add a guest_memfd callback to achieve this purpose?


BTW, here's an analysis of why we can't let kvm_mmu_unmap_gfn_range()
and mmu_notifier_invalidate_range_start() fail, based on the repo
https://github.com/torvalds/linux.git, commit cd2e103d57e5 ("Merge tag
'hardening-v6.16-rc1-fix1-take2' of
git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux")

1. Status of mmu notifier
-------------------------------
(1) There're 34 direct callers of mmu_notifier_invalidate_range_start().
    1. clear_refs_write
    2. do_pagemap_scan
    3. uprobe_write_opcode
    4. do_huge_zero_wp_pmd
    5. __split_huge_pmd (N)
    6. __split_huge_pud (N)
    7. move_pages_huge_pmd
    8. copy_hugetlb_page_range
    9. hugetlb_unshare_pmds  (N)
    10. hugetlb_change_protection
    11. hugetlb_wp
    12. unmap_hugepage_range (N)
    13. move_hugetlb_page_tables
    14. collapse_huge_page
    15. retract_page_tables
    16. collapse_pte_mapped_thp
    17. write_protect_page
    18. replace_page
    19. madvise_free_single_vma
    20. wp_clean_pre_vma
    21. wp_page_copy 
    22. zap_page_range_single_batched (N)
    23. unmap_vmas (N)
    24. copy_page_range 
    25. remove_device_exclusive_entry
    26. migrate_vma_collect
    27. __migrate_device_pages
    28. change_pud_range 
    29. move_page_tables
    30. page_vma_mkclean_one
    31. try_to_unmap_one
    32. try_to_migrate_one
    33. make_device_exclusive
    34. move_pages_pte

Of these 34 direct callers, those marked with (N) cannot tolerate
mmu_notifier_invalidate_range_start() failing. I have not yet investigated all
34 direct callers one by one, so the list of (N) is incomplete.

For 5. __split_huge_pmd(), Documentation/mm/transhuge.rst says:
"Note that split_huge_pmd() doesn't have any limitations on refcounting:
pmd can be split at any point and never fails." This is because split_huge_pmd()
serves as a graceful fallback design for code walking pagetables but unaware
about huge pmds.


(2) There's 1 direct caller of mmu_notifier_invalidate_range_start_nonblock(),
__oom_reap_task_mm(), which only expects the error -EAGAIN.

In mn_hlist_invalidate_range_start():
"WARN_ON(mmu_notifier_range_blockable(range) || _ret != -EAGAIN);"


(3) For DMAs, drivers need to invoke pin_user_pages() to pin memory. In that
case, they don't need to register mmu notifier.

Or, device drivers can pin pages via get_user_pages*(), and register for mmu         
notifier callbacks for the memory range. Then, upon receiving a notifier         
"invalidate range" callback , stop the device from using the range, and unpin    
the pages.

See Documentation/core-api/pin_user_pages.rst.


2. Cases that cannot tolerate failure of mmu_notifier_invalidate_range_start()
-------------------------------
(1) Error fallback cases.

    1. split_huge_pmd() as mentioned in Documentation/mm/transhuge.rst.
       split_huge_pmd() is designed as a graceful fallback without failure.

       split_huge_pmd
        |->__split_huge_pmd
           |->mmu_notifier_range_init
           |  mmu_notifier_invalidate_range_start
           |  split_huge_pmd_locked
           |  mmu_notifier_invalidate_range_end


    2. in fs/iomap/buffered-io.c, iomap_write_failed() itself is error handling.
       iomap_write_failed
         |->truncate_pagecache_range
            |->unmap_mapping_range
            |  |->unmap_mapping_pages
            |     |->unmap_mapping_range_tree
            |        |->unmap_mapping_range_vma
            |           |->zap_page_range_single
            |              |->zap_page_range_single_batched
            |                       |->mmu_notifier_range_init
            |                       |  mmu_notifier_invalidate_range_start
            |                       |  unmap_single_vma
            |                       |  mmu_notifier_invalidate_range_end
            |->truncate_inode_pages_range
               |->truncate_cleanup_folio
                  |->if (folio_mapped(folio))
                  |     unmap_mapping_folio(folio);
                         |->unmap_mapping_range_tree
                            |->unmap_mapping_range_vma
                               |->zap_page_range_single
                                  |->zap_page_range_single_batched
                                     |->mmu_notifier_range_init
                                     |  mmu_notifier_invalidate_range_start
                                     |  unmap_single_vma
                                     |  mmu_notifier_invalidate_range_end

   3. in mm/memory.c, zap_page_range_single() is invoked to handle error.
      remap_pfn_range_notrack
        |->int error = remap_pfn_range_internal(vma, addr, pfn, size, prot);
        |  if (!error)
        |      return 0;
	|  zap_page_range_single
           |->zap_page_range_single_batched
              |->mmu_notifier_range_init
              |  mmu_notifier_invalidate_range_start
              |  unmap_single_vma
              |  mmu_notifier_invalidate_range_end

   4. in kernel/events/core.c, zap_page_range_single() is invoked to clear any
      partial mappings on error.

      perf_mmap
        |->ret = map_range(rb, vma);
                 |  err = remap_pfn_range
                 |->if (err) 
                 |     zap_page_range_single
                        |->zap_page_range_single_batched
                           |->mmu_notifier_range_init
                           |  mmu_notifier_invalidate_range_start
                           |  unmap_single_vma
                           |  mmu_notifier_invalidate_range_end


   5. in mm/memory.c, unmap_mapping_folio() is invoked to unmap posion page.

      __do_fault
	|->if (unlikely(PageHWPoison(vmf->page))) { 
	|	vm_fault_t poisonret = VM_FAULT_HWPOISON;
	|	if (ret & VM_FAULT_LOCKED) {
	|		if (page_mapped(vmf->page))
	|			unmap_mapping_folio(folio);
        |                       |->unmap_mapping_range_tree
        |                          |->unmap_mapping_range_vma
        |                             |->zap_page_range_single
        |                                |->zap_page_range_single_batched
        |                                   |->mmu_notifier_range_init
        |                                   |  mmu_notifier_invalidate_range_start
        |                                   |  unmap_single_vma
        |                                   |  mmu_notifier_invalidate_range_end
	|		if (mapping_evict_folio(folio->mapping, folio))
	|			poisonret = VM_FAULT_NOPAGE; 
	|		folio_unlock(folio);
	|	}
	|	folio_put(folio);
	|	vmf->page = NULL;
	|	return poisonret;
	|  }


  6. in mm/vma.c, in __mmap_region(), unmap_region() is invoked to undo any
     partial mapping done by a device driver.

     __mmap_new_vma
       |->__mmap_new_file_vma(map, vma);
          |->error = mmap_file(vma->vm_file, vma);
          |  if (error)
          |     unmap_region
                 |->unmap_vmas
                    |->mmu_notifier_range_init
                    |  mmu_notifier_invalidate_range_start
                    |  unmap_single_vma
                    |  mmu_notifier_invalidate_range_end


(2) No-fail cases
-------------------------------
1. iput() cannot fail. 

iput
 |->iput_final
    |->WRITE_ONCE(inode->i_state, state | I_FREEING);
    |  inode_lru_list_del(inode);
    |  evict(inode);
       |->op->evict_inode(inode);
          |->shmem_evict_inode
             |->shmem_truncate_range
                |->truncate_inode_pages_range
                   |->truncate_cleanup_folio
                      |->if (folio_mapped(folio))
                      |     unmap_mapping_folio(folio);
                            |->unmap_mapping_range_tree
                               |->unmap_mapping_range_vma
                                  |->zap_page_range_single
                                     |->zap_page_range_single_batched
                                        |->mmu_notifier_range_init
                                        |  mmu_notifier_invalidate_range_start
                                        |  unmap_single_vma
                                        |  mmu_notifier_invalidate_range_end


2. exit_mmap() cannot fail

exit_mmap
  |->mmu_notifier_release(mm);
     |->unmap_vmas(&tlb, &vmi.mas, vma, 0, ULONG_MAX, ULONG_MAX, false);
        |->mmu_notifier_range_init
        |  mmu_notifier_invalidate_range_start
        |  unmap_single_vma
        |  mmu_notifier_invalidate_range_end


3. KVM Cases That Cannot Tolerate Unmap Failure
-------------------------------
Allowing unmap operations to fail in the following scenarios would make it very
difficult or even impossible to handle the failure:

(1) __kvm_mmu_get_shadow_page() is designed to reliably obtain a shadow page
without expecting any failure.

mmu_alloc_direct_roots
  |->mmu_alloc_root
     |->kvm_mmu_get_shadow_page
        |->__kvm_mmu_get_shadow_page
           |->kvm_mmu_alloc_shadow_page
              |->account_shadowed
                 |->kvm_mmu_slot_gfn_write_protect
                    |->kvm_tdp_mmu_write_protect_gfn
                       |->write_protect_gfn
                          |->tdp_mmu_iter_set_spte


(2) kvm_vfio_release() and kvm_vfio_file_del() cannot fail

kvm_vfio_release/kvm_vfio_file_del
 |->kvm_vfio_update_coherency
    |->kvm_arch_unregister_noncoherent_dma
       |->kvm_noncoherent_dma_assignment_start_or_stop
          |->kvm_zap_gfn_range
             |->kvm_tdp_mmu_zap_leafs
                |->tdp_mmu_zap_leafs
                   |->tdp_mmu_iter_set_spte


(3) There're lots of callers of __kvm_set_or_clear_apicv_inhibit() currently
never expect failure of unmap.

__kvm_set_or_clear_apicv_inhibit
  |->kvm_zap_gfn_range
     |->kvm_tdp_mmu_zap_leafs
        |->tdp_mmu_zap_leafs
           |->tdp_mmu_iter_set_spte



4. Cases in KVM where it's hard to make tdp_mmu_set_spte() (update SPTE with
write mmu_lock) failable.

(1) kvm_vcpu_flush_tlb_guest()

kvm_vcpu_flush_tlb_guest
  |->kvm_mmu_sync_roots
     |->mmu_sync_children
        |->kvm_vcpu_write_protect_gfn
           |->kvm_mmu_slot_gfn_write_protect
              |->kvm_tdp_mmu_write_protect_gfn
                 |->write_protect_gfn
                    |->tdp_mmu_iter_set_spte
                       |->tdp_mmu_set_spte


(2) handle_removed_pt() and handle_changed_spte().


Thanks
Yan

  reply	other threads:[~2025-06-05  2:45 UTC|newest]

Thread overview: 294+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24  3:00 [RFC PATCH 00/21] KVM: TDX huge page support for private memory Yan Zhao
2025-04-24  3:04 ` [RFC PATCH 01/21] KVM: gmem: Allocate 2M huge page from guest_memfd backend Yan Zhao
2025-04-24  3:04 ` [RFC PATCH 02/21] x86/virt/tdx: Enhance tdh_mem_page_aug() to support huge pages Yan Zhao
2025-04-24  7:48   ` Kirill A. Shutemov
2025-04-24  8:41     ` Yan Zhao
2025-04-25  6:51   ` Binbin Wu
2025-04-25  7:19     ` Yan Zhao
2025-05-13 18:52   ` Edgecombe, Rick P
2025-05-16  9:05     ` Yan Zhao
2025-05-16 17:10       ` Edgecombe, Rick P
2025-06-19  9:26       ` Nikolay Borisov
2025-06-23  9:32         ` Yan Zhao
2025-05-15  2:16   ` Chao Gao
2025-05-16  9:07     ` Yan Zhao
2025-07-08  8:48   ` Yan Zhao
2025-07-08 13:55     ` Edgecombe, Rick P
2025-07-08 15:29       ` Vishal Annapurve
2025-07-08 15:32         ` Edgecombe, Rick P
2025-07-08 22:06           ` Vishal Annapurve
2025-07-08 23:16             ` Edgecombe, Rick P
2025-07-08 23:31               ` Vishal Annapurve
2025-07-09  2:23       ` Yan Zhao
2025-07-09 14:08         ` Edgecombe, Rick P
2025-04-24  3:04 ` [RFC PATCH 03/21] x86/virt/tdx: Add SEAMCALL wrapper tdh_mem_page_demote() Yan Zhao
2025-04-25  7:12   ` Binbin Wu
2025-04-25  7:17     ` Yan Zhao
2025-04-25  7:25       ` Binbin Wu
2025-04-25  9:24         ` Yan Zhao
2025-05-13 18:19   ` Edgecombe, Rick P
2025-05-15  8:26     ` Yan Zhao
2025-05-15 17:28       ` Edgecombe, Rick P
2025-05-16  2:23         ` Yan Zhao
2025-07-01 21:15         ` Edgecombe, Rick P
2025-04-24  3:05 ` [RFC PATCH 04/21] KVM: TDX: Enforce 4KB mapping level during TD build Time Yan Zhao
2025-04-24  7:55   ` Kirill A. Shutemov
2025-04-24  8:49     ` Yan Zhao
2025-05-13 19:12   ` Edgecombe, Rick P
2025-05-15  9:16     ` Yan Zhao
2025-05-15 17:32       ` Edgecombe, Rick P
2025-05-16 10:05         ` Yan Zhao
2025-04-24  3:05 ` [RFC PATCH 05/21] KVM: TDX: Enhance tdx_clear_page() to support huge pages Yan Zhao
2025-05-13 19:17   ` Edgecombe, Rick P
2025-05-16  2:02     ` Yan Zhao
2025-04-24  3:05 ` [RFC PATCH 06/21] KVM: TDX: Assert the reclaimed pages were mapped as expected Yan Zhao
2025-05-13 19:25   ` Edgecombe, Rick P
2025-05-16  2:11     ` Yan Zhao
2025-05-16 17:34       ` Edgecombe, Rick P
2025-04-24  3:05 ` [RFC PATCH 07/21] KVM: TDX: Add a helper for WBINVD on huge pages with TD's keyID Yan Zhao
2025-05-06  8:37   ` Binbin Wu
2025-05-16  3:10     ` Yan Zhao
2025-05-13 19:29   ` Edgecombe, Rick P
2025-05-16  3:03     ` Yan Zhao
2025-05-16 17:35       ` Edgecombe, Rick P
2025-04-24  3:06 ` [RFC PATCH 08/21] KVM: TDX: Increase/decrease folio ref for huge pages Yan Zhao
2025-04-29  0:17   ` Vishal Annapurve
2025-04-29  0:49     ` Yan Zhao
2025-04-29 13:46       ` Vishal Annapurve
2025-05-06  0:53         ` Yan Zhao
2025-05-06  5:08           ` Vishal Annapurve
2025-05-06  6:04             ` Yan Zhao
2025-05-06 13:18               ` Vishal Annapurve
2025-05-07  7:37                 ` Yan Zhao
2025-05-07 14:56                   ` Vishal Annapurve
2025-05-08  1:30                     ` Yan Zhao
2025-05-08 14:10                       ` Vishal Annapurve
2025-05-09  3:20                         ` Yan Zhao
2025-05-09 14:20                           ` Vishal Annapurve
2025-05-09 23:45                             ` Edgecombe, Rick P
2025-05-10  0:41                               ` Vishal Annapurve
2025-05-12 21:59                                 ` Edgecombe, Rick P
2025-05-12  2:15                             ` Yan Zhao
2025-05-12 16:53                               ` Vishal Annapurve
2025-05-15  3:01                                 ` Yan Zhao
2025-06-04 20:02                                   ` Ackerley Tng
2025-06-05  2:42                                     ` Yan Zhao [this message]
2025-06-05 21:12                                       ` Ackerley Tng
2025-06-16 10:43                                         ` Yan Zhao
2025-06-16 23:27                                           ` Edgecombe, Rick P
2025-06-11 14:30                                       ` Vishal Annapurve
2025-06-16  9:59                                         ` Yan Zhao
2025-06-17  0:12                                           ` Edgecombe, Rick P
2025-06-17  1:38                                             ` Yan Zhao
2025-06-17 15:52                                               ` Edgecombe, Rick P
2025-06-18  0:19                                                 ` Yan Zhao
2025-06-18  0:41                                                   ` Edgecombe, Rick P
2025-06-23  9:27                                                     ` Yan Zhao
2025-06-23 18:20                                                       ` Edgecombe, Rick P
     [not found]                                                       ` <draft-diqzh606mcz0.fsf@ackerleytng-ctop.c.googlers.com>
2025-06-23 22:48                                                         ` Ackerley Tng
2025-06-24 10:18                                                           ` Yan Zhao
2025-06-24 21:29                                                             ` Ackerley Tng
2025-06-24 22:22                                                               ` Edgecombe, Rick P
2025-06-24 22:00                                                           ` Edgecombe, Rick P
2025-06-24 22:14                                                             ` Edgecombe, Rick P
2025-06-24 23:30                                                             ` Ackerley Tng
2025-06-25  0:01                                                               ` Edgecombe, Rick P
2025-06-25  7:29                                                                 ` Yan Zhao
2025-06-25 23:09                                                                 ` Ackerley Tng
2025-06-25 23:19                                                                   ` Edgecombe, Rick P
2025-06-26 15:16                                                                     ` Shutemov, Kirill
2025-06-26 22:19                                                                       ` Edgecombe, Rick P
2025-06-27 17:59                                                                         ` Ackerley Tng
2025-06-30 11:13                                                                           ` Yan Zhao
2025-06-30 17:55                                                                             ` Edgecombe, Rick P
2025-06-30 19:25                                                                               ` Ackerley Tng
2025-06-30 21:45                                                                                 ` Edgecombe, Rick P
2025-07-01  5:01                                                                                   ` Yan Zhao
2025-07-01  5:22                                                                                     ` Vishal Annapurve
2025-07-01  6:03                                                                                       ` Yan Zhao
2025-07-01  7:13                                                                                         ` Vishal Annapurve
2025-07-01 14:15                                                                                           ` Edgecombe, Rick P
2025-07-01 22:09                                                                                         ` Ackerley Tng
2025-07-02 11:24                                                                                           ` Yan Zhao
2025-07-02 18:43                                                                                             ` Ackerley Tng
2025-07-03  4:54                                                                                               ` Yan Zhao
2025-07-14 19:32                                                                                                 ` Ackerley Tng
2025-07-01 16:13                                                                                     ` Edgecombe, Rick P
2025-07-01 21:48                                                                                       ` Ackerley Tng
2025-07-01 21:57                                                                                         ` Ackerley Tng
2025-07-01 22:37                                                                                         ` Edgecombe, Rick P
2025-07-02 20:57                                                                                           ` Ackerley Tng
2025-07-02 23:51                                                                                             ` Edgecombe, Rick P
2025-07-08 21:19                                                                                               ` Ackerley Tng
2025-07-11  1:46                                                                                                 ` Edgecombe, Rick P
2025-07-11  5:12                                                                                                   ` Yan Zhao
2025-07-11 16:14                                                                                                     ` Edgecombe, Rick P
2025-07-14 19:49                                                                                                       ` Ackerley Tng
2025-07-15 15:08                                                                                                         ` Edgecombe, Rick P
2025-07-15 22:31                                                                                                           ` Ackerley Tng
2025-07-02  9:08                                                                                       ` Yan Zhao
2025-07-02 15:28                                                                                         ` Edgecombe, Rick P
2025-07-01  5:07                                                                                 ` Yan Zhao
2025-07-01 22:01                                                                                   ` Ackerley Tng
2025-07-01 22:26                                                                                     ` Ackerley Tng
2025-06-30 21:47                                                                               ` Vishal Annapurve
2025-07-01  9:35                                                                               ` Yan Zhao
2025-07-01 13:32                                                                                 ` Vishal Annapurve
2025-07-01 14:02                                                                                   ` Vishal Annapurve
2025-07-01 15:42                                                                                     ` Edgecombe, Rick P
2025-07-01 16:14                                                                                   ` Edgecombe, Rick P
2025-07-02  8:54                                                                                   ` Yan Zhao
2025-07-02 13:12                                                                                     ` Vishal Annapurve
2025-06-25  7:08                                                               ` Yan Zhao
2025-06-25 22:54                                                                 ` Ackerley Tng
2025-06-24 22:03                                                           ` Edgecombe, Rick P
2025-06-17  0:25                                           ` Edgecombe, Rick P
2025-06-17  2:00                                             ` Yan Zhao
2025-06-17  3:51                                           ` Vishal Annapurve
2025-06-17  6:52                                             ` Yan Zhao
2025-06-17  8:09                                               ` Vishal Annapurve
2025-06-17  9:57                                                 ` Yan Zhao
2025-06-18  4:25                                                   ` Vishal Annapurve
2025-06-18  0:34                                                 ` Edgecombe, Rick P
2025-06-18  0:46                                                   ` Yan Zhao
2025-06-18  4:33                                                     ` Vishal Annapurve
2025-06-18  6:13                                                       ` Yan Zhao
2025-06-18  6:21                                                         ` Vishal Annapurve
2025-06-18  6:32                                                           ` Yan Zhao
2025-06-18  6:44                                                             ` Vishal Annapurve
2025-06-18  6:57                                                               ` Yan Zhao
2025-06-18  4:29                                                   ` Vishal Annapurve
2025-06-19  0:22                                                     ` Edgecombe, Rick P
2025-06-05  2:47                                     ` Yan Zhao
2025-06-05 22:35                                       ` Ackerley Tng
2025-06-19  8:11                                         ` Yan Zhao
2025-06-20 18:06                                           ` Vishal Annapurve
2025-07-16  1:23                                         ` Yan Zhao
2025-07-16 20:57                                           ` Ackerley Tng
2025-07-18  5:49                                             ` Yan Zhao
2025-07-22  5:33                                               ` Ackerley Tng
2025-07-22  6:37                                                 ` Yan Zhao
2025-07-22 17:55                                                   ` Ackerley Tng
2025-05-12 19:00                           ` Ackerley Tng
2025-05-12 21:44                             ` Edgecombe, Rick P
2025-04-24  3:06 ` [RFC PATCH 09/21] KVM: TDX: Enable 2MB mapping size after TD is RUNNABLE Yan Zhao
2025-05-13 20:10   ` Edgecombe, Rick P
2025-05-16  1:35     ` Huang, Kai
2025-05-16  9:43       ` Yan Zhao
2025-05-16 22:35         ` Huang, Kai
2025-05-16 23:47           ` Edgecombe, Rick P
2025-05-19  8:32           ` Yan Zhao
2025-05-19 16:53             ` Edgecombe, Rick P
2025-05-20  9:34               ` Yan Zhao
2025-05-20 23:47                 ` Huang, Kai
2025-06-11 14:42                   ` Sean Christopherson
2025-06-12 23:39                     ` Edgecombe, Rick P
2025-06-13  0:19                       ` Sean Christopherson
2025-06-13  0:25                         ` Edgecombe, Rick P
2025-06-13  0:44                           ` Sean Christopherson
2025-06-13  0:47                             ` Edgecombe, Rick P
2025-06-13  1:32                               ` Yan Zhao
2025-06-13 21:53                                 ` Edgecombe, Rick P
2025-06-13 22:19                                   ` Sean Christopherson
2025-06-13 23:33                                     ` Edgecombe, Rick P
2025-06-16  3:14                                       ` Yan Zhao
2025-06-16 22:49                                         ` Edgecombe, Rick P
2025-06-17  0:52                                           ` Yan Zhao
2025-06-18  0:30                                             ` Yan Zhao
2025-06-20 16:31                                               ` Sean Christopherson
2025-06-23 21:44                                                 ` Edgecombe, Rick P
2025-06-24  9:57                                                   ` Yan Zhao
2025-06-24 18:35                                                     ` Edgecombe, Rick P
2025-06-25  9:28                                                       ` Yan Zhao
2025-06-25  9:36                                                         ` Yan Zhao
2025-06-25 14:48                                                           ` Edgecombe, Rick P
2025-06-26  0:50                                                             ` Yan Zhao
2025-06-25 14:47                                                         ` Edgecombe, Rick P
2025-06-26  8:53                                                           ` Yan Zhao
2025-07-01  0:42                                                             ` Edgecombe, Rick P
2025-07-01  2:41                                                               ` Yan Zhao
2025-07-01 15:36                                                                 ` Edgecombe, Rick P
2025-07-02  0:12                                                                   ` Yan Zhao
2025-07-02  0:18                                                                     ` Edgecombe, Rick P
2025-07-02  1:07                                                                       ` Yan Zhao
2025-07-02 15:26                                                                         ` Edgecombe, Rick P
2025-07-02  3:31                                                                       ` Yan Zhao
2025-06-25 13:47                                                       ` Vishal Annapurve
2025-06-25 15:51                                                         ` Edgecombe, Rick P
2025-06-18  1:22                                             ` Edgecombe, Rick P
2025-06-18 11:32                                               ` Shutemov, Kirill
2025-06-20 16:32                                                 ` Sean Christopherson
2025-06-20 17:44                                                   ` Kirill Shutemov
2025-06-20 18:40                                                     ` Sean Christopherson
2025-06-20 19:26                                                       ` Kirill Shutemov
2025-06-13  2:41                     ` Xiaoyao Li
2025-06-13  3:29                       ` Yan Zhao
2025-06-13  5:35                         ` Yan Zhao
2025-06-13  6:08                           ` Xiaoyao Li
2025-05-21 15:40                 ` Edgecombe, Rick P
2025-05-22  3:52                   ` Yan Zhao
2025-05-23 23:40                     ` Edgecombe, Rick P
2025-05-27  1:31                       ` Yan Zhao
2025-05-20 23:34             ` Huang, Kai
2025-05-21  2:35               ` Yan Zhao
2025-05-16  9:28     ` Yan Zhao
2025-04-24  3:06 ` [RFC PATCH 10/21] KVM: x86/mmu: Disallow page merging (huge page adjustment) for mirror root Yan Zhao
2025-05-13 20:15   ` Edgecombe, Rick P
2025-05-16  4:01     ` Yan Zhao
2025-05-16 17:50       ` Edgecombe, Rick P
2025-05-19  3:57         ` Yan Zhao
2025-05-19 17:42           ` Edgecombe, Rick P
2025-05-20 10:11             ` Yan Zhao
2025-04-24  3:06 ` [RFC PATCH 11/21] KVM: x86: Add "vcpu" "gfn" parameters to x86 hook private_max_mapping_level Yan Zhao
2025-04-24  3:07 ` [RFC PATCH 12/21] KVM: TDX: Determine max mapping level according to vCPU's ACCEPT level Yan Zhao
2025-05-13 21:20   ` Edgecombe, Rick P
2025-05-16  6:12     ` Xiaoyao Li
2025-05-16  6:30     ` Yan Zhao
2025-05-16 22:02       ` Edgecombe, Rick P
2025-05-19  6:39         ` Yan Zhao
2025-05-19 20:17           ` Edgecombe, Rick P
2025-04-24  3:07 ` [RFC PATCH 13/21] KVM: x86/tdp_mmu: Alloc external_spt page for mirror page table splitting Yan Zhao
2025-04-24  3:07 ` [RFC PATCH 14/21] KVM: x86/tdp_mmu: Invoke split_external_spt hook with exclusive mmu_lock Yan Zhao
2025-05-13 23:06   ` Edgecombe, Rick P
2025-05-16  9:17     ` Yan Zhao
2025-05-16 22:11       ` Edgecombe, Rick P
2025-05-19  4:01         ` Yan Zhao
2025-05-19 20:21           ` Edgecombe, Rick P
2025-05-20  5:40   ` Binbin Wu
2025-05-20  9:40     ` Yan Zhao
2025-04-24  3:08 ` [RFC PATCH 15/21] KVM: TDX: Support huge page splitting with exclusive kvm->mmu_lock Yan Zhao
2025-05-20  6:18   ` Binbin Wu
2025-05-20  9:40     ` Yan Zhao
2025-07-02 15:47   ` Edgecombe, Rick P
2025-04-24  3:08 ` [RFC PATCH 16/21] KVM: x86/mmu: Introduce kvm_split_boundary_leafs() to split boundary leafs Yan Zhao
2025-05-13 22:56   ` Edgecombe, Rick P
2025-05-16  7:46     ` Yan Zhao
2025-05-16  8:03       ` Yan Zhao
2025-05-16 22:27         ` Edgecombe, Rick P
2025-05-19  8:12           ` Yan Zhao
2025-05-16 11:44       ` Yan Zhao
2025-05-16 22:16         ` Edgecombe, Rick P
2025-04-24  3:08 ` [RFC PATCH 17/21] KVM: Change the return type of gfn_handler_t() from bool to int Yan Zhao
2025-04-24  3:08 ` [RFC PATCH 18/21] KVM: x86: Split huge boundary leafs before private to shared conversion Yan Zhao
2025-05-09 23:34   ` Edgecombe, Rick P
2025-05-12  2:25     ` Yan Zhao
2025-05-12 21:53       ` Edgecombe, Rick P
2025-04-24  3:08 ` [RFC PATCH 19/21] KVM: gmem: Split huge boundary leafs for punch hole of private memory Yan Zhao
2025-04-24 10:19   ` Francesco Lavra
2025-04-25  1:55     ` Yan Zhao
2025-05-13 22:59   ` Edgecombe, Rick P
2025-05-16  8:19     ` Yan Zhao
2025-04-24  3:09 ` [RFC PATCH 20/21] KVM: x86: Force a prefetch fault's max mapping level to 4KB for TDX Yan Zhao
2025-05-13 23:20   ` Edgecombe, Rick P
2025-05-16  8:43     ` Yan Zhao
2025-05-21  3:30   ` Binbin Wu
2025-05-21  5:03     ` Yan Zhao
2025-04-24  3:09 ` [RFC PATCH 21/21] KVM: x86: Ignore splitting huge pages in fault path " Yan Zhao
2025-05-13 21:58   ` Edgecombe, Rick P
2025-05-16  6:40     ` Yan Zhao
2025-04-24  7:35 ` [RFC PATCH 00/21] KVM: TDX huge page support for private memory Kirill A. Shutemov
2025-04-24  8:33   ` Yan Zhao
2025-04-24  9:05     ` Kirill A. Shutemov
2025-04-24  9:08       ` Juergen Gross
2025-04-24  9:49       ` Yan Zhao
2025-04-24 10:39         ` Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aEEEJbTzlncbRaRA@yzhao56-desk.sh.intel.com \
    --to=yan.y.zhao@intel.com \
    --cc=ackerleytng@google.com \
    --cc=binbin.wu@linux.intel.com \
    --cc=chao.p.peng@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=david@redhat.com \
    --cc=fan.du@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=isaku.yamahata@intel.com \
    --cc=jroedel@suse.de \
    --cc=jun.miao@intel.com \
    --cc=kirill.shutemov@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=pgonda@google.com \
    --cc=quic_eberman@quicinc.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    --cc=tabba@google.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vannapurve@google.com \
    --cc=vbabka@suse.cz \
    --cc=x86@kernel.org \
    --cc=xiaoyao.li@intel.com \
    --cc=zhiquan1.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®