mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-11-14 02:00:27 +00:00
The following pcpu related interfaces are moved into common: - common/cpu.c::start_pcpus - include/common/cpu.h::get_pcpu_id - include/common/cpu.h::set_current_pcpu_id Their arch specific implementations are moved into arch/$(ARCH): - arch/$(ARCH)/cpu.c::arch_start_pcpu - include/arch/$(ARCH)/asm/cpu.h::arch_get_pcpu_id - include/arch/$(ARCH)/asm/cpu.h::arch_set_current_pcpu_id The following interface is moved into common: - pcpu_set_current_state (from arch/x86/cpu.c -> common/cpu.c) The following MACROs are moved into include/common/cpu.h: - CPU_UP_TIMEOUT - CPU_DOWN_TIMEOUT - BSP_CPU_ID - INVALID_CPU_ID Tracked-On: #8791 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
25 lines
549 B
C
25 lines
549 B
C
/*
|
|
* Copyright (C) 2018-2022 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <asm/irq.h>
|
|
#include <asm/vmx.h>
|
|
|
|
#include <asm/guest/vcpu.h>
|
|
#include <asm/guest/virq.h>
|
|
#include <cpu.h>
|
|
|
|
void handle_nmi(__unused struct intr_excp_ctx *ctx)
|
|
{
|
|
uint16_t pcpu_id = get_pcpu_id();
|
|
struct acrn_vcpu *vcpu = get_running_vcpu(pcpu_id);
|
|
|
|
/*
|
|
* If NMI occurs, inject it into current vcpu. Now just PMI is verified.
|
|
* For other kind of NMI, it may need to be checked further.
|
|
*/
|
|
vcpu_make_request(vcpu, ACRN_REQUEST_NMI);
|
|
}
|