mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
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:
@@ -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 */
|
||||
|
||||
|
@@ -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,
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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[] = {
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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"
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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 */
|
||||
|
@@ -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)
|
||||
|
@@ -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*/
|
||||
|
@@ -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))
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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
|
||||
|
@@ -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, };
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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!");
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user