Re: [libvirt PATCH v2 3/8] conf: Introduce VIR_DOMAIN_TIMER_NAME_ARMVTIMER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 07, 2020 at 03:27:03PM +0100, Andrea Bolognani wrote:
> This new timer model will be used to control the behavior of the
> virtual timer for KVM ARM/virt guests.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  docs/schemas/domaincommon.rng | 1 +
>  src/conf/domain_conf.c        | 1 +
>  src/conf/domain_conf.h        | 1 +
>  src/libxl/libxl_conf.c        | 1 +
>  src/libxl/xen_common.c        | 1 +
>  src/qemu/qemu_command.c       | 2 ++
>  src/qemu/qemu_domain.c        | 3 +++
>  7 files changed, 10 insertions(+)
> 
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 9577d26c2a..29b6b95357 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -1239,6 +1239,7 @@
>              <choice>
>                <value>hpet</value>
>                <value>pit</value>
> +              <value>armvtimer</value>
>              </choice>
>            </attribute>
>            <optional>
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 51ae520897..78d964ed9e 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -1063,6 +1063,7 @@ VIR_ENUM_IMPL(virDomainTimerName,
>                "tsc",
>                "kvmclock",
>                "hypervclock",
> +              "armvtimer",
>  );
>  
>  VIR_ENUM_IMPL(virDomainTimerTrack,
> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index 2db3c19473..867a9c7661 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -1993,6 +1993,7 @@ typedef enum {
>      VIR_DOMAIN_TIMER_NAME_TSC,
>      VIR_DOMAIN_TIMER_NAME_KVMCLOCK,
>      VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK,
> +    VIR_DOMAIN_TIMER_NAME_ARMVTIMER,
>  
>      VIR_DOMAIN_TIMER_NAME_LAST
>  } virDomainTimerNameType;
> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> index ee6b23895c..56deca7b7c 100644
> --- a/src/libxl/libxl_conf.c
> +++ b/src/libxl/libxl_conf.c
> @@ -359,6 +359,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
>          case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
>          case VIR_DOMAIN_TIMER_NAME_RTC:
>          case VIR_DOMAIN_TIMER_NAME_PIT:
> +        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                             _("unsupported timer type (name) '%s'"),
>                             virDomainTimerNameTypeToString(clock.timers[i]->name));
> diff --git a/src/libxl/xen_common.c b/src/libxl/xen_common.c
> index 415549a42c..9a385eba0d 100644
> --- a/src/libxl/xen_common.c
> +++ b/src/libxl/xen_common.c
> @@ -2182,6 +2182,7 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def)
>          case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
>          case VIR_DOMAIN_TIMER_NAME_RTC:
>          case VIR_DOMAIN_TIMER_NAME_PIT:
> +        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
>              virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
>                             _("unsupported timer type (name) '%s'"),
>                             virDomainTimerNameTypeToString(def->clock.timers[i]->name));
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 52a74c7acf..71ae1f72e5 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -6199,6 +6199,7 @@ qemuBuildClockCommandLine(virCommandPtr cmd,
>          case VIR_DOMAIN_TIMER_NAME_TSC:
>          case VIR_DOMAIN_TIMER_NAME_KVMCLOCK:
>          case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
> +        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
>              /* Timers above are handled when building -cpu.  */
>          case VIR_DOMAIN_TIMER_NAME_LAST:
>              break;
> @@ -6609,6 +6610,7 @@ qemuBuildCpuCommandLine(virCommandPtr cmd,
>              if (timer->frequency > 0)
>                  virBufferAsprintf(&buf, ",tsc-frequency=%lu", timer->frequency);
>              break;
> +        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
>          case VIR_DOMAIN_TIMER_NAME_PLATFORM:
>          case VIR_DOMAIN_TIMER_NAME_PIT:
>          case VIR_DOMAIN_TIMER_NAME_RTC:
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 1b4825a539..68348464a8 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -5428,6 +5428,9 @@ qemuDomainDefValidateClockTimers(const virDomainDef *def,
>                  return -1;
>              }
>              break;
> +
> +        case VIR_DOMAIN_TIMER_NAME_ARMVTIMER:
> +            break;
>          }
>      }
>  
> -- 
> 2.24.1
> 

Reviewed-by: Masayoshi Mizuma <m.mizuma@xxxxxxxxxxxxxx>






[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux