xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@globallogic.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	jinsong.liu@alibaba-inc.com, Tim Deegan <tim@xen.org>,
	xen-devel <xen-devel@lists.xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	jacob.shin@amd.com,
	Andrii Tseglytskyi <andrii.tseglytskyi@globallogic.com>
Subject: Re: cpufreq implementation for OMAP under xen hypervisor.
Date: Fri, 19 Sep 2014 12:38:34 +0300	[thread overview]
Message-ID: <CAN58jiuA8ypHPhnGdx9r1frafC=rAbSr3Pxd6=Qw5ChKSeAjpw@mail.gmail.com> (raw)
In-Reply-To: <20140918145921.GE4172@laptop.dumpdata.com>

On Thu, Sep 18, 2014 at 5:59 PM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> wrote:
>> > > 2. Driver in Dom0 will parse /cpus/cpu@0/private_data path instead of the /cpus
>> > > path and give the information about CPUs parameters to the hypervisor via
>> > > XENPF_set_processor_pminfo hypercall. (Some parameters are calculated in the
>> > > Dom0 driver and can not be calculated  in the hypervisor).
>> >
>> > Which driver? I presume it would be similar to the xen-acpi-processor.c driver
>> > in drivers/xen?
>> I meant slightly modified cpufreq-cpu0 driver in Linux kernel - driver
>> which changes
>> frequency and voltage on the OMAP CPU. And this driver will use part of the
>
> OK, is that something you would upstream as well? Which of the ARM cpufreq
> drivers is this?
I'll try to upstream it. But at first I should write and check that
cpufreq mechanism
is fully working.
This driver is drivers/cpufreq/cpufreq-cpu0.c

>> xen-acpi-processor.c driver to upload P-states for xen.
>> xen-acpi-processor.c driver only uploads the information about
>> P-states and C-states
>> to the xen and xen can change CPUs frequency and voltage via ACPI interface.
>> In this case xen works with ACPI interface directly (without Dom0 kernel).
>> In case the ARM architecture every processor has own non-standardized interface
>> to change frequency. And in addition we should change voltage on CPU when we
>> change frequency. Every ARM CPU has own external Power Management IC
>> which can change voltage. But Power Management IC has own non-standardized
>> interface and command sequence to change voltage. In my case voltage can
>> be changed via I2C commands. We can not use I2C in the same time in xen
>> and in Dom0 (in this case I2C should be virtualized). Thus if we want
>> that cpufreq
>> driver work in the same way for ARM as for x86 we should port to xen a lot of
>> the frameworks from Linux kernel (I2C, clock and regulator framework) and
>> we should virtualize each framework. But we can not do that.
>>
>> > >
>> > > 3. Cpufreq core driver in the hypervisor will communicate via some interface
>> > > with Dom0 (event channel can be used to notify Dom0) and give some commands
>> > > to the CPU driver in Dom0. Those command are set/get frequency, etc.
>> >
>> > Like the 'xenpm' which does that?
>> Not exactly. 'xenpm' communicates via hypercalls with Xen. In this case
>> xen acts as slave. And all cpufreq drivers are inside xen. In my case
>> part of the
>> cpufreq driver will be implemented in the Linux kernel (Dom0) and xen should
>> act as master and give commands to the cpufreq CPU driver in Dom0
>> (this driver will only change frequency and voltage on physical CPUs).
>
> Oh, I must have misunderstood your picture. In it the cpufreq and the
> lot seemed to be all inside Xen.
Yes, but there is a 'CPU driver' on the picture and this driver is
drivers/cpufreq/cpufreq-cpu0.c
in the Linux kernel.

>
>> I
>> > >
>> > > Can I implement cpufreq driver in this way?
>> >
>> > I don't see why not. Thought I am curious to what is the 'driver' you
>> > are referring too. I presume it is the one that reads the voltage values
>> > from something (what is that "Something" ?)?
>> I've written about this driver above. This driver (in Dom0) will read
>> information
>> about voltages and frequencies from Device Tree. This Device Tree is created
>> by xen for Dom0.
>
> And this driver is based on some Linux driver right ? Which one?
This driver is drivers/cpufreq/cpufreq-cpu0.c and it reads all information
from the Device Tree. Also this driver can change voltage and frequency
on physical CPU (using 'clock' and 'regulator' frameworks).

Oleksandr Dmytryshyn | Product Engineering and Development
GlobalLogic
M +38.067.382.2525
www.globallogic.com

http://www.globallogic.com/email_disclaimer.txt

  reply	other threads:[~2014-09-19  9:38 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12 10:57 cpufreq implementation for OMAP under xen hypervisor Oleksandr Dmytryshyn
2014-08-12 12:15 ` Stefano Stabellini
2014-08-12 12:19   ` Oleksandr Dmytryshyn
2014-08-19 14:02   ` Vitaly V. Ch
2014-08-21 23:05     ` Stefano Stabellini
2014-08-22 14:21       ` Vitaly Chernooky
2014-08-22 16:20         ` Stefano Stabellini
2014-08-21 11:00   ` Oleksandr Dmytryshyn
2014-08-21 23:31     ` Stefano Stabellini
2014-08-22  9:02       ` Oleksandr Dmytryshyn
2014-08-22 16:31         ` Stefano Stabellini
2014-08-22 16:51           ` Ian Campbell
2014-08-29 13:25           ` Oleksandr Dmytryshyn
2014-08-29 15:08             ` Andrii Tseglytskyi
2014-09-02  1:00               ` Stefano Stabellini
2014-09-02  9:06                 ` Vitaly Chernooky
2014-09-02 15:43                 ` Andrii Tseglytskyi
2014-09-02 18:39                   ` Stefano Stabellini
2014-09-02 18:46                     ` Andrii Tseglytskyi
2014-09-04 14:43                       ` Oleksandr Dmytryshyn
2014-09-04 21:56                         ` Stefano Stabellini
2014-09-09 10:19                           ` Oleksandr Dmytryshyn
2014-09-09 21:52                             ` Stefano Stabellini
2014-09-09 10:32                           ` Ian Campbell
2014-09-09 21:41                             ` Stefano Stabellini
2014-09-10  9:42                               ` Ian Campbell
2014-09-10 10:19                                 ` Andrii Tseglytskyi
2014-09-10 18:35                                   ` Stefano Stabellini
2014-09-10 19:31                                     ` Konrad Rzeszutek Wilk
2014-09-16 13:49                                       ` Oleksandr Dmytryshyn
2014-09-17 17:06                                         ` Konrad Rzeszutek Wilk
2014-09-18  9:38                                           ` Oleksandr Dmytryshyn
2014-09-18 14:59                                             ` Konrad Rzeszutek Wilk
2014-09-19  9:38                                               ` Oleksandr Dmytryshyn [this message]
2014-09-24 14:36                                         ` Stefano Stabellini
2014-09-24 14:46                                           ` Konrad Rzeszutek Wilk
2014-09-25  9:13                                             ` Oleksandr Dmytryshyn
2014-09-25  9:08                                           ` Oleksandr Dmytryshyn
2014-09-25 10:14                                             ` Stefano Stabellini
2014-09-25 11:15                                               ` Oleksandr Dmytryshyn
2014-09-26 18:13                                             ` Konrad Rzeszutek Wilk
2014-09-29  9:45                                               ` Oleksandr Dmytryshyn
2014-09-29 15:18                                                 ` Konrad Rzeszutek Wilk
2014-09-30 10:28                                                   ` Oleksandr Dmytryshyn
2014-09-30 17:37                                                     ` Konrad Rzeszutek Wilk
2014-09-11  9:43                                     ` Ian Campbell
2014-09-09 13:25                           ` Vitaly Chernooky
2014-09-09 21:58                             ` Stefano Stabellini
2014-09-10 10:15                               ` Andrii Tseglytskyi
2014-09-10 10:24                                 ` Vitaly Chernooky
2014-09-10 11:18                                   ` Andrii Tseglytskyi
2014-09-10 18:37                                   ` Stefano Stabellini
2014-09-11  7:51                                     ` Vitaly Chernooky
2014-09-10 11:24                                 ` Vitaly Chernooky
2014-09-10 14:28                               ` Vitaly Chernooky
2014-09-10 18:41                                 ` Stefano Stabellini
2014-09-11  7:48                                   ` Vitaly Chernooky

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='CAN58jiuA8ypHPhnGdx9r1frafC=rAbSr3Pxd6=Qw5ChKSeAjpw@mail.gmail.com' \
    --to=oleksandr.dmytryshyn@globallogic.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrii.tseglytskyi@globallogic.com \
    --cc=jacob.shin@amd.com \
    --cc=jbeulich@suse.com \
    --cc=jinsong.liu@alibaba-inc.com \
    --cc=konrad.wilk@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@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 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).