The isolated environment is inside a virtual machine container, in a separate physical and virtual address space.

liblcd is the library kernel that runs alongside the isolated code inside the LCD and provides the functions and environment that the isolated code needs. It includes an implementation of the LIBLCD Interface.

It is built as a single static library (.a) and linked with the isolated code at compile time. The static library includes the object files in libcap, libfipc, and libasync (that's why you can call those functions inside an LCD).

Most liblcd functions are just simple wrappers around the lower-level hypercalls (defined in lcd-domains/arch/x86/include/asm/lcd_domains/liblcd.h). The memory-management-related LIBLCD interface functions are less trivial, and some are implemented using a "generalized buddy allocator" data structure.

liblcd also provides additional library functions and data structures beyond the LIBLCD interface, including kmalloc, memcpy, and red black trees.

Where's the UTCB, Cptr Cache?

The Isolated Execution Environment (x86_64, address spaces, etc.)

The Generalized Buddy Allocator

Memory Management in the Isolated Environment

Additional Library Functions

Isolate Environment Boot

Isolated Code Configuration and Hacks

Handling Interrupts Inside an LCD