mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-08 16:36:58 +00:00
This patch can fetch the thermal lvt irq and propagate it to VM. At this stage we support the case that there is only one VM governing thermal. And we pass the hardware thermal irq to this VM. First, we register the handler for thermal lvt interrupt, its irq vector is THERMAL_VECTOR and the handler is thermal_irq_handler(). Then, when a thermal irq occurs, it flags the SOFTIRQ_THERMAL bit of softirq_pending, This bit triggers the thermal_softirq() function. And this function will inject the virtual thermal irq to VM. Tracked-On: #8595 Signed-off-by: Zhangwei6 <wei6.zhang@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
22 lines
466 B
C
22 lines
466 B
C
/*
|
|
* Copyright (C) 2018-2022 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SOFTIRQ_H
|
|
#define SOFTIRQ_H
|
|
|
|
#define SOFTIRQ_TIMER 0U
|
|
#define SOFTIRQ_PTDEV 1U
|
|
#define SOFTIRQ_THERMAL 2U
|
|
#define NR_SOFTIRQS 3U
|
|
|
|
typedef void (*softirq_handler)(uint16_t cpu_id);
|
|
|
|
void init_softirq(void);
|
|
void register_softirq(uint16_t nr, softirq_handler handler);
|
|
void fire_softirq(uint16_t nr);
|
|
void do_softirq(void);
|
|
#endif /* SOFTIRQ_H */
|