Page MenuHomeFreeBSD

arm64/vmm: Don't load on Ampere eMAG
ClosedPublic

Authored by andrew on Feb 27 2025, 9:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 28, 5:58 PM
Unknown Object (File)
Wed, Aug 27, 12:24 AM
Unknown Object (File)
Tue, Aug 26, 2:51 PM
Unknown Object (File)
Fri, Aug 22, 4:50 AM
Unknown Object (File)
Tue, Aug 19, 7:44 PM
Unknown Object (File)
Mon, Aug 18, 2:28 AM
Unknown Object (File)
Sun, Aug 17, 5:17 AM
Unknown Object (File)
Thu, Aug 14, 3:39 PM
Subscribers

Details

Summary

Loading vmm.ko on Ampere eMAG locks up the system. Block loading for
now until it can be fixed.

PR: 285051
Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62662
Build 59546: arc lint + arc unit

Event Timeline

Is there anything I could do to help fixing the root cause?

This revision is now accepted and ready to land.Feb 27 2025, 10:37 AM

After approving:
I applied the patch, compiled and installed the kernel, rebooted and tried sudo kldload vmm.
The system became unresponsive. Is a buildworld needed? I thought just building kernel
includes building the kernel modules including vmm.ko...
Any idea why the above fix did not work?

Use the correct CPU Implementer ID

This revision now requires review to proceed.Feb 27 2025, 10:54 AM

Tested again:
sudo kldload vmm
does NOT lock up the system anymore.
/var/log/messages
contains
vgic0: <Virtual GIC v3> on gic0
module_register_init: MOD_LOAD (vmm, 0xffff0002a5298574, 0) error 6
vgic0: detached
as expected.
What is unexpected for me is that after sudo kldload vmm,
kldstat reports vmm.ko as being loaded.
sudo kldunload vmm
succeeds. Is it expected, that vmm.ko is reported as loaded even though loading
of it fails?

From a quick look at kldload handling in the kernel it appears that is the expected behaviour.

From a quick look at kldload handling in the kernel it appears that is the expected behaviour.

OK.

This revision is now accepted and ready to land.Feb 27 2025, 3:03 PM
bz added inline comments.
sys/arm64/vmm/vmm.c
317

I think the comment is misleading if it's a hard freeze for the machine.

This revision was automatically updated to reflect the committed changes.