Skip to content

Conversation

@tylerfanelli
Copy link
Member

@tylerfanelli tylerfanelli commented Jan 27, 2026

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
@tylerfanelli tylerfanelli force-pushed the nitro-cleanup branch 2 times, most recently from bcedd53 to b37a470 Compare January 27, 2026 07:18
Modularize each error within its respected module. This allows for
clearer messages to determine the component that the error originated.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Creating the enclave VM can be thought of as a critical section that
should not be interrupted. Disable all signals while starting the
enclave VM.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
If an error occurs in device proxy threads, ensure they are logged.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
There exists shared behavior within the device proxies such as dedicated
threads for reading from and (optionally) writing to a vsock, signalling
when the proxy has shut down, and more. Extract this shared behavior
from the individual device proxy implementations themselves and
implement them within the proxy list's method for running each proxy.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Refer to the port offset directly when creating the proxy's vsock.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
The proxy threads do not return until they are finished running. Reflect
this by naming the method `run` instead of `start` which may indicate
returning after starting the proxies.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Rather than direct device emulation, the proxies act as intermediaries
between the guest and host device to provide device services. `device`
may lead some to believe that the module refers to device emulations.
Rename it to `proxy` to better reflect its/their goals.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Originally, the enclave's main process would sleep to give libkrun a
chance to read the return code before the enclave shut down. Rather than
sleep, write a 4-byte "close signal" to the enclave to notify it that
libkrun has read the return code and the enclave can now exit.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
The size of the vsock buffers should be determined on a per-proxy basis.
For example, the network proxy buffer must be determined by the
enclave TAP device's MTU. Allocate these buffers accordingly.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
With this, the signal proxy can return zero bytes written and wait for
a shutdown signal from the receiver thread.

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
@tylerfanelli tylerfanelli merged commit 4d9b499 into containers:main Jan 28, 2026
11 checks passed
@tylerfanelli tylerfanelli deleted the nitro-cleanup branch January 29, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants