You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
doc: walkthroughs/VM.start: Update the xenguest chapter (domain build) (xapi-project#6272)
Update:
- No longer add the links to not "official" source repositories for
xenguest.
Update and extend the walkthrough of `VM.start`:
- Update the links to `xenopsd` functions from
[xapi-project/xenopsd.git](https://github.com/xapi-project/xenopsd) to
the current
[xenopsd](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/)
code in
[xapi-project/xen-api.git](https://github.com/xapi-project/xen-api/blob/master/ocaml/xenopsd/)
- Add the step for storing the platform data (vCPUs, vCPU affinity,
etc.) in the domain's Xenstore tree.` xenguest then uses this in the
`build` phase to build the domain.
- Convert the paragraphs about `xenguest` into a dedicated chapter on
`xenguest`.
- Add a summary of the data that `xenopsd` passes to `xenguest` for the
domain build
- Add a summary of the steps that `xenguest` takes to build the domain.
was originally created as a separate program due to issues with
285
+
`libxenguest` that were fixed, but we still shell out to `xenguest`:
286
+
287
+
- Wasn't threadsafe: fixed, but it still uses a per-call global struct
288
+
- Incompatible licence, but now licensed under the LGPL.
289
+
290
+
The `xenguest` binary has evolved to build more of the initial
291
+
domain state. `xenopsd` passes it:
292
+
293
+
- The domain type to build for (HVM, PHV or PV),
294
+
- The `domid` of the created empty domain,
295
+
- The amount of system memory of the domain,
296
+
- The platform data (vCPUs, vCPU affinity, etc) using the Xenstore:
297
+
- the vCPU affinity
298
+
- the vCPU credit2 weight/cap parameters
299
+
- whether the NX bit is exposed
300
+
- whether the viridian CPUID leaf is exposed
301
+
- whether the system has PAE or not
302
+
- whether the system has ACPI or not
303
+
- whether the system has nested HVM or not
304
+
- whether the system has an HPET or not
305
+
306
+
When called to build a domain, `xenguest` reads those and builds the VM accordingly.
307
+
308
+
### 3.2 Workflow for allocating and populating domain memory
309
+
310
+
Based on the given type, the `xenguest` program calls dedicated
311
+
functions for the build process of given domain type.
312
+
313
+
- For HVM, this function is `stub_xc_hvm_build()`.
314
+
315
+
These domain build functions call these functions:
316
+
317
+
1.`get_flags()` to get the platform data from the Xenstore
318
+
2.`configure_vcpus()` which uses the platform data from the Xenstore to configure vCPU affinity and the credit scheduler parameters vCPU weight and vCPU cap (max % pCPU time for throttling)
319
+
3. For HVM, `hvm_build_setup_mem` to:
320
+
1. Decide the `e820` memory layout of the system memory of the domain
321
+
including memory holes depending on PCI passthrough and vGPU flags.
322
+
2. Load the BIOS/UEFI firmware images
323
+
3. Store the final MMIO hole parameters in the Xenstore
0 commit comments