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 <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2022-04-01 18:15:09 +02:00 committed by Rob Bradford
parent 00ce8277aa
commit 2963e5c954

View File

@ -55,9 +55,9 @@ cargo build --features tdx
``` ```
And run a TDX VM by providing the firmware previously built, along with the 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 guest image containing the TDX enlightened kernel. The latest image
command line contains `console=hvc0` (printing to the `virtio-console` device), `td-guest-rhel8.5.raw` contains `console=hvc0` on the kernel boot parameters,
run Cloud Hypervisor as follows: meaning it will be printing guest kernel logs to the `virtio-console` device.
```bash ```bash
./cloud-hypervisor \ ./cloud-hypervisor \
@ -67,8 +67,8 @@ run Cloud Hypervisor as follows:
--disk path=tdx_guest_img --disk path=tdx_guest_img
``` ```
And here is the alternative command when looking for debug logs (assuming the And here is the alternative command when looking for debug logs from the
guest kernel command line contains `console=ttyS0`): firmware:
```bash ```bash
./cloud-hypervisor \ ./cloud-hypervisor \
@ -76,8 +76,8 @@ guest kernel command line contains `console=ttyS0`):
--cpus boot=1 \ --cpus boot=1 \
--memory size=1G \ --memory size=1G \
--disk path=tdx_guest_img \ --disk path=tdx_guest_img \
--serial tty \ --serial file=/tmp/ch_serial \
--console off --console tty
``` ```
### TDShim ### TDShim
@ -97,8 +97,14 @@ option as well.
./cloud-hypervisor \ ./cloud-hypervisor \
--tdx firmware=tdshim \ --tdx firmware=tdshim \
--kernel bzImage \ --kernel bzImage \
--cmdline "root=/dev/vda1 console=hvc0 rw tdx_allow_acpi=MCFG" --cmdline "root=/dev/vda3 console=hvc0 rw"
--cpus boot=1 \ --cpus boot=1 \
--memory size=1G \ --memory size=1G \
--disk path=tdx_guest_img --disk path=tdx_guest_img
``` ```
### 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.