Skip to content

Conversation

@tylerfanelli
Copy link
Member

@tylerfanelli tylerfanelli commented Jan 27, 2026

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
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>
.map_err(Error::UnixWrite)?;
} else {
tx.send(()).unwrap();
let _ = tx.send(());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason why we want to ignore the error here?

Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
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