Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user-mode binary to build system #539

Merged
merged 14 commits into from
Dec 9, 2024

Conversation

joergroedel
Copy link
Member

This PR imports the helper utility used for user-mode bring-up into the COCONUT-SVSM repository. The build script and the recipes are enhanced to compile the binary and package it into the IGVM files via a generated file-system image.

This PR also creates the directory structure for user-mode modules and introduces the joint library.

msft-jlange and others added 14 commits December 9, 2024 10:03
Exception handlers (other than IST-based exceptions) should run with
interrupts enabled if interrupts were enabled at the time the exception
was raised.  This is necessary to ensure that the `IrqState` nesting
management is not confused by nesting that might occur within an
exception handler.  In addition, most exceptions can safely tolerate
interrupts, and need not impact system stability by suppressing
interrupt delivery (this is particularly true for #VC exceptions, which
can take a long time to execute due to emulation in the host).

IST-based exceptions must keep interrupts disabled as long as they
execute on the IST stack (this currently applies only to #DF, which is
fatal anyway).

Interrupt handlers must run with interrupts disabled, but need to update
the `IrqState` in case they call into common code which attempts to
disable interrupts.

The #HV handler must also run with interrupts disabled, and similarly
needs to manage the `IrqState`.

Signed-off-by: Jon Lange <[email protected]>
Build the utility needed to pack the COCONUT file-system image in the
build script.

Signed-off-by: Joerg Roedel <[email protected]>
Enable panic='abort' for the COCONUT-SVSM workspace.

Signed-off-by: Joerg Roedel <[email protected]>
Exclude the user* packages which will implement user-space modules and
support libraries from being included in workspace tests.

Signed-off-by: Joerg Roedel <[email protected]>
Lay the foundation for user-space modules by implementing a very
basic library crate which, for now, only provides entry code
generation, system call wrappers, and panic handling.

It also contains the common linker script for all user-space modules.

Signed-off-by: Joerg Roedel <[email protected]>
Import the code used for user-space bringup as the init module into
the COCONUT-SVSM source code tree.

Signed-off-by: Joerg Roedel <[email protected]>
Reflect in the name that the function will be used to parse build
component recipes beyond the COCONUT kernel parts.

Signed-off-by: Joerg Roedel <[email protected]>
The path attribute will be used for placing user-space components into
the file-system image.

Signed-off-by: Joerg Roedel <[email protected]>
Extend the build script to build SVSM user-space components and
package them up into an image file. Include this image file into the
IGVM file if requested by the build recipe.

Signed-off-by: Joerg Roedel <[email protected]>
Include a file-system image into the IGVM file for the QEMU target.

Signed-off-by: Joerg Roedel <[email protected]>
Include a file-system image into the IGVM file for the Hyper-V target.

Signed-off-by: Joerg Roedel <[email protected]>
Include a file-system image into the IGVM file for the Vanadium target.

Signed-off-by: Joerg Roedel <[email protected]>
Include a file-system image into the IGVM files for all-targets.

Signed-off-by: Joerg Roedel <[email protected]>
Re-organize the documentation for build recipes and document the added
ability to specify how to build a user-space file-system image.

Signed-off-by: Joerg Roedel <[email protected]>
@joergroedel joergroedel merged commit 6522c67 into coconut-svsm:main Dec 9, 2024
4 checks passed
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.

3 participants