diff --git a/osdk/src/config/mod.rs b/osdk/src/config/mod.rs index 046c33720..a3c766ce6 100644 --- a/osdk/src/config/mod.rs +++ b/osdk/src/config/mod.rs @@ -182,6 +182,13 @@ fn apply_args_after_finalize(action: &mut Action, args: &CommonArgs) { action.qemu.args += " --no-shutdown"; action.qemu.with_monitor = true; } + + // Since current QEMU argument parsing does not support QOM format, hardcode the argument here. + // The argument configures a TDX guest object with a vsock-based communication channel to the + // Quote Generation Service running on the host machine. + if std::env::var("INTEL_TDX").is_ok_and(|s| s == "1") { + action.qemu.args += " -object '{ \"qom-type\": \"tdx-guest\", \"id\": \"tdx0\", \"sept-ve-disable\": true, \"quote-generation-socket\": { \"type\": \"vsock\", \"cid\": \"2\", \"port\": \"4050\" } }'"; + } } impl Config { diff --git a/tools/qemu_args.sh b/tools/qemu_args.sh index f667097c8..3a1387e44 100755 --- a/tools/qemu_args.sh +++ b/tools/qemu_args.sh @@ -55,7 +55,6 @@ if [ "$1" = "tdx" ]; then -monitor pty \ -nodefaults \ -bios /root/ovmf/release/OVMF.fd \ - -object tdx-guest,sept-ve-disable=on,id=tdx0 \ -cpu host,-kvm-steal-time,pmu=off \ -machine q35,kernel-irqchip=split,confidential-guest-support=tdx0 \ -device virtio-net-pci,netdev=net01,disable-legacy=on,disable-modern=off$VIRTIO_NET_FEATURES \