Re: [RFC PATCH v2 5/6] dt-bindings: cpufreq: add bindings for virtual kvm cpufreq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/03/2023 03:43, David Dai wrote:
> Add devicetree bindings for a virtual kvm cpufreq driver.

Why? Why virtual devices should be documented in DT? DT is for
non-discoverable hardware, right? You have entire commit msg to explain
it instead of saying something easily visible by the diff.

> 
> Co-developed-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> Signed-off-by: Saravana Kannan <saravanak@xxxxxxxxxx>
> Signed-off-by: David Dai <davidai@xxxxxxxxxx>
> ---
>  .../bindings/cpufreq/cpufreq-virtual-kvm.yaml | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml
> 
> diff --git a/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml b/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml
> new file mode 100644
> index 000000000000..31e64558a7f1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/cpufreq/cpufreq-virtual-kvm.yaml
> @@ -0,0 +1,39 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/cpufreq/cpufreq-virtual-kvm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Virtual KVM CPUFreq
> +
> +maintainers:
> +  - David Dai <davidai@xxxxxxxxxx>
> +
> +description: |

Do not need '|'.
> +

Drop stray blank line.

> +  KVM CPUFreq is a virtualized driver in guest kernels that sends utilization
> +  of its vCPUs as a hint to the host. The host uses hint to schedule vCPU
> +  threads and select CPU frequency. It enables accurate Per-Entity Load
> +  Tracking for tasks running in the guest by querying host CPU frequency
> +  unless a virtualized FIE exists(Like AMUs).

No clue why you need DT bindings for this. KVM has interfaces between
host and guests.

> +
> +properties:
> +  compatible:
> +    const: virtual,kvm-cpufreq
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    {

This is some broken syntax and/or indentation.

I don't get what this node is about.

> +      #address-cells = <2>;
> +      #size-cells = <2>;

Why?

> +
> +      cpufreq {
> +            compatible = "virtual,kvm-cpufreq";
> +      };
> +

Drop stray blank lines

> +    };

Best regards,
Krzysztof




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux