From: Mark Brown <broonie@kernel•org>
To: Sean Christopherson <seanjc@google•com>
Cc: Anup Patel <anup@brainfault•org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>,
Wu Fei <wu.fei9@sanechips•com.cn>
Subject: linux-next: manual merge of the kvm-x86 tree with the kvm-riscv tree
Date: Thu, 29 Jan 2026 15:00:39 +0000 [thread overview]
Message-ID: <aXt2F2jIm5YK8LB1@sirena.org.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 2375 bytes --]
Hi 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.
diff --cc tools/testing/selftests/kvm/lib/riscv/processor.c
index 373cf4d1ed809,e6ec7c224fc3e..0000000000000
--- a/tools/testing/selftests/kvm/lib/riscv/processor.c
+++ b/tools/testing/selftests/kvm/lib/riscv/processor.c
@@@ -64,15 -68,15 +64,15 @@@ static uint64_t pte_index(struct kvm_v
void 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)
@@@ -220,14 -212,8 +221,14 @@@ void riscv_vcpu_mmu_setup(struct kvm_vc
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);
}
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-01-29 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 15:00 Mark Brown [this message]
2026-01-29 15:19 ` linux-next: manual merge of the kvm-x86 tree with the kvm-riscv tree Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2024-03-07 3:59 Stephen Rothwell
2023-08-15 6:34 Stephen Rothwell
2023-08-15 6:32 Stephen Rothwell
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=aXt2F2jIm5YK8LB1@sirena.org.uk \
--to=broonie@kernel$(echo .)org \
--cc=anup@brainfault$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=seanjc@google$(echo .)com \
--cc=wu.fei9@sanechips$(echo .)com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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