From ef974d1adf4da1789a7af314643f45ec623427ab Mon Sep 17 00:00:00 2001 From: Mingqiang Chi Date: Tue, 6 Nov 2018 11:18:43 +0800 Subject: [PATCH] hv:Remove atomic operation to set initial value for 'created_vcpu' It is not necessary to use atomic operation to set the initial value for 'created_vcpu' in vm structure. Tracked-On: #861 Signed-off-by: Mingqiang Chi --- hypervisor/arch/x86/guest/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/guest/vm.c b/hypervisor/arch/x86/guest/vm.c index 0fc88ce36..3012c59fb 100644 --- a/hypervisor/arch/x86/guest/vm.c +++ b/hypervisor/arch/x86/guest/vm.c @@ -82,7 +82,7 @@ int create_vm(struct vm_description *vm_desc, struct acrn_vm **rtn_vm) #endif /* Init mmio list */ INIT_LIST_HEAD(&vm->mmio_list); - atomic_store16(&vm->hw.created_vcpus, 0U); + vm->hw.created_vcpus = 0U; /* gpa_lowtop are used for system start up */ vm->hw.gpa_lowtop = 0UL;