acrn-hypervisor/hypervisor/scenarios/logical_partition/pt_dev.c
Victor Sun 7580cddf9f HV: add scenario for logical partition
In this scenario, hypervisor will run two logical partition VMs.

Please note that the Kconfig of Hypervisor mode will be removed
gradually. In current Kconfig setting, the CONFIG_PARTITION_MODE
is still kept for now for back-compatibility.

Tracked-On: #2291

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

40 lines
837 B
C

/*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <vm_config.h>
#include <vm_configurations.h>
#include <pci_devices.h>
struct acrn_vm_pci_ptdev_config vm0_pci_ptdevs[VM0_CONFIG_PCI_PTDEV_NUM] = {
{
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
HOST_BRIDGE
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x01U, .f = 0x00U},
STORAGE_CONTROLLER_0
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x02U, .f = 0x00U},
ETHERNET_CONTROLLER_0
},
};
struct acrn_vm_pci_ptdev_config vm1_pci_ptdevs[VM1_CONFIG_PCI_PTDEV_NUM] = {
{
.vbdf.bits = {.b = 0x00U, .d = 0x00U, .f = 0x00U},
HOST_BRIDGE
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x01U, .f = 0x00U},
STORAGE_CONTROLLER_1
},
{
.vbdf.bits = {.b = 0x00U, .d = 0x02U, .f = 0x00U},
ETHERNET_CONTROLLER_1
},
};