aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/kvm/vcpu_fp.c
diff options
context:
space:
mode:
authorNick Kossifidis <mick@ics.forth.gr>2021-11-26 20:04:11 +0200
committerPalmer Dabbelt <palmer@rivosinc.com>2022-01-09 10:40:14 -0800
commitdecf89f86ecd3c3c3de81c562010d5797bea3de1 (patch)
tree00b3d4638f6ea0a6533878f306c660f8aea61d65 /arch/riscv/kvm/vcpu_fp.c
parent0e105f1d0037d677dff3c697d22f9551e6c39af8 (diff)
riscv: try to allocate crashkern region from 32bit addressible memory
When allocating crash kernel region without explicitly specifying its base address/size, memblock_phys_alloc_range will attempt to allocate memory top to bottom (memblock.bottom_up is false), so the crash kernel region will end up in highmem on 64bit systems. This way swiotlb can't work on the crash kernel, since there won't be any 32bit addressible memory available for the bounce buffers. Try to allocate 32bit addressible memory if available, for the crash kernel by restricting the top search address to be less than SZ_4G. If that fails fallback to the previous behavior. I tested this on HiFive Unmatched where the pci-e controller needs swiotlb to work, with this patch it's possible to access the pci-e controller on crash kernel and mount the rootfs from the nvme. Signed-off-by: Nick Kossifidis <mick@ics.forth.gr> Fixes: e53d28180d4d ("RISC-V: Add kdump support") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/kvm/vcpu_fp.c')
0 files changed, 0 insertions, 0 deletions