do_fill_tlb_entry is used to fill a tlb entry.
Signed-off-by: Song Gao
---
target/loongarch/tcg/tlb_helper.c | 43 ++-
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/target/loongarch/tcg/tlb_helper.c
b/target/loongarch/tcg/tlb_helper.c
index
ew pte_val, patch5.
Song Gao (5):
target/loongarch: Add a new cpu_type la664
target/loongarch: Add do_lddir/ldpte()
target/loongarch: Add do_fill_tlb_entry()
target/loongarch: Add get_random_tlb_index()
target/loongarch/tcg: Add hardware page table walker support
target/loongarch
Add hardware page table walker (HPTW) feature for la664.
Set CPUCFG2.HPTW = 1 to indicate that HPTW is implemented on this CPU.
Set PWCH.HPTW_EN = 1 to enable HPTW.
Signed-off-by: Song Gao
---
target/loongarch/cpu-csr.h| 3 +
target/loongarch/cpu.c| 1 +
target/loongarch
Add a new LoongArch cpu type la664. The la664 has many new features,
such as new atomic instructions, hardware page table walk, etc.
We will implement them later.
Signed-off-by: Song Gao
---
target/loongarch/cpu.c | 50 +-
1 file changed, 35 insertions
get_random_tlb_index() is used to get a random tlb index.
Signed-off-by: Song Gao
---
target/loongarch/tcg/tlb_helper.c | 34 +--
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/target/loongarch/tcg/tlb_helper.c
b/target/loongarch/tcg/tlb_helper.c
do_lddir is used for accessing directory entries during page table
walking, do_ldpte is used for page table entry accesses during page
table walking.
Signed-off-by: Song Gao
---
target/loongarch/tcg/tlb_helper.c | 53 ---
1 file changed, 34 insertions(+), 19
From: Philippe Mathieu-Daudé
Nothing in LoongArch fw_cfg.c requires target specific definitions.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Song Gao
Message-Id: <20240927213254.17552-3-phi...@linaro.org>
Signed-off-by: Song Gao
---
hw/loongarch/meson.build | 2 +-
1 file chan
it can be
used to dump fp registers into coredump note segment.
Resolves: Coverity CID 1561133
Signed-off-by: Bibo Mao
Reviewed-by: Richard Henderson
Message-Id: <20240914064645.2099169-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
target/loongarch/arch_dump.c | 6 +-
1 file c
From: Jiaxun Yang
Use stl_p to write instructions so that host endian conversion
will be performed.
Replace mailbox read/write on LoongArch32 systems with 32bit IOCSR
instructions to prevent illegal instructions.
Signed-off-by: Jiaxun Yang
Reviewed-by: Song Gao
Message-Id: <20240
various problems in old implementation such
as null pointer on empty string, memory desc map_size not set,
incorrect memory map definition and so on.
Signed-off-by: Jiaxun Yang
Reviewed-by: Song Gao
Message-Id: <20240914-loongarch-booting-v1-1-1517cae11...@flygoat.com>
Signed-off-by: So
From: Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Song Gao
Message-Id: <20240927213254.17552-2-phi...@linaro.org>
Signed-off-by: Song Gao
---
include/hw/loongarch/virt.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/hw/loongarch/virt.h b/incl
The following changes since commit 3b14a767eaca3df5534a162851f04787b363670e:
Merge tag 'qemu-openbios-20240924' of https://github.com/mcayland/qemu into
staging (2024-09-28 12:34:44 +0100)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-202409
compatbile
with syscon method in FDT table, only that acpi ged pm register is accessed
with 8-bit mode, rather with 32-bit mode.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Tested-by: Song Gao
Message-Id: <20240918014206.2165821-3-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loo
.cn>
Signed-off-by: Song Gao
---
hw/acpi/generic_event_device.c | 6 +++---
include/hw/acpi/generic_event_device.h | 7 +--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/hw/acpi/generic_event_device.c b/hw/acpi/generic_event_device.c
index 15b4c3ebbf..d00f5a6c1c 100644
ed on
snapshot load, but the LoongArch code somehow already does that, despite
not having this patch here, presumably due to some lucky copy and
pasting.
Signed-off-by: Jason A. Donenfeld
Reviewed-by: Song Gao
Message-Id: <20240905153316.2038769-1-ja...@zx2c4.com>
Signed-off-by: Song G
From: Bibo Mao
KVM provides interface KVM_REG_LOONGARCH_VCPU_RESET to reset vCPU,
it can be used to clear internal state about kvm kernel. vCPU reset
function is added here for kvm mode.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240822022827.2273534-1-maob...@loongson
support for VIRTIO_VGA device, VIRTIO_GPU is prefered
on LoongArch system. For frame buffer video card support, standard VGA can
be used.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240823073050.2619484-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/K
y: Jason A. Donenfeld
Tested-by: Bibo Mao
[gaosong: ACPI uart need't reverse order]
Signed-off-by: Song Gao
Message-Id: <20240907143439.2792924-1-ja...@zx2c4.com>
---
hw/loongarch/acpi-build.c | 23 +++
hw/loongarch/virt.c| 27 +--
inclu
function
loongarch_cpu_reset_hold(), so that VM can reboot with edk2-stable202408
UEFI bios.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240827035807.3326293-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
target/loongarch/cpu.c | 14 ++
1 file chang
,mmio,0x1fe001e0
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240907073037.243353-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/acpi-build.c | 40 +++
1 file changed, 40 insertions(+)
diff --git a/hw/loongarch/acpi-build.
: Song Gao
Tested-by: Song Gao
Message-Id: <20240822065245.2286214-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
target/loongarch/arch_dump.c | 167 +++
target/loongarch/cpu.c | 1 +
target/loongarch/internals.h | 2 +
target/loongarch/meson.build
The following changes since commit 4b7ea33074450bc6148c8e1545d78f179e64adb4:
Merge tag 'pull-request-2024-09-11' of https://gitlab.com/thuth/qemu into
staging (2024-09-11 19:28:23 +0100)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarch-20240912
RAT: Node 1 PXM 1 [mem 0x17000-0x26fff]
[0.00] Warning: node 0 [mem 0x-0x] overlaps with itself
[mem 0x8000-0x16fff]
Fixes: fc100011f38d ("hw/loongarch: Refine acpi srat table for numa memory")
Signed-off-by: Jiaxun Yang
Reviewed-by: Bibo Mao
The following changes since commit 4220ebde107c44412755d593fb46e168eeaed936:
Merge tag 'migration-20240820-pull-request' of
https://gitlab.com/farosas/qemu into staging (2024-08-21 08:46:45 +1000)
are available in the Git repository at:
https://gitlab.com/gaosong/qemu.git tags/pull-loongarc
Add hardware page table walker (HPTW) feature for la664.
Set CPUCFG2.HPTW = 1 to indicate that HPTW is implemented on this CPU.
Set PWCH.HPTW_EN = 1 to enable HPTW.
Signed-off-by: Song Gao
---
target/loongarch/cpu-csr.h| 3 +
target/loongarch/cpu.c| 1 +
target/loongarch
Add a new LoongArch cpu type la664. The la664 has many new features,
such as new atomic instructions, hardware page table walk, etc.
We will implement them later.
Signed-off-by: Song Gao
---
target/loongarch/cpu.c | 48 +++---
1 file changed, 36 insertions
get_random_tlb_index() is used to get a random tlb index.
Signed-off-by: Song Gao
---
target/loongarch/tcg/tlb_helper.c | 34 +--
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/target/loongarch/tcg/tlb_helper.c
b/target/loongarch/tcg/tlb_helper.c
do_fill_tlb_entry is used to fill a tlb entry.
Signed-off-by: Song Gao
---
target/loongarch/tcg/tlb_helper.c | 43 ++-
1 file changed, 25 insertions(+), 18 deletions(-)
diff --git a/target/loongarch/tcg/tlb_helper.c
b/target/loongarch/tcg/tlb_helper.c
index
do_lddir is used for accessing directory entries during page table
walking, do_ldpte is used for page table entry accesses during page
table walking.
Signed-off-by: Song Gao
---
target/loongarch/tcg/tlb_helper.c | 53 ---
1 file changed, 34 insertions(+), 19
Loongson-3A6000 and newer processors have hardware page table walker
(PTW) support. PTW can handle all fastpaths of PIL/PIS/PIF/PIE
exceptions by hardware,
Song Gao (5):
target/loongarch: Add a new cpu_type la664
target/loongarch: Add do_lddir/ldpte()
target/loongarch: Add do_fill_tlb_entry
When the lddir level is 4 and the base is a HugePage, we may try to put value 4
into a field in the TLBENTRY that is only 2 bits wide.
Fixes: Coverity CID 1547717
Fixes: 9c70db9a43388 ("target/loongarch: Fix tlb huge page loading issue")
Signed-off-by: Song Gao
Reviewed-by: Richard
ix for 9.1
--------
Song Gao (1):
target/loongarch: Fix helper_lddir() a CID INTEGER_OVERFLOW issue
target/loongarch/tcg/tlb_helper.c | 1 +
1 file changed, 1 insertion(+)
When the lddir level is 4 and the base is a HugePage, we may try to put value 4
into a field in the TLBENTRY that is only 2 bits wide.
Fixes: Coverity CID 1547717
Fixes: 9c70db9a43388 ("target/loongarch: Fix tlb huge page loading issue")
Signed-off-by: Song Gao
---
target/loo
2e
Signed-off-by: Song Gao
Reviewed-by: Philippe Mathieu-Daudé
Reviewd-by: Bibo Mao
Message-Id: <20240711024454.3075183-1-gaos...@loongson.cn>
---
configs/targets/loongarch64-linux-user.mak | 2 +-
configs/targets/loongarch64-softmmu.mak| 2 +-
gdb-xml/loongarch-lasx.xml
Remove extioi INT_encode encode mode, because we don't emulate it.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240718083254.748179-1-gaos...@loongson.cn>
---
include/hw/intc/loongarch_extioi.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/incl
From: Xianglai Li
loongarch added a common library for edk2 to
parse flash base addresses through fdt.
For compatibility with other architectures,
the flash block size in qemu is now changed to 256k.
Signed-off-by: Xianglai Li
Reviewed-by: Song Gao
Message-Id: <20240624033319.999631-1-lixi
h-20240719
--------
Song Gao (2):
target/loongarch/gdbstub: Add vector registers support
hw/loongarch: Remove unimplemented extioi INT_encode mode
Xianglai Li (1):
hw/loongarch: Modify flash block size to 256K
configs/targets/loongarch64-linux-user.mak | 2 +
Remove extioi INT_encode encode mode, because we don't emulate it.
Signed-off-by: Song Gao
---
include/hw/intc/loongarch_extioi.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/hw/intc/loongarch_extioi.h
b/include/hw/intc/loongarch_extioi.h
index eccc2e0d18..626a37dfa1 100644
Remove extioi INT_encode encode mode, because we don't emulate it.
Signed-off-by: Song Gao
---
hw/loongarch/virt.c| 6 --
include/hw/intc/loongarch_extioi.h | 1 -
2 files changed, 7 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index e592b
Signed-off-by: Song Gao
---
include/qemu/timer.h | 9 +
1 file changed, 9 insertions(+)
diff --git a/include/qemu/timer.h b/include/qemu/timer.h
index 5ce83c7911..fa56ec9481 100644
--- a/include/qemu/timer.h
+++ b/include/qemu/timer.h
@@ -1016,6 +1016,15 @@ static inline int64_t
es on that machine.
Signed-off-by: Jiaxun Yang
Reviewed-by: Song Gao
Message-Id: <20240627-ipi-fixes-v1-2-9b061dc28...@flygoat.com>
Signed-off-by: Song Gao
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 6725913c8b..41bece23c1 100644
--- a/
From: Dmitry Frolov
memcpy() is trying to READ 512 bytes from memory,
pointed by info->kernel_cmdline,
which was (presumable) allocated by g_strdup("");
Found with ASAN, making check with enabled sanitizers.
Signed-off-by: Dmitry Frolov
Reviewed-by: Song Gao
Message-Id: <20240
From: Bibo Mao
There is abuse usage about local variable gap. Remove
duplicated assignment and solve Coverity reported error.
Resolves: Coverity CID 1546441
Fixes: 3cc451cbce ("hw/loongarch: Refine fwcfg memory map")
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
After cpu_reset, DATF in CSR_CRMD is 0, DATM is 0.
See the manual[1] 6.4.
[1]:
https://github.com/loongson/LoongArch-Documentation/releases/download/2023.04.20/LoongArch-Vol1-v1.10-EN.pdf
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240705021839.1004374-2-gaos...@loongson
We set the value of register CSR_PRCFG3, but left out CSR_PRCFG1
and CSR_PRCFG2. Set CSR_PRCFG1 and CSR_PRCFG2 according to the
default values of the physical machine.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240705021839.1004374-1-gaos...@loongson.cn>
---
target/loo
From: Xianglai Li
Add devices that support tpm by default,
Fixed incomplete tpm acpi table information.
Signed-off-by: Xianglai Li
Reviewed-by: Song Gao
Message-Id: <20240624032300.999157-1-lixiang...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/Kconfig | 1 +
hw/loo
out-of-bound reading
Feiyang Chen (1):
target/loongarch: Remove avail_64 in trans_srai_w() and simplify it
Jiaxun Yang (1):
MAINTAINERS: Add myself as a reviewer of LoongArch virt machine
Song Gao (2):
target/loongarch: Set CSR_PRCFG1 and CSR_PRCFG2 values
target/loongarch: Fix
KVM_REG_LOONGARCH_DEBUG_INST.
Now only software breakpoint is supported, and it is allowed to
insert/remove software breakpoint. We can debug guest kernel with gdb
method after kernel is loaded, hardware breakpoint will be added in later.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Tested-by: Song Gao
Message-Id
Message-Id: <20240628033357.50027-1-chris.chenfeiy...@gmail.com>
Signed-off-by: Song Gao
---
target/loongarch/tcg/insn_trans/trans_shift.c.inc | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/target/loongarch/tcg/insn_trans/trans_shift.c.inc
b/target/loongarc
Message-Id: <20240628033357.50027-1-chris.chenfeiy...@gmail.com>
Signed-off-by: Song Gao
---
target/loongarch/tcg/insn_trans/trans_shift.c.inc | 15 +++
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/target/loongarch/tcg/insn_trans/trans_shift.c.inc
b/target/loongarc
From: Xianglai Li
Add devices that support tpm by default,
Fixed incomplete tpm acpi table information.
Signed-off-by: Xianglai Li
Reviewed-by: Song Gao
Message-Id: <20240624032300.999157-1-lixiang...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/Kconfig | 1 +
hw/loo
We set the value of register CSR_PRCFG3, but left out CSR_PRCFG1
and CSR_PRCFG2. Set CSR_PRCFG1 and CSR_PRCFG2 according to the
default values of the physical machine.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240705021839.1004374-1-gaos...@loongson.cn>
---
target/loo
After cpu_reset, DATF in CSR_CRMD is 0, DATM is 0.
See the manual[1] 6.4.
[1]:
https://github.com/loongson/LoongArch-Documentation/releases/download/2023.04.20/LoongArch-Vol1-v1.10-EN.pdf
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240705021839.1004374-2-gaos...@loongson
From: Bibo Mao
There is abuse usage about local variable gap. Remove
duplicated assignment and solve Coverity reported error.
Resolves: Coverity CID 1546441
Fixes: 3cc451cbce ("hw/loongarch: Refine fwcfg memory map")
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
From: Dmitry Frolov
memcpy() is trying to READ 512 bytes from memory,
pointed by info->kernel_cmdline,
which was (presumable) allocated by g_strdup("");
Found with ASAN, making check with enabled sanitizers.
Signed-off-by: Dmitry Frolov
Reviewed-by: Song Gao
Message-Id: <20240
es on that machine.
Signed-off-by: Jiaxun Yang
Reviewed-by: Song Gao
Message-Id: <20240627-ipi-fixes-v1-2-9b061dc28...@flygoat.com>
Signed-off-by: Song Gao
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 6725913c8b..41bece23c1 100644
--- a/
From: Xianglai Li
loongarch added a common library for edk2 to
parse flash base addresses through fdt.
For compatibility with other architectures,
the flash block size in qemu is now changed to 256k.
Signed-off-by: Xianglai Li
Reviewed-by: Song Gao
Message-Id: <20240624033319.999631-1-lixi
KVM_REG_LOONGARCH_DEBUG_INST.
Now only software breakpoint is supported, and it is allowed to
insert/remove software breakpoint. We can debug guest kernel with gdb
method after kernel is loaded, hardware breakpoint will be added in later.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Tested-by: Song Gao
Message-Id
d simplify it
Jiaxun Yang (1):
MAINTAINERS: Add myself as a reviewer of LoongArch virt machine
Song Gao (2):
target/loongarch: Set CSR_PRCFG1 and CSR_PRCFG2 values
target/loongarch: Fix cpu_reset set wrong CSR_CRMD
Xianglai Li (2):
hw/loongarch: Change the tpm support
2e
Signed-off-by: Song Gao
---
based-on:
https://patchew.org/QEMU/20240607035016.2975799-1-maob...@loongson.cn/
v2:
- fix tab line wrapper issue.
- Link to v1:
https://patchew.org/QEMU/20240621065406.864232-1-gaos...@loongson.cn/
configs/targets/loongarch64-linux-user.mak | 2 +-
confi
We set the value of register CSR_PRCFG3, but left out CSR_PRCFG1
and CSR_PRCFG2. Set CSR_PRCFG1 and CSR_PRCFG2 according to the
default values of the physical machine.
Signed-off-by: Song Gao
---
v2:
- Add a new patch fix set CSR_CRMD wrong value;
- Set PRCFG1-PRCFG3 values in
After cpu_reset, DATF in CSR_CRMD is 0, DATM is 0.
See the manual[1] 6.4.
[1]:
https://github.com/loongson/LoongArch-Documentation/releases/download/2023.04.20/LoongArch-Vol1-v1.10-EN.pdf
Signed-off-by: Song Gao
---
target/loongarch/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3
We set the value of register CSR_PRCFG3, but left out CSR_PRCFG1
and CSR_PRCFG2. Set CSR_PRCFG1 and CSR_PRCFG2 according to the
default values of the physical machine.
Signed-off-by: Song Gao
---
target/loongarch/cpu.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/target/loongarch
restore loongarch_ipi.
Song Gao (2):
Revert "hw/intc: Remove loongarch_ipi.c"
hw/intc: Restore loongarch_ipi for LoongArch
MAINTAINERS | 2 -
include/hw/intc/loongarch_ipi.h | 54 +
include/hw/loongarch/virt.h | 2 +-
hw/intc/loongarch_ipi.c
Restore 'loongarch_ipi.c' for LoongArch.
This reverts commit 5f82fb2a3a71bb510b3e1b7229929d468c01740a.
---
hw/intc/loongarch_ipi.c | 347
1 file changed, 347 insertions(+)
create mode 100644 hw/intc/loongarch_ipi.c
diff --git a/hw/intc/loongarch_ipi.c b/
restore loongarch_ipi.
Signed-off-by: Song Gao
---
MAINTAINERS | 2 --
include/hw/intc/loongarch_ipi.h | 54 +
include/hw/loongarch/virt.h | 2 +-
hw/loongarch/virt.c | 4 +--
hw/intc/Kconfig | 3 ++
hw/intc
2e
Signed-off-by: Song Gao
---
based-on:
https://patchew.org/QEMU/20240607035016.2975799-1-maob...@loongson.cn/
configs/targets/loongarch64-linux-user.mak | 2 +-
configs/targets/loongarch64-softmmu.mak| 2 +-
gdb-xml/loongarch-lasx.xml | 60 +++
gdb-xml
8
sextreg(offset_hi, 0, 20) is fff8
offset_hi is 8
sextreg(offset_hi, 0, 20) is fff8
..."
When pcalau12i + ori is not satisfied, we should use other methods instead,
instead of generating an assertion error.
Cc: qemu-sta...@nongnu.org
Rep
the PMU Feature and set the corresponding value in cpucfg.
Signed-off-by: Song Gao
---
v3:
- Use OnOffAuto type variable pmu to check the PMU feature.
- Link to v2:
https://patchew.org/QEMU/20240515040611.998507-1-gaos...@loongson.cn/
v2:
- Drop the property 'pmnum'.
- Link to
h-20240606
Bibo Mao (2):
tests/libqos: Add loongarch virt machine node
tests/qtest: Add numa test for loongarch system
Song Gao (3):
hw/intc/loongarch_extioi: Add extioi virt extension definition
hw/loongarch/virt: Use MemTxAttrs interface for misc ops
hw/loon
Use MemTxAttrs interface read_with_attrs/write_with_attrs
for virt_iocsr_misc_ops.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240528083855.1912757-3-gaos...@loongson.cn>
---
hw/loongarch/virt.c | 36
1 file changed, 24 insertions(
From: Bibo Mao
Add numa test case for loongarch system, it passes to run
with command "make check-qtest".
Signed-off-by: Bibo Mao
Acked-by: Thomas Huth
Tested-by: Song Gao
Message-Id: <20240528082155.938586-1-maob...@loongson.cn>
Signed-off-by: Song Gao
---
tests/qtest/
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
Reviewed-by: Bibo Mao
Message-Id: <20240528083855.1912757-4-gaos.
pio_base addresses.
Also hotplug handle checking about TYPE_VIRTIO_IOMMU_PCI device is
added on loongarch virt machine, since virtio_mmu_pci device requires
it.
Signed-off-by: Bibo Mao
Acked-by: Thomas Huth
Message-Id: <20240528082053.938564-1-maob...@loongson.cn>
Signed-off-by: So
| | PCH-MSI |
+-+ +-+
^ ^ ^
| | |
++ +-+ +-+
| UARTs | | Devices | | Devices |
++ +-+ +-+
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240528083855
From: lanyanzhi
description:
loongarch_cpu_dump_state() want to dump all loongarch cpu
state registers, but there is a tiny typographical error when
printing "PRCFG2".
Cc: qemu-sta...@nongnu.org
Signed-off-by: lanyanzhi
Reviewed-by: Richard Henderson
Reviewed-by: Song Gao
The VM uses old bios to boot up only 1 cpu, causing the test case to fail.
Update the bios to solve this problem.
Reported-by: Thomas Huth
Signed-off-by: Song Gao
---
v2:
Use a fixed release version for kernel/initrd/bios_url.
tests/avocado/machine_loongarch.py | 8
1 file changed
The VM uses old bios to boot up only 1 cpu, causing the test case to fail.
Update the bios to solve this problem.
Reported-by: Thomas Huth
Signed-off-by: Song Gao
---
tests/avocado/machine_loongarch.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/avocado
.cn/#r
[1]:
https://gitee.com/openeuler/kernel/commit/5d97cff72f91f4f20a536efd60eca75bfcb78a64
Thanks.
Song Gao
Song Gao (3):
hw/intc/loongarch_extioi: Add extioi virt extension definition
hw/loongarch/virt: Use MemTxAttrs interface for misc ops
hw/loongarch/virt: Enable extioi virt
Use MemTxAttrs interface read_with_attrs/write_with_attrs
for virt_iocsr_misc_ops.
Signed-off-by: Song Gao
---
hw/loongarch/virt.c | 36
1 file changed, 24 insertions(+), 12 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index
| | PCH-MSI |
+-+ +-+
^ ^ ^
| | |
++ +-+ +-+
| UARTs | | Devices | | Devices |
++ +-+ +-+
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
---
include/hw/intc/loongarch_e
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 | 1 +
target/loongarch/cpu.h
From: Jiaxun Yang
Higher bits for memory nodes were omitted at qemu_fdt_setprop_cells.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Jiaxun Yang
Reviewed-by: Song Gao
Message-Id: <20240520-loongarch-fdt-memnode-v1-1-5ea9be939...@flygoat.com>
Signed-off-by: Song Gao
---
hw/loongarch/virt
size for both total memory and numa
node0 is removed for acpi srat table creation.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240515093927.3453674-2-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/acpi-build.c | 58 +++
On kvm side, get_fpu/set_fpu save the vreg registers high 192bits,
but QEMU missing.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240514110752.989572-1-gaos...@loongson.cn>
---
target/loongarch/kvm/kvm.c | 6 ++
1 file changed, 6 inse
Reviewed-by: Song Gao
Message-Id: <20240521080549.434197-2-maob...@loongson.cn>
Signed-off-by: Song Gao
---
target/loongarch/cpu.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index a0cad53676..b5c1ec94af
Reviewed-by: Song Gao
Message-Id: <20240515093927.3453674-5-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/virt.c | 53 +++--
1 file changed, 17 insertions(+), 36 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
size for both total memory and numa
node0 is removed for fadt numa memory table creation.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240515093927.3453674-3-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/virt.c | 46 ++
vmstate does not save kvm_state_conter,
which can cause VM recovery from disk to fail.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Song Gao
Acked-by: Peter Xu
Message-Id: <20240508024732.3127792-1-gaos...@loongson.cn>
---
target/loongarch/machine.c | 6 --
1 file changed, 4 insertions
From: Bibo Mao
Some qtest test cases such as numa use default memory size of generic
machine class, which is 128M by fault.
Here generic default memory size is used, and also remove minimum memory
size which is 1G originally.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id
From: Bibo Mao
If VM runs in kvm mode, VM mode is added in IOCSR feature register.
So guest can detect kvm hypervisor type and enable possible pv functions.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240514025109.3238398-1-maob...@loongson.cn>
Signed-off-by: So
first memory HOB is part of numa node0, so that runtime
memory of UEFI which is allocated from the first memory HOB is located
at numa node0.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
Message-Id: <20240515093927.3453674-4-maob...@loongson.cn>
Signed-off-by: Song Gao
---
hw/loongarch/
ine system dram memory region
hw/loongarch: Remove minimum and default memory size
target/loongarch: Add loongarch vector property unconditionally
Jiaxun Yang (1):
hw/loongarch/virt: Fix FDT memory node address width
Song Gao (2):
target/loongarch/kvm: Fix VM recovery from dis
Use MemTxAttrs interface read_with_attrs/write_with_attrs
for virt_iocsr_misc_ops.
Signed-off-by: Song Gao
---
hw/loongarch/virt.c | 26 --
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index e7edc6c9f9
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 | 88
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 | 1 +
target/loongarch/cpu.h |
des in any way.
- Link to v1:
https://lore.kernel.org/all/20240116022526.498613-1-gaos...@loongson.cn/#r
[1]:
https://gitee.com/openeuler/kernel/commit/5d97cff72f91f4f20a536efd60eca75bfcb78a64
Thanks.
Song Gao
Song Gao (3):
hw/intc/loongarch_extioi: Add extioi virt extension definition
hw/loon
vmstate does not save kvm_state_conter,
which can cause VM recovery from disk to fail.
Cc: qemu-sta...@nongnu.org
Signed-off-by: Song Gao
Acked-by: Peter Xu
Message-Id: <20240508024732.3127792-1-gaos...@loongson.cn>
---
target/loongarch/machine.c | 6 --
1 file changed, 4 insertions
On kvm side, get_fpu/set_fpu save the vreg registers high 192bits,
but QEMU missing.
Signed-off-by: Song Gao
Reviewed-by: Bibo Mao
Message-Id: <20240514110752.989572-1-gaos...@loongson.cn>
---
target/loongarch/kvm/kvm.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/target/loo
h-20240516
Bibo Mao (3):
hw/loongarch: Add compat machine for 9.1
hw/loongarch: Remove minimum and default memory size
tests: Add migration test for loongarch64
Song Gao (2):
target/loongarch/kvm: Fix VM recovery from disk failures
target/loongarc
1 - 100 of 1054 matches
Mail list logo