Files
acrn-hypervisor/hypervisor/include/arch/x86/asm/per_cpu.h
Yifan Liu 62d07897e2 hv: vcpu: Move offline_vcpu to common vcpu.c and rename to destroy_vcpu
destroy_vcpu: Call arch_deinit_vcpu, and do common deinit.

Tracked-On: #8830
Signed-off-by: Yifan Liu <yifan1.liu@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Acked-by: Wang Yu1 <yu1.wang@intel.com>
2025-10-30 13:30:32 +08:00

42 lines
955 B
C

/*
* Copyright (C) 2018-2022 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef PER_CPU_X86_H
#define PER_CPU_X86_H
#include <types.h>
#include <asm/page.h>
#include <profiling.h>
#include <asm/gdt.h>
#include <asm/security.h>
#include <asm/vm_config.h>
struct per_cpu_arch {
/* vmxon_region MUST be 4KB-aligned */
uint8_t vmxon_region[PAGE_SIZE];
void *vmcs_run;
struct host_gdt gdt;
struct tss_64 tss;
uint8_t mc_stack[CONFIG_STACK_SIZE] __aligned(16);
uint8_t df_stack[CONFIG_STACK_SIZE] __aligned(16);
uint8_t sf_stack[CONFIG_STACK_SIZE] __aligned(16);
uint32_t lapic_id;
uint32_t lapic_ldr;
#ifdef STACK_PROTECTOR
struct stack_canary stk_canary;
#endif
#ifdef PROFILING_ON
struct profiling_info_wrapper profiling_info;
#endif
uint64_t tsc_suspend;
struct acrn_vcpu *whose_iwkey;
uint32_t kick_pcpu_mode;
uint32_t idle_mode;
} __aligned(PAGE_SIZE); /* per_cpu_region size aligned with PAGE_SIZE */
#endif