qemu/include/hw/intc/loongarch_ipi.h
Bibo Mao f936caa315 hw/intc/loongarch_ipi: Add kernel irqchip save and restore function
Add save and store funtction if kvm_irqchip_in_kernel() return true,
it is to get and set IPI irqchip state from KVM kernel.

Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250606063033.2557365-6-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
2025-06-19 15:46:28 +08:00

32 lines
769 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* LoongArch IPI interrupt header files
*
* Copyright (C) 2024 Loongson Technology Corporation Limited
*/
#ifndef HW_LOONGARCH_IPI_H
#define HW_LOONGARCH_IPI_H
#include "qom/object.h"
#include "hw/intc/loongson_ipi_common.h"
#define TYPE_LOONGARCH_IPI "loongarch_ipi"
OBJECT_DECLARE_TYPE(LoongarchIPIState, LoongarchIPIClass, LOONGARCH_IPI)
struct LoongarchIPIState {
LoongsonIPICommonState parent_obj;
int dev_fd;
};
struct LoongarchIPIClass {
LoongsonIPICommonClass parent_class;
DeviceRealize parent_realize;
ResettablePhases parent_phases;
};
void kvm_ipi_realize(DeviceState *dev, Error **errp);
int kvm_ipi_get(void *opaque);
int kvm_ipi_put(void *opaque, int version_id);
#endif