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

Re: [Xen-devel] [PATCH 10/11] xen/arch/x86: clarify domid == 0 checks



>>> On 12.04.13 at 23:04, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> wrote:
> --- a/xen/arch/x86/time.c
> +++ b/xen/arch/x86/time.c
> @@ -1928,7 +1928,7 @@ void tsc_set_info(struct domain *d,
>                    uint32_t tsc_mode, uint64_t elapsed_nsec,
>                    uint32_t gtsc_khz, uint32_t incarnation)
>  {
> -    if ( is_idle_domain(d) || (d->domain_id == 0) )
> +    if ( is_idle_domain(d) || is_hardware_domain(d) || is_control_domain(d) 
> )
>      {
>          d->arch.vtsc = 0;
>          return;
> @@ -2005,7 +2005,7 @@ static void dump_softtsc(unsigned char key)
>                 "warp=%lu (count=%lu)\n", tsc_max_warp, tsc_check_count);
>      for_each_domain ( d )
>      {
> -        if ( d->domain_id == 0 && d->arch.tsc_mode == TSC_MODE_DEFAULT )
> +        if ( is_hardware_domain(d) && d->arch.tsc_mode == TSC_MODE_DEFAULT )
>              continue;
>          printk("dom%u%s: mode=%d",d->domain_id,
>                  is_hvm_domain(d) ? "(hvm)" : "", d->arch.tsc_mode);

I am of the opinion that the two checks should match, i.e. the
second one should also become is_hardware || is_control. But
I say this without really recalling why Dom0 is being special cased
here in the first place.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.