On RISC-V check if hardware is RVA23 capable

Bug #2111715 reported by Heinrich Schuchardt
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Undecided
Unassigned
Noble
Won't Fix
High
Heinrich Schuchardt
Plucky
Fix Released
Undecided
Heinrich Schuchardt
Questing
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

For Ubuntu 25.10 release we plan to raise the required RISC-V ISA profile family to RVA23.

The ubuntu-release-upgrader should stop upgrades beyond Ubuntu 24.04 on hardware that does not support the RVA23U64 profile. RVA23U64 [1] is the profile relevant for user space.

As there is no upgrade path from Ubuntu 25.04 Plucky for RVA20 systems, we should also stop upgrading these RISC-V systems from Noble to Plucky. Probably a warning is adequate here.

The Noble entry is only a placeholder for the 24.04.3 milestone. All changes have to be done in the target releases (Questing, Noble).

The Linux kernel exposes available extensions via /proc/cpuinfo field ISA and via the hwprobe system call [3]. Which extensions are exposed depends on the kernel revision. We are backporting a v6.14 kernel to Ubuntu 24.04. We have to restrict our check to those RVA23 extensions exposed by this kernel release.

As the ubuntu-release-upgrader is implemented in Python we should use /proc/cpuinfo for the extension detection.

[1]
RVA23 Profiles, Version 1.0, 2024-10-17
https://github.com/riscv/riscv-profiles/releases/download/rva23-rvb23-ratified/rva23-profile.pdf

[2]
RISC-V Linux User ABI
https://docs.kernel.org/arch/riscv/uabi.html

[3]
RISC-V Hardware Probing Interface
https://docs.kernel.org/arch/riscv/hwprobe.html

[ Test Plan ]

Test that Ubuntu 22.04 Jammy can be upgraded to Ubuntu 24.04 Noble on RVA20 hardware.
Test that Ubuntu 24.04 Noble cannot be upgraded to Plucky or Questing on RVA20 hardware.
Test that Ubuntu 25.04 Plucky cannot be upgraded to Questing on RVA20 hardware.
Test that Ubuntu 24.04 Noble can be upgraded to Questing on a RVA23 virtual machine.
Test that Ubuntu 24.04 Plucky can be upgraded to Questing on a RVA23 virtual machine.

Test that Ubuntu 24.04 Plucky can be upgraded to Questing on an arm64 virtual machine.

QEMU 10.0 provides all RVA23U64 extensions.

[ Where problems could occur ]

If incorrectly implemented, the upgrader might not correctly identify RVA20 and RVA23 systems and therefore might stop or allow upgrades in the wrong case.

[ Other Info ]

n/a

Related branches

Changed in ubuntu-release-upgrader (Ubuntu):
milestone: none → ubuntu-25.10
summary: - On RISC-V check if hardware is RVA23 capapble
+ On RISC-V check if hardware is RVA23 capable
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Heinrich Schuchardt (xypron)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:25.10.5

---------------
ubuntu-release-upgrader (1:25.10.5) questing; urgency=medium

  * On RISC-V check for RVA23U64 compatibility (LP: #2111715)

 -- Heinrich Schuchardt <email address hidden> Tue, 03 Jun 2025 11:03:07 +0200

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Fix Released
Revision history for this message
Laurent (maxunn) wrote :

Hi,

Since there is no hardware supporting RVA23, what is the argument of targeting RVA23 instead of RVA22 ?

Revision history for this message
Peter de Kraker (peterdekraker) wrote :

Yeah. Quite bummed that my orangepi rv2 would immediately become unsupported by newer Ubuntu versions. :(. I would understand this for 26.10 but now?? RVA22 seems much more sane and indeed as Laurent says, there is no hardware with rva23 currently?!

Changed in ubuntu-release-upgrader (Ubuntu Plucky):
assignee: nobody → Heinrich Schuchardt (xypron)
Changed in ubuntu-release-upgrader (Ubuntu Questing):
assignee: Heinrich Schuchardt (xypron) → nobody
Changed in ubuntu-release-upgrader (Ubuntu Noble):
assignee: nobody → Heinrich Schuchardt (xypron)
milestone: none → ubuntu-24.04.3
description: updated
Paride Legovini (paride)
Changed in ubuntu-release-upgrader (Ubuntu Noble):
importance: Undecided → High
Revision history for this message
Paride Legovini (paride) wrote :

Hi, what are the plans for this bug looking at the 24.04.3 milestone specifically?

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

https://code.launchpad.net/~xypron/ubuntu-release-upgrader/+git/ubuntu-release-upgrader/+merge/488465 needs review.

The change adds a warning to do-release-upgrade if upgrading from Noble to Plucky on non-RVA23 hardware. This avoids that users find out late that there is no upgrade path beyond Plucky.

Revision history for this message
Tianon Gravi (tianon) wrote :

Do you have a plan for the container images (https://hub.docker.com/_/ubuntu), where no existing container runtime/platform yet supports "variant" for riscv64?

We have no means of setting variant for riscv64 in https://github.com/docker-library/official-images currently, but it's also hard to prioritize that work because there is no runtime which would support/use/filter by/validate it.

See also https://github.com/opencontainers/image-spec/pull/1172

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

Tianon, different container baselines already exist for amd64 where some distros changed the baseline to x86-64-v2 or higher. How is the problem solved there? Once the Open Container Initiative provides a solution for amd64 or arm64 we can reuse it for RISC-V. - Describing containers seems not to be not an ubuntu-release-upgrader issue.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

I have sponsored the upload now. Waiting in plucky unapproved.

Changed in ubuntu-release-upgrader (Ubuntu Plucky):
status: New → In Progress
Changed in ubuntu-release-upgrader (Ubuntu Noble):
status: New → In Progress
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello Heinrich, or anyone else affected,

Accepted ubuntu-release-upgrader into plucky-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:25.04.18 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-plucky to verification-done-plucky. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-plucky. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-release-upgrader (Ubuntu Plucky):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-plucky
Revision history for this message
Heinrich Schuchardt (xypron) wrote :

I have tested upgrading from Noble to Plucky with profiles rva23s64 and rva22s64 using `do-release-upgrade -p`. Only for rva22s64 a warning was shown that there is not upgrade path. The upgrade for rva23s64 from Noble to Plucky succeeds.

I verified that on amd64 the warning is not shown.

tags: added: verification-done-plucky
removed: verification-needed-plucky
Changed in ubuntu-release-upgrader (Ubuntu Noble):
status: In Progress → Won't Fix
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hi Heinrich, thanks for the verification.

The test plan lists a few upgrade tests. I reproduce them below, and have them itemized for easy reference:

a) Test that Ubuntu 22.04 Jammy can be upgraded to Ubuntu 24.04 Noble on RVA20 hardware.
b) Test that Ubuntu 24.04 Noble cannot be upgraded to Plucky or Questing on RVA20 hardware.
c) Test that Ubuntu 25.04 Plucky cannot be upgraded to Questing on RVA20 hardware.
d) Test that Ubuntu 24.04 Noble can be upgraded to Questing on a RVA23 virtual machine.
e) Test that Ubuntu 24.04 Plucky can be upgraded to Questing on a RVA23 virtual machine.
f) Test that Ubuntu 24.04 Plucky can be upgraded to Questing on an arm64 virtual machine.

Which are the ones your verification convers? (b), and perhaps (d)? I assume that wherever it says "Questing", it can be "Plucky or Questing"?

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

The version to be released to Plucky can only be invoked when coming from Noble and upgrading to Plucky. All other scenarios are not relevant here.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Ok, that strikes out (a), (c), (e), (f), and you verified (b) and (d). I guess scenarios that start from plucky were meant to test that the same fix is in questing, but we don't require actual sru testing for the devel release, just the presence of the fix there.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Doing an early release because of the 24.04.3 release this Thursday.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:25.04.18

---------------
ubuntu-release-upgrader (1:25.04.18) plucky; urgency=medium

  * On RISC-V check for RVA23U64 compatibility (LP: #2111715)

 -- Heinrich Schuchardt <email address hidden> Mon, 07 Jul 2025 17:03:16 +0200

Changed in ubuntu-release-upgrader (Ubuntu Plucky):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for ubuntu-release-upgrader has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.