Page MenuHomeFreeBSD

attempt to load vmm.ko if it's not already loaded (bhyveload)
AcceptedPublic

Authored by rob.fx907_gmail.com on Feb 28 2019, 12:58 AM.

Details

Reviewers
rgrimes
imp
araujo
jhb
bcran
Group Reviewers
bhyve
Summary

This proposed patch attempts to load vmm.ko if it's not already present in the kernel. If vmm.ko fails to load, an error message is produced and bhyveload exits.

Test Plan
  1. ensure vmm.ko is not loaded
  2. invoke bhyveload
  3. ensure vmm.ko is loaded

Diff Detail

Lint
Lint SkippedExcuse: nolint
Unit
No Unit Test Coverage
Build Status
Buildable 22802
Build 21893: arc lint + arc unit

Event Timeline

rgrimes added a reviewer: jhb.
bcran accepted this revision.Apr 8 2019, 9:55 PM
This revision is now accepted and ready to land.Apr 8 2019, 9:55 PM

@jhb Any objection if I proceed to commit this patch? I just hit the same situation "forgot to load vmm" and this patch does fix it.

@jhb Perhaps do the same with bhyverun.c?

jhb added a comment.Jul 31 2019, 10:59 PM

I wonder if it makes more sense to do this in vmrun.sh? OTOH, it's probably fine to do this. We should also probably do it in bhyverun.c since bhyveload isn't used in the UEFI case. Another option would be to do this in the vm_create() wrapper in libvmmapi in which case that would fix bhyveload, grub2-bhyve, and bhyve all in one place.

In D19400#458949, @jhb wrote:

I wonder if it makes more sense to do this in vmrun.sh? OTOH, it's probably fine to do this. We should also probably do it in bhyverun.c since bhyveload isn't used in the UEFI case. Another option would be to do this in the vm_create() wrapper in libvmmapi in which case that would fix bhyveload, grub2-bhyve, and bhyve all in one place.

Yes, I agree to do that on libvmmapi!!! I was actually think about that, because at the end I would repeat code on bhyveload and bhyverun.c
Ok, let me update this patch with the libvmmapi approach.

Thank you.

@araujo, sounds like you are taking over this review?

@araujo, sounds like you are taking over this review?

Oops, sorry not really!!! If you can go forward and do the implementation, I will be happy too. It was not my intention to taking over the review.

You’re welcome to finish it up..

I just wanted to make sure that you weren’t waiting for me to update this review.

Thanks in advance for getting these changes in.