Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and
replace them with LoongArchExtIOICommonState and macro
LOONGARCH_EXTIOI_COMMON separately. Also remove unnecessary header
files.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 31
Add new common file loongarch_extioi_common.c, and move vmstate
and property structure to common file.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c| 59 +
hw/intc/loongarch_extioi_common.c | 63 +++
2 files changed, 65
Rename structure LoongArchExtIOI with LoongArchExtIOICommonState,
since it is defined in file loongarch_extioi_common.h
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_extioi.h| 1 +
include/hw/intc/loongarch_extioi_common.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion
LoongArch extioi kvm driver can inherit from extioi common
driver.
---
v1 ... v2:
1. Remove unused element parent_unrealize in structure
LoongArchExtIOICommonClass to solve the compile and make check issue
---
Bibo Mao (10):
include: Add loongarch_extioi_common header file
include: Move
Add common realize function, it is only to check validity of property.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index 409d4a85da
Add common header file include/hw/intc/loongarch_extioi_common.h, and
move some macro definition from include/hw/intc/loongarch_extioi.h to
the common header file.
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_extioi.h| 50 +--
include/hw/intc
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON
object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMMON,
and has its own realize() function.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c| 37 ++---
hw/intc
For loongarch extioi emulation driver, add unrealize interface and
remove instance_finalize interface and move the code to unrealize
interface.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc
Move definiton of structure LoongArchExtIOI from header file loongarch_extioi.h
to file loongarch_extioi_common.h.
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_extioi.h| 26 --
include/hw/intc/loongarch_extioi_common.h | 27 +++
2 files
With some structure such as vmstate and property, rename LoongArchExtIOI
with LoongArchExtIOICommonState, these common structure will be moved
to common file.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 41 +++---
1 file changed, 25 insertions(+), 16
Add vmstate pre_save interface, which can be used extioi kvm driver
in future.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi_common.c | 13 +
include/hw/intc/loongarch_extioi_common.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/hw/intc
On LoongArch virt machine, ACPI GED hardware is used for CPU hotplug
handler, here CPU hotplug support feature is added based on GED handler,
also CPU scan and reject method is added about CPU device in DSDT table.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
hw/loongarch/Kconfig
information.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
docs/system/loongarch/virt.rst | 31
hw/loongarch/virt.c| 67 --
target/loongarch/cpu.c | 12 ++
target/loongarch/cpu.h | 17 +
4 files
Here generic function virt_init_cpu_irq() is added to init interrupt
pin of CPU object, IPI and extioi interrupt controllers are connected
to interrupt pin of CPU object.
The generic function can be used to both cold-plug and hot-plug CPUs.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 76
Add cpu hotplug interface, however cpu hotplug feature is still
disabled for the machine. When machine is on, all created vCPUs
go through hotplug interface, and there is no remaining vCPU which
can be hot-added after power on.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
hw
patches.
---
Bibo Mao (5):
hw/loongarch/virt: Add CPU topology support
hw/loongarch/virt: Implement cpu plug interface
hw/loongarch/virt: Add generic function to init interrupt pin of CPU
hw/loongarch/virt: Update the ACPI table for hotplug cpu
hw/loongarch/virt: Enable cpu hotplug
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 57 +
include/hw/loongarch/virt.h | 2 ++
2 files changed, 54 insertions(+), 5 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index e73f689c83..6673493109 100644
--- a/hw/loongarch
requirement is called.
Signed-off-by: Bibo Mao
---
hw/loongarch/boot.c | 9 +
hw/loongarch/virt.c | 14 ++
include/hw/loongarch/boot.h | 1 +
target/loongarch/cpu.c | 10 ++
4 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/hw/loongarch
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 68 ++---
include/hw/loongarch/virt.h | 2 ++
2 files changed, 66 insertions(+), 4 deletions(-)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 655312b0fe..cecb12786b 100644
--- a/hw/loongarch
-added CPUs.
The two properties can be generated from each other.
2. Use general hotplug api such as hotplug_handler_pre_plug etc
3. Reorganize the patch order, split the patch set into 4 small
patches.
---
Bibo Mao (4):
hw/loongarch/virt: Add CPU topology support
hw/loongarch/virt
Add topological relationship for Loongarch VCPU and initialize
topology member variables, the topo information includes socket-id,
core-id and thread-id. And its physical cpu id is calculated from
topo information.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
docs/system/loongarch
On LoongArch virt machine, ACPI GED hardware is used for cpu
hotplug, here cpu hotplug support feature is added on GED device,
also cpu scan and reject method is added about CPU device in
DSDT table.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
hw/loongarch/Kconfig| 1
Add cpu hotplug interface, however cpu hotplug feature is still
disabled for the machine. When machine is on, all created vCPUs
go through hotplug interface, and there is no remaining vCPU which
can be hot-added after power on.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
hw
, archid->cpu
will be NULL.
Signed-off-by: Bibo Mao
---
v1 ... v2:
1. since physical cpuid is the same with cpu_index when cpu_index
is set again as index of possible_cpus. Remove phy_id set about
CSR_CPUID in function loongarch_cpu_reset_hold()
---
hw/intc/loongarch_ipi.c
to Linux v6.12-rc5
v1 ... v2:
1. update header files in directory linux-headers to v6.12-rc3
---
Bibo Mao (3):
linux-headers: Add unistd_64.h
linux-headers: loongarch: Add kvm_para.h
linux-headers: Update to Linux v6.12-rc5
include/standard-headers/drm/drm_fourcc.h | 43 +++
include
KVM LBT supports on LoongArch depends on the linux-header file
kvm_para.h, add header file kvm_para.h here.
Signed-off-by: Bibo Mao
---
scripts/update-linux-headers.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index
update linux-headers to v6.12-rc5. Pass to compile on aarch64, arm,
loongarch64, x86_64, i386, riscv64,riscv32 softmmu and linux-user.
Signed-off-by: Bibo Mao
---
include/standard-headers/drm/drm_fourcc.h | 43 +++
include/standard-headers/linux/const.h| 17 +
include/standard
file or
directory
#include
Signed-off-by: Bibo Mao
---
scripts/update-linux-headers.sh | 6 ++
1 file changed, 6 insertions(+)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index c34ac6454e..203f48d089 100755
--- a/scripts/update-linux-headers.sh
+++ b
t;
> > target/loongarch: Add steal time support on migration (2024-10-24
> > 17:27:55 +0800)
> >
> > ----
> > pull-loongarch-20241024
> >
> > --
Implement interface for cpu hotplug function, and enable cpu hotplug
feature on virt machine.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
hw/loongarch/Kconfig| 1 +
hw/loongarch/virt.c | 191 +++-
include/hw/loongarch/virt.h | 2
On LoongArch virt machine, ACPI GED hardware is used for cpu
hotplug, here cpu hotplug support feature is added on GED device,
also cpu scan and reject method is added about CPU device in
DSDT table.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 35
can be added or remove with hmp command:
device_add la464-loongarch-cpu,socket-id=0,core-id=2,thread-id=0,id=cpu-2
device_del cpu-2
Bibo Mao (3):
hw/loongarch/virt: Add CPU topology support
hw/loongarch/virt: Add basic CPU plug support
hw/loongarch/virt: Update the ACPI table for hotplug
Add topological relationships for Loongarch VCPU and initialize
topology member variables. Also physical cpu id calculation
method comes from its topo information.
Co-developed-by: Xianglai Li
Signed-off-by: Bibo Mao
---
docs/system/loongarch/virt.rst | 31 +
hw/loongarch/virt.c
For user tcg, there is no physical cpu id provided and logic cpuid
is used. For system emulation, physical cpu id is provided, initial
value of register CSR CPUID can be set from physical cpu id.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_ipi.c | 3 ++-
target/loongarch/cpu.c
This update contains the required header changes for LoongArch
KVM LBT feature.
Signed-off-by: Bibo Mao
---
include/standard-headers/drm/drm_fourcc.h | 43 +++
include/standard-headers/linux/const.h| 17 +
include/standard-headers/linux/ethtool.h | 226 +
include
linux-headers/asm/unistd.h:3:10: fatal error: asm/unistd_64.h: No such file or
directory
#include
Also update linux-headers to v6.12-rc3
---
v1 ... v2:
1. update header files in directory linux-headers to v6.12-rc3
---
Bibo Mao (2):
linux-headers: loongarch: Add kvm_para.h and unistd_64.h
Signed-off-by: Bibo Mao
---
scripts/update-linux-headers.sh | 4
1 file changed, 4 insertions(+)
diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh
index c34ac6454e..3c411f0318 100755
--- a/scripts/update-linux-headers.sh
+++ b/scripts/update-linux-headers.sh
@@ -186,6
With pv steal time supported, VM machine needs get physical address
of each vcpu and notify new host during migration. Here two
functions kvm_get_stealtime/kvm_set_stealtime, and guest steal time
physical address is only updated on KVM_PUT_FULL_STATE stage.
Signed-off-by: Bibo Mao
---
v1 ... v2
KVM LBT supports on LoongArch requires the linux-header kvm_para.h,
also unistd_64.h is required by unistd.h on LoongArch since 6.11
Signed-off-by: Bibo Mao
---
scripts/update-linux-headers.sh | 4
1 file changed, 4 insertions(+)
diff --git a/scripts/update-linux-headers.sh b/scripts
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
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 | 62
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
target/loongarch/cpu.c
LoongArch extioi kvm driver can inherit from extioi common
driver.
Bibo Mao (10):
include: Add loongarch_extioi_common header file
include: Move struct LoongArchExtIOI to header file
loongarch_extioi_common
include: Rename LoongArchExtIOI with LoongArchExtIOICommonState
hw/intc
With some structure such as vmstate and property, rename LoongArchExtIOI
with LoongArchExtIOICommonState, these common structure will be moved
to common file.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 41 +++---
1 file changed, 25 insertions(+), 16
For loongarch extioi emulation driver, add unrealize interface and
remove instance_finalize interface and move the code to unrealize
interface.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc
Rename structure LoongArchExtIOI with LoongArchExtIOICommonState,
since it is defined in file loongarch_extioi_common.h
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_extioi.h| 1 +
include/hw/intc/loongarch_extioi_common.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion
Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and
replace them with LoongArchExtIOICommonState and macro
LOONGARCH_EXTIOI_COMMON separately. Also remove unnecessary header
files.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 31
Add common header file include/hw/intc/loongarch_extioi_common.h, and
move some macro definition from include/hw/intc/loongarch_extioi.h to
the common header file.
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_extioi.h| 50 +--
include/hw/intc
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON
object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMMON,
and has its own realize() function.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c| 37 ++---
hw/intc
Add vmstate pre_save interface, which can be used extioi kvm driver
in future.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi_common.c | 13 +
include/hw/intc/loongarch_extioi_common.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/hw/intc
Add common realize function, it is only to check validity of property.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c | 17 +++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c
index 409d4a85da
Add new common file loongarch_extioi_common.c, and move vmstate
and property structure to common file.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_extioi.c| 60 +
hw/intc/loongarch_extioi_common.c | 63 +++
2 files changed, 65
Move definiton of structure LoongArchExtIOI from header file loongarch_extioi.h
to file loongarch_extioi_common.h.
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_extioi.h| 26 --
include/hw/intc/loongarch_extioi_common.h | 27 +++
2 files
the PMU Feature and set the corresponding value in cpucfg.
This patch is based on lbt patch located at
https://lore.kernel.org/qemu-devel/20240904061859.86615-1-maob...@loongson.cn
Co-developed-by: Song Gao
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.c| 19
With pic vmstate, rename structure name vmstate_loongarch_pch_pic with
vmstate_loongarch_pic_common, and with pic property rename
loongarch_pch_pic_properties with loongarch_pic_common_properties.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c | 52
Move structure LoongArchPCHPIC from header file loongarch_pch_pic.h
to file loongarch_pic_common.h, and rename structure name with
LoongArchPICCommonState.
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_pch_pic.h| 27 +
include/hw/intc/loongarch_pic_common.h
Move some common functions to file loongarch_pic_common.c, the common
functions include loongarch_pic_common_realize(), property structure
loongarch_pic_common_properties and vmstate structure
vmstate_loongarch_pic_common.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c| 37
Add vmstate pre_save and post_load interfaces, which can be used
by pic kvm driver in future.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pic_common.c | 26 ++
include/hw/intc/loongarch_pic_common.h | 2 ++
2 files changed, 28 insertions(+)
diff --git a/hw
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object,
it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has
its own realize() function.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c| 38 --
hw/intc
Add common header file hw/intc/loongarch_pic_common.h, and move
some macro definition from hw/intc/loongarch_pch_pic.h to the common
header file.
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_pch_pic.h| 36 +++---
include/hw/intc/loongarch_pic_common.h | 42
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and
replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON
separately. Also remove unnecessary header files.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c | 24 ++--
hw/loongarch
driver can inherit from pic common driver.
---
v1 ... v2:
1. Reorganize the patchset, put macro and structure moving patch as
first one
2. Split the patchset with smaller patch, so that it is easier to
review
---
Bibo Mao (8):
include: Add loongarch_pic_common header file
include: Move
Memory region is created in instance_init(), merge it into function
realize(). There is no special class_init() for loongarch_pch object.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/hw/intc
:
1. Modify name of macro for acpi ged register from ACPI spec, and also add
comments for macro definition.
---
Bibo Mao (2):
acpi: ged: Add macro for acpi sleep control register
hw/loongarch/virt: Add FDT table support with acpi ged pm register
hw/acpi/generic_event_device.c
Macro definition is added for acpi sleep control register, ged emulation
driver can use the macro , also it can be used in FDT table if ged is
exposed with FDT table.
Signed-off-by: Bibo Mao
---
hw/acpi/generic_event_device.c | 6 +++---
include/hw/acpi/generic_event_device.h | 7
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
---
hw/loongarch/virt.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index
ump fp registers into coredump note segment.
Resolves: Coverity CID 1561133
Signed-off-by: Bibo Mao
Reviewed-by: Richard Henderson
---
target/loongarch/arch_dump.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/target/loongarch/arch_dump.c b/target/loongarch/arch_dum
Variable env->cf[i] is defined as bool type, it cannot be used with left
shifting operation. There is existing api read_fcc(), it can be used when
dumping fp registers into coredump note segment.
Resolves: Coverity CID 1561133
Signed-off-by: Bibo Mao
---
target/loongarch/arch_dump.c
ngArch IPI)
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 29040422aa..8e80110b24 100644
--- a/hw/loongarch/virt.c
+++ b/hw/loongarch/virt.c
@@ -1390,6 +1390,7 @@ static void virt_class_init(Objec
From: bibo mao
Memory region is created in instance_init(), merge it into function
realize(). There is no special class_init() for loongarch_pch object.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git
From: bibo mao
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and
replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON
separately. Also remove unnecessary header files.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c | 24
driver can inherit from pic common driver.
bibo mao (5):
hw/intc/loongarch_pic: Add loongarch pch pic common driver
hw/intc/loongarch_pch: Merge instance_init() into realize()
include: Add loongarch_pic_common header file
hw/intc/loongarch_pch: Inherit from loongarch_pic_common
hw/intc
From: bibo mao
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object,
it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has
its own realize() function.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pch_pic.c | 65 +
hw/intc
From: bibo mao
For header file hw/intc/loongarch_pch_pic.h, add common file
hw/intc/loongarch_pic_common.h and remove duplicated macro definition
in file loongarch_pch_pic.h
Signed-off-by: Bibo Mao
---
include/hw/intc/loongarch_pch_pic.h | 36 +
1 file changed, 6
From: bibo mao
Add pch pic common driver, so that it can be shared with KVM and
TCG driver, put vmstate and property, vmstate load and store interface
in this pic common driver.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_pic_common.c | 97 ++
include/hw/intc
syscon method in FDT table, only that acpi ged pm register is accessed
with 8-bit mode, rather with 32-bit mode.
---
v1 ... v2:
1. Modify name of macro for acpi ged register from ACPI spec, and also add
comments for macro definition.
---
Bibo Mao (2):
acpi: ged: Add macro for acpi sleep control
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
---
hw/loongarch/virt.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index
Macro definition is added for acpi sleep control register, so that
ged emulation driver can use this, also it can be used in FDT table if
ged is exposed with FDT table.
Signed-off-by: Bibo Mao
---
hw/acpi/generic_event_device.c | 6 +++---
hw/i386/acpi-microvm.c | 2
Signed-off-by: Bibo Mao
---
hw/loongarch/acpi-build.c | 40 +++
1 file changed, 40 insertions(+)
diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c
index 2638f87434..3912c8d307 100644
--- a/hw/loongarch/acpi-build.c
+++ b/hw/loongarch/acpi-build.c
syscon method in FDT table, only that acpi ged pm register is accessed
with 8-bit mode, rather in 32-bit mode.
Bibo Mao (2):
acpi: ged: Add macro for acpi ged sleep register
hw/loongarch/virt: Add FDT table support with acpi ged pm register
hw/acpi/generic_event_device.c | 6 ++--
hw
Macro definition is added for acpi ged sleep register, so that ged
emulation driver can use this, also it can be used in FDT table if
ged is exposed with FDT table.
Signed-off-by: Bibo Mao
---
hw/acpi/generic_event_device.c | 6 +++---
include/hw/acpi/generic_event_device.h | 3 +++
2
syscon method in FDT table, only that acpi ged pm register is accessed
with 8-bit mode, rather in 32-bit mode.
Signed-off-by: Bibo Mao
---
hw/loongarch/virt.c | 39 +++
1 file changed, 39 insertions(+)
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index
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
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
target/loongarch/cpu.c
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 | 60
loongarch_cpu_reset_hold(), so that VM can reboot with edk2-stable202408
UEFI bios.
Signed-off-by: Bibo Mao
---
target/loongarch/cpu.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 5e85b9dbef..2f4d635d03 100644
--- a/target
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
---
hw/loongarch/Kconfig | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/loongarch/Kconfig b/hw/loongarch/Kconfig
index 0de713a439..9c69170968
Add the support needed for creating prstatus elf notes. This allows
us to use QMP dump-guest-memory.
Now ELF notes of LoongArch only supports general elf notes, LSX and
LASX is not supported, since it is mainly used to dump guest memory.
Signed-off-by: Bibo Mao
---
target/loongarch/arch_dump.c
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
---
target/loongarch/cpu.c | 2 +-
target/loongarch/kvm/kvm.c | 5
Loongarch ipi is added herei, it inherits from class
TYPE_LOONGSON_IPI_COMMON, and two interfaces get_iocsr_as() and
cpu_by_arch_id() are added for Loongarch 3A5000 machine. It can
be used when ipi is emulated in userspace with kvm mode.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_ipi.c
Loongarch ipi inherits from class LoongsonIPICommonClass, and it only
contains Loongarch 3A5000 virt machine specific interfaces, rather than
mix different machine implementations together.
Signed-off-by: Bibo Mao
---
hw/intc/Kconfig | 3 +++
hw/intc/meson.build | 1 +
hw
Like loongarch ipi, reconstruct this driver by inheriting class
LoongsonIPICommonClass. Add extra function loongson_ipi_realize()
to implement mmio memory region.
Signed-off-by: Bibo Mao
---
hw/intc/loongson_ipi.c | 330 +++--
hw/intc/meson.build
other search
methods such binary searching method.
Signed-off-by: Bibo Mao
---
hw/intc/loongson_ipi_common.c | 394 ++
include/hw/intc/loongson_ipi_common.h | 77 +
2 files changed, 471 insertions(+)
create mode 100644 hw/intc/loongson_ipi_common.c
create mode
3A5000 irqchip in kernel mode soon.
Also Loongarch ipi and loongson ipi device are added here, it inherits
from base class TYPE_LOONGSON_IPI_COMMON. Loongarch ipi is tested,
loongson ipi device only passes to compile and make check, it is not
tested.
Bibo Mao (4):
hw/intc/loongson_ipi_common: Add
Loongarch ipi is added here and ipi is emulated in userspace when
running in kvm mode. It inherits from TYPE_LOONGSON_IPI_COMMON class,
and two interfaces get_iocsr_as() and cpu_by_arch_id() is added
for Loongarch 3A5000 machine.
Signed-off-by: Bibo Mao
---
hw/intc/loongarch_ipi.c | 80
Loongarch ipi inherits from class LoongsonIPICommonClass, and it only
contains Loongarch 3A5000 virt machine specific interfaces, rather than
mix different machine implementations together.
Signed-off-by: Bibo Mao
---
hw/intc/Kconfig | 3 +++
hw/intc/meson.build | 1 +
hw
base class
TYPE_LOONGSON_IPI_COMMON.
Bibo Mao (3):
hw/intc/loongson_ipi_common: Add loongson ipi common class
hw/intc/loongarch_ipi: Add loongarch ipi support
hw/loongarch/virt: Replace loongson ipi with loongarch ipi
hw/intc/Kconfig | 3 +
hw/intc/loongarch_ipi.c
another search
method such binary searching method.
Signed-off-by: Bibo Mao
---
hw/intc/loongson_ipi_common.c | 394 ++
include/hw/intc/loongson_ipi_common.h | 71 +
2 files changed, 465 insertions(+)
create mode 100644 hw/intc/loongson_ipi_common.c
create mode
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
---
hw/loongarch/virt.c | 15 +++
1 file
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
---
v2 ... v3:
1. Refresh patch based on the latest version, succeed in
1 - 100 of 217 matches
Mail list logo