Commit Graph

7 Commits

Author SHA1 Message Date
Junjie Mao de0a765010 config_tools: adapt to elementpath >= 4.0.0
Starting from elementpath 4.0.0, the XPath2Parser class no longer has a
SYMBOLS member and completeness checking based on that are removed as
well. This patch updates the elementpath_overlay in the config tools to fix
the compilation issue when using recent elementpath versions.

Tracked-On: #8368
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2023-04-24 11:46:56 +08:00
Junjie Mao 7ce49f8c3c config_tools: determine SSRAM_ENABLED automatically
Today users are able to tweak whether the hypervisor includes support to
software SRAM (SSRAM). This, however, gives rise to potential functional
incorrectness when the hypervisor is not built with such support but a
service VM attempts to assign SSRAM to a post-launched VM (which is
possible as the service VM can still see the SSRAM-related ACPI tables). In
such cases the SSRAM assigned to a post-launched VM is not properly
initialized and thus not locked in cache.

As makes little sense for a user to configure the SSRAM support in the
hypervisor in a different way as the presence of SSRAM on hardware, this
patch removes the "SSRAM support" option from the configurator. The config
tools will now automatically enable the SSRAM support if the hardware
supports the feature and disable that otherwise.

Tracked-On: #8231
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-10-14 15:20:48 +08:00
Junjie Mao df41ce807f config_tools: resolve incompatibility with elementpath 2.5.3
This patch adds to the customized function `number-of-clos-id-needed` more
robust checks, which ensures that a given node is a concrete element,
before that function passes the node to `get_policy_list`. This resolves
the incompatibility issue with elementpath 2.5.3 which is reported in v3.0.

Tracked-On: #7893
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-07-15 10:56:50 +08:00
Junjie Mao 256dd158c3 config_tools: fix a module resolving issue in elementpath overlay
The library module introduced by commit 2cd13026e ("misc: move the RDT
interface to common library") was put under the library/ directory which is
not by default searchable from elementpath_overlay. This patch works around
the issue by adding that path to sys.path.

Also fix a typo in the RDT checking assertion.

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Chenli Wei 72c406c2b7 misc: move the RDT interface to common library
The current RDT class and interface was define by the clos.py which is
mix get and merge RDT policy, create clos nodes.

Now we need call these interface to check the CLOS IDs number after
merged RDT policy, so this patch abstract the RDT interface to common
and add an assert to check the CLOS IDs number.

Tracked-On: #6690
Signed-off-by: Chenli Wei <chenli.wei@intel.com>
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-06-29 13:53:42 +08:00
Junjie Mao db17992293 config_tools: add assertions on the uniqueness of vBDF
This patch adds the assertion (in XSD) that validates if all explicitly
specified vBDF (including those for virtual UART controllers and IVSHMEM
interfaces) are unique.

Tracked-On: #7330
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-04-21 10:08:53 +08:00
Junjie Mao e266ab2649 config_tools: find and report counter examples on validation error
In order for more effective and specific error reporting, this patch
enhanced the XML assertion validation mechanism by:

  - Enhancing the elementpath library at runtime to capture of quantified
    variables that causes an assertion to fail, which can be used as a
    counter example of the rule.

  - Allowing error messages (as xs:documentation in the XML schema)
    embedding XPath (up to 2.0) which will be evaluated against the counter
    example to provide more specific information about the error.

  - Adding to assertions a mandatory attribute which specifies the context
    node(s) of an error using XPath. These nodes can be further used in the
    configurator to attach the errors to the widgets where users can fix
    them.

v1 -> v2:

  * Logging the validation errors according to their defined severity

Tracked-On: #6690
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2022-03-16 10:44:16 +08:00