summary refs log tree commit diff stats
path: root/include/hw/intc
diff options
context:
space:
mode:
authorBibo Mao <maobibo@loongson.cn>2025-06-06 14:30:28 +0800
committerSong Gao <gaosong@loongson.cn>2025-06-19 15:50:28 +0800
commit11a04c9f40ac479f68139f6801da314591e67ae1 (patch)
treeea448ff553deab50115b22ea3cc395a0bb490d84 /include/hw/intc
parentb758e28974614a15e70fbc983e28fe77852564ee (diff)
downloadfocaccia-qemu-11a04c9f40ac479f68139f6801da314591e67ae1.tar.gz
focaccia-qemu-11a04c9f40ac479f68139f6801da314591e67ae1.zip
hw/intc/loongarch_pch: 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 PCH PCI irqchip state from KVM kernel.

Reviewed-by: Song Gao <gaosong@loongson.cn>
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250606063033.2557365-9-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'include/hw/intc')
-rw-r--r--include/hw/intc/loongarch_pch_pic.h2
-rw-r--r--include/hw/intc/loongarch_pic_common.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/intc/loongarch_pch_pic.h b/include/hw/intc/loongarch_pch_pic.h
index 4b52f1165f..a46b6f8985 100644
--- a/include/hw/intc/loongarch_pch_pic.h
+++ b/include/hw/intc/loongarch_pch_pic.h
@@ -27,5 +27,7 @@ struct LoongarchPICClass {
 };
 
 void kvm_pic_realize(DeviceState *dev, Error **errp);
+int kvm_pic_get(void *opaque);
+int kvm_pic_put(void *opaque, int version_id);
 
 #endif /* HW_LOONGARCH_PCH_PIC_H */
diff --git a/include/hw/intc/loongarch_pic_common.h b/include/hw/intc/loongarch_pic_common.h
index 9349a055d0..f774c975d4 100644
--- a/include/hw/intc/loongarch_pic_common.h
+++ b/include/hw/intc/loongarch_pic_common.h
@@ -23,6 +23,7 @@
 #define PCH_PIC_ROUTE_ENTRY_END         0x13f
 #define PCH_PIC_HTMSI_VEC               0x200
 #define PCH_PIC_HTMSI_VEC_END           0x23f
+#define PCH_PIC_INT_REQUEST             0x380
 #define PCH_PIC_INT_STATUS              0x3a0
 #define PCH_PIC_INT_POL                 0x3e0