Files
acrn-hypervisor/hypervisor/arch/x86/configs/dnv-cb2/pt_dev.c
Victor Sun 827d24ccb9 HV: repace vpci_vdev_array with pci_ptdev config
Use acrn_vm_pci_ptdev_config struct for PCI PT devices configuration
in acrn_vm_config, the only needed configure item is PT devices's
vBDF and pBDF info. When init PT devices, the BDF info will be stored
in pci_vdevs[] of acrn_vm.

With this patch, the previous vpci_vdev_array struct is not needed.

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2019-02-03 08:18:54 +08:00

38 lines
932 B
C

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <hypervisor.h>
struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[3] = {
{
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
.pbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x01U, .f = 0x00U},
.pbdf.bits = {.b = 0x03U, .d = 0x00U, .f = 0x01U},
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x02U, .f = 0x00U},
.pbdf.bits = {.b = 0x00U, .d = 0x15U, .f = 0x00U},
},
};
struct acrn_vm_pci_ptdev_config vm1_pci_ptdevs[3] = {
{
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
.pbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x01U, .f = 0x00U},
.pbdf.bits = {.b = 0x00U, .d = 0x14U, .f = 0x00U},
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x02U, .f = 0x00U},
.pbdf.bits = {.b = 0x03U, .d = 0x00U, .f = 0x00U},
},
};