From 8338cd463ba95c01a20c3e934398daa73c651a96 Mon Sep 17 00:00:00 2001 From: Mingqiang Chi Date: Mon, 10 Jun 2019 14:37:47 +0800 Subject: [PATCH] hv: move 3 files to lib & arch folder move stack_protector.c/retpoline-thunk.S into lib folder move vmptable.c into arch/x86/config Tracked-On: #1842 Signed-off-by: Mingqiang Chi Reviewed-by: Jason Chen CJ modified: Makefile renamed: arch/x86/retpoline-thunk.S -> arch/x86/lib/retpoline-thunk.S renamed: common/stack_protector.c -> lib/stack_protector.c renamed: dm/vmptable.c -> arch/x86/configs/vmptable.c --- hypervisor/Makefile | 8 ++++---- hypervisor/{dm => arch/x86/configs}/vmptable.c | 0 hypervisor/arch/x86/{ => lib}/retpoline-thunk.S | 0 hypervisor/{common => lib}/stack_protector.c | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename hypervisor/{dm => arch/x86/configs}/vmptable.c (100%) rename hypervisor/arch/x86/{ => lib}/retpoline-thunk.S (100%) rename hypervisor/{common => lib}/stack_protector.c (100%) diff --git a/hypervisor/Makefile b/hypervisor/Makefile index 2d1b0838a..3e5dd09f2 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -233,7 +233,7 @@ C_SRCS += common/schedule.c C_SRCS += common/vm_load.c C_SRCS += common/ptdev.c ifdef STACK_PROTECTOR -C_SRCS += common/stack_protector.c +C_SRCS += lib/stack_protector.c endif C_SRCS += hw/pci.c @@ -245,7 +245,7 @@ C_SRCS += dm/vuart.c C_SRCS += dm/io_req.c C_SRCS += dm/vpci/vdev.c C_SRCS += dm/vpci/vpci.c -C_SRCS += dm/vmptable.c +C_SRCS += arch/x86/configs/vmptable.c C_SRCS += dm/vpci/vhostbridge.c C_SRCS += dm/vpci/pci_pt.c C_SRCS += dm/vpci/vmsi.c @@ -255,12 +255,12 @@ C_SRCS += dm/vpci/vmsix.c ifeq (true, $(shell [ $(GCC_MAJOR) -eq 7 ] && [ $(GCC_MINOR) -ge 3 ] && echo true)) CFLAGS += -mindirect-branch=thunk-extern -mindirect-branch-register CFLAGS += -DCONFIG_RETPOLINE -S_SRCS += arch/x86/retpoline-thunk.S +S_SRCS += arch/x86/lib/retpoline-thunk.S else ifeq (true, $(shell [ $(GCC_MAJOR) -ge 8 ] && echo true)) CFLAGS += -mindirect-branch=thunk-extern -mindirect-branch-register CFLAGS += -DCONFIG_RETPOLINE -S_SRCS += arch/x86/retpoline-thunk.S +S_SRCS += arch/x86/lib/retpoline-thunk.S endif endif diff --git a/hypervisor/dm/vmptable.c b/hypervisor/arch/x86/configs/vmptable.c similarity index 100% rename from hypervisor/dm/vmptable.c rename to hypervisor/arch/x86/configs/vmptable.c diff --git a/hypervisor/arch/x86/retpoline-thunk.S b/hypervisor/arch/x86/lib/retpoline-thunk.S similarity index 100% rename from hypervisor/arch/x86/retpoline-thunk.S rename to hypervisor/arch/x86/lib/retpoline-thunk.S diff --git a/hypervisor/common/stack_protector.c b/hypervisor/lib/stack_protector.c similarity index 100% rename from hypervisor/common/stack_protector.c rename to hypervisor/lib/stack_protector.c