HV: further cleanup of header inclusions

According to the comments in hypervisor:
 " This file includes config header file "bsp_cfg.h" and other
	hypervisor used header files.
	It should be included in all the source files."

this patch includes all common header files in hypervisor.h
then removes other redundant inclusions

Signed-off-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
Zide Chen
2018-05-21 17:30:50 -07:00
committed by lijinxia
parent d594878e31
commit 8f16faab04
69 changed files with 21 additions and 246 deletions

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#define ACTIVE_FLAG 0x1 /* any non zero should be okay */

View File

@@ -29,13 +29,9 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <bsp_extern.h>
#include <hv_arch.h>
#include <schedule.h>
#include <version.h>
#include <hv_debug.h>
spinlock_t cpu_secondary_spinlock = {
.head = 0,

View File

@@ -28,7 +28,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hypervisor.h>
#include <cpu.h>
#include <mmu.h>
#include <gdt.h>

View File

@@ -28,7 +28,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hypervisor.h>
#include <spinlock.h>
#include <gdt.h>
#include <cpu.h>

View File

@@ -28,9 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <acrn_common.h>
#include <hv_lib.h>
#include <hv_arch.h>
#include <hypervisor.h>
/* The table includes cpu px info of Intel A3960 SoC */
struct cpu_px_data px_a3960[] = {

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
static inline struct vcpuid_entry *find_vcpuid_entry(struct vcpu *vcpu,
uint32_t leaf, uint32_t subleaf)

View File

@@ -2,7 +2,7 @@
* Copyright (C) <2018> Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <acrn_common.h>
#include <hypervisor.h>
int warm_reboot(void)
{

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_hv_defs.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include "guest/instr_emul_wrapper.h"
#include "guest/instr_emul.h"

View File

@@ -28,8 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <gdt.h>
#include <hypervisor.h>
DEFINE_CPU_DATA(struct tss_64, tss);
DEFINE_CPU_DATA(struct host_gdt, gdt);

View File

@@ -29,12 +29,7 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <bsp_extern.h>
#include <acrn_hv_defs.h>
#include <hv_debug.h>
#include <multiboot.h>
#define ACRN_DBG_GUEST 6

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include "instr_emul_wrapper.h"
#include "instr_emul.h"

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include "instr_emul_wrapper.h"
#include "instr_emul.h"

View File

@@ -28,10 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <acrn_common.h>
#include <hv_lib.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include <hypervisor.h>
int validate_pstate(struct vm *vm, uint64_t perf_ctl)
{

View File

@@ -28,9 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hypervisor.h>
#include <ucode.h>
uint64_t get_microcode_version(void)

View File

@@ -29,11 +29,7 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <schedule.h>
#include <hv_debug.h>
vm_sw_loader_t vm_sw_loader;

View File

@@ -31,10 +31,6 @@
#define pr_fmt(fmt) "vioapic: " fmt
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#define IOREGSEL 0x00
#define IOWIN 0x10

View File

@@ -30,11 +30,6 @@
#define pr_fmt(fmt) "vlapic: " fmt
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <acrn_hv_defs.h>
#include <hv_debug.h>
#include "instr_emul_wrapper.h"
#include "instr_emul.h"

View File

@@ -28,11 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hypervisor.h>
#include <bsp_extern.h>
#include <hv_debug.h>
#include <multiboot.h>
/* Local variables */

View File

@@ -28,11 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include <acrn_hv_defs.h>
#include <hypervisor.h>
#include <hypercall.h>
int vmcall_vmexit_handler(struct vcpu *vcpu)

View File

@@ -28,10 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include <hypervisor.h>
#include <ucode.h>
/*MRS need to be emulated, the order in this array better as freq of ops*/

View File

@@ -28,10 +28,6 @@
#define pr_fmt(fmt) "vpic: " fmt
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#define VPIC_LOCK_INIT(vpic) spinlock_init(&((vpic)->lock))
#define VPIC_LOCK(vpic) spinlock_obtain(&((vpic)->lock))

View File

@@ -28,10 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#include <hypervisor.h>
#define EXCEPTION_ERROR_CODE_VALID 8
#define INTERRPUT_QUEUE_BUFF_SIZE 255

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
/* Rate range 1 to 1000 or 1uSec to 1mSec */
#define APIC_TIMER_MAX 0xffffffff

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
int interrupt_init(uint32_t cpu_id)
{

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
int dm_emulate_pio_post(struct vcpu *vcpu)
{

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
/* Register offsets */
#define IOAPIC_REGSEL_OFFSET 0

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
static spinlock_t exception_spinlock = { .head = 0, .tail = 0, };

View File

@@ -28,10 +28,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
static void *mmu_pml4_addr;

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
static struct dev_handler_node *notification_node;

View File

@@ -29,9 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
static DEFINE_CPU_DATA(uint64_t, softirq_pending);

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#define MAX_TIMER_ACTIONS 32
#define TIMER_IRQ (NR_MAX_IRQS - 1)

View File

@@ -28,11 +28,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <acrn_hv_defs.h>
#include <hv_debug.h>
#include <hypervisor.h>
#include <hkdf.h>
_Static_assert(NR_WORLD == 2, "Only 2 Worlds supported!");

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
static int unhandled_vmexit_handler(struct vcpu *vcpu);
static int xsetbv_vmexit_handler(struct vcpu *vcpu);

View File

@@ -29,10 +29,6 @@
*/
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#ifdef CONFIG_EFI_STUB
#include <acrn_efi.h>
extern struct efi_ctx* efi_ctx;

View File

@@ -31,10 +31,6 @@
#define pr_fmt(fmt) "iommu: " fmt
#include <hypervisor.h>
#include <hv_lib.h>
#include <acrn_common.h>
#include <hv_arch.h>
#include <hv_debug.h>
#define DBG_IOMMU 0