xref: /openbmc/qemu/include/hw/intc/loongarch_ipi.h (revision d01d42ccc9510c039b2e4ec49af164e374eab154)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * LoongArch IPI interrupt header files
4  *
5  * Copyright (C) 2024 Loongson Technology Corporation Limited
6  */
7 
8 #ifndef HW_LOONGARCH_IPI_H
9 #define HW_LOONGARCH_IPI_H
10 
11 #include "qom/object.h"
12 #include "hw/intc/loongson_ipi_common.h"
13 
14 #define TYPE_LOONGARCH_IPI  "loongarch_ipi"
15 OBJECT_DECLARE_TYPE(LoongarchIPIState, LoongarchIPIClass, LOONGARCH_IPI)
16 
17 struct LoongarchIPIState {
18     LoongsonIPICommonState parent_obj;
19     int  dev_fd;
20 };
21 
22 struct LoongarchIPIClass {
23     LoongsonIPICommonClass parent_class;
24     DeviceRealize parent_realize;
25     ResettablePhases parent_phases;
26 };
27 
28 void kvm_ipi_realize(DeviceState *dev, Error **errp);
29 int kvm_ipi_get(void *opaque);
30 int kvm_ipi_put(void *opaque, int version_id);
31 
32 #endif
33