- target/loongarch: Fix qemu-system-loongarch64 assert - target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d , , 0' - target/loongarch: Fix tlb huge page loading issue - target/loongarch/kvm: Add software breakpoint support - target/loongarch/kvm: sync kernel header files - hw/intc/loongarch_extioi: Add virt extension support - target/loongarch/kvm: Add pmu support - target/loongarch/kvm: Fix vm restore failed - target/loongarch/kvm: Add pv steal time support - target/loongarch/kvm: fpu save the vreg registers high Signed-off-by: Song Gao <gaosong@loongson.cn>
44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 7a3573ce009afa271168829da86e2c70c63fa58a Mon Sep 17 00:00:00 2001
|
|
From: Song Gao <gaosong@loongson.cn>
|
|
Date: Tue, 14 May 2024 19:07:52 +0800
|
|
Subject: [PATCH] target/loongarch/kvm: fpu save the vreg registers high
|
|
192bit
|
|
|
|
On kvm side, get_fpu/set_fpu save the vreg registers high 192bits,
|
|
but QEMU missing.
|
|
|
|
Signed-off-by: Song Gao <gaosong@loongson.cn>
|
|
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
|
|
Message-Id: <20240514110752.989572-1-gaosong@loongson.cn>
|
|
---
|
|
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 e1d521a1de..5c88270132 100644
|
|
--- a/target/loongarch/kvm/kvm.c
|
|
+++ b/target/loongarch/kvm/kvm.c
|
|
@@ -444,6 +444,9 @@ static int kvm_loongarch_get_regs_fp(CPUState *cs)
|
|
env->fcsr0 = fpu.fcsr;
|
|
for (i = 0; i < 32; i++) {
|
|
env->fpr[i].vreg.UD[0] = fpu.fpr[i].val64[0];
|
|
+ env->fpr[i].vreg.UD[1] = fpu.fpr[i].val64[1];
|
|
+ env->fpr[i].vreg.UD[2] = fpu.fpr[i].val64[2];
|
|
+ env->fpr[i].vreg.UD[3] = fpu.fpr[i].val64[3];
|
|
}
|
|
for (i = 0; i < 8; i++) {
|
|
env->cf[i] = fpu.fcc & 0xFF;
|
|
@@ -465,6 +468,9 @@ static int kvm_loongarch_put_regs_fp(CPUState *cs)
|
|
fpu.fcc = 0;
|
|
for (i = 0; i < 32; i++) {
|
|
fpu.fpr[i].val64[0] = env->fpr[i].vreg.UD[0];
|
|
+ fpu.fpr[i].val64[1] = env->fpr[i].vreg.UD[1];
|
|
+ fpu.fpr[i].val64[2] = env->fpr[i].vreg.UD[2];
|
|
+ fpu.fpr[i].val64[3] = env->fpr[i].vreg.UD[3];
|
|
}
|
|
|
|
for (i = 0; i < 8; i++) {
|
|
--
|
|
2.33.0
|
|
|