Page MenuHomeFreeBSD

vmm: add VM_DESTROY ioctl call
Needs ReviewPublic

Authored by gusev.vitaliy_gmail.com on Apr 18 2022, 10:04 PM.
Tags
Referenced Files
F102581682: D34954.diff
Thu, Nov 14, 8:38 AM
Unknown Object (File)
Sun, Nov 10, 8:15 AM
Unknown Object (File)
Oct 12 2024, 11:34 AM
Unknown Object (File)
Sep 21 2024, 1:10 PM
Unknown Object (File)
Sep 21 2024, 10:05 AM
Unknown Object (File)
Sep 8 2024, 9:05 PM
Unknown Object (File)
Sep 8 2024, 6:25 AM
Unknown Object (File)
Sep 2 2024, 5:33 PM

Details

Reviewers
None
Group Reviewers
bhyve
Summary

If bhyve compiled with capsicum support, vm_destroy() fails because sysctl calls are not allowed.

This is counterpart of https://reviews.freebsd.org/D31325 can probably can be used as replacement.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Mm, this conflicts with a change I have to make destroy synchronous due to a race with destroy not finishing before bhyve restarts in a loop. I think instead you might want some sort of model where you can set a flag when creating a VM (or perhaps via an ioctl) that causes the VM to be destroyed on last close.

The conflicting change I haven't yet uploaded for review but you can see it here: https://github.com/bsdjhb/freebsd/commit/213d5795a8a1e1835bf936d1c820ffd272e68b11

In D34954#793575, @jhb wrote:

Mm, this conflicts with a change I have to make destroy synchronous due to a race with destroy not finishing before bhyve restarts in a loop. I think instead you might want some sort of model where you can set a flag when creating a VM (or perhaps via an ioctl) that causes the VM to be destroyed on last close.

The conflicting change I haven't yet uploaded for review but you can see it here: https://github.com/bsdjhb/freebsd/commit/213d5795a8a1e1835bf936d1c820ffd272e68b11

I will check it out and update review. Thanks.