aboutsummaryrefslogtreecommitdiff
path: root/include/hw
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
parentb758e28974614a15e70fbc983e28fe77852564ee (diff)
downloadqemu-11a04c9f40ac479f68139f6801da314591e67ae1.zip
qemu-11a04c9f40ac479f68139f6801da314591e67ae1.tar.gz
qemu-11a04c9f40ac479f68139f6801da314591e67ae1.tar.bz2
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')
-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 4b52f11..a46b6f8 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 9349a05..f774c97 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