Skip to content

8388474: RISC-V: Relax satp mode check for sv57 - #32043

Closed
aprilivy wants to merge 1 commit into
openjdk:masterfrom
aprilivy:8388474-riscv-relax-satpmode-sv57
Closed

8388474: RISC-V: Relax satp mode check for sv57#32043
aprilivy wants to merge 1 commit into
openjdk:masterfrom
aprilivy:8388474-riscv-relax-satpmode-sv57

Conversation

@aprilivy

@aprilivy aprilivy commented Jul 24, 2026

Copy link
Copy Markdown
Member

Linux defaults userspace mappings to the sv48 address range even when the kernel uses sv57. HotSpot can therefore run safely on systems reporting an sv57 MMU.

This change allows SATP modes through VM_SV57 and updates the corresponding error message. VM_SV64 remains unsupported.

Testing:

  • RISC-V fastdebug HotSpot cross-build
  • QEMU RISC-V VM startup
  • Verified synthetic sv57 CPU information is accepted
  • Verified sv64 remains rejected


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8388474: RISC-V: Relax satp mode check for sv57 (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32043/head:pull/32043
$ git checkout pull/32043

Update a local copy of the PR:
$ git checkout pull/32043
$ git pull https://git.openjdk.org/jdk.git pull/32043/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 32043

View PR using the GUI difftool:
$ git pr show -t 32043

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32043.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jul 24, 2026

Copy link
Copy Markdown

👋 Welcome back aivy! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Jul 24, 2026

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot added the hotspot hotspot-dev@openjdk.org label Jul 24, 2026
@openjdk

openjdk Bot commented Jul 24, 2026

Copy link
Copy Markdown

@aprilivy The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk

openjdk Bot commented Jul 24, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jul 24, 2026
@mlbridge

mlbridge Bot commented Jul 24, 2026

Copy link
Copy Markdown

Webrevs

@zifeihan

zifeihan commented Jul 24, 2026

Copy link
Copy Markdown
Member

Hi, thanks for the contribution.
Does this overlap with #32001 ? I'm still running some tier1 tests on sv57, so the PR is still in draft status.
You can keep your PR open, and I'll close mine. I can follow up with the tier1 test results here afterward.

@aprilivy

Copy link
Copy Markdown
Member Author

Hi, thanks for the contribution. Does this overlap with #32001 ? I'm still running some tier1 tests on sv57, so the PR is still in draft status. You can keep your PR open, and I'll close mine. I can follow up with the tier1 test results here afterward.

Yes, they overlap, I missed your draft when I picked up the issue, sorry about the duplication. Please do share the sv57 tier1 results here when they finish, that system level coverage would be very helpful :)

@RealFYang

Copy link
Copy Markdown
Member

Hi, This is interesting. Besides the link to the related kernel patch on the JBS, I am wondering if this is documented anywhere? Thanks.

@aprilivy

Copy link
Copy Markdown
Member Author

Hi, This is interesting. Besides the link to the related kernel patch on the JBS, I am wondering if this is documented anywhere? Thanks.

Hi, I couldn’t find this stated in the current kernel documentation, but the current kernel source caps MMAP_VA_BITS_64 at Sv48 and derives DEFAULT_MAP_WINDOW from it:

https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/pgtable.h?plain=1#L137-L140
https://github.com/torvalds/linux/blob/master/arch/riscv/include/asm/processor.h?plain=1#L32-L40

So Sv48 is the default mapping window on an Sv57 system although it is not a strict address-space limit

@zifeihan

Copy link
Copy Markdown
Member

Hi, I've run some tier1 tests, and some hotspot-tier1 tests crash and even trigger Kernel panic. I'm not sure if this is caused by the patch. Also, I think this patch still needs some additional handling, which is why my PR (#32001) is still in draft. For convenience, I'd like to continue the tier1 testing, kernel version compatibility work, and virtual address boundary handling under my PR #32001, and I'll add you as a Contributor on my patch. Would that be okay with you?

@aprilivy

Copy link
Copy Markdown
Member Author

Hi, I've run some tier1 tests, and some hotspot-tier1 tests crash and even trigger Kernel panic. I'm not sure if this is caused by the patch. Also, I think this patch still needs some additional handling, which is why my PR (#32001) is still in draft. For convenience, I'd like to continue the tier1 testing, kernel version compatibility work, and virtual address boundary handling under my PR #32001, and I'll add you as a Contributor on my patch. Would that be okay with you?

That sounds good, thanks for investigating this further and for offering to add me as a Contributor. I’ll close this PR in favor of #32001.

@aprilivy aprilivy closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hotspot hotspot-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

3 participants