All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel De Graaf <dgdegra@tycho.nsa.gov>
To: Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	xen-devel@lists.xensource.com
Subject: Re: [PATCH v4 2/3] arm: export platform_op XENPF_settime64
Date: Tue, 24 Nov 2015 12:00:04 -0500	[thread overview]
Message-ID: <56549794.9070803@tycho.nsa.gov> (raw)
In-Reply-To: <1447679291.27871.81.camel@citrix.com>

On 16/11/15 08:08, Ian Campbell wrote:
> On Thu, 2015-11-12 at 17:46 +0000, Stefano Stabellini wrote:
>> Call update_domain_wallclock_time at domain initialization.
>> Set time_offset_seconds to the number of seconds between physical boot
>> and domain initialization: it is going to be used to get/set the
>> wallclock time.
>> Add time_offset_seconds to system_time when before calling do_settime,
>> so that system_time actually accounts for all the time in nsec between
>> machine boot and when the wallclock was set.
>>
>> Expose xsm_platform_op to ARM.
>>
>> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> An aside:[...]
> @@ -1332,6 +1332,75 @@ static int flask_deassign_dtdevice(struct domain
>> *d, const char *dtpath)
>>   }
>>   #endif /* HAS_PASSTHROUGH && HAS_DEVICE_TREE */
>>
>> +static int flask_platform_op(uint32_t op)
>> +{
>> +    switch ( op )
>> +    {
>> +#ifdef CONFIG_X86
>> +    /* These operations have their own XSM hooks */
>> +    case XENPF_cpu_online:
>> +    case XENPF_cpu_offline:
>> +    case XENPF_cpu_hotadd:
>> +    case XENPF_mem_hotadd:
>> +        return 0;
>
> Should this not then be an error (e.g. fail closed)?

During the invocation of these operations, two XSM hooks are called: this
one (from above the switch) and the individual hook (inside the switch).
This hook needs to allow access so that the more detailed hook is called.

> Also, although only implemented today for x86 they don't seem inherently
> any more x86 specific than many of the other things below, so maybe the
> ifdef could be ditched?

The #ifdef is there mostly as a failsafe reminder to ensure that the
implementation for other architectures actually calls the same XSM hooks
that the x86 version does.


-- 
Daniel De Graaf
National Security Agency

  reply	other threads:[~2015-11-24 17:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12 17:45 [PATCH v4 0/3] wallclock time on arm Stefano Stabellini
2015-11-12 17:46 ` [PATCH v4 1/3] xen: move wallclock functions from x86 to common Stefano Stabellini
2015-11-16 13:04   ` Ian Campbell
2015-11-12 17:46 ` [PATCH v4 2/3] arm: export platform_op XENPF_settime64 Stefano Stabellini
2015-11-12 18:49   ` Daniel De Graaf
2015-11-13 11:59   ` Julien Grall
2015-11-16 13:08   ` Ian Campbell
2015-11-24 17:00     ` Daniel De Graaf [this message]
2015-11-25 10:36       ` Ian Campbell
2015-11-12 17:46 ` [PATCH v4 3/3] xen/arm: move ticks conversions function declarations to the header file Stefano Stabellini
2015-11-13 12:00   ` Julien Grall
2015-11-16 13:08   ` Ian Campbell
2015-11-16 13:09 ` [PATCH v4 0/3] wallclock time on arm Ian Campbell
2015-11-20 11:41   ` Stefano Stabellini
2015-11-25 11:49 ` Ian Campbell

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=56549794.9070803@tycho.nsa.gov \
    --to=dgdegra@tycho.nsa.gov \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.