18 Commits
Author SHA1 Message Date
Ariadne Conill 6a6b5b6e0b feature(xen-preflight): test for hypervisor presence explicitly and error if missing (#347)
Fixes #309
2024-08-20 00:22:28 +00:00
Ariadne Conill 2ab2cda937 Add support for reading hypervisor console (#344)
* feature(xencall): add hypervisor SYSCTL_readconsole definitions

* feature(hypervisor-dmesg): xencall: add read_console_ring_raw hypercall wrapper

* feature(hypervisor-dmesg): protobuf: add ReadHypervisorConsoleRing RPC

* feature(hypervisor-dmesg): runtime: add read_hypervisor_console wrapper

* feature(hypervisor-dmesg): daemon: add ReadHypervisorConsoleRing rpc implementation

* feature(hypervisor-dmesg): ctl: add host hypervisor-messages command to get hypervisor messages

* feature(hypervisor-dmesg): cli: rename hypervisor-messages command to hv-console

* feature(hypervisor-dmesg): proto: change ReadHypervisorConsoleRing to ReadHypervisorConsole

* feature(hypervisor-dmesg): fix up kratactl protobuf calls
2024-08-19 23:49:02 +00:00
Ariadne Conill 6096dee2fe chore(document-custom-kernels): Add initial documentation on custom kernels (#337) 2024-08-15 00:10:56 +00:00
Ariadne Conill 5ec3d9d5c1 xencall: use correct op for setting cpufreq governor (#327) 2024-08-14 03:11:08 +00:00
Ariadne Conill 0358c9c775 fix(power-trap-eacces): gracefully handle hypercall errors in power management (#325)
* daemon: reenable built-in power management policy

* xenruntime: gracefully handle power management errors
2024-08-13 08:22:05 +00:00
Ariadne Conill 8806a79161 zone: init: mount /proc with hidepid=1 (#277)
Mounting procfs with hidepid=1 denies access to procfs directories
for processes not accessible by the current user credentials.

Signed-off-by: Ariadne Conill <[email protected]>
2024-07-22 06:11:36 +00:00
Ariadne Conill b2dd4af09b chore(powermgmt): disable for now as a hackfix (#242)
Signed-off-by: Ariadne Conill <[email protected]>
2024-07-10 03:47:02 +00:00
Ariadne Conill 783dd51f05 chore(systemd): align systemd unit definitions with OCI asset paths (#241)
Signed-off-by: Ariadne Conill <[email protected]>
2024-07-10 00:37:12 +00:00
Ariadne Conill 2f866ad47b feature(oci-distribution): distribute guestinit via OCI (#240)
Signed-off-by: Ariadne Conill <[email protected]>
2024-07-10 00:34:05 +00:00
Ariadne Conill 98ca623828 fix(oci-distribution): use scratch images for OCI distributed-artefacts (#230)
Signed-off-by: Ariadne Conill <[email protected]>
2024-07-05 16:02:26 +00:00
Ariadne Conill 0e64d4ea79 feature(power-management-defaults): set an initial power management policy (#219)
The default policy enables performance mode and SMT.

Signed-off-by: Ariadne Conill <[email protected]>
2024-07-01 03:37:17 +00:00
Ariadne Conillandalex a79320b4fc Power management core functionality (#217)
* feat(power-management-core): add core power management control messages for kratad

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): expose xen hypercall client publicly

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): add indexmap to kratart crate dependencies

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): implement power management core in kratart

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): bubble up runtime context in daemon/control service

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): expose performance/efficiency core data in protobuf

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): fix up some protobuf message names

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): fix up performance core heuristic

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): implement GetHostCpuTopology RPC

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): hackfix to get sysctls working with tokio

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): borrow the PowerManagementContext when calling functions belonging to it

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): remove GetHostPowerManagementPolicy RPC for now

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): implement SetHostPowerManagementPolicy RPC

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): add cpu-topology command

Signed-off-by: Ariadne Conill <[email protected]>

* feat(power-management-core): appease format checking

Signed-off-by: Ariadne Conill <[email protected]>

* fix(runtime): cpu topology corrections

---------

Signed-off-by: Ariadne Conill <[email protected]>
Co-authored-by: Alex Zenla <[email protected]>
2024-06-29 15:43:08 -07:00
Ariadne Conill 8363ed0085 OCI distribution (#210)
* feat(images): add dockerfiles for the OCI distributions of krata components

Signed-off-by: Ariadne Conill <[email protected]>

* feat(images): add oci distribution workflow

Signed-off-by: Ariadne Conill <[email protected]>

---------

Signed-off-by: Ariadne Conill <[email protected]>
2024-06-26 21:31:30 +00:00
Ariadne Conill 6f50167798 Use native loopdev implementation instead of loopdev-3 (#209)
* feature(loopdev): add native loop device implementation

The previous loop device implementation required bindgen for no reason,
making cross-compilation difficult.

Signed-off-by: Ariadne Conill <[email protected]>

* feat(runtime): use native krata-loopdev instead of loopdev-3

Signed-off-by: Ariadne Conill <[email protected]>

* chore: update cargo workspace lock file

Signed-off-by: Ariadne Conill <[email protected]>

* chore: appease formatting linter

Signed-off-by: Ariadne Conill <[email protected]>

---------

Signed-off-by: Ariadne Conill <[email protected]>
2024-06-26 10:29:58 -07:00
Ariadne Conill f8247f13e4 build: use LTO for release builds and strip guestinit (#68)
* initrd: strip guestinit binary before adding it to initramfs

Signed-off-by: Ariadne Conill <[email protected]>

* build: use LTO for release profile artifacts

this allows us to save ~25-30% on binary sizes, at least in guestinit

Signed-off-by: Ariadne Conill <[email protected]>

* revert strip command usage, breaks arm

Signed-off-by: Ariadne Conill <[email protected]>

* build: use strip=symbols

Signed-off-by: Ariadne Conill <[email protected]>

---------

Signed-off-by: Ariadne Conill <[email protected]>
2024-04-13 09:20:24 +00:00
Ariadne Conill 6cef03bffa debug: common: run programs in a way that is compatible with alpine doas-sudo-shim (#53)
doas sudo shim (as used by Alpine) does not support passing through environment variables
in the same way that sudo does, therefore use `sh -c` instead.

Signed-off-by: Ariadne Conill <[email protected]>
2024-04-12 09:20:34 +00:00
Ariadne Conill 73fd95dbe2 guest: init: default to xterm if TERM is not set (#52)
Most terminal emulators support the xterm control codes more faithfully than the
vt100 ones.

Fixes #51.

Signed-off-by: Ariadne Conill <[email protected]>
2024-04-12 08:52:18 +00:00
Ariadne Conill f41a1e2168 build: target: use alpine rust triplets when building on alpine (#49)
Signed-off-by: Ariadne Conill <[email protected]>
2024-04-12 08:40:44 +00:00