From ace027d0c0aaff85ebc81c5c2f022a1112bc9f2e Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Thu, 11 Nov 2021 14:25:38 +0800 Subject: [PATCH 1/3] add Phytium's CPU models: FT-2000+ and Tengyun-S2500. Signed-off-by: Jiadong Zeng --- ...CPU-models-FT-2000-and-Tengyun-S2500.patch | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 add-Phytium-s-CPU-models-FT-2000-and-Tengyun-S2500.patch diff --git a/add-Phytium-s-CPU-models-FT-2000-and-Tengyun-S2500.patch b/add-Phytium-s-CPU-models-FT-2000-and-Tengyun-S2500.patch new file mode 100644 index 0000000..bdf4931 --- /dev/null +++ b/add-Phytium-s-CPU-models-FT-2000-and-Tengyun-S2500.patch @@ -0,0 +1,73 @@ +From ea7a395de920cfecd9bf99f0cf55914d47718edf Mon Sep 17 00:00:00 2001 +From: Jiadong Zeng +Date: Thu, 11 Nov 2021 14:25:38 +0800 +Subject: [PATCH] add Phytium's CPU models: FT-2000+ and Tengyun-S2500. + +Signed-off-by: Jiadong Zeng +--- + hw/arm/virt.c | 2 ++ + target/arm/cpu64.c | 28 ++++++++++++++++++++++++++++ + 2 files changed, 30 insertions(+) + +diff --git a/hw/arm/virt.c b/hw/arm/virt.c +index 7506d0ff32..0e46260116 100644 +--- a/hw/arm/virt.c ++++ b/hw/arm/virt.c +@@ -195,6 +195,8 @@ static const char *valid_cpus[] = { + ARM_CPU_TYPE_NAME("cortex-a57"), + ARM_CPU_TYPE_NAME("cortex-a72"), + ARM_CPU_TYPE_NAME("Kunpeng-920"), ++ ARM_CPU_TYPE_NAME("FT-2000+"), ++ ARM_CPU_TYPE_NAME("Tengyun-S2500"), + ARM_CPU_TYPE_NAME("host"), + ARM_CPU_TYPE_NAME("max"), + }; +diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c +index a1649f8844..4cf5b89db0 100644 +--- a/target/arm/cpu64.c ++++ b/target/arm/cpu64.c +@@ -327,6 +327,32 @@ static void cpu_max_set_sve_vq(Object *obj, Visitor *v, const char *name, + error_propagate(errp, err); + } + ++static void aarch64_max_ft2000plus_initfn(Object *obj) ++{ ++ ARMCPU *cpu = ARM_CPU(obj); ++ ++ if (kvm_enabled()) { ++ kvm_arm_set_cpu_features_from_host(cpu); ++ kvm_arm_add_vcpu_properties(obj); ++ } else { ++ aarch64_a72_initfn(obj); ++ cpu->midr = 0x70186622; ++ } ++} ++ ++static void aarch64_max_tengyun_s2500_initfn(Object *obj) ++{ ++ ARMCPU *cpu = ARM_CPU(obj); ++ ++ if (kvm_enabled()) { ++ kvm_arm_set_cpu_features_from_host(cpu); ++ kvm_arm_add_vcpu_properties(obj); ++ } else { ++ aarch64_a72_initfn(obj); ++ cpu->midr = 0x70186632; ++ } ++} ++ + /* -cpu max: if KVM is enabled, like -cpu host (best possible with this host); + * otherwise, a CPU with as many features enabled as our emulation supports. + * The version of '-cpu max' for qemu-system-arm is defined in cpu.c; +@@ -442,6 +468,8 @@ static const ARMCPUInfo aarch64_cpus[] = { + { .name = "cortex-a53", .initfn = aarch64_a53_initfn }, + { .name = "cortex-a72", .initfn = aarch64_a72_initfn }, + { .name = "Kunpeng-920", .initfn = aarch64_kunpeng_920_initfn }, ++ { .name = "FT-2000+", .initfn = aarch64_max_ft2000plus_initfn }, ++ { .name = "Tengyun-S2500", .initfn = aarch64_max_tengyun_s2500_initfn }, + { .name = "max", .initfn = aarch64_max_initfn }, + { .name = NULL } + }; +-- +2.27.0 + -- Gitee From 03d2f52649012a8309e19861c6944e31f3d3982d Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Tue, 21 Dec 2021 21:28:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?spec:=20Update=20patch=20and=20changelog=20?= =?UTF-8?q?with=20!211=20add=20Phytium's=20CPU=20models:=20FT-2000+=20and?= =?UTF-8?q?=20Tengyun-S2500.=20Merge=20pull=20request=20!211=20from=20?= =?UTF-8?q?=E6=9B=BE=E4=BD=B3=E6=A0=8B/qemu-4.1.0=20!211?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit add Phytium's CPU models: FT-2000+ and Tengyun-S2500. Signed-off-by: Chen Qun --- qemu.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qemu.spec b/qemu.spec index 29b5769..1cc63ca 100644 --- a/qemu.spec +++ b/qemu.spec @@ -563,6 +563,7 @@ Patch0550: virtio-net-fix-use-after-unmap-free-for-sg.patch Patch0551: fix-cve-2020-35504.patch Patch0552: fix-cve-2020-35505.patch Patch0553: virtio-balloon-apply-upstream-patch.patch +Patch0554: add-Phytium-s-CPU-models-FT-2000-and-Tengyun-S2500.patch BuildRequires: flex BuildRequires: gcc @@ -966,6 +967,9 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Tue Dec 21 2021 Chen Qun +- add Phytium's CPU models: FT-2000+ and Tengyun-S2500. + * Fri Dec 03 2021 Chen Qun - virtio-balloon: apply upstream patch. -- Gitee From f411d466d705c35eca9762f93d46a0a4f522c9d5 Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Tue, 21 Dec 2021 21:28:15 +0800 Subject: [PATCH 3/3] spec: Update release version with !211 increase release verison by one Signed-off-by: Chen Qun --- qemu.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu.spec b/qemu.spec index 1cc63ca..5aa7672 100644 --- a/qemu.spec +++ b/qemu.spec @@ -1,6 +1,6 @@ Name: qemu Version: 4.1.0 -Release: 83 +Release: 84 Epoch: 2 Summary: QEMU is a generic and open source machine emulator and virtualizer License: GPLv2 and BSD and MIT and CC-BY-SA-4.0 -- Gitee