1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2024 Loongson Technology Corporation Limited
6 #ifndef __ASM_KVM_IPI_H
7 #define __ASM_KVM_IPI_H
11 #define LARCH_INT_IPI 12
13 struct loongarch_ipi
{
16 struct kvm_io_device device
;
28 #define IOCSR_IPI_BASE 0x1000
29 #define IOCSR_IPI_SIZE 0x160
31 #define IOCSR_IPI_STATUS 0x000
32 #define IOCSR_IPI_EN 0x004
33 #define IOCSR_IPI_SET 0x008
34 #define IOCSR_IPI_CLEAR 0x00c
35 #define IOCSR_IPI_BUF_20 0x020
36 #define IOCSR_IPI_BUF_28 0x028
37 #define IOCSR_IPI_BUF_30 0x030
38 #define IOCSR_IPI_BUF_38 0x038
39 #define IOCSR_IPI_SEND 0x040
40 #define IOCSR_MAIL_SEND 0x048
41 #define IOCSR_ANY_SEND 0x158
43 int kvm_loongarch_register_ipi_device(void);