is added with OnOffAuto type,
If lbt feature is not supported with KVM host, it reports error if there
is lbt=on command line.
If there is no any command line about lbt parameter, it checks whether
KVM host supports lbt feature and set the corresponding value in cpucfg.
Signed-off-by: Bibo Mao
flags default_features and forced_features
v1 ... v2:
1. Add LBT register saving and restoring in vmstate
2. Add two pseudo feature flags: default_features and forced_features
---
Bibo Mao (2):
target/loongarch: Add loongson binary translation feature
target/loongarch: Implement lbt
Six registers scr0 - scr3, eflags and ftop are added in percpu vmstate.
And two functions kvm_loongarch_get_lbt/kvm_loongarch_put_lbt are added
to save/restore lbt registers.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.h | 12 +
target/loongarch/kvm/kvm.c | 52
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
---
v1 ... v2:
1. Update copyright licence notation with file loongarch-virt-machine.c
---
hw
Add numa test case for loongarch system, it passes to run
with command "make check-qtest".
Signed-off-by: Bibo Mao
---
tests/qtest/meson.build | 2 +-
tests/qtest/numa-test.c | 53 +
2 files changed, 54 insertions(+), 1 deletion(-)
diff --g
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
---
hw/loongarch/virt.c | 2 +
tests/qtest/libqos/loongarch-virt-machine.c | 114
With pv steal time supported, VM machine needs get physical address
of each vcpu and notify to new host during migration. Here two
functions kvm_loongarch_get_stealtime/kvm_loongarch_put_stealtime
are provided and they are called in cpu_pre_save/cpu_post_load
separately.
Signed-off-by: Bibo Mao
if there is no command line option for LBT
feature. If the feature is not supported with KVM host, it reports error
and exits if forced_features is set, else it disables feature and continues
if default_features is set.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.c| 69
in KVM kernel
---
v1 ... v2:
1. Add LBT register saving and restoring in vmstate
2. Add two pseudo feature flags: default_features and forced_features.
---
Bibo Mao (2):
target/loongarch: Add loongson binary translation feature
target/loongarch: Implement lbt registers save/restore function
Six registers scr0 - scr3, eflags and ftop are added in percpu vmstate.
And two functions kvm_loongarch_get_lbt/kvm_loongarch_put_lbt are added
to save/restore lbt registers.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.h | 12 +
target/loongarch/kvm/kvm.c | 52
is added here, LBT register
saving and restoring is not supported since it depeeds on LBT feautre
implemented in KVM kernel.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.c| 32 +++
target/loongarch/cpu.h| 1 +
target/loongarch/loongarch
in KVM kernel
Bibo Mao (2):
target/loongarch: Add loongarch vector property unconditionally
target/loongarch: Add loongson binary translation feature
target/loongarch/cpu.c| 42 ++-
target/loongarch/cpu.h| 1 +
target/loongarch/loongarch
Currently LSX/LASX vector property is decided by the default value.
Instead vector property should be added unconditionally, and it is
irrelative with its default value. If vector is disabled by default,
vector also can be enabled from command line.
Signed-off-by: Bibo Mao
---
target/loongarch
Local variable fence_fd is defined but not used if CONFIG_GBM is
not enabled, and there is compiling problem.
Signed-off-by: Bibo Mao
---
ui/gtk-egl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 0473f689c9..9831c10e1b 100644
--- a/ui/gtk
with gdb
method after kernel is loaded, hardware breakpoint will be added in later.
Signed-off-by: Bibo Mao
---
v1 ... v2:
1. Enable TARGET_KVM_HAVE_GUEST_DEBUG on loongarch64 platform
---
configs/targets/loongarch64-softmmu.mak | 1 +
target/loongarch/kvm/kvm.c | 76
the patch based on the latest version.
v1 ... v2:
1. Refresh the patch based on the latest qemu version, solve the
confliction issue.
2. Add numa test case for loongarch system.
---
Bibo Mao (6):
hw/loongarch: Refine acpi srat table for numa memory
hw/loongarch: Refine fadt memory table for numa
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
---
hw/loongarch/virt.c | 60 ++---
1 file changed, 57 insertions(+), 3 deletions(-)
diff --git a/hw
memory and numa
node0 is removed for acpi srat table creation.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 58 +++
1 file changed, 34 insertions(+), 24 deletions(-)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index
For system dram memory region, it is not necessary to use numa node
information. There is only low memory region and high memory region.
Remove numa node information for ddr memory region here, it can reduce
memory region number on LoongArch virt machine.
Signed-off-by: Bibo Mao
---
hw
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
---
hw/loongarch/virt.c | 5 -
1 file changed, 5
Add numa test case for loongarch system, it passes to run
with command "make check-qtest".
Signed-off-by: Bibo Mao
---
tests/qtest/meson.build | 2 +-
tests/qtest/numa-test.c | 53 +
2 files changed, 54 insertions(+), 1 deletion(-)
diff --g
memory and numa
node0 is removed for fadt numa memory table creation.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 46 ++---
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index f0640d2d80
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
---
hw/loongarch/virt.c | 2 +
tests/qtest/libqos/loongarch-virt-machine.c | 114
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
---
hw/loongarch/virt.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw
in tests/migration/loongarch64. So users can
change the source and/or re-compile the binary as they wish.
Signed-off-by: Bibo Mao
Acked-by: Thomas Huth
Acked-by: Peter Xu
Reviewed-by: Fabiano Rosas
---
tests/migration/Makefile | 2 +-
tests/migration/loongarch64/Makefile | 18
based on the latest qemu version, solve the
confliction issue.
v1 ... v2:
1. Keep the default memory size unchanged with 1GB, only modify minimum
memory size with 256MB
2. Remove tab char in file tests/migration/loongarch64/a-b-kernel.S
---
Bibo Mao (3):
hw/loongarch: Add compat machine for 9.1
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
---
hw/loongarch/virt.c | 5 -
1 file changed, 5
Since migration test case requires compat machine type support,
compat machine is added for qemu 9.1 here.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 61 +++--
1 file changed, 48 insertions(+), 13 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw
Add boot-serial-test and filter test cases support on LoongArch system.
Signed-off-by: Bibo Mao
---
v1 ... v2:
1. Refresh the changelog, adding filter test case support also.
2. Adjust order of loongarch qtest in alphabetical order.
---
tests/qtest/boot-serial-test.c | 10 ++
tests
Add boot-serial-test test case support on LoongArch system.
Signed-off-by: Bibo Mao
---
tests/qtest/boot-serial-test.c | 10 ++
tests/qtest/meson.build| 4
2 files changed, 14 insertions(+)
diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c
index
modify minimum
memory size with 256MB
2. Remove tab char in file tests/migration/loongarch64/a-b-kernel.S
---
Bibo Mao (5):
hw/loongarch: Rename LOONGARCH_MACHINE with LOONGARCH_VIRT_MACHINE
hw/loongarch: Rename LoongArchMachineState with
LoongArchVirtMachineState
hw/loongarch: Add compat
The minimum memory size for LoongArch UEFI bios is 256M, also some
test cases such as migration and qos use 256M memory by default.
Here set minimum memory size for Loongarch VirtMachine with 256M rather
than 1G, so that test cases with 256M memory can pass to run.
Signed-off-by: Bibo Mao
On LoongArch system, there is only virt machine type now, name
LOONGARCH_MACHINE is confused, rename it with LOONGARCH_VIRT_MACHINE.
Machine name about Other real hw boards can be added in future.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 8
hw/loongarch/boot.c
such as
loongarch_acpi_setup()/loongarch_load_kernel(), since there functions
can be used for real hw boards.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 89 +-
hw/loongarch/boot.c | 10 +-
hw/loongarch/fw_cfg.c | 2 +-
hw/loongarch/fw_cfg.h | 2 +-
hw/loongarch/virt.c
in tests/migration/loongarch64. So users can
change the source and/or re-compile the binary as they wish.
Signed-off-by: Bibo Mao
Acked-by: Thomas Huth
Acked-by: Peter Xu
Reviewed-by: Fabiano Rosas
---
tests/migration/Makefile | 2 +-
tests/migration/loongarch64/Makefile | 18
Since migration test case requires compat machine type support,
compat machine is added for qemu 9.0 here.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 61 +++--
1 file changed, 48 insertions(+), 13 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw
memory and numa
node0 is removed for acpi srat table creation.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 58 +++
1 file changed, 34 insertions(+), 24 deletions(-)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index
Add numa test case for loongarch system, it passes to run
with command "make check-qtest", after the following patch
is applied.
https://lore.kernel.org/all/20240319022606.2994565-1-maob...@loongson.cn/
Signed-off-by: Bibo Mao
---
tests/qtest/meson.build | 2 ++
1 file changed, 2
For system dram memory region, it is not necessary to use numa node
information. There is only low memory region and high memory region.
Remove numa node information for ddr memory region here, it can reduce
memory region number about LoongArch virt machine.
Signed-off-by: Bibo Mao
---
hw
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
---
hw/loongarch/virt.c | 60 ++---
1 file changed, 57 insertions(+), 3 deletions(-)
diff --git a/hw
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
---
hw/loongarch/virt.c | 5 -
1 file changed, 5
the
confliction issue.
2. Add numa test case for loongarch system.
---
Bibo Mao (6):
hw/loongarch: Refine acpi srat table for numa memory
hw/loongarch: Refine fadt memory table for numa memory
hw/loongarch: Refine fwcfg memory map
hw/loongarch: Refine system dram memory region
hw/loongarch
memory and numa
node0 is removed for fadt numa memory table creation.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 47 ++---
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index c0999878df
seconds.
---
v2 ... v3:
1. Refresh the patch based on the latest qemu version, solve the
confliction issue.
v1 ... v2:
1. Keep the default memory size unchanged with 1GB, only modify minimum
memory size with 256MB
2. Remove tab char in file tests/migration/loongarch64/a-b-kernel.S
---
Bibo Mao (5
On LoongArch system, there is only virt machine type now, name
LOONGARCH_MACHINE is confused, rename it with VIRT_MACHINE. Machine name
about Other real hw boards can be added in future.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 8
hw/loongarch/boot.c | 2
The minimum memory size for LoongArch UEFI bios is 256M, also some
test cases such as migration and qos use 256M memory by default.
Here set minimum memory size for Loongarch VirtMachine with 256M rather
than 1G, so that test cases with 256M memory can pass to run.
Signed-off-by: Bibo Mao
Rename LoongArchMachineState with VirtMachineState, and change variable
name LoongArchMachineState *lams with VirtMachineState *vms, and rename
function loongarch_xxx() with virt_xxx() also.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 80 +-
hw/loongarch/boot.c
Since migration test case requires compat machine type support,
compat machine is added for qemu 9.0 here.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 60 +++--
1 file changed, 47 insertions(+), 13 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw
in tests/migration/loongarch64. So users can
change the source and/or re-compile the binary as they wish.
Signed-off-by: Bibo Mao
Acked-by: Thomas Huth
Acked-by: Peter Xu
Reviewed-by: Fabiano Rosas
---
tests/migration/Makefile | 2 +-
tests/migration/loongarch64/Makefile | 18
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
---
v3 --> v4:
- Refresh the patch based on the latest mainline version.
v2 --> v3:
- Remove print info about fp_status in loongarch_cpu_dump_state()
-by: Bibo Mao
---
target/loongarch/kvm/kvm.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c
index 8224d94333..bc75552d0f 100644
--- a/target/loongarch/kvm/kvm.c
+++ b/target/loongarch/kvm/kvm.c
@@ -587,22
test fails on LoongArch, since the actual result is:
node 0 cpus: 0 1 2 3
node 1 cpus: 4 5 6 7
It will be better if all the cpus in one socket share the same numa
node. Here socket id is used to calculate numa id in function
virt_get_default_cpu_node_id().
Signed-off-by: Bibo Mao
---
hw/loonga
memory and numa
node0 is removed for acpi srat table creation.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 58 +++
1 file changed, 34 insertions(+), 24 deletions(-)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index
For system dram memory region, it is not necessary to use numa node
information. There is only low memory region and high memory region.
Remove numa node information for ddr memory region here, it can reduce
memory region number about LoongArch virt machine.
Signed-off-by: Bibo Mao
---
hw
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
---
hw/loongarch/virt.c | 5 -
1 file changed, 5
memory and numa
node0 is removed here, including acpi srat table, fadt memory map table
and fw_cfg memory map table.
Also remove numa node about memory region, there is only low memory
region and how memory region.
Bibo Mao (5):
hw/loongarch: Refine acpi srat table for numa memory
hw
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
---
hw/loongarch/virt.c | 60 ++---
1 file changed, 57 insertions(+), 3 deletions(-)
diff --git a/hw
memory and numa
node0 is removed for fadt numa memory table creation.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 47 ++---
1 file changed, 44 insertions(+), 3 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index efce112310
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
---
hw/intc/loongarch_extioi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
are not used and do not need
migrate. It is only useful when it runs in TCG mode.
Signed-off-by: Bibo Mao
---
v2 --> v3:
- Remove print info about fp_status in loongarch_cpu_dump_state() since
it is always zero.
- Return tcg_enabled() directly in tlb_needed()
v1 --> v2:
- Add field needed in str
are not used and do not need
migrate. It is only useful when it runs in TCG mode.
Signed-off-by: Bibo Mao
Change-Id: Id30d663f5d7bc3436520638f606f99d93926eb2e
---
v1 --> v2:
- Add field needed in structure vmstate_tlb, dynamically judge whether
tlb should be migrated, since mostly qemu-system-loongarc
are not necessary to save
in VMState. It is only useful when it runs in TCG mode, macro CONFIG_TCG
is also added.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.c| 14 +++---
target/loongarch/cpu.h| 16 ++--
target/loongarch/cpu_helper.c | 9 +
target
in tests/migration/loongarch64. So users can
change the source and/or re-compile the binary as they wish.
Signed-off-by: Bibo Mao
Reviewed-by: Fabiano Rosas
Acked-by: Thomas Huth
Acked-by: Peter Xu
---
tests/migration/Makefile | 2 +-
tests/migration/loongarch64/Makefile | 18
to avoid confliction
---
Bibo Mao (5):
hw/loongarch: Rename LOONGARCH_MACHINE with VIRT_MACHINE.
hw/loongarch: Rename LoongArchMachineState with VirtMachineState
hw/loongarch: Add compat machine for 9.0
hw/loongarch: Set minimium memory size as 256M
tests: Add migration test for loongarch64
Since migration test case requires compat machine type support,
compat machine is added for qemu 9.0 here.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 60 +++--
1 file changed, 47 insertions(+), 13 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw
On LoongArch system, there is only virt machine type now, name
LOONGARCH_MACHINE is confused, rename it with VIRT_MACHINE. Machine name
about Other real hw boards can be added in future.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 8
hw/loongarch/virt.c | 19
The minimum memory size for LoongArch UEFI bios is 256M, also some
test cases such as migration and qos use 256M memory by default.
Here set minimum memory size for Loongarch VirtMachine with 256M rather
than 1G, so that test cases with 256M memory can pass to run.
Signed-off-by: Bibo Mao
Rename LoongArchMachineState with VirtMachineState, and change variable
name LoongArchMachineState *lams with VirtMachineState *vms, and rename
function loongarch_xxx() with virt_xxx() also.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 80 +-
hw/loongarch/fw_cfg.c
Since migration test case requires compat machine type support,
compat machine is added for qemu 9.0 here.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 60 +++--
1 file changed, 47 insertions(+), 13 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw
in tests/migration/loongarch64. So users can
change the source and/or re-compile the binary as they wish.
Signed-off-by: Bibo Mao
---
tests/migration/Makefile | 2 +-
tests/migration/loongarch64/Makefile | 18 ++
tests/migration/loongarch64/a-b-kernel.S | 46
The minium memory size for LoongArch UEFI bios is 256M, also some
test cases such as migration and qos uses parameter 256M.
Here set minium memory size for Loongarch VirtMachine with 256M,
also default memory size is changed with 256M.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 6
Rename LoongArchMachineState with VirtMachineState, also change variable
name lams with vms.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 76 +-
hw/loongarch/fw_cfg.c | 2 +-
hw/loongarch/fw_cfg.h | 2 +-
hw/loongarch/virt.c | 276
Migration test case is added for loongarch64 here. Since compat machine
type is required for migration test case, also compat machine qemu 9.0
is added for loongarch virt machine.
Bibo Mao (5):
hw/loongarch: Rename LOONGARCH_MACHINE with VIRT_MACHINE.
hw/loongarch: Rename
On LoongArch system, there is only virt machine type now, name
LOONGARCH_MACHINE is confused, rename it with VIRT_MACHINE. Name
about Other real hw boards can be added in future.
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 8
hw/loongarch/virt.c | 19
hardware breakpoint
will be added.
Signed-off-by: Bibo Mao
---
target/loongarch/kvm/kvm.c | 77 ++
1 file changed, 77 insertions(+)
diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c
index c19978a970..49d02076ad 100644
--- a/target/loongarch/kvm
The cdrom test skips to execute on LoongArch system with command
"make check", this patch enables cdrom test for LoongArch virt
machine platform.
With this patch, cdrom test passes to run on LoongArch virt
machine type.
Signed-off-by: Bibo Mao
---
Add virtio-blk-pci checking since
The cdrom test skips to execute on LoongArch system with command
"make check", this patch enables cdrom test for LoongArch virt
machine platform.
With this patch, cdrom test passes to run on LoongArch virt
machine type.
Signed-off-by: Bibo Mao
---
tests/qtest/cdrom-test.c | 3 +
system so that
header files in directory linux-headers/asm-loongarch can be included.
Fixes: 714b03c125 ("target/loongarch: Add loongarch kvm into meson build")
Signed-off-by: Bibo Mao
Reviewed-by: Philippe Mathieu-Daudé
---
Changes in v2:
1. Add Fixes label for commit 714b03c125
---
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
---
target/loongarch/kvm/kvm.c | 9 ++---
1 file
-off-by: Bibo Mao
---
include/qemu/osdep.h | 8
1 file changed, 8 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 9a405bed89..c9692cc314 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -547,6 +547,14 @@ int madvise(char *, size_t, int
system so that header
files in directory linux-headers/asm-loongarch can be included.
Signed-off-by: Bibo Mao
---
configure | 1 +
1 file changed, 1 insertion(+)
diff --git a/configure b/configure
index 21ab9a64e9..3d8e24ae01 100755
--- a/configure
+++ b/configure
@@ -445,6 +445,7 @@ case "
. Add num-cpu property for extioi interrupt controller
2. Add post_load support for extioi vmstate to calculate sw_ipmap/sw_coremap
info
---
Bibo Mao (4):
hw/intc/loongarch_ipi: Use MemTxAttrs interface for ipi ops
hw/loongarch/virt: Set iocsr address space per-board rather than
percpu
hw
it is to forward message to another vcpu.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_ipi.c | 136 +++-
1 file changed, 77 insertions(+), 59 deletions(-)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index 67858b521c..1d3449e77d 100644
--- a/hw/intc
, however kernel can detect
and choose new route method in future, so that interrupt can be routed to
all vcpus.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 107 +++--
hw/loongarch/virt.c| 3 +-
include/hw/intc/loongarch_extioi.h | 11
There are elements sw_ipmap and sw_coremap, which is usd to speed
up irq injection flow. They are saved and restored in vmstate during
migration, indeed they can calculated from hw registers. Here
post_load is added for get sw_ipmap and sw_coremap from extioi hw
state.
Signed-off-by: Bibo Mao
per-board rather percpu,
for iocsr registers specified for cpu, MemTxAttrs.requester_id
can be parsed for the cpu. With this patches, the total address space
on board will be simple, only iocsr address space and system memory,
rather than the number of cpu and system memory.
Signed-off-by: Bibo Mao
it is to forward message to another vcpu.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_ipi.c | 136 +++-
1 file changed, 77 insertions(+), 59 deletions(-)
diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index 67858b521c..1d3449e77d 100644
--- a/hw/intc
On LoongArch system, there is iocsr address space simliar system io
address space on x86. And each cpu has its separate iocsr address space now,
with this patch, iocsr address space is changed with per-board, and
MemTxAttrs.requester_id is used to differentiate cpu cores.
Bibo Mao (2):
hw/intc
per-board rather percpu,
for iocsr registers specified for cpu, MemTxAttrs.requester_id
can be parsed for the cpu. With this patches, the total address space
on board will be simple, only iocsr address space and system memory,
rather than the number of cpu and system memory.
Signed-off-by: Bibo Mao
Timer emulation sometimes is problematic especially when vm is running in
kvm mode. This patch adds registers dump support relative with timer
hardware, so that it is easier to find the problems.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.c | 2 ++
1 file changed, 2 insertions(+)
diff
bios has no limitation with high
memory base address, it is ok to set high memory base address
with 0x8000.
Signed-off-by: Bibo Mao
Change-Id: Iac1af728bf6fd35c9c2f4e7dbdae6e3c0fbab623
---
include/hw/loongarch/virt.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include
value like 0x1e20/7.
Another way multiple virtio-mmio devices should be added like other arches.
And there should be fdt/acpi table added for the device so that users can use
it.
Regards
Bibo Mao
> +
> pm_mem = g_new(MemoryRegion, 1);
> memory_region_init_io(pm_mem, NULL, _virt_pm_ops,
>NULL, "loongarch_virt_pm", PM_SIZE);
>>>> store.
>>>
>>> Is this really guaranteed to be an atomic 128-bit operation?
>>>
>>
>> Song Gao, please check this.
>>
>>
> Could you explain this issue? Thanks.
If address is aligned with 16-bytes, the 128-bi
Implement the callback for getting the architecture-dependent CPU
ID, the cpu ID is physical id described in ACPI MADT table, this
will be used for cpu hotplug.
Signed-off-by: Bibo Mao
Reviewed-by: Song Gao
---
v1->v2:
remove unuseful changeid.
---
hw/loongarch/virt.c| 2 ++
tar
在 2023/8/23 09:14, gaosong 写道:
> 在 2023/8/22 下午8:26, Bibo Mao 写道:
>> Implement the callback for getting the architecture-dependent CPU
>> ID, the cpu ID is physical id described in ACPI MADT table, this
>> will be used for cpu hotplug.
>>
>> Sign
Implement the callback for getting the architecture-dependent CPU
ID, the cpu ID is physical id described in ACPI MADT table, this
will be used for cpu hotplug.
Signed-off-by: Bibo Mao
Change-Id: I53bcfb9f4279e491f33e8b99a9102534ad53409e
---
hw/loongarch/virt.c| 2 ++
target/loongarch/cpu.c
在 2023/8/21 09:29, Jiajie Chen 写道:
>
> On 2023/8/21 09:24, bibo mao wrote:
>> + Add xianglai
>>
>> Good catch.
>>
>> In theory, it is logical id, and it can be not equal to physical id.
>> However it must be equal to _UID in cpu dsdt table which is mi
在 2023/8/21 09:29, Jiajie Chen 写道:
>
> On 2023/8/21 09:24, bibo mao wrote:
>> + Add xianglai
>>
>> Good catch.
>>
>> In theory, it is logical id, and it can be not equal to physical id.
>> However it must be equal to _UID in cpu dsdt table which is mi
+ Add xianglai
Good catch.
In theory, it is logical id, and it can be not equal to physical id.
However it must be equal to _UID in cpu dsdt table which is missing
now.
Can pptt table parse error be fixed if cpu dsdt table is added?
Regards
Bibo Mao
在 2023/8/20 18:56, Jiajie Chen 写道:
> In
quot;Philippe Mathieu-Daudé"
> Cc: Gerd Hoffmann
> Cc: Xiaojuan Yang
> Cc: Song Gao
> Cc: Bibo Mao
> Signed-off-by: xianglai li
> ---
> .gitmodules| 3 +++
> meson.build| 2 +-
> pc-bios/meson.build| 2 ++
> roms/edk2-build.con
1 - 100 of 114 matches
Mail list logo