This patch adds PMU support, We just sets some cpucfg6 default value
to PMU config on kvm mode, and then check the PMU config with kvm ioctl
KVM_GET_DEVICE_ATTR.
e.g
'... -cpu max,pmu=on' (enable PMU)'
'... -cpu max,pmu=off' (disable PMU)'
Signed-off-by: Song Gao
---
v2:
- Drop
On kvm side, get_fpu/set_fpu save the vreg registers high 192bits,
but QEMU missing.
Signed-off-by: Song Gao
---
target/loongarch/kvm/kvm.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c
index a9f9020071..0b5dbb7ed8 100644
)
Signed-off-by: Song Gao
---
This patch adds the 'RFC' heading because it requires
the kernel to merge into patch[1] first
[1]: https://lore.kernel.org/all/20240507120140.3119714-1-gaos...@loongson.cn/
target/loongarch/cpu.h| 2 +
target/loongarch/cpu.c| 64
This patch adds a new board attribute 'v-eiointc'.
A value of true enables the virt extended I/O interrupt controller.
VMs working in kvm mode have 'v-eiointc' enabled by default.
Signed-off-by: Song Gao
---
include/hw/loongarch/virt.h | 2 +
target/loongarch/cpu.h | 1 +
hw/loongarch
commit/5d97cff72f91f4f20a536efd60eca75bfcb78a64
Thanks.
Song Gao.
Song Gao (2):
hw/intc/loongarch_extioi: Add extioi virt extension definition
hw/loongarch/virt: Enable extioi virt extension
include/hw/intc/loongarch_extioi.h | 21 ++
include/hw/loongarch/virt.h| 2 +
target/loongarch/cpu.h
On LoongArch, IRQs can be routed to four vcpus with hardware extioi.
This patch adds the extioi virt extension definition so that the IRQ can
route to 256 vcpus.
Signed-off-by: Song Gao
---
include/hw/intc/loongarch_extioi.h | 21 +++
hw/intc/loongarch_extioi.c | 92
The following changes since commit 4e66a08546a2588a4667766a1edab9caccf24ce3:
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
(2024-05-07 09:26:30 -0700)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240509
for
entries are not used and do not need
migrate. It is only useful when it runs in TCG mode.
Signed-off-by: Bibo Mao
Reviewed-by: Richard Henderson
Message-Id: <20240506011912.2108842-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
target/loongarch/cpu.c| 7 +--
target/loo
.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240428031651.1354587-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
target/loongarch/kvm/kvm.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/target/loongarch/kvm/kvm.c b/target/loongar
: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240319022606.2994565-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/virt.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index c0999878df..12d20055fe
vmstate does not save kvm_state_conter,
which can cause VM recovery from disk to fail.
Signed-off-by: Song Gao
---
v2:
- Update the version.
- Link to v1:
https://patchew.org/QEMU/20240430012356.2620763-1-gaos...@loongson.cn/
target/loongarch/machine.c | 6 --
1 file changed, 4
The char pointer 'ramName' point to a block of memory, but never free it.
Use a small fixed-size buffer for 'ramName'.
Resolves: Coverity CID 1544773
Fixes: 0cf1478d6 ("hw/loongarch: Add numa support")
Signed-off-by: Song Gao
---
v2:
- Use a small fixed-size buffer for 'ramName'
The char pointer 'ramName' point to a block of memory,
but never free it. Use 'g_autofree' to automatically free it.
Resolves: Coverity CID 1544773
Fixes: 0cf1478d6 ("hw/loongarch: Add numa support")
Signed-off-by: Song Gao
---
hw/loongarch/virt.c | 3 +--
1 file changed, 1 inser
vmstate does not save kvm_state_conter,
which can cause VM recovery from disk to fail.
Signed-off-by: Song Gao
---
target/loongarch/machine.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/loongarch/machine.c b/target/loongarch/machine.c
index c7029fb9b4..4cd1bf06ff 100644
The efi_system_table adds a efi_boot_memmap configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-7-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 40 +
hw/loongarch/virt.c
The efi_system_table adds a efi_fdt configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-9-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 11 +++
hw/loongarch/virt.c | 6 ++
include/hw/loongarch/boot.
Load the slave CPU boot code at pflash0 and set
the slave CPU elf_address to VIRT_FLASH0_BASE.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-4-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 62 -
1 file chang
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
Reviewed-by: Bibo Mao
Message-Id
The efi_system_table adds a efi_initrd configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-8-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 23 +--
include/hw/loongarch/boot.h | 9 +
2 files chang
we load initrd ramdisk after kernel_high address
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 28 +++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/hw/loongarch/
This patch removes the unused fdt irqchip node.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-16-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 31 +--
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/hw/loo
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
rtc node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-18-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.
<0x02 0x00 0x02 0x1000>;
};
Reviewed-by: Bibo Mao
Signed-off-by: Song Gao
Message-Id: <20240426091551.2397867-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 42e5df8a24
uart node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-17-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/loongarch/virt.
Add init_cmline and set boot_info->a0, a1
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-5-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 30 ++
include/hw/loongarch/virt.h | 2 ++
target/loongarch/cpu.h |
This patch adds pcie irq_map node for FDT.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-15-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 73 ++---
1 file changed, 69 insertions(+), 4 deletions(-)
diff --gi
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
Reviewed-by: Bibo Mao
Message
Add init_systab and set boot_info->a2
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-6-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 22 +
include/hw/loongarch/boot.h | 48 +
2 files ch
Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20240426091551.2397867-2-gaos...@loongson.cn>
---
hw/loongarch/boot.c
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
Reviewed-by: Bibo Mao
Message-Id
.
Song Gao (17):
hw/loongarch: Move boot functions 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
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
Reviewed-by: Bibo Mao
Message-Id
uart node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-17-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/loongarch/virt.
Add init_systab and set boot_info->a2
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-6-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 22 +
include/hw/loongarch/boot.h | 48 +
2 files ch
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
<0x02 0x00 0x02 0x1000>;
};
Reviewed-by: Bibo Mao
Signed-off-by: Song Gao
Message-Id: <20240426091551.2397867-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 42e5df8a24
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
Reviewed-by: Bibo Mao
Message-Id
Load the slave CPU boot code at pflash0 and set
the slave CPU elf_address to VIRT_FLASH0_BASE.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-4-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 62 -
1 file chang
rtc node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-18-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.
The efi_system_table adds a efi_fdt configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-9-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 11 +++
hw/loongarch/virt.c | 6 ++
include/hw/loongarch/boot.
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
Reviewed-by: Bibo Mao
Message
This patch adds pcie irq_map node for FDT.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-15-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 73 ++---
1 file changed, 69 insertions(+), 4 deletions(-)
diff --gi
Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20240426091551.2397867-2-gaos...@loongson.cn>
---
hw/loongarch/boot.c
This patch removes the unused fdt irqchip node.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-16-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 31 +--
1 file changed, 1 insertion(+), 30 deletions(-)
diff --git a/hw/loo
The efi_system_table adds a efi_initrd configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-8-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 23 +--
include/hw/loongarch/boot.h | 9 +
2 files chang
we load initrd ramdisk after kernel_high address
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-3-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 29 -
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/hw/loo
Add init_cmline and set boot_info->a0, a1
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-5-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 30 ++
include/hw/loongarch/virt.h | 2 ++
target/loongarch/cpu.h |
Song Gao (17):
hw/loongarch: Move boot functions 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
The efi_system_table adds a efi_boot_memmap configuration table.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240426091551.2397867-7-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 40 +
hw/loongarch/virt.c
Signed-off-by: Song Gao
Message-Id: <20240307164835.300412-4-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 62 -
1 file changed, 61 insertions(+), 1 deletion(-)
diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c
index a9522d6912..d1a8
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
Reviewed-by: Bibo Mao
Message
Add init_cmline and set boot_info->a0, a1
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-5-gaos...@loongson.cn>
---
include/hw/loongarch/virt.h | 2 ++
target/loongarch/cpu.h | 2 ++
hw/loongarch/boot.c | 30
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-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 91a5
rtc node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-18-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.
Move some boot functions to boot.c and struct
loongarch_boot_info into struct LoongArchMachineState.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20240307164835.300412-2-gaos...@loongson.cn>
---
include/hw/loongarch/boot.h
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
Reviewed-by: Bibo Mao
Message-Id
Add init_systab and set boot_info->a2
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-6-gaos...@loongson.cn>
---
include/hw/loongarch/boot.h | 48 +
hw/loongarch/boot.c | 22 +
2 files ch
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
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-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/loo
to be reviewed.
Thanks.
Song Gao
V7:
- Rebase and R-b;
- Patch3, replace reg_num with reg_name.
move slave boot code buf to pflash0;
- Patch5: replace __aligned(8) with QEMU_ALIGNED(8);
- Patch8: Use the macro FDT_BASE to indicate the fdt base size.
V6:
- Fixes test/compilation failures
we load initrd ramdisk after kernel_high address
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-3-gaos...@loongson.cn>
---
hw/loongarch/boot.c | 29 -
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/hw/loongarch/
uart node need interrupts and interrupt-parent cells.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-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/loo
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-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
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
Reviewed-by: Bibo Mao
Message-Id
Signed-off-by: Song Gao
Message-Id: <20240307164835.300412-7-gaos...@loongson.cn>
---
include/hw/loongarch/boot.h | 27 +
include/hw/loongarch/virt.h | 10 ++
hw/loongarch/boot.c | 40 +
hw/loongarch/virt.c
<0x02 0x00 0x02 0x1000>;
};
Reviewed-by: Bibo Mao
Signed-off-by: Song Gao
Message-Id: <20240307164835.300412-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 42e5df8a24
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240307164835.300412-9-gaos...@loongson.cn>
---
include/hw/loongarch/boot.h | 4
include/hw/loongarch/virt.h | 2 ++
hw/loongarch/boot.c | 11 +++
hw/loongarch/virt.c | 6 ++
4 files chang
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
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20240321123606.1704900-1-gaos...@loongson.cn>
---
target/loongarch
-loongarch-20240322
Song Gao (1):
target/loongarch: Fix qemu-system-loongarch64 assert failed with the
option '-d int'
target/loongarch/cpu.c | 74 +++---
1 file changed, 40 insertions
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 | 74 +++---
1 file changed, 40 insertions(+), 34 deletions
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 | 76 +++---
1 file changed, 42 insertions(+), 34 deletions
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
-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
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
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
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
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
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/
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
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
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
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
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
--
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
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
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
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/
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.
<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
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
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/
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
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
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
/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
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
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
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
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
1 - 100 of 2193 matches
Mail list logo