mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
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:
39
hypervisor/scenarios/logical_partition/pt_dev.c
Normal file
39
hypervisor/scenarios/logical_partition/pt_dev.c
Normal 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
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user