config-tools: add vsock option in configurator

vsock is the new socket address family for host/guest communication.
Configurator option for vsock CID is added in this patch.
Also vsock parameter is generated in script.

Tracked-On: #7535
Signed-off-by: Wu Zhou <wu.zhou@intel.com>
This commit is contained in:
Wu Zhou
2022-05-23 11:32:28 +08:00
committed by acrnsi-robot
parent 8e263385c5
commit 59ec4cf6c2
2 changed files with 19 additions and 0 deletions

View File

@@ -326,6 +326,9 @@ def generate_for_one_vm(board_etree, hv_scenario_etree, vm_scenario_etree, vm_id
if virtio_gpu is not None:
script.add_virtual_device("virtio-gpu", options=virtio_gpu)
for vsock in eval_xpath_all(vm_scenario_etree, ".//virtio_devices/vsock[text() != '']/text()"):
script.add_virtual_device("vhost-vsock", options="cid="+vsock)
# Passthrough PCI devices
bdf_regex = re.compile("([0-9a-f]{2}):([0-1][0-9a-f]).([0-7])")
for passthru_device in eval_xpath_all(vm_scenario_etree, ".//pci_devs/*/text()"):