Page MenuHomeFreeBSD

[PPC64] Support QEMU/KVM pseries without hugepages
ClosedPublic

Authored by luporl on Jun 5 2019, 4:07 PM.
Tags
None
Referenced Files
F106170861: D20522.id58374.diff
Thu, Dec 26, 1:32 PM
Unknown Object (File)
Sat, Dec 14, 7:12 PM
Unknown Object (File)
Nov 23 2024, 8:45 AM
Unknown Object (File)
Nov 1 2024, 10:24 PM
Unknown Object (File)
Nov 1 2024, 10:24 PM
Unknown Object (File)
Nov 1 2024, 10:24 PM
Unknown Object (File)
Nov 1 2024, 10:01 PM
Unknown Object (File)
Sep 24 2024, 10:39 PM

Details

Summary

This set of changes make it possible to run FreeBSD for PowerPC64/pseries, under QEMU/KVM, without requiring the host to make hugepages available to the guest.

While there was already this possibility, by means of setting hw_direct_map to 0, on PowerPC64 there were a couple of issues/wrong assumptions that prevented this from working, before this changelist.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

luporl added reviewers: jhibbits, bdragon.
luporl added subscribers: alfredo, gromero_br.ibm.com.

Overall looks good, just one question.

sys/powerpc/aim/mmu_oea64.c
700 ↗(On Diff #58267)

Does this need the | DMAP_BASE_ADDRESS as well, like below?

sys/powerpc/aim/mmu_oea64.c
700 ↗(On Diff #58267)

I think it doesn't make much difference in this case, in a practical sense, but indeed it seems better to add the | DMAP_BASE_ADDRESS, for consistency and for getting this memory range out of the low memory addresses range.

Thanks for the explanation. It looks fine either way. I just recommend making the change for consistency, but it's not required if it's not needed.

This revision is now accepted and ready to land.Jun 7 2019, 2:59 PM
luporl added inline comments.
sys/powerpc/aim/mmu_oea64.c
700 ↗(On Diff #58267)

Well, in fact I was wrong, and | DMAP_BASE_ADDRESS can't be added in this case.
This change results in the kernel hanging right after printing the mmu_phyp message, when hugepages are off.

As moea64_bpvo_pool is used for early pvo allocation (alloc_pvo_entry), remapping the region at this point invalidate previous pvo pointers allocated from the pool.

This revision was automatically updated to reflect the committed changes.