From 9f2cd1716dfbee635f6051cc154871e141dcd9b8 Mon Sep 17 00:00:00 2001 From: laokz Date: Sun, 19 Feb 2023 14:27:32 +0800 Subject: [PATCH] add riscv64 buildarch and fix its IO tests error --- ...iscv-virt-machine-mapping-to-testenv.patch | 30 +++++++++++++++++++ qemu.spec | 11 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 add-riscv-virt-machine-mapping-to-testenv.patch diff --git a/add-riscv-virt-machine-mapping-to-testenv.patch b/add-riscv-virt-machine-mapping-to-testenv.patch new file mode 100644 index 00000000..e17e52f8 --- /dev/null +++ b/add-riscv-virt-machine-mapping-to-testenv.patch @@ -0,0 +1,30 @@ +commit 3213bbaf5797cc405e57f122e72c1fb55d0b08ab +Author: laokz +Date: Tue Mar 8 12:33:39 2022 +0800 + + tests: add (riscv virt) machine mapping to testenv + + Some qemu-iotests(040 etc) use PCI disk to do test. Without the + mapping, RISC-V flavor use spike as default machine which has no + PCI bus, causing test failure. + + Resolves: https://gitlab.com/qemu-project/qemu/-/issues/894 + + Signed-off-by: Kai Zhang + Message-Id: + Reviewed-by: Alistair Francis + Signed-off-by: Hanna Reitz + +diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py +index b11e943c8a..a864c74b12 100644 +--- a/tests/qemu-iotests/testenv.py ++++ b/tests/qemu-iotests/testenv.py +@@ -235,6 +235,8 @@ def __init__(self, imgfmt: str, imgproto: str, aiomode: str, + ('aarch64', 'virt'), + ('avr', 'mega2560'), + ('m68k', 'virt'), ++ ('riscv32', 'virt'), ++ ('riscv64', 'virt'), + ('rx', 'gdbsim-r5f562n8'), + ('tricore', 'tricore_testboard') + ) diff --git a/qemu.spec b/qemu.spec index 0b05c163..0cf770a6 100644 --- a/qemu.spec +++ b/qemu.spec @@ -3,7 +3,7 @@ Name: qemu Version: 6.2.0 -Release: 66 +Release: 67 Epoch: 10 Summary: QEMU is a generic and open source machine emulator and virtualizer License: GPLv2 and BSD and MIT and CC-BY-SA-4.0 @@ -444,6 +444,7 @@ Patch0429: migration-report-multiFd-related-thread-pid-to-libvi.patch Patch0430: vhost_net-keep-acked_feature-only-for-NET_CLIENT_DRI.patch Patch0431: linux-user-Add-strace-output-for-timer_settime64-sys.patch Patch0432: fix-qemu-core-when-vhost-user-net-config-with-server.patch +Patch0433: add-riscv-virt-machine-mapping-to-testenv.patch BuildRequires: flex BuildRequires: gcc @@ -622,6 +623,10 @@ targetarch="aarch64-softmmu arm-softmmu riscv32-softmmu riscv64-softmmu" buildarch="aarch64-softmmu" targetarch="x86_64-softmmu arm-softmmu riscv32-softmmu riscv64-softmmu" %endif +%ifarch riscv64 +buildarch="riscv64-softmmu" +targetarch="x86_64-softmmu aarch64-softmmu arm-softmmu riscv32-softmmu" +%endif buildldflags="VL_LDFLAGS=-Wl,--build-id" qemubuilddir="build" @@ -976,6 +981,10 @@ getent passwd qemu >/dev/null || \ %endif %changelog +* Tue Mar 28 2023 laokz - 10:6.2.0-67 +- add riscv64 buildarch +- add patch0433(from v7.0.0) to fix riscv64 iotests error + * Wed Mar 22 2023 MinMin Ren - 10:6.2.0-66 - spec: Add multiboot_dma.bin -- Gitee