acrn-config: change names for vcpu_affinity[] related items

hypervisor is replacing vm_configs[].vcpu_affinity[] array with
cpu_affinity_bitmap, the meaning of which has some changes as well.

This patch changes the names in generated vm_configuration.c:
-.vcpu_affinity = VMx_CONFIG_VCPU_AFFINITY,
+.cpu_affinity_bitmap = VMx_CONFIG_CPU_AFFINITY,

Changes in vm_configuration.h:
-#define  VMx_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(xU), AFFINITY_CPU(xU)}
+#define  VMx_CONFIG_CPU_AFFINITY  (AFFINITY_CPU(xU) | AFFINITY_CPU(xU))

Also don't generate default assignment of vcpu_num in vm_configuration.c,
because now hypervisor can easily calculate it from cpu_affinity_bitmap.

Accordingly, in the scenario xml files, tag "vcpu_affinity" is changed
to "cpu_affinity".

Tracked-On: #4641
Signed-off-by: Zide Chen <zide.chen@intel.com>
Acked-by: Victor Sun <victor.sun@intel.com>
This commit is contained in:
Zide Chen
2020-04-13 08:49:12 -07:00
committed by wenlingz
parent 71bdc27a0f
commit fafce7aa5f
9 changed files with 23 additions and 24 deletions

View File

@@ -228,7 +228,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
{{sub_elem.tag}}</label>
{% if ','.join(['uos', elem.tag, sub_elem.tag]) not in launch_item_values
and elem.tag != 'vcpu_affinity'%}
and elem.tag != 'cpu_affinity'%}
<div class="col-sm-5">
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
<input type="text" class="form-control" readonly
@@ -254,7 +254,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
{% endif%}
{% else %}
{% set item_key = ','.join(['uos', elem.tag, sub_elem.tag]) if elem.tag != 'vcpu_affinity'
{% set item_key = ','.join(['uos', elem.tag, sub_elem.tag]) if elem.tag != 'cpu_affinity'
else ','.join(['uos', elem.tag]) %}
<div class="dropdown col-sm-6">
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
@@ -273,7 +273,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
{% endif %}
{% endfor %}
</select>
{% if elem.tag == 'vcpu_affinity' %}
{% if elem.tag == 'cpu_affinity' %}
<button type="button" class="btn" id="add_vcpu_{{first_child|length}}">+</button>
{% if not first_child %}
<button type="button" disabled class="btn" id="remove_vcpu_{{first_child|length}}">-</button>
@@ -393,4 +393,4 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa
{% endif %}
</form>
{% endblock %}
{% endblock %}

View File

@@ -227,7 +227,7 @@ the source files will be generated into default path and overwirte the previous
{{sub_elem.tag}}</label>
{% if ','.join([vm.tag, elem.tag, sub_elem.tag]) not in scenario_item_values
and elem.tag != 'vcpu_affinity' and elem.tag != 'pci_devs' %}
and elem.tag != 'cpu_affinity' and elem.tag != 'pci_devs' %}
{% if sub_elem.tag in ['bootargs', 'kern_args'] %}
<div class="col-sm-6">
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
@@ -253,7 +253,7 @@ the source files will be generated into default path and overwirte the previous
</div>
{% endif %}
{% else %}
{% set item_key = ','.join([vm.tag, elem.tag, sub_elem.tag]) if elem.tag != 'vcpu_affinity'
{% set item_key = ','.join([vm.tag, elem.tag, sub_elem.tag]) if elem.tag != 'cpu_affinity'
and elem.tag != 'pci_devs' else ','.join([vm.tag, elem.tag]) %}
<div class="dropdown col-sm-6">
{% if 'readonly' in sub_elem.attrib and sub_elem.attrib['readonly'] == 'true' %}
@@ -273,7 +273,7 @@ the source files will be generated into default path and overwirte the previous
{% endfor %}
</select>
{% if elem.tag == 'vcpu_affinity' %}
{% if elem.tag == 'cpu_affinity' %}
<button type="button" class="btn" id="add_vcpu_{{first_child|length}}">+</button>
{% if not first_child %}
<button type="button" disabled class="btn" id="remove_vcpu_{{first_child|length}}">-</button>