mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-27 07:46:53 +00:00
config-tools: diable real_time_vcpu for non real-time VM
Reset the real_time_vcpu to 'n' if the VM is not a real-time VM. Tracked-On: #8145 Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
parent
d579a0be47
commit
0d7527ce2f
@ -86,6 +86,7 @@
|
|||||||
@deleteVM="deleteVM"
|
@deleteVM="deleteVM"
|
||||||
@scenarioConfigFormDataUpdate="scenarioConfigFormDataUpdate"
|
@scenarioConfigFormDataUpdate="scenarioConfigFormDataUpdate"
|
||||||
@vmNameChange="vmNameChange"
|
@vmNameChange="vmNameChange"
|
||||||
|
@updateCpuAffinity="updateCpuAffinity"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -344,6 +345,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
updateCpuAffinity(vmid) {
|
||||||
|
this.scenario.vm.map((vmConfig, vmIndex) => {
|
||||||
|
if (vmConfig['@id'] === vmid) {
|
||||||
|
for (let i = 0; i < vmConfig['cpu_affinity']['pcpu'].length; i++) {
|
||||||
|
this.scenario.vm[vmIndex]['cpu_affinity']['pcpu'][i]['real_time_vcpu'] = 'n'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
assignVMID() {
|
assignVMID() {
|
||||||
let vm_priority = {
|
let vm_priority = {
|
||||||
'PRE_LAUNCHED_VM': 0,
|
'PRE_LAUNCHED_VM': 0,
|
||||||
|
@ -60,7 +60,7 @@ i18n.useLocal(localizeEn);
|
|||||||
export default {
|
export default {
|
||||||
name: "ConfigForm",
|
name: "ConfigForm",
|
||||||
components: {Icon, Minus, VueForm, CAT, VUART, cpu_affinity, IVSHMEM_REGION},
|
components: {Icon, Minus, VueForm, CAT, VUART, cpu_affinity, IVSHMEM_REGION},
|
||||||
emits: ['scenarioConfigFormDataUpdate', 'deleteVM', 'vmNameChange'],
|
emits: ['scenarioConfigFormDataUpdate', 'deleteVM', 'vmNameChange', 'updateCpuAffinity'],
|
||||||
props: {
|
props: {
|
||||||
currentActiveVMID: {type: Number},
|
currentActiveVMID: {type: Number},
|
||||||
currentFormSchema: {type: Object},
|
currentFormSchema: {type: Object},
|
||||||
@ -125,6 +125,7 @@ export default {
|
|||||||
dataChange({newValue, oldValue}) {
|
dataChange({newValue, oldValue}) {
|
||||||
let newID = newValue.hasOwnProperty('@id') ? newValue['@id'] : -1;
|
let newID = newValue.hasOwnProperty('@id') ? newValue['@id'] : -1;
|
||||||
let oldID = oldValue.hasOwnProperty('@id') ? oldValue['@id'] : -1;
|
let oldID = oldValue.hasOwnProperty('@id') ? oldValue['@id'] : -1;
|
||||||
|
let vmType = newValue.hasOwnProperty('vm_type') ? newValue['vm_type'] : "";
|
||||||
|
|
||||||
if (newID === oldID) {
|
if (newID === oldID) {
|
||||||
// skip hv settings
|
// skip hv settings
|
||||||
@ -133,6 +134,9 @@ export default {
|
|||||||
this.$emit('vmNameChange', newValue.name, this.vmNameCache)
|
this.$emit('vmNameChange', newValue.name, this.vmNameCache)
|
||||||
this.vmNameCache = newValue.name;
|
this.vmNameCache = newValue.name;
|
||||||
}
|
}
|
||||||
|
if (vmType != 'RTVM') {
|
||||||
|
this.$emit('updateCpuAffinity', newID)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$emit('scenarioConfigFormDataUpdate', newID, newValue)
|
this.$emit('scenarioConfigFormDataUpdate', newID, newValue)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user