linux-next: manual merge of the kvm-x86 tree with the kvm-riscv tree
Subsystems (5)
Mark Brown
maintainerHi all,
Today's linux-next merge of the kvm-x86 tree got a conflict in:
tools/testing/selftests/kvm/lib/riscv/processor.c
between commit:
7631f7b1ccc9e ("KVM: riscv: selftests: Add riscv vm satp modes")
from the kvm-riscv tree and commit:
9f073ac25b4c4 ("KVM: selftests: Add "struct kvm_mmu" to track a given MMU instance")
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.
tools/testing/selftests/kvm/lib/riscv/processor.c +0 -0
@@@ -64,15 -68,15 +64,15 @@@ static uint64_t pte_index(struct kvm_vvoid virt_arch_pgd_alloc (struct kvm_vm *vm) { - size_t nr_pages = page_align(vm, ptrs_per_pte(vm) * 8) / vm->page_size; + size_t nr_pages = vm_page_align(vm, ptrs_per_pte(vm) * 8) / vm->page_size; -if (vm->pgd_created) +if (vm->mmu.pgd_created)return ; - vm->pgd =vm_phy_pages_alloc (vm, nr_pages, -KVM_GUEST_PAGE_TABLE_MIN_PADDR , - vm->memslots[MEM_REGION_PT ]); - vm->pgd_created = true; + vm->mmu.pgd =vm_phy_pages_alloc (vm, nr_pages, +KVM_GUEST_PAGE_TABLE_MIN_PADDR , + vm->memslots[MEM_REGION_PT ]); + vm->mmu.pgd_created = true; } void virt_arch_pg_map(struct kvm_vm *vm, uint64_t vaddr, uint64_t paddr) TEST_FAIL("Unknown guest mode, mode: 0x%x", vm->mode); } + max_satp_mode =vcpu_get_reg (vcpu,RISCV_CONFIG_REG (satp_mode)); + + if ((satp_mode >> SATP_MODE_SHIFT) > max_satp_mode) +TEST_FAIL ("Unable to set satp mode 0x%lx, max mode 0x%lx\n" , + satp_mode >>SATP_MODE_SHIFT , max_satp_mode); + - satp = (vm->pgd >>PGTBL_PAGE_SIZE_SHIFT ) &SATP_PPN ; + satp = (vm->mmu.pgd >>PGTBL_PAGE_SIZE_SHIFT ) &SATP_PPN ; - satp |=SATP_MODE_48 ; + satp |= satp_mode;vcpu_set_reg (vcpu,RISCV_GENERAL_CSR_REG (satp), satp); }
Mark Brown
maintainerQuoted 8 lines · Mark Brown
Hi all,
Today's linux-next merge of the kvm-x86 tree got a conflict in:
tools/testing/selftests/kvm/lib/riscv/processor.cbetween commit:
Quoted 7 lines
7631f7b1ccc9e("KVM: riscv: selftests: Add riscv vm satp modes")from the kvm-riscv tree and commit:
9f073ac25b4c4("KVM: selftests: Add "structkvm_mmu" to track a given MMU instance")from the kvm-x86 tree.
This also nsees the semantic fixup below:
From 11021bad2a6d62224d9216da62023e1a79cdd0dc Mon Sep 17 00:00:00 2001
From: Mark Brown <[email protected]>
Date: Thu, 29 Jan 2026 15:12:25 +0000
Subject: [PATCH] KVM: selftests: Fix up semantic changes
--- tools/testing/selftests/kvm/lib/kvm_util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/kvm/lib/kvm_util.c +3 -3
@@ -359,17 +359,17 @@ struct kvm_vm *____vm_create(struct vm_shape shape)case VM_MODE_P56V57_4K :case VM_MODE_P50V57_4K :case VM_MODE_P41V57_4K : - vm->pgtable_levels =5 ; + vm->mmu.pgtable_levels =5 ;break ;case VM_MODE_P56V48_4K :case VM_MODE_P50V48_4K :case VM_MODE_P41V48_4K : - vm->pgtable_levels =4 ; + vm->mmu.pgtable_levels =4 ;break ;case VM_MODE_P56V39_4K :case VM_MODE_P50V39_4K :case VM_MODE_P41V39_4K : - vm->pgtable_levels =3 ; + vm->mmu.pgtable_levels =3 ;break ;default :TEST_FAIL ("Unknown guest mode: 0x%x" , vm->mode);
Signature · 1 line
2.47.3