From d742be2c5c6ed728f59f75e0df4463c25f33658b Mon Sep 17 00:00:00 2001 From: Victor Sun Date: Fri, 17 Apr 2020 14:13:52 +0800 Subject: [PATCH] HV: Kconfig: enable CPU sharing by default The patch enables CPU sharing feature by default, the default scheduler is set to SCHED_BVT; Tracked-On: #4661 Signed-off-by: Victor Sun --- hypervisor/arch/x86/Kconfig | 2 +- hypervisor/scenarios/industry/vm_configurations.c | 2 +- hypervisor/scenarios/industry/vm_configurations.h | 2 +- misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry.xml | 3 ++- misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry.xml | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hypervisor/arch/x86/Kconfig b/hypervisor/arch/x86/Kconfig index b6c870fc88..de8ce53a7e 100644 --- a/hypervisor/arch/x86/Kconfig +++ b/hypervisor/arch/x86/Kconfig @@ -25,7 +25,7 @@ config MULTIBOOT2 choice prompt "ACRN Scheduler" - default SCHED_NOOP + default SCHED_BVT help Select the CPU scheduler to be used by the hypervisor diff --git a/hypervisor/scenarios/industry/vm_configurations.c b/hypervisor/scenarios/industry/vm_configurations.c index b3fc60148c..b65f97b5b8 100644 --- a/hypervisor/scenarios/industry/vm_configurations.c +++ b/hypervisor/scenarios/industry/vm_configurations.c @@ -39,7 +39,7 @@ struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = { }, { /* VM1 */ CONFIG_POST_STD_VM(1), - .vcpu_num = 1U, + .vcpu_num = 2U, .vcpu_affinity = VM1_CONFIG_VCPU_AFFINITY, .vuart[0] = { .type = VUART_LEGACY_PIO, diff --git a/hypervisor/scenarios/industry/vm_configurations.h b/hypervisor/scenarios/industry/vm_configurations.h index 4c03945e7b..641be675dd 100644 --- a/hypervisor/scenarios/industry/vm_configurations.h +++ b/hypervisor/scenarios/industry/vm_configurations.h @@ -35,7 +35,7 @@ "i915.enable_gvt=1 idle=halt " \ SOS_BOOTARGS_DIFF -#define VM1_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(1U)} +#define VM1_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(0U), AFFINITY_CPU(1U)} #define VM2_CONFIG_VCPU_AFFINITY {AFFINITY_CPU(2U), AFFINITY_CPU(3U)} #endif /* VM_CONFIGURATIONS_H */ diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry.xml index 7fcd136051..f77e8e94f2 100644 --- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry.xml +++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i5/industry.xml @@ -12,7 +12,7 @@ y - SCHED_NOOP + SCHED_BVT y y n @@ -99,6 +99,7 @@ 0 + 0 1 diff --git a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry.xml b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry.xml index 6776096a51..65acac07da 100644 --- a/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry.xml +++ b/misc/acrn-config/xmls/config-xmls/whl-ipc-i7/industry.xml @@ -12,7 +12,7 @@ y - SCHED_NOOP + SCHED_BVT y y n @@ -99,6 +99,7 @@ 0 + 0 1