All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>, xen-devel@lists.xen.org
Subject: Re: [PATCH 10/11] xen/arch/x86: clarify domid == 0 checks
Date: Mon, 15 Apr 2013 09:47:08 -0400	[thread overview]
Message-ID: <516C04DC.7070608@tycho.nsa.gov> (raw)
In-Reply-To: <516BDB9F02000078000CD238@nat28.tlf.novell.com>

On 04/15/2013 04:51 AM, Jan Beulich wrote:
>>>> On 12.04.13 at 23:04, Daniel De Graaf <dgdegra@tycho.nsa.gov> 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
>

Since this is just an output function, my best guess is to avoid displaying
dom0 statistics that aren't relevant for a query that is intended for domUs,
so it doesn't really matter what is tested.

-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2013-04-15 13:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 21:04 [PATCH v3 0/11] Rename/remove IS_PRIV Daniel De Graaf
2013-04-12 21:04 ` [PATCH 01/11] MAINTAINERS: Add myself as XSM maintainer Daniel De Graaf
2013-04-12 21:04 ` [PATCH 02/11] xen/arch/x86: remove IS_PRIV access check bypasses Daniel De Graaf
2013-04-12 21:04 ` [PATCH 03/11] xen/xsm: add hooks for claim Daniel De Graaf
2013-04-12 21:04 ` [PATCH 04/11] hvm: convert access check for nested HVM to XSM Daniel De Graaf
2013-04-12 21:04 ` [PATCH 05/11] xen/arch/x86: remove IS_PRIV_FOR references Daniel De Graaf
2013-04-12 21:04 ` [PATCH 06/11] xen/arch/arm: remove rcu_lock_target_domain_by_id Daniel De Graaf
2013-04-12 21:04 ` [PATCH 07/11] xen: rename IS_PRIV to is_hardware_domain Daniel De Graaf
2013-04-12 21:04 ` [PATCH 08/11] xen/cpupool: prevent a domain from moving itself Daniel De Graaf
2013-04-19  9:43   ` Jürgen Groß
2013-04-12 21:04 ` [PATCH 09/11] xen: use domid check in is_hardware_domain Daniel De Graaf
2013-04-12 21:04 ` [PATCH 10/11] xen/arch/x86: clarify domid == 0 checks Daniel De Graaf
2013-04-15  8:51   ` Jan Beulich
2013-04-15 13:47     ` Daniel De Graaf [this message]
2013-04-18 15:09       ` Jan Beulich
2013-04-12 21:04 ` [PATCH 11/11] IOMMU: use is_hardware_domain instead of domid == 0 Daniel De Graaf
2013-04-18 15:12 ` [PATCH v3 0/11] Rename/remove IS_PRIV Jan Beulich
2013-04-18 16:10   ` Daniel De Graaf
2013-04-18 16:11     ` [PATCH] xen/arch/x86: remove IS_PRIV bypass on IRQ check Daniel De Graaf
2013-04-18 16:20       ` Jan Beulich
2013-04-22 12:13     ` [PATCH v3 0/11] Rename/remove IS_PRIV George Dunlap
2013-04-22 15:05       ` Daniel De Graaf
2013-04-22 15:09         ` George Dunlap
2013-04-23  9:59           ` Jan Beulich
2013-05-03  7:39           ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516C04DC.7070608@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.