Skip to content

Commit

Permalink
Merge pull request avocado-framework#3899 from zhencliu/tdx
Browse files Browse the repository at this point in the history
Added Intel TDX support
  • Loading branch information
luckyh authored May 13, 2024
2 parents fb4d362 + ef92a77 commit 055c07f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions virttest/qemu_devices/qcontainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1390,8 +1390,12 @@ def machine_q35(machine_params):
),
qdevices.QCPUBus(params.get("cpu_model"), [[""], [0]], "vcpu"),
)
pflash_devices = pflash_handler("ovmf", machine_params)
devices.extend(pflash_devices)

# FIXME: Use -bios option to set firmware for a tdx vm
if params.get("vm_secure_guest_type") != "tdx":
pflash_devices = pflash_handler("ovmf", machine_params)
devices.extend(pflash_devices)

devices.append(
qdevices.QMachine(params=machine_params, child_bus=bus, aobject="pci.0")
)
Expand Down
2 changes: 1 addition & 1 deletion virttest/qemu_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ def add_secure_guest_descriptor(params):

sectype = params["vm_secure_guest_type"]
sev_mach_props = {}
tdx_mach_props = {"kvm-type": "tdx"}
tdx_mach_props = {}
backend_props = {"sev": sev_mach_props, "tdx": tdx_mach_props}
for k, v in backend_props.get(sectype, {}).items():
machine_dev.set_param(k, v)
Expand Down

0 comments on commit 055c07f

Please sign in to comment.