qemu/include/hw/intc/loongarch_extioi.h
Bibo Mao 228c5413fb hw/intc/loongarch_extioi: 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 ExtIOI irqchip state from KVM kernel.

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

33 lines
866 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* LoongArch 3A5000 ext interrupt controller definitions
*
* Copyright (C) 2021 Loongson Technology Corporation Limited
*/
#ifndef LOONGARCH_EXTIOI_H
#define LOONGARCH_EXTIOI_H
#include "hw/intc/loongarch_extioi_common.h"
#define TYPE_LOONGARCH_EXTIOI "loongarch.extioi"
OBJECT_DECLARE_TYPE(LoongArchExtIOIState, LoongArchExtIOIClass, LOONGARCH_EXTIOI)
struct LoongArchExtIOIState {
LoongArchExtIOICommonState parent_obj;
int dev_fd;
};
struct LoongArchExtIOIClass {
LoongArchExtIOICommonClass parent_class;
DeviceRealize parent_realize;
DeviceUnrealize parent_unrealize;
ResettablePhases parent_phases;
};
void kvm_extioi_realize(DeviceState *dev, Error **errp);
int kvm_extioi_get(void *opaque);
int kvm_extioi_put(void *opaque, int version_id);
#endif /* LOONGARCH_EXTIOI_H */