* linux-next: manual merge of the kvm-arm tree with the kvm-arm-fixes tree
@ 2026-11-24 17:03 Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-11-24 17:03 UTC (permalink / raw)
To: Oliver Upton, Marc Zyngier
Cc: Fuad Tabba, Linux Kernel Mailing List, Linux Next Mailing List,
Vincent Donnefort
[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]
Hi all,
Today's linux-next merge of the kvm-arm tree got a conflict in:
arch/arm64/kvm/mmu.c
between commit:
fb92b5981ae3c ("KVM: arm64: Fix THP block mapping when the PMD level is folded")
from the kvm-arm-fixes tree and commit:
9da9b26ce1aca ("KVM: arm64: Fast fail transparent_hugepage_adjust() for non-PMD folios")
from the kvm-arm 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/arm64/kvm/mmu.c
index a0d4981ebb998,042dc53267cb3..0000000000000
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@@ -1564,25 -1566,31 +1566,31 @@@ transparent_hugepage_adjust(const struc
* sure that the HVA and IPA are sufficiently aligned and that the
* block map is contained within the memslot.
*/
- if (fault_supports_stage2_huge_mapping(s2fd, PMD_SIZE)) {
- int sz = get_user_mapping_size(kvm, s2fd->hva);
+ if (!fault_supports_stage2_huge_mapping(s2fd, PMD_SIZE))
+ return PAGE_SIZE;
- if (sz < 0)
- return sz;
+ /*
+ * If the allocated folio isn't at least PMD_SIZE, there is no way a
+ * stage-1 PMD level was installed.
+ */
+ if (s2vi->page && !folio_test_pmd_mappable(page_folio(s2vi->page)))
+ return PAGE_SIZE;
- if (sz < PMD_SIZE)
- return PAGE_SIZE;
+ /*
+ * Even though the folio size is big enough, the stage-1 mapping might
+ * have been split. Verify it.
+ */
+ sz = get_user_mapping_size(kvm, s2fd->hva);
+ if (sz < 0)
+ return sz;
- gfn = ALIGN_DOWN(gfn, PMD_SIZE >> PAGE_SHIFT);
- *gfnp = gfn;
- pfn = ALIGN_DOWN(pfn, PMD_SIZE >> PAGE_SHIFT);
- *pfnp = pfn;
+ if (sz < PMD_SIZE)
+ return PAGE_SIZE;
- return PMD_SIZE;
- }
- *gfnp &= ~(PTRS_PER_PMD - 1);
- *pfnp &= ~(PTRS_PER_PMD - 1);
++ *gfnp = ALIGN_DOWN(*gfnp, PMD_SIZE >> PAGE_SHIFT);
++ *pfnp = ALIGN_DOWN(*pfnp, PMD_SIZE >> PAGE_SHIFT);
- /* Use page mapping if we cannot use block mapping. */
- return PAGE_SIZE;
+ return PMD_SIZE;
}
static int get_vma_page_shift(struct vm_area_struct *vma)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* linux-next: manual merge of the kvm-arm tree with the kvm-arm-fixes tree
@ 2026-10-19 16:46 Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-10-19 16:46 UTC (permalink / raw)
To: Oliver Upton, Marc Zyngier
Cc: Fuad Tabba, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 3043 bytes --]
Hi all,
Today's linux-next merge of the kvm-arm tree got a conflict in:
arch/arm64/include/asm/kvm_asm.h
between commits:
ecb6b43cd2224 ("KVM: arm64: Reject the GICv5 CPU interface hypercalls under pKVM")
8c6599d4e4893 ("KVM: arm64: Reject the stage-2 flush hypercalls under pKVM")
from the kvm-arm-fixes tree and commit:
421c18edc7f3a ("Merge branch kvm-arm64/pkvm-tracing-7.4 into kvmarm-master/next")
from the kvm-arm 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 --combined arch/arm64/include/asm/kvm_asm.h
index abda476e023de,7d799cd05dcd0..0000000000000
--- a/arch/arm64/include/asm/kvm_asm.h
+++ b/arch/arm64/include/asm/kvm_asm.h
@@@ -63,17 -63,6 +63,17 @@@ enum __kvm_host_smccc_func
__KVM_HOST_SMCCC_FUNC___vgic_v3_init_lrs,
__KVM_HOST_SMCCC_FUNC___vgic_v3_get_gic_config,
__KVM_HOST_SMCCC_FUNC___pkvm_hyp_alloc_selftest,
+ __KVM_HOST_SMCCC_FUNC___vgic_v5_make_resident,
+ __KVM_HOST_SMCCC_FUNC___vgic_v5_make_non_resident,
+ __KVM_HOST_SMCCC_FUNC___vgic_v5_vdpend,
+ __KVM_HOST_SMCCC_FUNC___vgic_v5_save_apr,
+ __KVM_HOST_SMCCC_FUNC___vgic_v5_restore_vmcr_apr,
+ __KVM_HOST_SMCCC_FUNC___kvm_flush_vm_context,
+ __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_ipa,
+ __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_ipa_nsh,
+ __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid,
+ __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_range,
+ __KVM_HOST_SMCCC_FUNC___kvm_flush_cpu_context,
MARKER(__KVM_HOST_SMCCC_FUNC_MIN_PKVM),
@@@ -82,6 -71,12 +82,6 @@@
/* Hypercalls that are always available and common to [nh]VHE/pKVM. */
__KVM_HOST_SMCCC_FUNC___kvm_adjust_pc,
__KVM_HOST_SMCCC_FUNC___kvm_vcpu_run,
- __KVM_HOST_SMCCC_FUNC___kvm_flush_vm_context,
- __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_ipa,
- __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_ipa_nsh,
- __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid,
- __KVM_HOST_SMCCC_FUNC___kvm_tlb_flush_vmid_range,
- __KVM_HOST_SMCCC_FUNC___kvm_flush_cpu_context,
__KVM_HOST_SMCCC_FUNC___kvm_timer_set_cntvoff,
__KVM_HOST_SMCCC_FUNC___tracing_load,
__KVM_HOST_SMCCC_FUNC___tracing_unload,
@@@ -93,6 -88,11 +93,6 @@@
__KVM_HOST_SMCCC_FUNC___tracing_write_event,
__KVM_HOST_SMCCC_FUNC___vgic_v3_save_aprs,
__KVM_HOST_SMCCC_FUNC___vgic_v3_restore_vmcr_aprs,
- __KVM_HOST_SMCCC_FUNC___vgic_v5_make_resident,
- __KVM_HOST_SMCCC_FUNC___vgic_v5_make_non_resident,
- __KVM_HOST_SMCCC_FUNC___vgic_v5_vdpend,
- __KVM_HOST_SMCCC_FUNC___vgic_v5_save_apr,
- __KVM_HOST_SMCCC_FUNC___vgic_v5_restore_vmcr_apr,
__KVM_HOST_SMCCC_FUNC___pkvm_hyp_topup,
__KVM_HOST_SMCCC_FUNC___pkvm_hyp_reclaim,
__KVM_HOST_SMCCC_FUNC___pkvm_hyp_reclaimable,
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-24 17:03 linux-next: manual merge of the kvm-arm tree with the kvm-arm-fixes tree Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2026-10-19 16:46 Mark Brown
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®