From: Peng Fan <van.freenix@gmail.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Julien Grall <julien.grall@citrix.com>,
David Vrabel <david.vrabel@citrix.com>,
Jan Beulich <JBeulich@suse.com>,
xen-devel@lists.xenproject.org
Subject: Re: [RFC V2] xen: interface: introduce pvclk interface
Date: Sat, 23 Jan 2016 23:26:11 +0800 [thread overview]
Message-ID: <20160123152608.GA13634@linux-7smt.suse> (raw)
In-Reply-To: <1453380564.4320.35.camel@citrix.com>
Hi Ian,
On Thu, Jan 21, 2016 at 12:49:24PM +0000, Ian Campbell wrote:
>On Thu, 2016-01-21 at 20:35 +0800, Peng Fan wrote:
>> On Thu, Jan 21, 2016 at 12:26:04PM +0000, Ian Campbell wrote:
>> > Would adding a dummy fixed-clock[0] (or several of them) to the guest
>> > passthrough DT satisfy the driver's requirements? They would be hardcoded
>> > to whatever rate dom0 and/or the tools has decided upon (and had set in the
>> > real h/w).
>>
>> If using this way, we have the assumption that DomU device driver would not
>> change the rate of the clock driving the device. I am not sure whether this is
>> ok for so many platform devices based ARM core.
>
>Don't (non-buggy) drivers already need to cope with the possibility that
>the clk core may not be able to satisfy their request for a particular rate
>due to constraints from other ip blocks?
>
>I would also expect the user to want to configure things in dom0 such that
>the specific drivers used in domU are satisfied with what they get (which
>is a bit fiddly perhaps, but platform device passthrough already is
>somewhat that way).
>
>> In /sys/kernel/debug/clk/...., there are clk tree info, but
>> clk api are not exposed to userspace as far as I know, so
>> if using sysfs interface to set a known fixed rate or enable/disable the clock,
>> we need to expose the clk info to userspace.
>
>That seems possible to arrange given a use case for it though, a SMOP (and
>convincing the clk maintainer of the need).
Sorry to bother you again on this.
For the fixed clock method, I add such a xl cfg entry: devclk=["uart_root_clk,24000000", "gpu_root_clk,200000000"].
After add code for writeing sysfs clk node in libxl, the clk can be set rate/prepared/enabled.
But I do not know the resource release path, when need to shutdown/destroy a domain. For example:
when domain creation, the clk is prepared, when domain destroied, I want the clk unprepared. But I
do not find out the code path to releasing resource.
Also, since need to add fixed-clock nodes in DomU dts, do you agree to let libxl or xc to create the nodes
in dts, but not mannually add them in passthrough node?
Thanks,
Peng.
>
>Worst case is a xen-clkback driver or perhaps even vfio will want to do
>something like this, we can't normally use vfio on Xen, but in this case
>perhaps we could.
>
>
>> Jan said using hypercall in the other mail, do you have any ideas about
>> this?
>
>This would need a whole clock infrastructure in Xen, wouldn't it? I
>described why that is not currently available in an earlier mail, and also
>my opinion that doing the whole thing in Xen would involve pulling in far
>too much SoC specific code for each specific platform.
>
>Ian.
>>
next prev parent reply other threads:[~2016-01-23 15:30 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 8:31 [RFC V2] xen: interface: introduce pvclk interface Peng Fan
2016-01-20 9:05 ` Juergen Gross
2016-01-20 9:25 ` Peng Fan
2016-01-20 10:16 ` Jan Beulich
2016-01-20 10:40 ` Juergen Gross
2016-01-20 11:48 ` Peng Fan
2016-01-20 12:11 ` Juergen Gross
2016-01-20 14:13 ` Peng Fan
2016-01-20 10:14 ` Jan Beulich
2016-01-20 11:40 ` Peng Fan
2016-01-20 12:01 ` Jan Beulich
2016-01-20 14:05 ` Peng Fan
2016-01-20 14:16 ` Jan Beulich
2016-01-20 14:37 ` Peng Fan
2016-01-20 14:49 ` Ian Campbell
2016-01-20 14:52 ` Jan Beulich
2016-01-21 1:29 ` Peng Fan
2016-01-21 7:53 ` Jan Beulich
2016-01-21 8:59 ` Peng Fan
2016-01-21 10:19 ` Ian Campbell
2016-01-21 11:55 ` Peng Fan
2016-01-21 12:26 ` Ian Campbell
2016-01-21 12:35 ` Peng Fan
2016-01-21 12:49 ` Ian Campbell
2016-01-22 2:19 ` Peng Fan
2016-01-23 15:26 ` Peng Fan [this message]
2016-01-21 12:55 ` Stefano Stabellini
2016-01-21 13:11 ` Ian Campbell
2016-01-21 16:11 ` Stefano Stabellini
2016-01-22 2:51 ` Peng Fan
2016-01-21 10:21 ` Jan Beulich
2016-01-21 12:06 ` Peng Fan
2016-01-21 12:52 ` Jan Beulich
2016-01-22 1:56 ` Peng Fan
2016-01-22 7:36 ` Jan Beulich
2016-01-22 9:27 ` Peng Fan
2016-01-22 10:25 ` Jan Beulich
2016-01-22 12:12 ` Peng Fan
2016-01-22 12:33 ` Jan Beulich
2016-01-22 13:55 ` Stefano Stabellini
2016-01-20 12:06 ` Stefano Stabellini
2016-01-20 12:27 ` Ian Campbell
2016-01-20 13:52 ` Peng Fan
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=20160123152608.GA13634@linux-7smt.suse \
--to=van.freenix@gmail.com \
--cc=JBeulich@suse.com \
--cc=david.vrabel@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).