HV: remove sworld_supported in acrn_vm_config

We will use guest_flags of SECURE_WORLD_ENABLED to check wthether
sworld is supported.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun 2019-01-21 01:08:31 +08:00 committed by Eddie Dong
parent ec199d9609
commit 2e32fba536
3 changed files with 3 additions and 4 deletions

View File

@ -139,7 +139,9 @@ int32_t create_vm(uint16_t vm_id, struct acrn_vm_config *vm_config, struct acrn_
} else {
/* populate UOS vm fields according to vm_config */
vm->sworld_control.flag.supported = vm_config->sworld_supported;
if ((vm_config->guest_flags & SECURE_WORLD_ENABLED) != 0U) {
vm->sworld_control.flag.supported = 1U;
}
if (vm->sworld_control.flag.supported != 0UL) {
struct memory_ops *ept_mem_ops = &vm->arch_vm.ept_mem_ops;

View File

@ -125,7 +125,6 @@ int32_t hcall_create_vm(struct acrn_vm *vm, uint64_t param)
/* TODO: set by DM */
vm_config->type = NORMAL_VM;
vm_config->guest_flags |= cv.vm_flag;
vm_config->sworld_supported = ((cv.vm_flag & (SECURE_WORLD_ENABLED)) != 0U);
(void)memcpy_s(&vm_config->GUID[0], 16U, &cv.GUID[0], 16U);
ret = create_vm(vm_id, vm_config, &target_vm);

View File

@ -221,8 +221,6 @@ struct acrn_vm_config {
*/
uint16_t *vm_pcpu_ids;
uint16_t vm_hw_num_cores; /* Number of virtual cores */
/* Whether secure world is supported for current VM. */
bool sworld_supported;
#ifdef CONFIG_PARTITION_MODE
uint8_t vm_id;
uint64_t start_hpa;