Date
1 - 4 of 4
[PATCH v2] config_tools: set 'own_pcpu' of RTVM
Zhao, Yuanyuan
From: Yuanyua Zhao <yuanyuan.zhao@...>
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@...>
---
.../configurator/pyodide/populateDefaultValues.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc/config_tools/configurator/pyodide/populateDefaultValues.py b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
index 23f22f37a..241a8263d 100644
--- a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
+++ b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
@@ -46,6 +46,10 @@ def main(scenario):
if name.text not in vmNames:
name.text = ""
+ own_pcpus = etree.findall(".//vm[vm_type = 'RTVM']/own_pcpu")
+ for o in own_pcpus:
+ o.text = 'y'
+
result = tostring(obj.get("scenario_etree").getroot())
result = result.decode()
result = convert_result({
--
2.25.1
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@...>
---
.../configurator/pyodide/populateDefaultValues.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc/config_tools/configurator/pyodide/populateDefaultValues.py b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
index 23f22f37a..241a8263d 100644
--- a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
+++ b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
@@ -46,6 +46,10 @@ def main(scenario):
if name.text not in vmNames:
name.text = ""
+ own_pcpus = etree.findall(".//vm[vm_type = 'RTVM']/own_pcpu")
+ for o in own_pcpus:
+ o.text = 'y'
+
result = tostring(obj.get("scenario_etree").getroot())
result = result.decode()
result = convert_result({
--
2.25.1
Junjie Mao
toggle quoted message
Show quoted text
---
Best Regards
Junjie Mao
-----Original Message-----That `findall` method comes from `xml` package which may have less support for XPATH than lxml. Just to double check, have you verified it in your own build?
From: root <yuanyuan.zhao@...>
Sent: Monday, November 28, 2022 9:38 AM
To: Mao, Junjie <junjie.mao@...>; acrn-dev@...
Cc: yuanyuan.zhao@...
Subject: [PATCH v2] config_tools: set 'own_pcpu' of RTVM
From: Yuanyua Zhao <yuanyuan.zhao@...>
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@...>
---
.../configurator/pyodide/populateDefaultValues.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
index 23f22f37a..241a8263d 100644
--- a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
+++ b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
@@ -46,6 +46,10 @@ def main(scenario):
if name.text not in vmNames:
name.text = ""
+ own_pcpus = etree.findall(".//vm[vm_type = 'RTVM']/own_pcpu")
---
Best Regards
Junjie Mao
+ for o in own_pcpus:
+ o.text = 'y'
+
result = tostring(obj.get("scenario_etree").getroot())
result = result.decode()
result = convert_result({
--
2.25.1
Zhao, Yuanyuan
On 2022/11/28 10:26, Junjie Mao wrote:
-----Original Message-----That `findall` method comes from `xml` package which may have less support for XPATH than lxml. Just to double check, have you verified it in your own build?
From: root <yuanyuan.zhao@...>
Sent: Monday, November 28, 2022 9:38 AM
To: Mao, Junjie <junjie.mao@...>; acrn-dev@...
Cc: yuanyuan.zhao@...
Subject: [PATCH v2] config_tools: set 'own_pcpu' of RTVM
From: Yuanyua Zhao <yuanyuan.zhao@...>
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@...>
---
.../configurator/pyodide/populateDefaultValues.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
index 23f22f37a..241a8263d 100644
--- a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
+++ b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
@@ -46,6 +46,10 @@ def main(scenario):
if name.text not in vmNames:
name.text = ""
+ own_pcpus = etree.findall(".//vm[vm_type = 'RTVM']/own_pcpu")
Yes. The own_pcpu of RTVM in saved scenario.xml is 'y'.
---
Best Regards
Junjie Mao+ for o in own_pcpus:
+ o.text = 'y'
+
result = tostring(obj.get("scenario_etree").getroot())
result = result.decode()
result = convert_result({
--
2.25.1
Junjie Mao
toggle quoted message
Show quoted text
Reviewed-by: Junjie Mao <junjie.mao@...>
---
Best Regards
Junjie Mao
-----Original Message-----OK. Thanks for confirmation.
From: Zhao, Yuanyuan <yuanyuan.zhao@...>
Sent: Tuesday, November 29, 2022 8:40 AM
To: Mao, Junjie <junjie.mao@...>; acrn-dev@...
Subject: Re: [acrn-dev] [PATCH v2] config_tools: set 'own_pcpu' of RTVM
On 2022/11/28 10:26, Junjie Mao wrote:than lxml. Just to double check, have you verified it in your own build?-----Original Message-----That `findall` method comes from `xml` package which may have less support for XPATH
From: root <yuanyuan.zhao@...>
Sent: Monday, November 28, 2022 9:38 AM
To: Mao, Junjie <junjie.mao@...>; acrn-dev@...
Cc: yuanyuan.zhao@...
Subject: [PATCH v2] config_tools: set 'own_pcpu' of RTVM
From: Yuanyua Zhao <yuanyuan.zhao@...>
For STANDARD_VM 'own_pcpu' default value is 'n'. But RTVM always own pCPUs.
So check 'own_pcpu' of RTVM and make sure it's set to 'y'.
Signed-off-by: Yuanyua Zhao <yuanyuan.zhao@...>
---
.../configurator/pyodide/populateDefaultValues.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
index 23f22f37a..241a8263d 100644
--- a/misc/config_tools/configurator/pyodide/populateDefaultValues.py
+++ b/misc/config_tools/configurator/pyodide/populateDefaultValues.py
@@ -46,6 +46,10 @@ def main(scenario):
if name.text not in vmNames:
name.text = ""
+ own_pcpus = etree.findall(".//vm[vm_type = 'RTVM']/own_pcpu")Yes. The own_pcpu of RTVM in saved scenario.xml is 'y'.
Reviewed-by: Junjie Mao <junjie.mao@...>
---
Best Regards
Junjie Mao
---
Best Regards
Junjie Mao+ for o in own_pcpus:
+ o.text = 'y'
+
result = tostring(obj.get("scenario_etree").getroot())
result = result.decode()
result = convert_result({
--
2.25.1