[Bug 2072381] Re: NVMe show-regs command forcibly reboots ARM-based VM
Timo Aaltonen
2072381 at bugs.launchpad.net
Fri Aug 16 09:32:43 UTC 2024
Hello Chengen, or anyone else affected,
Accepted nvme-cli into jammy-proposed. The package will build now and be
available at https://launchpad.net/ubuntu/+source/nvme-
cli/1.16-3ubuntu0.3 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-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. 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: nvme-cli (Ubuntu Jammy)
Status: In Progress => Fix Committed
** Tags added: verification-needed-jammy
** Changed in: nvme-cli (Ubuntu Focal)
Status: In Progress => Fix Committed
** Tags added: verification-needed-focal
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nvme-cli in Ubuntu.
https://bugs.launchpad.net/bugs/2072381
Title:
NVMe show-regs command forcibly reboots ARM-based VM
Status in nvme-cli package in Ubuntu:
Fix Released
Status in nvme-cli source package in Focal:
Fix Committed
Status in nvme-cli source package in Jammy:
Fix Committed
Status in nvme-cli source package in Mantic:
Won't Fix
Status in nvme-cli source package in Noble:
Fix Committed
Status in nvme-cli source package in Oracular:
Fix Released
Bug description:
[Impact]
The ARM-based VM will reboot after executing the 'nvme show-regs' command.
[Fix]
There is an upstream commit that fixed this issue:
commit fa5a46cc25b884a61a14f06e6693373bcefff29d
Author: Oliver Upton <oliver.upton at linux.dev>
Date: Thu Jul 4 19:59:26 2024 +0200
common.h: Avoid using unsupported load/store instructions in arm64
VMs
Using nvme show-regs within a VM on arm64 can sometimes lead to VM
termination.
To answer why this happens: one of the deficiencies of the Arm
architecture is that there exists a range of load/store instructions
that have insufficient decode information for traps taken to the
hypervisor. KVM, for example, may raise an external abort or outright
terminate the VM depending on the configuration.
This is a known problem on the kernel side, and is fixed by using
assembly MMIO accessors w/ 'safe' load/store instructions. So do
exactly that, providing arm64-specific accessors and falling back to
plain old volatile pointer accesses for other architectures.
Reported-by: William Butler <wab at google.com>
Signed-off-by: Oliver Upton <oliver.upton at linux.dev>
[Test Plan]
Execute the command 'nvme show-regs /dev/nvme0' to confirm if it functions correctly.
[Where problems could occur]
The patch fixes the issue by using assembly code to access MMIO on ARM, while keeping the original approach on other platforms. If the patch encounters any issues, it will only impact the functionality of displaying register data on ARM-based platforms.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvme-cli/+bug/2072381/+subscriptions
More information about the foundations-bugs
mailing list