From 6bbd0129c37e9b9144c15086ec12d52ea03336b0 Mon Sep 17 00:00:00 2001 From: Zide Chen Date: Mon, 10 Dec 2018 13:04:55 -0800 Subject: [PATCH] modularization: move vMTRR code to guest directory MTRR emulation belongs to virtual CPU component. - rename mtrr.c to vmtrr.c and move it to arch/x86/guest - rename mtrr.h to vmtrr.h and move it to include/arch/x86/guest Tracked-On: #1842 Signed-off-by: Zide Chen Acked-by: Eddie Dong --- doc/acrn.doxyfile | 2 +- hypervisor/Makefile | 2 +- hypervisor/arch/x86/{mtrr.c => guest/vmtrr.c} | 0 hypervisor/include/arch/x86/{mtrr.h => guest/vmtrr.h} | 8 ++++---- hypervisor/include/arch/x86/hv_arch.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename hypervisor/arch/x86/{mtrr.c => guest/vmtrr.c} (100%) rename hypervisor/include/arch/x86/{mtrr.h => guest/vmtrr.h} (95%) diff --git a/doc/acrn.doxyfile b/doc/acrn.doxyfile index 57a9924de..855b4480e 100644 --- a/doc/acrn.doxyfile +++ b/doc/acrn.doxyfile @@ -795,10 +795,10 @@ WARN_LOGFILE = INPUT = custom-doxygen/mainpage.md \ ../hypervisor/include/arch/x86/guest/guest.h \ ../hypervisor/include/arch/x86/mmu.h \ - ../hypervisor/include/arch/x86/mtrr.h \ ../hypervisor/include/arch/x86/pgtable.h \ ../hypervisor/include/arch/x86/vtd.h \ ../hypervisor/include/arch/x86/irq.h \ + ../hypervisor/include/arch/x86/guest/vmtrr.h \ ../hypervisor/include/arch/x86/guest/vlapic.h \ ../hypervisor/include/arch/x86/guest/vioapic.h \ ../hypervisor/include/arch/x86/guest/vpic.h \ diff --git a/hypervisor/Makefile b/hypervisor/Makefile index f8c996f0a..c6f2fe344 100644 --- a/hypervisor/Makefile +++ b/hypervisor/Makefile @@ -154,7 +154,6 @@ C_SRCS += arch/x86/vmx.c C_SRCS += arch/x86/assign.c C_SRCS += arch/x86/trusty.c C_SRCS += arch/x86/cpu_state_tbl.c -C_SRCS += arch/x86/mtrr.c C_SRCS += arch/x86/pm.c S_SRCS += arch/x86/wakeup.S C_SRCS += arch/x86/static_checks.c @@ -163,6 +162,7 @@ C_SRCS += arch/x86/guest/vcpuid.c C_SRCS += arch/x86/guest/vcpu.c C_SRCS += arch/x86/guest/vm.c C_SRCS += arch/x86/guest/vlapic.c +C_SRCS += arch/x86/guest/vmtrr.c C_SRCS += arch/x86/guest/guest.c C_SRCS += arch/x86/guest/vmcall.c C_SRCS += arch/x86/guest/vmsr.c diff --git a/hypervisor/arch/x86/mtrr.c b/hypervisor/arch/x86/guest/vmtrr.c similarity index 100% rename from hypervisor/arch/x86/mtrr.c rename to hypervisor/arch/x86/guest/vmtrr.c diff --git a/hypervisor/include/arch/x86/mtrr.h b/hypervisor/include/arch/x86/guest/vmtrr.h similarity index 95% rename from hypervisor/include/arch/x86/mtrr.h rename to hypervisor/include/arch/x86/guest/vmtrr.h index fe5a489fb..5c7b0f0b8 100644 --- a/hypervisor/include/arch/x86/mtrr.h +++ b/hypervisor/include/arch/x86/guest/vmtrr.h @@ -3,12 +3,12 @@ * SPDX-License-Identifier: BSD-3-Clause */ /** - * @file mtrr.h + * @file vmtrr.h * * @brief MTRR Virtualization */ -#ifndef MTRR_H -#define MTRR_H +#ifndef VMTRR_H +#define VMTRR_H /** * @brief MTRR Virtualization * @@ -83,4 +83,4 @@ void init_mtrr(struct acrn_vcpu *vcpu); /** * @} */ -#endif /* MTRR_H */ +#endif /* VMTRR_H */ diff --git a/hypervisor/include/arch/x86/hv_arch.h b/hypervisor/include/arch/x86/hv_arch.h index 59ecde85a..e1874af4d 100644 --- a/hypervisor/include/arch/x86/hv_arch.h +++ b/hypervisor/include/arch/x86/hv_arch.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include