mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 00:38:28 +00:00
HV: remove vm_config pointer in acrn_vm struct
For each vm_array[] item, its config is located in corresponding index of vm_configs[], so vm_config pointer is not needed any more. 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:
@@ -36,9 +36,10 @@ static struct pci_vdev *partition_mode_find_vdev(struct acrn_vpci *vpci, union p
|
||||
{
|
||||
struct vpci_vdev_array *vdev_array;
|
||||
struct pci_vdev *vdev;
|
||||
struct acrn_vm_config *vm_config = get_vm_config(vpci->vm->vm_id);
|
||||
int32_t i;
|
||||
|
||||
vdev_array = vpci->vm->vm_config->vpci_vdev_array;
|
||||
vdev_array = vm_config->vpci_vdev_array;
|
||||
for (i = 0; i < vdev_array->num_pci_vdev; i++) {
|
||||
vdev = &vdev_array->vpci_vdev_list[i];
|
||||
if (vdev->vbdf.value == vbdf.value) {
|
||||
@@ -54,9 +55,10 @@ static int32_t partition_mode_vpci_init(const struct acrn_vm *vm)
|
||||
struct vpci_vdev_array *vdev_array;
|
||||
const struct acrn_vpci *vpci = &vm->vpci;
|
||||
struct pci_vdev *vdev;
|
||||
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
|
||||
int32_t i;
|
||||
|
||||
vdev_array = vm->vm_config->vpci_vdev_array;
|
||||
vdev_array = vm_config->vpci_vdev_array;
|
||||
|
||||
for (i = 0; i < vdev_array->num_pci_vdev; i++) {
|
||||
vdev = &vdev_array->vpci_vdev_list[i];
|
||||
@@ -77,9 +79,10 @@ static void partition_mode_vpci_deinit(const struct acrn_vm *vm)
|
||||
{
|
||||
struct vpci_vdev_array *vdev_array;
|
||||
struct pci_vdev *vdev;
|
||||
struct acrn_vm_config *vm_config = get_vm_config(vm->vm_id);
|
||||
int32_t i;
|
||||
|
||||
vdev_array = vm->vm_config->vpci_vdev_array;
|
||||
vdev_array = vm_config->vpci_vdev_array;
|
||||
|
||||
for (i = 0; i < vdev_array->num_pci_vdev; i++) {
|
||||
vdev = &vdev_array->vpci_vdev_list[i];
|
||||
|
Reference in New Issue
Block a user