[PATCH V2 1/7] config-tools: add CPU performance policy option


Zhou, Wu
 

Add 'CPU performance policy type' option to configurator. User can choose
from 'Performance' or 'Nominal' as the CPU performance policy for ACRN to
apply.

Signed-off-by: Wu Zhou <wu.zhou@...>
---
misc/config_tools/schema/config.xsd | 8 ++++++++
misc/config_tools/schema/types.xsd | 18 ++++++++++++++++++
2 files changed, 26 insertions(+)

diff --git a/misc/config_tools/schema/config.xsd b/misc/config_tools/schema/config.xsd
index 65226e7af..6998a2955 100644
--- a/misc/config_tools/schema/config.xsd
+++ b/misc/config_tools/schema/config.xsd
@@ -129,6 +129,14 @@ If your VM is not a security VM, leave this option unchecked. </xs:documentation
<xs:documentation>Configure Software SRAM. This feature reserves memory buffers as always-cached memory to improve an application's real-time performance.</xs:documentation>
</xs:annotation>
</xs:element>
+ <xs:element name="CPU_PERFORMANCE_POLICY" type="policyType" default="Performance">
+ <xs:annotation acrn:title="CPU performance policy type" acrn:views="advanced">
+ <xs:documentation>Select the default performance policy type for CPU. The hypervisor will setup CPU frequency based on the policy type.
+
+- ``Performance``: CPU runs at its maximum frequency. Enable hardware autonomous frequency selection if HWP is presented.
+- ``Nominal``: CPU runs at its guaranteed frequency.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
</xs:all>
</xs:complexType>

diff --git a/misc/config_tools/schema/types.xsd b/misc/config_tools/schema/types.xsd
index b09f578a6..790cb95ca 100644
--- a/misc/config_tools/schema/types.xsd
+++ b/misc/config_tools/schema/types.xsd
@@ -147,6 +147,24 @@ higher value (lower severity) are discarded.</xs:documentation>
</xs:restriction>
</xs:simpleType>

+<xs:simpleType name="policyType">
+ <xs:annotation>
+ <xs:documentation>A string specifying the CPU frequency policy type:
+
+- ``Performance``: CPU runs at its maximum frequency. Enable hardware autonomous frequency selection if HWP is presented.
+- ``Nominal``: CPU runs at its guaranteed frequency.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Performance">
+ <xs:annotation acrn:title="Performance" />
+ </xs:enumeration>
+ <xs:enumeration value="Nominal">
+ <xs:annotation acrn:title="Nominal" />
+ </xs:enumeration>
+ </xs:restriction>
+</xs:simpleType>
+
<xs:simpleType name="PriorityType">
<xs:annotation>
<xs:documentation>Two priorities are supported for priority based scheduler:
--
2.25.1