HV: Calling into VPCI init/unit functions for partition hypervisor

V4:
 - Clear address cache info after a full cf8/cfc access
 - Add NULL pointer checking when calling init/deinit ops

V3:
 - Do not use ASSERT
 - Loop through the vdev list defined in vm_desctiption table to call the vdev init/unit functions
 - Make the cached vbdf info struct per vm instead of per pcpu

V2:
 - Fixed MISRA violations

Reviewed-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
This commit is contained in:
dongshen
2018-08-07 18:21:23 -07:00
committed by lijinxia
parent 65bd038650
commit 86180bd4ce
4 changed files with 267 additions and 0 deletions

View File

@@ -186,6 +186,10 @@ int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm)
}
vm->vpic = vpic_init(vm);
#ifdef CONFIG_PARTITION_MODE
vpci_init(vm);
#endif
/* vpic wire_mode default is INTR */
vm->wire_mode = VPIC_WIRE_INTR;
@@ -290,6 +294,10 @@ int shutdown_vm(struct vm *vm)
vpic_cleanup(vm);
}
#ifdef CONFIG_PARTITION_MODE
vpci_cleanup(vm);
#endif
free(vm->hw.vcpu_array);
/* TODO: De-Configure HV-SW */