From 730cf1e944d2553e52f89b9c0b048cd8adeafee1 Mon Sep 17 00:00:00 2001 From: Ruoqing He Date: Sat, 8 Feb 2025 15:59:29 +0800 Subject: [PATCH] docs: Fix broken link to intel 0x80 debug port Previous link to provide details of `0x80 debug port` is removed, which could no longer be found on intel site [1]. Use snapshot found in web archive [2] to fix this link. Format `debug-port.md` using `mdformat` with GitHub Flavored Markdown (GFM). [1] https://www.intel.com/content/www/us/en/homepage.html [2] https://web.archive.org Signed-off-by: Ruoqing He --- docs/debug-port.md | 29 +++++++++++++++-------------- release-notes.md | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/docs/debug-port.md b/docs/debug-port.md index 5cec79311..8983a8f0c 100644 --- a/docs/debug-port.md +++ b/docs/debug-port.md @@ -1,8 +1,9 @@ # `cloud-hypervisor` debug IO ports When running x86 guests, `cloud-hypervisor` provides different kinds of debug ports: -- [`0x80` debug port](https://www.intel.com/content/www/us/en/support/articles/000005500/boards-and-kits.html) -- Debug console (by default at `0xe9`). + +- [`0x80` debug port](https://web.archive.org/web/20211028033025/https://www.intel.com/content/www/us/en/support/articles/000005500/boards-and-kits.html) +- Debug console (by default at `0xe9`). - Firmware debug port at `0x402`. All of them can be used to trace user-defined guest events and all of them can @@ -25,13 +26,13 @@ for debugging specific components of the guest software stack. When logging a write of one of those codes to the debug port, `cloud-hypervisor` adds a pre-defined string to the logs. -| Code Range | Component | Log string | -| ---------------- | ----------- | ------------ | -| `0x00` to `0x1f` | Firmware | `Firmware` | -| `0x20` to `0x3f` | Bootloader | `Bootloader` | -| `0x40` to `0x5f` | Kernel | `Kernel` | -| `0x60` to `0x7f` | Userspace | `Userspace` | -| `0x80` to `0xff` | Custom | `Custom` | +| Code Range | Component | Log string | +| ---------------- | ---------- | ------------ | +| `0x00` to `0x1f` | Firmware | `Firmware` | +| `0x20` to `0x3f` | Bootloader | `Bootloader` | +| `0x40` to `0x5f` | Kernel | `Kernel` | +| `0x60` to `0x7f` | Userspace | `Userspace` | +| `0x80` to `0xff` | Custom | `Custom` | One typical use case is guest boot time measurement and tracing. By writing different values to the debug I/O port at different boot process steps, the @@ -71,8 +72,8 @@ cloud-hypervisor: 403.499628ms: DEBUG:vmm/src/vm.rs:510 -- [Debug I/O port: Firm ### Debug console port -The debug console is inspired by QEMU and Bochs, which have a similar feature. -By default, the I/O port `0xe9` is used. This port can be configured like a +The debug console is inspired by QEMU and Bochs, which have a similar feature. +By default, the I/O port `0xe9` is used. This port can be configured like a console. Thus, it can print to a tty, a file, or a pty, for example. ### Firmware debug port @@ -83,7 +84,7 @@ it. The firmware debug port only prints to stdout. ## When do I need these ports? The ports are on the one hand interesting for firmware or kernel developers, as -they provide an easy way to print debug information from within a guest. +they provide an easy way to print debug information from within a guest. Furthermore, you can patch "normal" software to measure certain events, such as the boot time of a guest. @@ -91,6 +92,6 @@ the boot time of a guest. The `0x80` debug port and the port of the firmware debug device are always available. The debug console must be activated via the command line, but -provides more configuration options. +provides more configuration options. -You can use different ports for different aspect of your logging messages. \ No newline at end of file +You can use different ports for different aspect of your logging messages. diff --git a/release-notes.md b/release-notes.md index be1574e2c..da1cd7a30 100644 --- a/release-notes.md +++ b/release-notes.md @@ -3216,7 +3216,7 @@ enabled by default. Based on the Firecracker idea of using a dedicated I/O port to measure guest boot times, we added support for logging guest events through the -[0x80](https://www.intel.com/content/www/us/en/support/articles/000005500/boards-and-kits.html) +[0x80](https://web.archive.org/web/20211028033025/https://www.intel.com/content/www/us/en/support/articles/000005500/boards-and-kits.html) PC debug port. This allows, among other things, for granular guest boot time measurements. See our [debug port documentation](docs/debug-port.md) for more details.