Page MenuHomeFreeBSD

FreeBSD enablement for ARM64 in Hyper-V: fixing hung issue during Hyper-V initialization
ClosedPublic

Authored by schakrabarti_microsoft.com on Oct 30 2022, 9:36 PM.
Tags
None
Referenced Files
F86803997: D37219.id112432.diff
Tue, Jun 25, 7:56 PM
F86794204: D37219.id112433.diff
Tue, Jun 25, 4:22 PM
Unknown Object (File)
Mon, Jun 24, 10:08 PM
Unknown Object (File)
Mon, Jun 24, 8:39 PM
Unknown Object (File)
Sat, Jun 22, 8:51 PM
Unknown Object (File)
Fri, Jun 21, 2:06 PM
Unknown Object (File)
Thu, Jun 20, 10:27 PM
Unknown Object (File)
Thu, Jun 20, 2:40 PM
Subscribers

Details

Summary

In non-Hyper-V systems during Hyper-V initialization, system initialization was getting hung, as hyperv_identify(),
was returning successful irrespective of the type of the platform.

Test Plan

The change has been tested on Hyper-V on ARM64, but needs to be tested on
non-Hyper-V arm and arm64 system to validate a successful boot.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

whu requested changes to this revision.Oct 31 2022, 4:11 AM
whu added inline comments.
sys/conf/files.arm64
216 ↗(On Diff #112421)

Can you fix the indentations on these lines?

sys/dev/hyperv/vmbus/aarch64/hyperv_aarch64.c
85

Can you add some comments on what this function does? And the return values mean?

105

This will set the ret to 0 if they match. The return value is the same as above cases when it cannot find or map the fadt. It doesn't seem right.

119

See comments above. It is not right.

This revision now requires changes to proceed.Oct 31 2022, 4:11 AM

This should be 4 commits, one for each file.

sys/dev/hyperv/vmbus/aarch64/hyperv_aarch64.c
92

This should probably be named is_hyperv or similar and return a bool. The current name looks like it returns the hyper-v ID when it's just checking it it is running under it.

124

No need for the else when the if returns.

andrew added inline comments.
sys/dev/hyperv/vmbus/aarch64/hyperv_aarch64.c
111–112

These two lines could just be:

return (strncmp((char *)&hypervid, "MsHyperV", 8) == 0);
This revision was not accepted when it landed; it landed in state Needs Review.Nov 1 2022, 2:15 PM
This revision was automatically updated to reflect the committed changes.