Hardcode qemu args to add `quote-generation-socket`
This commit is contained in:
parent
73cd7e0c02
commit
31cb7433eb
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Reference in New Issue