From 598ad396bdc1c49574bd0fff822598dbe9a1e680 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 4 Dec 2020 14:50:13 +0000 Subject: [PATCH 1/2] Enable qemu-kvm-core package on riscv64. (cherry picked from commit d283ab8f84a33e64086ee5ccef3d893af80a9863) --- qemu.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qemu.spec b/qemu.spec index 81f22f8..e664e59 100644 --- a/qemu.spec +++ b/qemu.spec @@ -23,6 +23,9 @@ %ifarch %{mips} %global kvm_package system-mips %endif +%ifarch riscv64 +%global kvm_package system-riscv +%endif %global user_static 1 @@ -184,7 +187,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 5.1.0 -Release: 7%{?rcrel}%{?dist} +Release: 8%{?rcrel}%{?dist} Epoch: 2 License: GPLv2 and BSD and MIT and CC-BY URL: http://www.qemu.org/ @@ -1915,6 +1918,9 @@ getent passwd qemu >/dev/null || \ %changelog +* Thu Dec 03 2020 Richard W.M. Jones - 5.2.0-0.9.rc4 +- Enable qemu-kvm-core package on riscv64. + * Thu Dec 03 2020 Cole Robinson - 5.1.0-7 - vhost-vsock-pci regressions (bz #1902057) From 95cc694fb2feef3de8f06d4712855fdead0d05ab Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 11 Jan 2021 10:56:01 +0100 Subject: [PATCH 2/2] remove qemu-kvm script in favor of symlink Since QEMU 4.0 upstream supported automatically favoring KVM if the executable ends with "kvm". Unlike the script that is currently in use, this allows the user to specify an alternative accelerator with "-accel". Signed-off-by: Paolo Bonzini --- qemu-kvm.sh | 10 ---------- qemu.spec | 11 ++++++----- 2 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 qemu-kvm.sh diff --git a/qemu-kvm.sh b/qemu-kvm.sh deleted file mode 100644 index 87cf89c..0000000 --- a/qemu-kvm.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Libvirt introspects the binary using -M none. In that case, don't try -# to init KVM, which will fail and be noisy if the host has kvm disabled -opts="-machine accel=kvm" -if echo "$@" | grep -q " -M none "; then - opts= -fi - -exec /usr/bin/qemu-system-x86_64 $opts "$@" diff --git a/qemu.spec b/qemu.spec index e664e59..559ea50 100644 --- a/qemu.spec +++ b/qemu.spec @@ -187,7 +187,7 @@ Summary: QEMU is a FAST! processor emulator Name: qemu Version: 5.1.0 -Release: 8%{?rcrel}%{?dist} +Release: 9%{?rcrel}%{?dist} Epoch: 2 License: GPLv2 and BSD and MIT and CC-BY URL: http://www.qemu.org/ @@ -201,8 +201,6 @@ Source17: qemu-ga.sysconfig Source11: 99-qemu-guest-agent.rules # /etc/qemu/bridge.conf Source12: bridge.conf -# qemu-kvm back compat wrapper installed as /usr/bin/qemu-kvm -Source13: qemu-kvm.sh # PR manager service Source14: qemu-pr-helper.service Source15: qemu-pr-helper.socket @@ -1313,7 +1311,7 @@ done # Install kvm specific source bits, and qemu-kvm manpage %if 0%{?need_qemu_kvm} ln -sf qemu.1.gz %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz -install -m 0755 %{_sourcedir}/qemu-kvm.sh %{buildroot}%{_bindir}/qemu-kvm +ln -sf qemu-system-x86_64 %{buildroot}%{_bindir}/qemu-kvm install -D -p -m 0644 %{_sourcedir}/kvm-x86.modprobe.conf %{buildroot}%{_sysconfdir}/modprobe.d/kvm.conf %endif @@ -1918,7 +1916,10 @@ getent passwd qemu >/dev/null || \ %changelog -* Thu Dec 03 2020 Richard W.M. Jones - 5.2.0-0.9.rc4 +* Mon Jan 11 2021 Paolo Bonzini - 5.1.0-9 +- Use symlink for qemu-kvm. + +* Thu Dec 03 2020 Richard W.M. Jones - 5.1.0-8 - Enable qemu-kvm-core package on riscv64. * Thu Dec 03 2020 Cole Robinson - 5.1.0-7