acrn-config: add inter-vm config in config app
Shared memory regoins can be added or deleted or updated from scenario settings in config app with sanity check. v2: move IVSHMEM config to hv->FEATURES->IVSHMEM Tracked-On: #4853 Signed-off-by: Shuang Zheng <shuang.zheng@intel.com> Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
parent
9d27ec2df0
commit
4665a17f72
|
@ -728,7 +728,7 @@ function save_scenario(generator=null){
|
|||
$("input").each(function(){
|
||||
var id = $(this).attr('id');
|
||||
var value = $(this).val();
|
||||
if(id.indexOf('CLOS_MASK')>=0 || id.indexOf('MBA_DELAY')>=0) {
|
||||
if(id.indexOf('CLOS_MASK')>=0 || id.indexOf('MBA_DELAY')>=0 || id.indexOf('IVSHMEM_REGION')>=0) {
|
||||
if(id in scenario_config) {
|
||||
scenario_config[id].push(value);
|
||||
} else {
|
||||
|
@ -795,7 +795,7 @@ function save_scenario(generator=null){
|
|||
index = index.replace(new RegExp(jquerySpecialChars[i],
|
||||
"g"), "\\" + jquerySpecialChars[i]);
|
||||
}
|
||||
$("#"+index).parents(".form-group").addClass("has-error");
|
||||
$("#"+index+"_err").parents(".form-group").addClass("has-error");
|
||||
$("#"+index+"_err").text(item);
|
||||
})
|
||||
if(no_err == true && status == 'success') {
|
||||
|
|
|
@ -209,32 +209,13 @@ the source files will be generated into default path and overwirte the previous
|
|||
!= '0')%}
|
||||
{% if 'multiselect' not in elem.attrib or elem.attrib['multiselect'] != 'true' %}
|
||||
{% set first_child = [] %}
|
||||
{% set first_multi_child = {'IVSHMEM_REGION': 0} %}
|
||||
{% for sub_elem in elem.getchildren() %}
|
||||
{% set sub_elem_text = sub_elem.text if sub_elem.text != None else '' %}
|
||||
|
||||
{% if sub_elem.tag == 'RDT' %}
|
||||
{% if sub_elem.tag in ['RDT', 'IVSHMEM'] %}
|
||||
{% for sub_elem_2 in sub_elem.getchildren() %}
|
||||
{% if ','.join([vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag]) not in scenario_item_values %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
||||
title="{{elem.attrib['desc'] if 'desc' in elem.attrib else elem.tag}}">
|
||||
</label>
|
||||
<label class="col-sm-2 control-label" data-toggle="tooltip"
|
||||
title="{{sub_elem_2.attrib['desc'] if 'desc' in sub_elem_2.attrib else sub_elem.attrib['desc']}}">
|
||||
{{sub_elem.tag}} {{sub_elem_2.tag}}</label>
|
||||
<div class="col-sm-6">
|
||||
{% if 'readonly' in sub_elem_2.attrib and sub_elem_2.attrib['readonly'] == 'true' %}
|
||||
<input type="text" class="form-control"
|
||||
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}"
|
||||
readonly vaule={{sub_elem_2.text}}></input>
|
||||
{% else %}
|
||||
<input type="text" class="form-control"
|
||||
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}" value={{sub_elem_2.text}}></input>
|
||||
{% endif %}
|
||||
</div>
|
||||
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}_err" class="col-sm-3"></p>
|
||||
</div>
|
||||
{% elif sub_elem_2.tag not in ['CLOS_MASK', 'MBA_DELAY'] %}
|
||||
{% if ','.join([vm.tag, elem.tag, sub_elem.tag, sub_elem_2.tag]) in scenario_item_values %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
||||
title="{{elem.attrib['desc'] if 'desc' in elem.attrib else elem.tag}}">
|
||||
|
@ -262,19 +243,44 @@ the source files will be generated into default path and overwirte the previous
|
|||
</div>
|
||||
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}_err" class="col-sm-3"></p>
|
||||
</div>
|
||||
{% else %}
|
||||
{% else %}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-1 control-label" data-toggle="tooltip"
|
||||
title="{{elem.attrib['desc'] if 'desc' in elem.attrib else elem.tag}}">
|
||||
</label>
|
||||
<label class="col-sm-2 control-label" data-toggle="tooltip"
|
||||
title={{sub_elem_2.attrib['desc'] if 'desc' in sub_elem_2.attrib else sub_elem.attrib['desc']}}>
|
||||
{{sub_elem.tag}} {{sub_elem_2.tag}}</label>
|
||||
title="{{sub_elem_2.attrib['desc'] if 'desc' in sub_elem_2.attrib else sub_elem.attrib['desc']}}">
|
||||
{{sub_elem.tag}} {{sub_elem_2.tag}}</label>
|
||||
{% if sub_elem_2.tag in ['IVSHMEM_REGION'] %}
|
||||
<div class="col-sm-5">
|
||||
{% else %}
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control"
|
||||
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}" value={{'' if sub_elem_2.text == None else sub_elem_2.text}}></input>
|
||||
{% endif %}
|
||||
{% if 'readonly' in sub_elem_2.attrib and sub_elem_2.attrib['readonly'] == 'true' %}
|
||||
<input type="text" class="form-control"
|
||||
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}"
|
||||
readonly vaule="{{sub_elem_2.text}}"></input>
|
||||
{% else %}
|
||||
<input type="text" class="form-control"
|
||||
id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}" value="{{sub_elem_2.text}}"></input>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if sub_elem_2.tag in ['IVSHMEM_REGION'] %}
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn" id="add_ivshmem_{{sub_elem.tag}}_{{first_multi_child[sub_elem_2.tag]}}">+</button>
|
||||
{% if first_multi_child[sub_elem_2.tag] == 0 %}
|
||||
<button type="button" disabled class="btn" id="remove_ivshmem_{{sub_elem.tag}}_{{first_multi_child[sub_elem_2.tag]}}">-</button>
|
||||
{% else %}
|
||||
<button type="button" class="btn" id="remove_ivshmem_{{sub_elem.tag}}_{{first_multi_child[sub_elem_2.tag]}}">-</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% do first_multi_child.update({sub_elem_2.tag: first_multi_child[sub_elem_2.tag]+1}) %}
|
||||
{% endif%}
|
||||
{% if sub_elem_2.tag in ['IVSHMEM_REGION'] %}
|
||||
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+(first_multi_child[sub_elem_2.tag]-1)|string()}}_err" class="col-sm-3"></p>
|
||||
{% else %}
|
||||
<p id="{{vm_type+','+elem.tag+','+sub_elem.tag+','+sub_elem_2.tag}}_err" class="col-sm-3"></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -323,6 +329,7 @@ the source files will be generated into default path and overwirte the previous
|
|||
value="{{sub_elem_text}}">
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set item_key = ','.join([vm.tag, elem.tag, sub_elem.tag]) if elem.tag != 'cpu_affinity'
|
||||
|
|
Loading…
Reference in New Issue