Skip to content

Commit

Permalink
doc: Add some information about xapi-guard
Browse files Browse the repository at this point in the history
Signed-off-by: Pau Ruiz Safont <[email protected]>
  • Loading branch information
psafont committed Feb 9, 2024
1 parent 3199708 commit 43a392c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/content/toolstack/high-level/daemons.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ xapi-storage-script
message-switch
: exchanges messages between the daemons on a host

xapi-guard
: forwards uefi and vtpm persistence calls from domains to xapi

v6d
: controls which features are enabled.

Expand All @@ -52,4 +55,4 @@ mpathalert
if paths fail and need repair

wsproxy
: handles access to VM consoles
: handles access to VM consoles
28 changes: 28 additions & 0 deletions doc/content/xapi-guard/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
+++
title = "Xapi-guard"
weight = 50
+++

The `xapi-guard` daemon is the component in the xapi toolstack that is responsible for handling persistence requests from VMs (domains).
Currently these are UEFI vars and vTPM updates.

The code is in `ocaml/xapi-guard`.
When the daemon managed only with UEFI updates it was called `varstored-guard`.
Some files and package names still use the previous name.

Principles
----------
1. Calls from domains must be limited in privilege to do certain API calls, and
to read and write from their corresponding VM in xapi's database only.
2. Xenopsd is able to control xapi-guard through message switch, this access is
not limited.
3. Listening to domain socket is restored whenever the daemon restarts to minimize disruption of running domains.


Overview
--------

Xapi-guard forwards calls from domains to xapi to persist UEFI variables, and update vTPMs.
To do this, it listens to 1 socket per service (varstored, or swtpm) per domain.
To create these sockets before the domains are running, it listens to a message-switch socket.
This socket listens to calls from xenopsd, which orchestrates the domain creation.

0 comments on commit 43a392c

Please sign in to comment.