Subject: linux-next: manual merge of the kvm-x86 tree with the mm-unstable tree

From: Mark Brown <[email-masked]>
Date: Wed, 11 Mar 2026 15:00:55 +0000

Hi all,

Today's linux-next merge of the kvm-x86 tree got a conflict in:

  virt/kvm/guest_memfd.c

between commit:

  83f131e867e17 ("KVM: guest_memfd: implement userfaultfd operations")

from the mm-unstable tree and commit:

  6dad5447c7bfc ("KVM: guest_memfd: Don't set FGP_ACCESSED when getting folios")

from the kvm-x86 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc arch/x86/virt/vmx/tdx/tdx_global_metadata.c
index 4c9917a9c2c39,360963bc9328f..0000000000000
--- a/arch/x86/virt/vmx/tdx/tdx_global_metadata.c
+++ b/arch/x86/virt/vmx/tdx/tdx_global_metadata.c
@@@ -7,22 -7,7 +7,22 @@@
   * Include this file to other C file instead.
   */
  
 +static int get_tdx_sys_info_version(struct tdx_sys_info_version *sysinfo_version)
 +{
 +	int ret = 0;
 +	u64 val;
 +
 +	if (!ret && !(ret = read_sys_metadata_field(0x0800000100000003, &val)))
 +		sysinfo_version->minor_version = val;
 +	if (!ret && !(ret = read_sys_metadata_field(0x0800000100000004, &val)))
 +		sysinfo_version->major_version = val;
 +	if (!ret && !(ret = read_sys_metadata_field(0x0800000100000005, &val)))
 +		sysinfo_version->update_version = val;
 +
 +	return ret;
 +}
 +
- static int get_tdx_sys_info_features(struct tdx_sys_info_features *sysinfo_features)
+ static __init int get_tdx_sys_info_features(struct tdx_sys_info_features *sysinfo_features)
  {
  	int ret = 0;
  	u64 val;
diff --cc virt/kvm/guest_memfd.c
index 46582feeed75a,462c5c5cb602a..0000000000000
--- a/virt/kvm/guest_memfd.c
+++ b/virt/kvm/guest_memfd.c
@@@ -108,12 -107,6 +108,11 @@@ static int kvm_gmem_prepare_folio(struc
  	return __kvm_gmem_prepare_folio(kvm, slot, index, folio);
  }
  
 +static struct folio *kvm_gmem_get_folio_noalloc(struct inode *inode, pgoff_t pgoff)
 +{
- 	return __filemap_get_folio(inode->i_mapping, pgoff,
- 				   FGP_LOCK | FGP_ACCESSED, 0);
++	return filemap_lock_folio(inode->i_mapping, pgoff);
 +}
 +
  /*
   * Returns a locked folio on success.  The caller is responsible for
   * setting the up-to-date flag before the memory is mapped into the guest.