On 9/11/23 05:16, David Stevens wrote: > From: David Stevens <stevensd@xxxxxxxxxxxx> > > Handle non-refcounted pages in __kvm_faultin_pfn. This allows the host > to map memory into the guest that is backed by non-refcounted struct > pages - for example, the tail pages of higher order non-compound pages > allocated by the amdgpu driver via ttm_pool_alloc_page. > > The bulk of this change is tracking the is_refcounted_page flag so that > non-refcounted pages don't trigger page_count() == 0 warnings. This is > done by storing the flag in an unused bit in the sptes. There are no > bits available in PAE SPTEs, so non-refcounted pages can only be handled > on TDP and x86-64. > > Signed-off-by: David Stevens <stevensd@xxxxxxxxxxxx> > --- > arch/x86/kvm/mmu/mmu.c | 52 +++++++++++++++++++++++---------- > arch/x86/kvm/mmu/mmu_internal.h | 1 + > arch/x86/kvm/mmu/paging_tmpl.h | 8 +++-- > arch/x86/kvm/mmu/spte.c | 4 ++- > arch/x86/kvm/mmu/spte.h | 12 +++++++- > arch/x86/kvm/mmu/tdp_mmu.c | 22 ++++++++------ > include/linux/kvm_host.h | 3 ++ > virt/kvm/kvm_main.c | 6 ++-- > 8 files changed, 76 insertions(+), 32 deletions(-) Could you please tell which kernel tree you used for the base of this series? This patch #6 doesn't apply cleanly to stable/mainline/next/kvm error: sha1 information is lacking or useless (arch/x86/kvm/mmu/mmu.c). error: could not build fake ancestor -- Best regards, Dmitry