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>
This commit is contained in:
Victor Sun
2019-04-02 12:41:45 +08:00
committed by wenlingz
parent 56c193851a
commit 7580cddf9f
7 changed files with 116 additions and 100 deletions

View File

@@ -0,0 +1,39 @@
/*
* 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
},
};