Skip to content

Docs on xenopsd: Apply minor fixups to VM.build #6297

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ jobs:
- name: Finish the parallel coverage upload to Coveralls
uses: coverallsapp/github-action@v2
with:
fail-on-error: false
parallel-finished: true
continue-on-error: true # Do not fail CI if this step fails

deprecation-test:
name: Deprecation tests
Expand Down
17 changes: 9 additions & 8 deletions doc/content/xenopsd/walkthroughs/VM.build/Domain.build.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,22 @@ to call:
- Run `xenguest`
- `xenguest` to invoke the [xenguest](xenguest) program to setup the domain's system memory.

## Domain Build Preparation using build_pre
## build_pre: Prepare building the VM

[`Domain.build`](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L1111-L1210)
[Domain.build](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L1111-L1210)
[calls](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L1137)
the [function `build_pre`](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L899-L964)
(which is also used for VM restore). It must:
[build_pre](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L899-L964)
(which is also used for VM restore) to:

1. [Call](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L902-L911)
[wait_xen_free_mem](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/domain.ml#L236-L272)
to wait, if necessary, for the Xen memory scrubber to catch up reclaiming memory (CA-39743)
to wait (if necessary), for the Xen memory scrubber to catch up reclaiming memory (CA-39743)
2. Call the hypercall to set the timer mode
3. Call the hypercall to set the number of vCPUs
4. As described in the [NUMA feature description](../../toolstack/features/NUMA),
when the `xe` configuration option `numa_placement` is set to `Best_effort`,
except when the VM has a hard affinity set, invoke the `numa_placement` function:
4. Call the `numa_placement` function
as described in the [NUMA feature description](/toolstack/features/NUMA)
when the `xe` configuration option `numa_placement` is set to `Best_effort`
(except when the VM has a hard CPU affinity).

```ml
match !Xenops_server.numa_placement with
Expand Down
6 changes: 3 additions & 3 deletions doc/content/xenopsd/walkthroughs/VM.build/VM_build.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ must:

1. Run pygrub (or eliloader) to extract the kernel and initrd, if necessary
2. [Call](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/xc/xenops_server_xen.ml#L2222-L2225)
[Domain.build](Domain.build)
to:
[Domain.build](Domain.build) to
- optionally run NUMA placement and
- invoke [xenguest](VM.build/xenguest) to set up the domain memory.

See the walk-though on [VM.build](VM.build) for more details on this phase.
See the walk-through of the [Domain.build](Domain.build) function
for more details on this phase.
3. Apply the `cpuid` configuration
4. Store the current domain configuration on disk -- it's important to know
the difference between the configuration you started with and the configuration
Expand Down
15 changes: 8 additions & 7 deletions doc/content/xenopsd/walkthroughs/VM.build/xenguest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ title: xenguest
description:
"Perform building VMs: Allocate and populate the domain's system memory."
---

# Flowchart

xenguest is called as part of starting a new domain in VM_build:
As part of starting a new domain in VM_build, `xenopsd` calls `xenguest`.
When multiple domain build threads run in parallel,
also multiple instances of `xenguest` also run in parallel:

```mermaid
flowchart
Expand All @@ -27,7 +26,8 @@ libxenguest2 --> Xen
end
```

# About xenguest
## About xenguest

`xenguest` is called by the xenopsd [Domain.build](Domain.build) function
to perform the build phase for new VMs, which is part of the `xenopsd`
[VM.start operation](VM.start).
Expand All @@ -45,7 +45,7 @@ an individual package once planned changes to the Xen hypercalls are stabilised.

Over time, `xenguest` has evolved to build more of the initial domain state.

# Interface to xenguest
## Interface to xenguest

```mermaid
flowchart
Expand All @@ -70,7 +70,8 @@ Xenstore[Xenstore platform data] --> xenguest
- The amount of system memory of the domain,
- A number of other parameters that are domain-specific.

Using the Xenstore, the platform data (vCPUs, vCPU affinity, etc) is passed:
`xenopsd` uses the Xenstore to provide platform data:

- the vCPU affinity
- the vCPU credit2 weight/cap parameters
- whether the NX bit is exposed
Expand Down
Loading