From 2963e5c954e9cd9e6a9a2c89d234a18db96b63a5 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 1 Apr 2022 18:15:09 +0200 Subject: [PATCH] docs: Update TDX documentation According to latest official images based on latest TDX guest kernel, we update the documentation to reflect the change regarding serial support. New guest kernels have been updated to disable usage of serial ports, meaning adding console=ttyS0 to the kernel boot parameters will have no effect. Signed-off-by: Sebastien Boeuf --- docs/intel_tdx.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docs/intel_tdx.md b/docs/intel_tdx.md index 71eedbd6a..5bf9dc22d 100644 --- a/docs/intel_tdx.md +++ b/docs/intel_tdx.md @@ -55,9 +55,9 @@ cargo build --features tdx ``` And run a TDX VM by providing the firmware previously built, along with the -guest image containing the TDX enlightened kernel. Assuming the guest kernel -command line contains `console=hvc0` (printing to the `virtio-console` device), -run Cloud Hypervisor as follows: +guest image containing the TDX enlightened kernel. The latest image +`td-guest-rhel8.5.raw` contains `console=hvc0` on the kernel boot parameters, +meaning it will be printing guest kernel logs to the `virtio-console` device. ```bash ./cloud-hypervisor \ @@ -67,8 +67,8 @@ run Cloud Hypervisor as follows: --disk path=tdx_guest_img ``` -And here is the alternative command when looking for debug logs (assuming the -guest kernel command line contains `console=ttyS0`): +And here is the alternative command when looking for debug logs from the +firmware: ```bash ./cloud-hypervisor \ @@ -76,8 +76,8 @@ guest kernel command line contains `console=ttyS0`): --cpus boot=1 \ --memory size=1G \ --disk path=tdx_guest_img \ - --serial tty \ - --console off + --serial file=/tmp/ch_serial \ + --console tty ``` ### TDShim @@ -97,8 +97,14 @@ option as well. ./cloud-hypervisor \ --tdx firmware=tdshim \ --kernel bzImage \ - --cmdline "root=/dev/vda1 console=hvc0 rw tdx_allow_acpi=MCFG" + --cmdline "root=/dev/vda3 console=hvc0 rw" --cpus boot=1 \ --memory size=1G \ --disk path=tdx_guest_img -``` \ No newline at end of file +``` + +### Guest kernel disables serial ports + +The latest guest kernel that can be found in the latest image +`td-guest-rhel8.5.raw` disabled the support for serial ports. This means adding +`console=ttyS0` will have no effect and will not print any log from the guest. \ No newline at end of file