mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
test: tpm: pass optional machine options to swtpm test functions
We plan to use swtpm test functions on ARM for testing the sysbus TPM-TIS device. However on ARM there is no default machine type. So we need to explictly pass some machine options on startup. Let's allow this by adding a new parameter to both swtpm test functions and update all call sites. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-id: 20200305165149.618-9-eric.auger@redhat.com Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
fcaa204194
commit
551cabdfa9
6 changed files with 23 additions and 13 deletions
|
@ -258,23 +258,27 @@ void tpm_util_migration_start_qemu(QTestState **src_qemu,
|
|||
SocketAddress *src_tpm_addr,
|
||||
SocketAddress *dst_tpm_addr,
|
||||
const char *miguri,
|
||||
const char *ifmodel)
|
||||
const char *ifmodel,
|
||||
const char *machine_options)
|
||||
{
|
||||
char *src_qemu_args, *dst_qemu_args;
|
||||
|
||||
src_qemu_args = g_strdup_printf(
|
||||
"%s "
|
||||
"-chardev socket,id=chr,path=%s "
|
||||
"-tpmdev emulator,id=dev,chardev=chr "
|
||||
"-device %s,tpmdev=dev ",
|
||||
src_tpm_addr->u.q_unix.path, ifmodel);
|
||||
machine_options ? : "", src_tpm_addr->u.q_unix.path, ifmodel);
|
||||
|
||||
*src_qemu = qtest_init(src_qemu_args);
|
||||
|
||||
dst_qemu_args = g_strdup_printf(
|
||||
"%s "
|
||||
"-chardev socket,id=chr,path=%s "
|
||||
"-tpmdev emulator,id=dev,chardev=chr "
|
||||
"-device %s,tpmdev=dev "
|
||||
"-incoming %s",
|
||||
machine_options ? : "",
|
||||
dst_tpm_addr->u.q_unix.path,
|
||||
ifmodel, miguri);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue