#45 - arm: domain 0 disables clocks which are in fact being used

Owner: Ian Campbell <Ian.Campbell@citrix.com>

Date: Thu Oct 30 12:45:02 2014

Last Update: Thu Oct 30 12:45:02 2014

Severity: normal

Affects:

State: Open

[ Retrieve as mbox ]


From: Ian Campbell <Ian.Campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>, xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line
Date: Thu, 30 Oct 2014 12:33:10 +0000
Message-ID: <1414672390.2064.31.camel@citrix.com>

[ Reply to this message; Retrieve Raw Message; Archives: gmane, marc.info ]

create !
title it arm: domain 0 disables clocks which are in fact being used
thanks

On Wed, 2014-10-29 at 16:39 +0000, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line"):
> > This stops dom0 from messing with clocks which it should and is required on
> > some platforms. It's harmless even when not needed.
> 
> This is pretty odd.  Doesn't this correspond to some kind of bug, in
> the dom0 kernel perhaps ?

dom0 is not aware that some clocks are actually in use (e.g. by the
hypervisor), so the bug is probably in the lack of some interface to
communicate this from Xen to dom0, or some other mechanism to gate this.

I think some or all of the above ought to be added to the commit
message, and perhaps in a comment too. Along with a reference to the bug
which this mail should be about to create. Would you like me to do
anything else?

Ian.


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


From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>, xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line
Date: Thu, 30 Oct 2014 13:46:57 +0000
Message-ID: <21586.16721.302136.516477@mariner.uk.xensource.com>

[ Reply to this message; Retrieve Raw Message; Archives: gmane, marc.info ]

Ian Campbell writes ("Re: [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line"):
> create !
> title it arm: domain 0 disables clocks which are in fact being used
> thanks
...
> dom0 is not aware that some clocks are actually in use (e.g. by the
> hypervisor), so the bug is probably in the lack of some interface to
> communicate this from Xen to dom0, or some other mechanism to gate this.

Right.

> I think some or all of the above ought to be added to the commit
> message, and perhaps in a comment too. Along with a reference to the bug
> which this mail should be about to create. Would you like me to do
> anything else?

I think that's enough, thanks.

Ian.

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

From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>, Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org, Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line
Date: Tue, 11 Nov 2014 17:50:05 +0100
Message-ID: <54623E3D.4060803@linaro.org>

[ Reply to this message; Retrieve Raw Message; Archives: gmane, marc.info ]

Hi,

Somehow I missed this email.

On 30/10/2014 13:33, Ian Campbell wrote:
> create !
> title it arm: domain 0 disables clocks which are in fact being used
> thanks
>
> On Wed, 2014-10-29 at 16:39 +0000, Ian Jackson wrote:
>> Ian Campbell writes ("[PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line"):
>>> This stops dom0 from messing with clocks which it should and is required on
>>> some platforms. It's harmless even when not needed.
>>
>> This is pretty odd.  Doesn't this correspond to some kind of bug, in
>> the dom0 kernel perhaps ?
>
> dom0 is not aware that some clocks are actually in use (e.g. by the
> hypervisor), so the bug is probably in the lack of some interface to
> communicate this from Xen to dom0, or some other mechanism to gate this.

In reality, Xen is only using the clock of the UART. Even though, I 
think this would also happen with platform device passthrough.

For the latter, it would be fairly easy via a PV drivers. But for 
UART... gating the clock could be a nightmare because every platform 
have their own way to enable/disable the clock. Futhermore, the clock 
could be shared with multiple device...

I'm wondering if we could expose the UART to DOM0 without marking as 
disabled. It would avoid DOM0 to mess up the clock while everything 
would be catch via the vuart implementation in Xen.

Regards,

-- 
Julien Grall

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

From: Ian Campbell <Ian.Campbell@citrix.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>, xen-devel@lists.xen.org, Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line
Date: Wed, 12 Nov 2014 10:07:56 +0000
Message-ID: <1415786876.25176.49.camel@citrix.com>

[ Reply to this message; Retrieve Raw Message; Archives: gmane, marc.info ]

On Tue, 2014-11-11 at 17:50 +0100, Julien Grall wrote:
> Hi,
> 
> Somehow I missed this email.
> 
> On 30/10/2014 13:33, Ian Campbell wrote:
> > create !
> > title it arm: domain 0 disables clocks which are in fact being used
> > thanks
> >
> > On Wed, 2014-10-29 at 16:39 +0000, Ian Jackson wrote:
> >> Ian Campbell writes ("[PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line"):
> >>> This stops dom0 from messing with clocks which it should and is required on
> >>> some platforms. It's harmless even when not needed.
> >>
> >> This is pretty odd.  Doesn't this correspond to some kind of bug, in
> >> the dom0 kernel perhaps ?
> >
> > dom0 is not aware that some clocks are actually in use (e.g. by the
> > hypervisor), so the bug is probably in the lack of some interface to
> > communicate this from Xen to dom0, or some other mechanism to gate this.
> 
> In reality, Xen is only using the clock of the UART. Even though, I 
> think this would also happen with platform device passthrough.
> 
> For the latter, it would be fairly easy via a PV drivers. But for 
> UART... gating the clock could be a nightmare because every platform 
> have their own way to enable/disable the clock. Futhermore, the clock 
> could be shared with multiple device...
> 
> I'm wondering if we could expose the UART to DOM0 without marking as 
> disabled. It would avoid DOM0 to mess up the clock while everything 
> would be catch via the vuart implementation in Xen.

Perhaps we could propagate any clock related properties from the UART
node into the Xen hypervisor node (or a subnode)? The Xen Linux code
would then consume those and mark the relevant clocks as in use. I've
not looked into the clock bindings to know how plausible this might be.

Ian.


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

From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>, Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>, xen-devel@lists.xen.org
Subject: Re: [Xen-devel] [PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line
Date: Wed, 12 Nov 2014 14:26:34 +0000
Message-ID: <54636E1A.50504@linaro.org>

[ Reply to this message; Retrieve Raw Message; Archives: gmane, marc.info ]

On 11/12/2014 10:07 AM, Ian Campbell wrote:
> On Tue, 2014-11-11 at 17:50 +0100, Julien Grall wrote:
>> Hi,
>>
>> Somehow I missed this email.
>>
>> On 30/10/2014 13:33, Ian Campbell wrote:
>>> create !
>>> title it arm: domain 0 disables clocks which are in fact being used
>>> thanks
>>>
>>> On Wed, 2014-10-29 at 16:39 +0000, Ian Jackson wrote:
>>>> Ian Campbell writes ("[PATCH OSSTEST v2 18/20] Osstest/Debian: Add "clk_ignore_unused" to default command line"):
>>>>> This stops dom0 from messing with clocks which it should and is required on
>>>>> some platforms. It's harmless even when not needed.
>>>>
>>>> This is pretty odd.  Doesn't this correspond to some kind of bug, in
>>>> the dom0 kernel perhaps ?
>>>
>>> dom0 is not aware that some clocks are actually in use (e.g. by the
>>> hypervisor), so the bug is probably in the lack of some interface to
>>> communicate this from Xen to dom0, or some other mechanism to gate this.
>>
>> In reality, Xen is only using the clock of the UART. Even though, I 
>> think this would also happen with platform device passthrough.
>>
>> For the latter, it would be fairly easy via a PV drivers. But for 
>> UART... gating the clock could be a nightmare because every platform 
>> have their own way to enable/disable the clock. Futhermore, the clock 
>> could be shared with multiple device...
>>
>> I'm wondering if we could expose the UART to DOM0 without marking as 
>> disabled. It would avoid DOM0 to mess up the clock while everything 
>> would be catch via the vuart implementation in Xen.
> 
> Perhaps we could propagate any clock related properties from the UART
> node into the Xen hypervisor node (or a subnode)? The Xen Linux code
> would then consume those and mark the relevant clocks as in use. I've
> not looked into the clock bindings to know how plausible this might be.

It looks like the bindings for clock is well defined and fairly common
(Documentation/devicetree/bindins/clock/clock-bindings.txt). So your
solution sounds plausible.

Regards,

-- 
Julien Grall

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