From 7282b933fbd32ad00f8a078ae7102db41da0d5bd Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Mon, 13 Apr 2020 09:05:16 +0800 Subject: [PATCH] HV: merge sos_pci_dev config to sos macro The pci_dev config settings of SOS are same so move the config interface from vm_configurations.c to CONFIG_SOS_VM macro; Tracked-On: #4616 Signed-off-by: Victor Sun Acked-by: Eddie Dong --- hypervisor/include/arch/x86/vm_config.h | 4 +++- hypervisor/scenarios/hybrid/vm_configurations.c | 2 -- hypervisor/scenarios/industry/vm_configurations.c | 2 -- hypervisor/scenarios/sdc/vm_configurations.c | 2 -- hypervisor/scenarios/sdc2/vm_configurations.c | 2 -- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hypervisor/include/arch/x86/vm_config.h b/hypervisor/include/arch/x86/vm_config.h index 7215ff930..2722a953e 100644 --- a/hypervisor/include/arch/x86/vm_config.h +++ b/hypervisor/include/arch/x86/vm_config.h @@ -29,7 +29,9 @@ #define CONFIG_SOS_VM .load_order = SOS_VM, \ .uuid = SOS_VM_UUID, \ - .severity = SEVERITY_SOS + .severity = SEVERITY_SOS, \ + .pci_dev_num = SOS_EMULATED_PCI_DEV_NUM, \ + .pci_devs = sos_pci_devs #define CONFIG_SAFETY_VM(idx) .load_order = PRE_LAUNCHED_VM, \ .uuid = SAFETY_VM_UUID##idx, \ diff --git a/hypervisor/scenarios/hybrid/vm_configurations.c b/hypervisor/scenarios/hybrid/vm_configurations.c index 54d49eeb7..5758a75ff 100644 --- a/hypervisor/scenarios/hybrid/vm_configurations.c +++ b/hypervisor/scenarios/hybrid/vm_configurations.c @@ -66,8 +66,6 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = { .t_vuart.vm_id = 0U, .t_vuart.vuart_id = 1U, }, - .pci_dev_num = SOS_EMULATED_PCI_DEV_NUM, - .pci_devs = sos_pci_devs, }, { /* VM2 */ CONFIG_POST_STD_VM(1), diff --git a/hypervisor/scenarios/industry/vm_configurations.c b/hypervisor/scenarios/industry/vm_configurations.c index df1b921d2..b3fc60148 100644 --- a/hypervisor/scenarios/industry/vm_configurations.c +++ b/hypervisor/scenarios/industry/vm_configurations.c @@ -36,8 +36,6 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = { .t_vuart.vm_id = 2U, .t_vuart.vuart_id = 1U, }, - .pci_dev_num = SOS_EMULATED_PCI_DEV_NUM, - .pci_devs = sos_pci_devs, }, { /* VM1 */ CONFIG_POST_STD_VM(1), diff --git a/hypervisor/scenarios/sdc/vm_configurations.c b/hypervisor/scenarios/sdc/vm_configurations.c index 2570c45a1..6228a2384 100644 --- a/hypervisor/scenarios/sdc/vm_configurations.c +++ b/hypervisor/scenarios/sdc/vm_configurations.c @@ -34,8 +34,6 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = { .type = VUART_LEGACY_PIO, .addr.port_base = INVALID_COM_BASE, }, - .pci_dev_num = SOS_EMULATED_PCI_DEV_NUM, - .pci_devs = sos_pci_devs, }, { /* VM1 */ CONFIG_POST_STD_VM(1), diff --git a/hypervisor/scenarios/sdc2/vm_configurations.c b/hypervisor/scenarios/sdc2/vm_configurations.c index 38b347e86..8ce9992b1 100644 --- a/hypervisor/scenarios/sdc2/vm_configurations.c +++ b/hypervisor/scenarios/sdc2/vm_configurations.c @@ -34,8 +34,6 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = { .type = VUART_LEGACY_PIO, .addr.port_base = INVALID_COM_BASE, }, - .pci_dev_num = SOS_EMULATED_PCI_DEV_NUM, - .pci_devs = sos_pci_devs, }, { /* VM1 */ CONFIG_POST_STD_VM(1),