mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-12 18:34:24 +00:00
NMI is used to notify LAPIC-PT RTVM, to kick its CPU into hypervisor. But NMI could be used by system devices, like PMU (Performance Monitor Unit). So use INIT signal as the partition CPU notification function, to replace injecting NMI. Also remove unused NMI as notification related code. Tracked-On: #6966 Acked-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Minggui Cao <minggui.cao@intel.com>
24 lines
548 B
C
24 lines
548 B
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <asm/irq.h>
|
|
#include <asm/vmx.h>
|
|
|
|
#include <asm/guest/vcpu.h>
|
|
#include <asm/guest/virq.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);
|
|
}
|