mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
HV:treewide:rename struct pic and iommu_domain
For data structure types "struct pic and struct iommu_domain", its name is identical with variable name in the same scope. This MISRA C violation is detected. Naming convention rule:If the data structure type is used by only one module and its name meaning is simplistic, its name needs prefix shorten module name. Naming convention rule:Variable name can be shortened from its data structure type name. The following udpates are made: struct pic pic-->struct i8259_reg_state i8259 struct iommu_domain iommu_domain-->struct iommu_domain iommu V1-->V2: Update "struct iommu_domain iommu_domain-->struct iommu_domain iommu" Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -662,21 +662,21 @@ int32_t hcall_assign_ptdev(struct vm *vm, uint16_t vmid, uint64_t param)
|
||||
}
|
||||
|
||||
/* create a iommu domain for target VM if not created */
|
||||
if (target_vm->iommu_domain == NULL) {
|
||||
if (target_vm->iommu == NULL) {
|
||||
if (target_vm->arch_vm.nworld_eptp == NULL) {
|
||||
pr_err("%s, EPT of VM not set!\n",
|
||||
__func__, target_vm->attr.id);
|
||||
return -EPERM;
|
||||
}
|
||||
/* TODO: how to get vm's address width? */
|
||||
target_vm->iommu_domain = create_iommu_domain(vmid,
|
||||
target_vm->iommu = create_iommu_domain(vmid,
|
||||
HVA2HPA(target_vm->arch_vm.nworld_eptp), 48U);
|
||||
if (target_vm->iommu_domain == NULL) {
|
||||
if (target_vm->iommu == NULL) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
}
|
||||
ret = assign_iommu_device(target_vm->iommu_domain,
|
||||
ret = assign_iommu_device(target_vm->iommu,
|
||||
(uint8_t)(bdf >> 8), (uint8_t)(bdf & 0xffU));
|
||||
|
||||
return ret;
|
||||
@@ -696,7 +696,7 @@ int32_t hcall_deassign_ptdev(struct vm *vm, uint16_t vmid, uint64_t param)
|
||||
pr_err("%s: Unable copy param to vm\n", __func__);
|
||||
return -1;
|
||||
}
|
||||
ret = unassign_iommu_device(target_vm->iommu_domain,
|
||||
ret = unassign_iommu_device(target_vm->iommu,
|
||||
(uint8_t)(bdf >> 8), (uint8_t)(bdf & 0xffU));
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user