[PATCH v1] target/loongarch: Fix qemu-system-loongarch64 assert failed with the option '-d int'

2024-03-20 Thread Song Gao
qemu-system-loongarch64 assert failed with the option '-d int', the helper_idle() raise an exception EXCP_HLT, but the exception name is undefined. Signed-off-by: Song Gao --- target/loongarch/cpu.c | 75 ++ 1 file changed, 46 insertions(+), 29 deletions

[PULL 2/3] target/loongarch: Fix tlb huge page loading issue

2024-03-19 Thread Song Gao
-by: Richard Henderson Signed-off-by: Song Gao Message-Id: <20240318070332.1273939-1-lixiang...@loongson.cn> --- target/loongarch/cpu-csr.h| 3 + target/loongarch/internals.h | 5 -- target/loongarch/tcg/tlb_helper.c | 113 +- 3 files chang

[PULL 3/3] target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0'

2024-03-19 Thread Song Gao
off-by: Song Gao Message-Id: <20240320013955.1561311-1-gaos...@loongson.cn> --- target/loongarch/tcg/insn_trans/trans_atomic.c.inc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/loongarch/tcg/insn_trans/trans_atomic.c.inc b/target/loongarch/tcg/i

[PULL 0/3] loongarch fixes for 9.0

2024-03-19 Thread Song Gao
Bibo Mao (1): hw/intc/loongarch_extioi: Fix interrupt routing update Song Gao (1): target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0' Xianglai Li (1): target/loongarch: Fix tlb huge page loading issue hw/intc/loongarch_extioi.c

[PULL 1/3] hw/intc/loongarch_extioi: Fix interrupt routing update

2024-03-19 Thread Song Gao
From: Bibo Mao Interrupt number in loop sentence should be base irq plus loop index, it is missing on checking whether the irq is pending. Fixes: 428a6ef4396 ("Add vmstate post_load support") Signed-off-by: Bibo Mao Reviewed-by: Song Gao Signed-off-by: Song Gao

[PATCH v2] target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0'

2024-03-19 Thread Song Gao
On gen_ll, if a->imm is zero, make_address_x return src1, but the load to destination may clobber src1. We use a new destination to fix this problem. Fixes: c5af6628f4be (target/loongarch: Extract make_address_i() helper) Suggested-by: Richard Henderson Signed-off-by: Song Gao --- tar

[PATCH v1] target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0'

2024-03-19 Thread Song Gao
On gen_ll, if a->imm is 0, The value of t0 should be src1. Links: https://www.openwall.com/lists/musl/2024/03/12/4 Signed-off-by: Song Gao --- target/loongarch/tcg/insn_trans/trans_atomic.c.inc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/loongarch/

[PATCH v6 10/17] hw/loongarch: fdt adds cpu interrupt controller node

2024-03-07 Thread Song Gao
fdt adds cpu interrupt controller node, we use 'loongson,cpu-interrupt-controller'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongarch-cpu.c https://lore.kernel.org/r/20221114113824.1880-2-liupei...@loongson.cn Signed-off-by: Song Gao Message-Id

[PATCH v6 12/17] hw/loongarch: fdt adds pch_pic Controller

2024-03-07 Thread Song Gao
fdt adds pch pic controller, we use 'loongson,pch-pic-1.0' See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-pic.c https://lore.kernel.org/r/20200528152757.1028711-4-jiaxun.y...@flygoat.com Signed-off-by: Song Gao Message-Id: <20240301093839.663947-13-g

[PATCH v6 01/17] hw/loongarch: Move boot fucntions to boot.c

2024-03-07 Thread Song Gao
Move some boot functions to boot.c and struct loongarch_boot_info into struct LoongArchMachineState. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-2-gaos...@loongson.cn> --- hw/loongarch/boot.c | 128 hw/loongarch/meson.build

[PATCH v6 14/17] hw/loongarch: fdt adds pcie irq_map node

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-15-gaos...@loongson.cn> --- hw/loongarch/virt.c | 73 ++--- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 1e767c49f8..d003

[PATCH v6 15/17] hw/loongarch: fdt remove unused irqchip node

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-16-gaos...@loongson.cn> --- hw/loongarch/virt.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index d00343f0c2..c80732a223 100644 --

[PATCH v6 11/17] hw/loongarch: fdt adds Extend I/O Interrupt Controller

2024-03-07 Thread Song Gao
fdt adds Extend I/O Interrupt Controller, we use 'loongson,ls2k2000-eiointc'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-eiointc.c https://lore.kernel.org/r/764e02d924094580ac0f1d15535f4b98308705c6.1683279769.git.zhoubin...@loongson.cn Signed-off-by: Song Gao

[PATCH v6 17/17] hw/loongarch: Add cells missing from rtc node

2024-03-07 Thread Song Gao
rtc node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-18-gaos...@loongson.cn> --- hw/loongarch/virt.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c

[PATCH v6 05/17] hw/loongarch: Init efi_system_table

2024-03-07 Thread Song Gao
Add init_systab and set boot_info->a2 Signed-off-by: Song Gao Message-Id: <20240301093839.663947-6-gaos...@loongson.cn> --- hw/loongarch/boot.c | 22 + include/hw/loongarch/boot.h | 48 + 2 files changed, 70 insertions(+) d

[PATCH v6 07/17] hw/loongarch: Init efi_initrd table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-8-gaos...@loongson.cn> --- hw/loongarch/boot.c | 23 +-- include/hw/loongarch/boot.h | 9 + 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[PATCH v6 06/17] hw/loongarch: Init efi_boot_memmap table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-7-gaos...@loongson.cn> --- hw/loongarch/boot.c | 39 + hw/loongarch/virt.c | 11 ++- include/hw/loongarch/boot.h | 27 + include/hw/loongarch/virt.

[PATCH v6 09/17] hw/loongarch: Fix fdt memory node wrong 'reg'

2024-03-07 Thread Song Gao
<0x02 0x00 0x02 0x1000>; }; Reviewed-by: Bibo Mao Signed-off-by: Song Gao Message-Id: <20240301093839.663947-10-gaos...@loongson.cn> --- hw/loongarch/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 8981b57b12

[PATCH v6 04/17] hw/loongarch: Add init_cmdline

2024-03-07 Thread Song Gao
Add init_cmline and set boot_info->a0, a1 Signed-off-by: Song Gao Message-Id: <20240301093839.663947-5-gaos...@loongson.cn> --- hw/loongarch/boot.c | 19 +++ include/hw/loongarch/virt.h | 2 ++ target/loongarch/cpu.h | 2 ++ 3 files changed, 23 insertions

[PATCH v6 02/17] hw/loongarch: Add load initrd

2024-03-07 Thread Song Gao
we load initrd ramdisk after kernel_high address Signed-off-by: Song Gao Message-Id: <20240301093839.663947-3-gaos...@loongson.cn> --- hw/loongarch/boot.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[PATCH v6 16/17] hw/loongarch: Add cells missing from uart node

2024-03-07 Thread Song Gao
uart node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-17-gaos...@loongson.cn> --- hw/loongarch/virt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c

[PATCH v6 08/17] hw/loongarch: Init efi_fdt table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-9-gaos...@loongson.cn> --- hw/loongarch/boot.c | 11 +++ include/hw/loongarch/boot.h | 4 2 files changed, 15 insertions(+) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 6126a37858..c6c6e6d194

[PATCH v6 03/17] hw/loongarch: Add slave cpu boot_code

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-4-gaos...@loongson.cn> --- hw/loongarch/boot.c | 70 - 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 149deb2e01..e560

[PATCH v6 00/17] Add boot LoongArch elf kernel with FDT

2024-03-07 Thread Song Gao
/loongarch-binary/releases Please review! Thanks. Song Gao Song Gao (17): hw/loongarch: Move boot fucntions to boot.c hw/loongarch: Add load initrd hw/loongarch: Add slave cpu boot_code hw/loongarch: Add init_cmdline hw/loongarch: Init efi_system_table hw/loongarch: Init efi_boot_memmap

[PATCH v6 13/17] hw/loongarch: fdt adds pch_msi Controller

2024-03-07 Thread Song Gao
fdt adds pch msi controller, we use 'loongson,pch-msi-1.0'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-msi.c https://lore.kernel.org/r/20200528152757.1028711-6-jiaxun.y...@flygoat.com Signed-off-by: Song Gao Message-Id: <20240301093839.663947-14-g

[PULL v2 16/17] hw/loongarch: Add cells missing from uart node

2024-03-07 Thread Song Gao
uart node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-17-gaos...@loongson.cn> --- hw/loongarch/virt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c

[PULL v2 00/17] loongarch-to-apply queue

2024-03-07 Thread Song Gao
Song Gao (17): hw/loongarch: Move boot fucntions to boot.c hw/loongarch: Add load initrd hw/loongarch: Add slave cpu boot_code hw/loongarch: Add init_cmdline hw/loongarch: Init efi_system_table hw/loongarch: Init efi_boot_memmap table hw

[PULL v2 12/17] hw/loongarch: fdt adds pch_pic Controller

2024-03-07 Thread Song Gao
fdt adds pch pic controller, we use 'loongson,pch-pic-1.0' See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-pic.c https://lore.kernel.org/r/20200528152757.1028711-4-jiaxun.y...@flygoat.com Signed-off-by: Song Gao Message-Id: <20240301093839.663947-13-g

[PULL v2 08/17] hw/loongarch: Init efi_fdt table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-9-gaos...@loongson.cn> --- hw/loongarch/boot.c | 11 +++ include/hw/loongarch/boot.h | 4 2 files changed, 15 insertions(+) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 6f56d4fd91..fe3e640508

[PULL v2 03/17] hw/loongarch: Add slave cpu boot_code

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-4-gaos...@loongson.cn> --- hw/loongarch/boot.c | 70 - 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 3075c276d4..2f39

[PULL v2 14/17] hw/loongarch: fdt adds pcie irq_map node

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-15-gaos...@loongson.cn> --- hw/loongarch/virt.c | 73 ++--- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 1e767c49f8..d003

[PULL v2 06/17] hw/loongarch: Init efi_boot_memmap table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-7-gaos...@loongson.cn> --- hw/loongarch/boot.c | 39 + hw/loongarch/virt.c | 11 ++- include/hw/loongarch/boot.h | 27 + include/hw/loongarch/virt.

[PULL v2 10/17] hw/loongarch: fdt adds cpu interrupt controller node

2024-03-07 Thread Song Gao
fdt adds cpu interrupt controller node, we use 'loongson,cpu-interrupt-controller'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongarch-cpu.c https://lore.kernel.org/r/20221114113824.1880-2-liupei...@loongson.cn Signed-off-by: Song Gao Message-Id

[PULL v2 05/17] hw/loongarch: Init efi_system_table

2024-03-07 Thread Song Gao
Add init_systab and set boot_info->a2 Signed-off-by: Song Gao Message-Id: <20240301093839.663947-6-gaos...@loongson.cn> --- hw/loongarch/boot.c | 22 + include/hw/loongarch/boot.h | 48 + 2 files changed, 70 insertions(+) d

[PULL v2 04/17] hw/loongarch: Add init_cmdline

2024-03-07 Thread Song Gao
Add init_cmline and set boot_info->a0, a1 Signed-off-by: Song Gao Message-Id: <20240301093839.663947-5-gaos...@loongson.cn> --- hw/loongarch/boot.c | 19 +++ include/hw/loongarch/virt.h | 2 ++ target/loongarch/cpu.h | 2 ++ 3 files changed, 23 insertions

[PULL v2 17/17] hw/loongarch: Add cells missing from rtc node

2024-03-07 Thread Song Gao
rtc node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-18-gaos...@loongson.cn> --- hw/loongarch/virt.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c

[PULL v2 02/17] hw/loongarch: Add load initrd

2024-03-07 Thread Song Gao
we load initrd ramdisk after kernel_high address Signed-off-by: Song Gao Message-Id: <20240301093839.663947-3-gaos...@loongson.cn> --- hw/loongarch/boot.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[PULL v2 01/17] hw/loongarch: Move boot fucntions to boot.c

2024-03-07 Thread Song Gao
Move some boot functions to boot.c and struct loongarch_boot_info into struct LoongArchMachineState. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-2-gaos...@loongson.cn> --- hw/loongarch/boot.c | 125 hw/loongarch/meson.build

[PULL v2 09/17] hw/loongarch: Fix fdt memory node wrong 'reg'

2024-03-07 Thread Song Gao
<0x02 0x00 0x02 0x1000>; }; Reviewed-by: Bibo Mao Signed-off-by: Song Gao Message-Id: <20240301093839.663947-10-gaos...@loongson.cn> --- hw/loongarch/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 8981b57b12

[PULL v2 13/17] hw/loongarch: fdt adds pch_msi Controller

2024-03-07 Thread Song Gao
fdt adds pch msi controller, we use 'loongson,pch-msi-1.0'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-msi.c https://lore.kernel.org/r/20200528152757.1028711-6-jiaxun.y...@flygoat.com Signed-off-by: Song Gao Message-Id: <20240301093839.663947-14-g

[PULL v2 07/17] hw/loongarch: Init efi_initrd table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-8-gaos...@loongson.cn> --- hw/loongarch/boot.c | 23 +-- include/hw/loongarch/boot.h | 9 + 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[PULL v2 11/17] hw/loongarch: fdt adds Extend I/O Interrupt Controller

2024-03-07 Thread Song Gao
fdt adds Extend I/O Interrupt Controller, we use 'loongson,ls2k2000-eiointc'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-eiointc.c https://lore.kernel.org/r/764e02d924094580ac0f1d15535f4b98308705c6.1683279769.git.zhoubin...@loongson.cn Signed-off-by: Song Gao

[PULL v2 15/17] hw/loongarch: fdt remove unused irqchip node

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-16-gaos...@loongson.cn> --- hw/loongarch/virt.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index d00343f0c2..c80732a223 100644 --

[PULL 09/17] hw/loongarch: Fix fdt memory node wrong 'reg'

2024-03-07 Thread Song Gao
<0x02 0x00 0x02 0x1000>; }; Reviewed-by: Bibo Mao Signed-off-by: Song Gao Message-Id: <20240301093839.663947-10-gaos...@loongson.cn> --- hw/loongarch/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 8981b57b12

[PULL 10/17] hw/loongarch: fdt adds cpu interrupt controller node

2024-03-07 Thread Song Gao
fdt adds cpu interrupt controller node, we use 'loongson,cpu-interrupt-controller'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongarch-cpu.c https://lore.kernel.org/r/20221114113824.1880-2-liupei...@loongson.cn Signed-off-by: Song Gao Message-Id

[PULL 13/17] hw/loongarch: fdt adds pch_msi Controller

2024-03-07 Thread Song Gao
fdt adds pch msi controller, we use 'loongson,pch-msi-1.0'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-msi.c https://lore.kernel.org/r/20200528152757.1028711-6-jiaxun.y...@flygoat.com Signed-off-by: Song Gao Message-Id: <20240301093839.663947-14-g

[PULL 14/17] hw/loongarch: fdt adds pcie irq_map node

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-15-gaos...@loongson.cn> --- hw/loongarch/virt.c | 73 ++--- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 1e767c49f8..d003

[PULL 08/17] hw/loongarch: Init efi_fdt table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-9-gaos...@loongson.cn> --- hw/loongarch/boot.c | 11 +++ include/hw/loongarch/boot.h | 4 2 files changed, 15 insertions(+) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 6f56d4fd91..fe3e640508

[PULL 06/17] hw/loongarch: Init efi_boot_memmap table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-7-gaos...@loongson.cn> --- hw/loongarch/boot.c | 39 + hw/loongarch/virt.c | 11 ++- include/hw/loongarch/boot.h | 27 + include/hw/loongarch/virt.

[PULL 07/17] hw/loongarch: Init efi_initrd table

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-8-gaos...@loongson.cn> --- hw/loongarch/boot.c | 23 +-- include/hw/loongarch/boot.h | 9 + 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[PULL 05/17] hw/loongarch: Init efi_system_table

2024-03-07 Thread Song Gao
Add init_systab and set boot_info->a2 Signed-off-by: Song Gao Message-Id: <20240301093839.663947-6-gaos...@loongson.cn> --- hw/loongarch/boot.c | 22 + include/hw/loongarch/boot.h | 48 + 2 files changed, 70 insertions(+) d

[PULL 12/17] hw/loongarch: fdt adds pch_pic Controller

2024-03-07 Thread Song Gao
fdt adds pch pic controller, we use 'loongson,pch-pic-1.0' See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-pic.c https://lore.kernel.org/r/20200528152757.1028711-4-jiaxun.y...@flygoat.com Signed-off-by: Song Gao Message-Id: <20240301093839.663947-13-g

[PULL 01/17] hw/loongarch: Move boot fucntions to boot.c

2024-03-07 Thread Song Gao
Move some boot functions to boot.c and struct loongarch_boot_info into struct LoongArchMachineState. Signed-off-by: Song Gao Message-Id: <20240301093839.663947-2-gaos...@loongson.cn> --- hw/loongarch/boot.c | 125 hw/loongarch/meson.build

[PULL 04/17] hw/loongarch: Add init_cmdline

2024-03-07 Thread Song Gao
Add init_cmline and set boot_info->a0, a1 Signed-off-by: Song Gao Message-Id: <20240301093839.663947-5-gaos...@loongson.cn> --- hw/loongarch/boot.c | 19 +++ include/hw/loongarch/virt.h | 2 ++ target/loongarch/cpu.h | 2 ++ 3 files changed, 23 insertions

[PULL 15/17] hw/loongarch: fdt remove unused irqchip node

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-16-gaos...@loongson.cn> --- hw/loongarch/virt.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index d00343f0c2..c80732a223 100644 --

[PULL 02/17] hw/loongarch: Add load initrd

2024-03-07 Thread Song Gao
we load initrd ramdisk after kernel_high address Signed-off-by: Song Gao Message-Id: <20240301093839.663947-3-gaos...@loongson.cn> --- hw/loongarch/boot.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[PULL 11/17] hw/loongarch: fdt adds Extend I/O Interrupt Controller

2024-03-07 Thread Song Gao
fdt adds Extend I/O Interrupt Controller, we use 'loongson,ls2k2000-eiointc'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-eiointc.c https://lore.kernel.org/r/764e02d924094580ac0f1d15535f4b98308705c6.1683279769.git.zhoubin...@loongson.cn Signed-off-by: Song Gao

[PULL 00/17] loongarch-to-apply queue

2024-03-07 Thread Song Gao
Song Gao (17): hw/loongarch: Move boot fucntions to boot.c hw/loongarch: Add load initrd hw/loongarch: Add slave cpu boot_code hw/loongarch: Add init_cmdline hw/loongarch: Init efi_system_table hw/loongarch: Init efi_boot_memmap table hw

[PULL 03/17] hw/loongarch: Add slave cpu boot_code

2024-03-07 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20240301093839.663947-4-gaos...@loongson.cn> --- hw/loongarch/boot.c | 70 - 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 3075c276d4..2f39

[PATCH v5 11/17] hw/loongarch: fdt adds Extend I/O Interrupt Controller

2024-03-01 Thread Song Gao
fdt adds Extend I/O Interrupt Controller, we use 'loongson,ls2k2000-eiointc'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-eiointc.c https://lore.kernel.org/r/764e02d924094580ac0f1d15535f4b98308705c6.1683279769.git.zhoubin...@loongson.cn Signed-off-by: Song Gao

[PATCH v5 13/17] hw/loongarch: fdt adds pch_msi Controller

2024-03-01 Thread Song Gao
fdt adds pch msi controller, we use 'loongson,pch-msi-1.0'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-msi.c https://lore.kernel.org/r/20200528152757.1028711-6-jiaxun.y...@flygoat.com Signed-off-by: Song Gao --- include/hw/pci-host/ls7a.h | 1 + hw

[PATCH v5 12/17] hw/loongarch: fdt adds pch_pic Controller

2024-03-01 Thread Song Gao
fdt adds pch pic controller, we use 'loongson,pch-pic-1.0' See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-pch-pic.c https://lore.kernel.org/r/20200528152757.1028711-4-jiaxun.y...@flygoat.com Signed-off-by: Song Gao --- include/hw/pci-host/ls7a.h | 1 + hw

[PATCH v5 05/17] hw/loongarch: Init efi_system_table

2024-03-01 Thread Song Gao
Add init_systab and set boot_info->a2 Signed-off-by: Song Gao --- include/hw/loongarch/boot.h | 48 + hw/loongarch/boot.c | 22 + 2 files changed, 70 insertions(+) diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boo

[PATCH v5 14/17] hw/loongarch: fdt adds pcie irq_map node

2024-03-01 Thread Song Gao
Signed-off-by: Song Gao --- hw/loongarch/virt.c | 73 ++--- 1 file changed, 69 insertions(+), 4 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index e1fe1ea97f..ea73a80628 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c

[PATCH v5 01/17] hw/loongarch: Move boot fucntions to boot.c

2024-03-01 Thread Song Gao
Move some boot functions to boot.c and struct loongarch_boot_info into struct LoongArchMachineState. Signed-off-by: Song Gao --- include/hw/loongarch/boot.h | 21 ++ include/hw/loongarch/virt.h | 2 + hw/loongarch/boot.c | 125 hw/loongarch

[PATCH v5 15/17] hw/loongarch: fdt remove unused irqchip node

2024-03-01 Thread Song Gao
Signed-off-by: Song Gao --- hw/loongarch/virt.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index ea73a80628..e2185d7bb4 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -410,34 +410,6

[PATCH v5 03/17] hw/loongarch: Add slave cpu boot_code

2024-03-01 Thread Song Gao
Signed-off-by: Song Gao --- hw/loongarch/boot.c | 70 - 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 3075c276d4..2f398260af 100644 --- a/hw/loongarch/boot.c +++ b/hw/loongarch/boot.c

[PATCH v5 04/17] hw/loongarch: Add init_cmdline

2024-03-01 Thread Song Gao
Add init_cmline and set boot_info->a0, a1 Signed-off-by: Song Gao --- include/hw/loongarch/virt.h | 2 ++ target/loongarch/cpu.h | 2 ++ hw/loongarch/boot.c | 19 +++ 3 files changed, 23 insertions(+) diff --git a/include/hw/loongarch/virt.h b/include

[PATCH v5 06/17] hw/loongarch: Init efi_boot_memmap table

2024-03-01 Thread Song Gao
Signed-off-by: Song Gao --- include/hw/loongarch/boot.h | 27 + include/hw/loongarch/virt.h | 10 ++ hw/loongarch/boot.c | 39 + hw/loongarch/virt.c | 11 ++- 4 files changed, 78 insertions(+), 9

[PATCH v5 09/17] hw/loongarch: Fix fdt memory node wrong 'reg'

2024-03-01 Thread Song Gao
<0x02 0x00 0x02 0x1000>; }; Reviewed-by: Bibo Mao Signed-off-by: Song Gao --- hw/loongarch/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 47e040628f..5f787338a2 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/v

[PATCH v5 17/17] hw/loongarch: Add cells missing from rtc node

2024-03-01 Thread Song Gao
rtc node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao --- hw/loongarch/virt.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 5d92b2f1aa..6810f78ebd 100644 --- a/hw/loongarch/virt.c +++ b/hw

[PATCH v5 16/17] hw/loongarch: Add cells missing from uart node

2024-03-01 Thread Song Gao
uart node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao --- hw/loongarch/virt.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index e2185d7bb4..5d92b2f1aa 100644 --- a/hw/loongarch/virt.c +++ b/hw

[PATCH v5 07/17] hw/loongarch: Init efi_initrd table

2024-03-01 Thread Song Gao
Signed-off-by: Song Gao --- include/hw/loongarch/boot.h | 9 + hw/loongarch/boot.c | 23 +-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h index 7ad25080c5..ce47056608 100644

[PATCH v5 00/17] Add boot LoongArch elf kernel with FDT

2024-03-01 Thread Song Gao
! Thanks. Song Gao Song Gao (17): hw/loongarch: Move boot fucntions to boot.c hw/loongarch: Add load initrd hw/loongarch: Add slave cpu boot_code hw/loongarch: Add init_cmdline hw/loongarch: Init efi_system_table hw/loongarch: Init efi_boot_memmap table hw/loongarch: Init efi_initrd table

[PATCH v5 02/17] hw/loongarch: Add load initrd

2024-03-01 Thread Song Gao
we load initrd ramdisk after kernel_high address Signed-off-by: Song Gao --- hw/loongarch/boot.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 0f2bc15fdf..3075c276d4 100644 --- a/hw/loongarch

[PATCH v5 08/17] hw/loongarch: Init efi_fdt table

2024-03-01 Thread Song Gao
Signed-off-by: Song Gao --- include/hw/loongarch/boot.h | 4 hw/loongarch/boot.c | 11 +++ 2 files changed, 15 insertions(+) diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h index ce47056608..bbe8c8dd5d 100644 --- a/include/hw/loongarch/boot.h +++ b

[PATCH v5 10/17] hw/loongarch: fdt adds cpu interrupt controller node

2024-03-01 Thread Song Gao
fdt adds cpu interrupt controller node, we use 'loongson,cpu-interrupt-controller'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongarch-cpu.c https://lore.kernel.org/r/20221114113824.1880-2-liupei...@loongson.cn Signed-off-by: Song Gao --- hw/loongarch/virt.c | 20

[PULL v2 1/1] loongarch: Change the UEFI loading mode to loongarch

2024-02-29 Thread Song Gao
the same UEFI loading scheme as other architectures. Cc: Andrea Bolognani Cc: maob...@loongson.cn Cc: Philippe Mathieu-Daudé Cc: Song Gao Cc: zhaotian...@loongson.cn Signed-off-by: Xianglai Li Tested-by: Andrea Bolognani Reviewed-by: Song Gao Message-Id

[PULL v2 0/1] loongarch-to-apply queue

2024-02-29 Thread Song Gao
The following changes since commit bfe8020c814a30479a4241aaa78b63960655962b: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-02-28 14:23:21 +) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240229 for

[PULL 0/1] loongarch-to-apply queue

2024-02-21 Thread Song Gao
The following changes since commit 760b4dcdddba4a40b9fa0eb78fdfc7eda7cb83d0: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2024-02-20 10:11:08 +) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240221 for

[PULL 1/1] loongarch: Change the UEFI loading mode to loongarch

2024-02-21 Thread Song Gao
the same UEFI loading scheme as other architectures. Cc: Andrea Bolognani Cc: maob...@loongson.cn Cc: Philippe Mathieu-Daudé Cc: Song Gao Cc: zhaotian...@loongson.cn Signed-off-by: Xianglai Li Tested-by: Andrea Bolognani Reviewed-by: Song Gao Message-Id

[PULL 1/1] target/loongarch: Fix qtest test-hmp error when KVM-only build

2024-01-31 Thread Song Gao
The cc->sysemu_ops->get_phys_page_debug() is NULL when KVM-only build. this patch fixes it. Signed-off-by: Song Gao Tested-by: Bibo Mao Message-Id: <20240125061401.52526-1-gaos...@loongson.cn> --- target/loongarch/cpu.c| 2 - target/loongarch/cpu_helper

[PULL 0/1] loongarch-to-apply queue

2024-01-31 Thread Song Gao
Song Gao (1): target/loongarch: Fix qtest test-hmp error when KVM-only build target/loongarch/cpu.c| 2 - target/loongarch/cpu_helper.c | 231 ++ target/loongarch/internals.h | 20 +++- target/loongarch

[PATCH] tcg: Fixes set const_args[i] wrong value when instructions imm is 0

2024-01-30 Thread Song Gao
v5, v4, 0x0 OUT: vslti.w v1, v1, 0x0 Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2136 Signed-off-by: Song Gao --- tcg/tcg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index e2c38f6d11..5b290123bc 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c

[PULL 0/2] loongarch-to-apply queue

2024-01-24 Thread Song Gao
Bibo Mao (1): target/loongarch: Set cpuid CSR register only once with kvm mode Song Gao (1): target/loongarch/kvm: Enable LSX/LASX extension linux-headers/asm-loongarch/kvm.h | 1 + target/loongarch/kvm/kvm.c| 54 +++ 2 files changed

[PULL 1/2] target/loongarch: Set cpuid CSR register only once with kvm mode

2024-01-24 Thread Song Gao
From: Bibo Mao CSR cpuid register is used for routing irq to different vcpus, its value is kept unchanged since poweron. So it is not necessary to set CSR cpuid register after system resets, and it is only set at vm creation stage. Signed-off-by: Bibo Mao Reviewed-by: Song Gao Message-Id

[PULL 2/2] target/loongarch/kvm: Enable LSX/LASX extension

2024-01-24 Thread Song Gao
The kernel had already support LSX and LASX [1], but QEMU is disable LSX/LASX for kvm. This patch adds kvm_check_cpucfg2() to check CPUCFG2. [1]: https://lore.kernel.org/all/cabgobfzhrf7e_7jk4uprmsyxty3eiuuywhc35jqncnl9s-z...@mail.gmail.com/ Signed-off-by: Song Gao Reviewed-by: Bibo Mao

[PULL 0/2] loongarch-to-apply queue

2024-01-24 Thread Song Gao
Bibo Mao (1): target/loongarch: Set cpuid CSR register only once with kvm mode Song Gao (1): target/loongarch/kvm: Enable LSX/LASX extension linux-headers/asm-loongarch/kvm.h | 1 + target/loongarch/kvm/kvm.c| 54 +++ 2 files changed

[PULL 0/2] loongarch-to-apply queue

2024-01-24 Thread Song Gao
Bibo Mao (1): target/loongarch: Set cpuid CSR register only once with kvm mode Song Gao (1): target/loongarch/kvm: Enable LSX/LASX extension linux-headers/asm-loongarch/kvm.h | 1 + target/loongarch/kvm/kvm.c| 54 +++ 2 files changed

[PATCH] target/loongarch: Fix qtest test-hmp error when KVM-only build

2024-01-24 Thread Song Gao
The cc->sysemu_ops->get_phys_page_debug() is NULL when KVM-only build. this patch fixes it. Signed-off-by: Song Gao --- target/loongarch/internals.h | 20 ++- target/loongarch/cpu.c| 2 - target/loongarch/cpu_helper.c | 231 ++

[PATCH v2] target/loongarch/kvm: Enable LSX/LASX extension

2024-01-22 Thread Song Gao
The kernel had already support LSX and LASX [1], but QEMU is disable LSX/LASX for kvm. This patch adds kvm_check_cpucfg2() to check CPUCFG2. [1]: https://lore.kernel.org/all/cabgobfzhrf7e_7jk4uprmsyxty3eiuuywhc35jqncnl9s-z...@mail.gmail.com/ Signed-off-by: Song Gao --- linux-headers/asm

[PATCH 1/1] target/loongarch/kvm: Enable LSX/LASX extension

2024-01-21 Thread Song Gao
The kernel had already support LSX and LASX [1], but QEMU is disable LSX/LASX for kvm. This patch adds kvm_check_cpucfg to check CPUCFG2. [1]: https://lore.kernel.org/all/cabgobfzhrf7e_7jk4uprmsyxty3eiuuywhc35jqncnl9s-z...@mail.gmail.com/ Signed-off-by: Song Gao --- linux-headers/asm

[RESEND PATCH v4 17/17] hw/loongarch: Add cells missing from rtc node

2024-01-18 Thread Song Gao
rtc node need interrupts and interrupt-parent cells. Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-18-gaos...@loongson.cn> --- hw/loongarch/virt.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c

[RESEND PATCH v4 15/17] hw/loongarch: fdt remove unused irqchip node

2024-01-18 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-16-gaos...@loongson.cn> --- hw/loongarch/virt.c | 31 +-- 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index d13383a65a..17b9c143b3 100644 --

[RESEND PATCH v4 11/17] hw/loongarch: fdt adds Extend I/O Interrupt Controller

2024-01-18 Thread Song Gao
fdt adds Extend I/O Interrupt Controller, we use 'loongson,ls2k2000-eiointc'. See: https://github.com/torvalds/linux/blob/v6.7/drivers/irqchip/irq-loongson-eiointc.c https://lore.kernel.org/r/764e02d924094580ac0f1d15535f4b98308705c6.1683279769.git.zhoubin...@loongson.cn Signed-off-by: Song Gao

[RESEND PATCH v4 02/17] hw/loongarch: Add load initrd

2024-01-18 Thread Song Gao
we load initrd ramdisk after kernel_high address Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-3-gaos...@loongson.cn> --- hw/loongarch/boot.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/

[RESEND PATCH v4 07/17] hw/loongarch: Init efi_initrd table

2024-01-18 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-8-gaos...@loongson.cn> --- include/hw/loongarch/boot.h | 9 + hw/loongarch/boot.c | 23 +-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/include/hw/loongarch/boot.h b/incl

[RESEND PATCH v4 03/17] hw/loongarch: Add slave cpu boot_code

2024-01-18 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-4-gaos...@loongson.cn> --- hw/loongarch/boot.c | 70 - 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index 3075c276d4..2f39

[RESEND PATCH v4 09/17] hw/loongarch: Fix fdt memory node wrong 'reg'

2024-01-18 Thread Song Gao
<0x02 0x00 0x02 0x1000>; }; Reviewed-by: Bibo Mao Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-10-gaos...@loongson.cn> --- hw/loongarch/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 5f5153e681

[RESEND PATCH v4 08/17] hw/loongarch: Init efi_fdt table

2024-01-18 Thread Song Gao
Signed-off-by: Song Gao Message-Id: <20231227080821.3216113-9-gaos...@loongson.cn> --- include/hw/loongarch/boot.h | 4 hw/loongarch/boot.c | 11 +++ 2 files changed, 15 insertions(+) diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h index ce47

<    1   2   3   4   5   6   7   8   9   10   >