hw/intc/loongarch_pch: Add kernel irqchip realize function

Function kvm_pic_realize() is added if kvm_irqchip_in_kernel() return true.
It is to notify KVM kernel to create and initialize PCH PCI device in
kernel mode.

Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250606063033.2557365-8-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
This commit is contained in:
Bibo Mao 2025-06-06 14:30:27 +08:00 committed by Song Gao
parent 5b0e05b902
commit b758e28974
4 changed files with 53 additions and 4 deletions

View file

@ -16,6 +16,7 @@ OBJECT_DECLARE_TYPE(LoongarchPICState, LoongarchPICClass, LOONGARCH_PIC)
struct LoongarchPICState {
LoongArchPICCommonState parent_obj;
int dev_fd;
};
struct LoongarchPICClass {
@ -25,4 +26,6 @@ struct LoongarchPICClass {
ResettablePhases parent_phases;
};
void kvm_pic_realize(DeviceState *dev, Error **errp);
#endif /* HW_LOONGARCH_PCH_PIC_H */