-
Notifications
You must be signed in to change notification settings - Fork 891
Add experimental NetBSD host support #137
Conversation
It's not a final version, but base for further improvements, in particular NetBSD as guest still does not boot. |
c276671
to
e9212b4
Compare
Thanks! First of all, we need you to commit to the maintenance of all the NetBSD-specific code that this PR adds to the HAXM source tree. Basically, the conditions for merging #108 (see #108 (comment)) also apply to this PR. We don't really have time to set up a NetBSD environment and test this PR. Still, if you write up some documentation ( Please allow me more time to complete the review. I'm not familiar with the BSD API, so if other people want to participate in the review (@tuxillo maybe?), please feel free to do so :-) |
BSDs are quite different at this level and I'm not really familiar with NetBSD internals. We decided not to share code initially because of this. If there are ports to other BSDs then we might decide to create some common layer but as @krytarowski pointed out, it shouldn't be the focus at this early stage. I'll keep working on the DragonFly BSD port, and I'll submit it when it is more or less ready with the lessons learned from this PR :-) |
CC: @m00nbsd - NetBSD x86 maintainer (for review of code, if there is time and interest -- for the discussion of rationale of HAXM - we already discussed internally). These exact internals are almost completely distinct and specific to NetBSD. We are probably not more similar to other BSDs (FreeBSD, DragonFlyBSD) than to Linux or Darwin. OpenBSD is a fork of NetBSD and uses UVM (with 2 decades of divergence), but it doesn't support loadable kernel modules anyway.
This support isn't complete, but good enough for start. I'm using locally in particular this patch for fpudna: I propose to reschedule |
If possible I would like to drop |
As a reviewer maybe CC: @zoulasc |
Yes, that would be great. There's no need for new code to support the |
I recommend to revisit this statement. I'm going to prepare a command-by-command tutorial how to get it done so you (and maybe @AlexAltea ) can give it a try. It will involve steps not applicable for future end-users (as patching the kernel). |
@krytarowski Thank you, I'll try to replicate your results this weekend and let you know if it works for me. EDIT: Sorry, but the whole NetBSD setup is too cumbersome. I won't be involved in testing and maintenance of this backend. |
@AlexAltea thanks! I'm looking forward to it. |
ping? |
@krytarowski Sorry, I wasn't able to make much progress last week. I'll try to complete this review today. |
Useful resources: opengrok with NetBSD sources http://src.illumos.org/source/ (http://nxr.netbsd.org/ seems to be unavailable temporarily) There are few places for cleanups, but I'm resisting myself from mutating the pending patch prior-review and scheduling it for later. |
I hope a little bit for someone to give it a try and finger me what's wrong. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed review!
- I've skipped the legacy memory allocation/mapping interfaces (
hax_{mem_alloc, mm}.c
), since I expect them to eventually fade out. - I haven't caught any serious issues. But if you decide to revise the PR based on my comments, please create new commits on the same branch, rather than amending the existing one and doing a force push. Later, you can squash the branch into a final commit.
@raphaelning done. I'm trying to leave refactoring of this code for future and get this merged as is. |
If the new version is acceptable, I will squash it and rebase on top of master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Please go ahead with the squash and rebase.
This module can already boot FREEDOS on NetBSD/amd64. Signed-off-by: Kamil Rytarowski <[email protected]>
69d94b8
to
bbf540c
Compare
Done! |
Thanks! I've noted that it didn't take long to see HAXM in action: |
This module can already boot FREEDOS on NetBSD/amd64.