[Bug 2072381] Re: NVMe show-regs command forcibly reboots ARM-based VM
Launchpad Bug Tracker
2072381 at bugs.launchpad.net
Thu Sep 12 20:51:33 UTC 2024
This bug was fixed in the package nvme-cli - 2.8-1ubuntu0.1
---------------
nvme-cli (2.8-1ubuntu0.1) noble; urgency=medium
[ Chengen Du ]
* NVMe show-regs command forcibly reboots ARM-based VM (LP: #2072381)
- d/p/lp2072381-0001-Avoid-using-unsupported-load-store-instruct.patch
[ Heitor Alves de Siqueira ]
* Fix FTBFS due to 64-bit time_t on 32-bit architectures (LP: #2076668)
- d/p/lp2076668-use-time_t-for-time_stamp-values.patch
-- Heitor Alves de Siqueira <halves at canonical.com> Wed, 14 Aug 2024
14:29:31 +0000
** Changed in: nvme-cli (Ubuntu Noble)
Status: Fix Committed => Fix Released
--
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 Released
Status in nvme-cli source package in Jammy:
Fix Released
Status in nvme-cli source package in Mantic:
Won't Fix
Status in nvme-cli source package in Noble:
Fix Released
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