[libvirt] [PATCH 3/4] qemu: format SLIC ACPI table command line

John Ferlan jferlan at redhat.com
Tue May 17 15:24:30 UTC 2016



On 05/13/2016 10:52 AM, Ján Tomko wrote:
> <os>
>   <acpi table="slic">/path/to/acpi/table/file</acpi>
> </os>
> 
> will result in:
> 
> -acpitable sig=SLIC,file=/path/to/acpi/table/file
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1327537
> ---
>  src/qemu/qemu_command.c                             |  4 ++++
>  tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args | 19 +++++++++++++++++++
>  tests/qemuxml2argvtest.c                            |  2 ++
>  3 files changed, 25 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args
> 

Is there a need for a capability check?  When was this added to QEMU?

I see there is one added for "-dtb" (commit id '0b3509e24')

ACK for what's here, but can we get the answer for whether there's
a need for a caps bit check before push.

John
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 0d6d5f8..574f37c 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -6289,6 +6289,10 @@ qemuBuildBootCommandLine(virCommandPtr cmd,
>              goto error;
>          }
>      }
> +    if (def->os.slic_table) {
> +        virCommandAddArg(cmd, "-acpitable");
> +        virCommandAddArgFormat(cmd, "sig=SLIC,file=%s", def->os.slic_table);
> +    }
>  
>      return 0;
>  
> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args b/tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args
> new file mode 100644
> index 0000000..31902ba
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-acpi-table.args
> @@ -0,0 +1,19 @@
> +LC_ALL=C \
> +PATH=/bin \
> +HOME=/home/test \
> +USER=test \
> +LOGNAME=test \
> +QEMU_AUDIO_DRV=none \
> +/usr/bin/qemu \
> +-name QEMUGuest1 \
> +-S \
> +-M pc \
> +-m 214 \
> +-smp 1 \
> +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
> +-nographic \
> +-nodefaults \
> +-monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \
> +-boot c \
> +-acpitable sig=SLIC,file=/var/lib/libvirt/acpi/slic.dat \
> +-usb
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index d1cfbec..a7e3e8e 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -1906,6 +1906,8 @@ mymain(void)
>  
>      DO_TEST("master-key", QEMU_CAPS_OBJECT_SECRET);
>  
> +    DO_TEST("acpi-table", NONE);
> +
>      qemuTestDriverFree(&driver);
>  
>      return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
> 




More information about the libvir-list mailing list