[libvirt PATCH v2 4/8] qemu: Validate configuration for the armvtimer timer
Ján Tomko
jtomko at redhat.com
Fri Feb 14 09:36:48 UTC 2020
On Thu, Feb 13, 2020 at 05:45:14PM +0100, Andrea Bolognani wrote:
>On Thu, 2020-02-13 at 14:28 +0100, Ján Tomko wrote:
>> On Fri, Feb 07, 2020 at 03:27:04PM +0100, Andrea Bolognani wrote:
>> > +++ b/src/qemu/qemu_domain.c
>> > @@ -5430,6 +5430,39 @@ qemuDomainDefValidateClockTimers(const virDomainDef *def,
>> > break;
>> >
>> > case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
>>
>> Missing check for present == 0.
>
>Good catch! Assuming Drew confirms the timer can't be disabled, then
>we should definitely error out for present='no'.
>
>Do you want me to respin, or can I just squash in the diff below?
>
>
>diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>index 29ec203413..143ddc508e 100644
>--- a/src/qemu/qemu_domain.c
>+++ b/src/qemu/qemu_domain.c
>@@ -5441,6 +5441,12 @@ qemuDomainDefValidateClockTimers(const virDomainDef *def,
> def->os.machine);
> return -1;
> }
>+ if (timer->present == 0) {
>+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>+ _("The '%s' timer can't be disabled"),
>+ virDomainTimerNameTypeToString(timer->name));
>+ return -1;
>+ }
> if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_KVM_NO_ADJVTIME)) {
> virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> _("Configuring the '%s' timer is not supported "
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200214/4f9c1584/attachment-0001.sig>
More information about the libvir-list
mailing list