diff --git a/SOURCES/0005-Enable-disable-devices-for-RHEL.patch b/SOURCES/0005-Enable-disable-devices-for-RHEL.patch index 97c53b4..e23ec51 100644 --- a/SOURCES/0005-Enable-disable-devices-for-RHEL.patch +++ b/SOURCES/0005-Enable-disable-devices-for-RHEL.patch @@ -115,7 +115,7 @@ new file mode 100644 index 0000000000..aec1831199 --- /dev/null +++ b/configs/devices/aarch64-softmmu/aarch64-rh-devices.mak -@@ -0,0 +1,41 @@ +@@ -0,0 +1,43 @@ +include ../rh-virtio.mak + +CONFIG_ARM_GIC_KVM=y @@ -126,11 +126,13 @@ index 0000000000..aec1831199 +CONFIG_CXL=y +CONFIG_CXL_MEM_DEVICE=y +CONFIG_EDID=y ++CONFIG_IVSHMEM_DEVICE=y +CONFIG_PCIE_PORT=y +CONFIG_PCIE_PCI_BRIDGE=y +CONFIG_PCI_DEVICES=y +CONFIG_PCI_TESTDEV=y +CONFIG_PFLASH_CFI01=y ++CONFIG_QXL=y +CONFIG_SCSI=y +CONFIG_SEMIHOSTING=y +CONFIG_USB=y @@ -245,7 +247,7 @@ new file mode 100644 index 0000000000..ce5be73633 --- /dev/null +++ b/configs/devices/x86_64-softmmu/x86_64-rh-devices.mak -@@ -0,0 +1,110 @@ +@@ -0,0 +1,112 @@ +include ../rh-virtio.mak + +CONFIG_ACPI=y @@ -290,6 +292,7 @@ index 0000000000..ce5be73633 +CONFIG_ISA_BUS=y +CONFIG_ISA_DEBUG=y +CONFIG_ISA_TESTDEV=y ++CONFIG_IVSHMEM_DEVICE=y +CONFIG_LPC_ICH9=y +CONFIG_MC146818RTC=y +CONFIG_MEM_DEVICE=y @@ -311,6 +314,7 @@ index 0000000000..ce5be73633 +CONFIG_PFLASH_CFI01=y +CONFIG_PVPANIC_ISA=y +CONFIG_PXB=y ++CONFIG_QXL=y +CONFIG_Q35=y +CONFIG_RTL8139_PCI=y +CONFIG_SCSI=y diff --git a/SPECS/qemu-kvm.spec b/SPECS/qemu-kvm.spec index 3d6f1e2..6c79a05 100644 --- a/SPECS/qemu-kvm.spec +++ b/SPECS/qemu-kvm.spec @@ -12,18 +12,22 @@ %endif %global have_usbredir 1 +%global have_spice 1 +%global have_virgl 1 %global have_opengl 1 %global have_fdt 1 %global have_modules_load 0 %global have_memlock_limits 0 # Some of these are not relevant for RHEL, but defining them # makes it easier to sync the dependency list with Fedora +%global have_block_gluster 1 +%global have_block_iscsi 1 %global have_block_rbd 1 +%global have_block_ssh 1 %global enable_werror 1 %global have_clang 1 %global have_safe_stack 0 - %if %{have_clang} %global toolchain clang %ifarch x86_64 @@ -60,6 +64,9 @@ %ifnarch %{ix86} x86_64 aarch64 %global have_usbredir 0 + %global have_spice 0 + %global have_virgl 0 + %global have_opengl 0 %endif %ifnarch s390x @@ -81,8 +88,9 @@ %endif %ifarch x86_64 %global kvm_target x86_64 -%else - %global have_opengl 0 +%endif +%ifarch aarch64 + %global kvm_target aarch64 %endif %ifarch %{power64} %global kvm_target ppc64 @@ -95,61 +103,77 @@ %ifarch ppc %global kvm_target ppc %endif -%ifarch aarch64 - %global kvm_target aarch64 -%endif %global target_list %{kvm_target}-softmmu -%global block_drivers_rw_list qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,compress,virtio-blk-vhost-vdpa,virtio-blk-vfio-pci,virtio-blk-vhost-user,io_uring,nvme-io_uring -%global block_drivers_ro_list vdi,vmdk,vhdx,vpc,https,host_cdrom +%global block_drivers_rw_list qcow2,raw,file,host_device,nbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,compress,virtio-blk-vhost-vdpa,virtio-blk-vfio-pci,virtio-blk-vhost-user,io_uring,nvme-io_uring +%if 0%{have_block_gluster} + %global block_drivers_rw_list %{block_drivers_rw_list},gluster +%endif +%if 0%{have_block_iscsi} + %global block_drivers_rw_list %{block_drivers_rw_list},iscsi +%endif +%if 0%{have_block_rbd} + %global block_drivers_rw_list %{block_drivers_rw_list},rbd +%endif +%global block_drivers_ro_list vdi,vmdk,vhdx,vpc,https +%if 0%{have_block_ssh} + %global block_drivers_ro_list %{block_drivers_rw_list},ssh +%endif %define qemudocdir %{_docdir}/%{name} %global firmwaredirs "%{_datadir}/qemu-firmware:%{_datadir}/ipxe/qemu:%{_datadir}/seavgabios:%{_datadir}/seabios" #Versions of various parts: %global requires_all_modules \ +%if %{have_spice} \ +Requires: %{name}-ui-spice = %{epoch}:%{version}-%{release} \ +%endif \ %if %{have_opengl} \ Requires: %{name}-ui-opengl = %{epoch}:%{version}-%{release} \ Requires: %{name}-ui-egl-headless = %{epoch}:%{version}-%{release} \ %endif \ Requires: %{name}-device-display-virtio-gpu = %{epoch}:%{version}-%{release} \ +%ifarch x86_64 aarch64 %{power64} \ +Requires: %{name}-device-display-virtio-gpu-gl = %{epoch}:%{version}-%{release} \ +%endif \ %ifarch s390x \ Requires: %{name}-device-display-virtio-gpu-ccw = %{epoch}:%{version}-%{release} \ %else \ Requires: %{name}-device-display-virtio-gpu-pci = %{epoch}:%{version}-%{release} \ +%ifarch x86_64 aarch64 %{power64} \ +Requires: %{name}-device-display-virtio-gpu-pci-gl = %{epoch}:%{version}-%{release} \ +%endif \ %endif \ %ifarch x86_64 %{power64} \ Requires: %{name}-device-display-virtio-vga = %{epoch}:%{version}-%{release} \ +Requires: %{name}-device-display-virtio-vga-gl = %{epoch}:%{version}-%{release} \ +%endif \ +%if %{have_virgl} \ +Requires: %{name}-device-display-vhost-user-gpu = %{epoch}:%{version}-%{release} \ %endif \ Requires: %{name}-device-usb-host = %{epoch}:%{version}-%{release} \ %if %{have_usbredir} \ Requires: %{name}-device-usb-redirect = %{epoch}:%{version}-%{release} \ %endif \ Requires: %{name}-block-blkio = %{epoch}:%{version}-%{release} \ -Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \ +%if %{have_block_gluster} \ +Requires: %{name}-block-gluster = %{epoch}:%{version}-%{release} \ +%endif \ +%if %{have_block_iscsi} \ +Requires: %{name}-block-iscsi = %{epoch}:%{version}-%{release} \ +%endif \ +%if %{have_block_rbd} \ +Requires: %{name}-block-rbd = %{epoch}:%{version}-%{release} \ +%endif \ +%if %{have_block_ssh} \ +Requires: %{name}-block-ssh = %{epoch}:%{version}-%{release} \ +%endif \ Requires: %{name}-audio-pa = %{epoch}:%{version}-%{release} -# Since SPICE is removed from RHEL-9, the following Obsoletes: -# removes {name}-ui-spice for upgrades from RHEL-8 -# The "<= {version}" assumes RHEL-9 version >= RHEL-8 version (in -# other words RHEL-9 rebases are done together/before RHEL-8 ones) - -# In addition, we obsolete some block drivers as we are no longer support -# them in default qemu-kvm installation. - -# Note: ssh driver wasn't removed yet just disabled due to late handling - -%global obsoletes_some_modules \ -Obsoletes: %{name}-ui-spice <= %{epoch}:%{version} \ -Obsoletes: %{name}-block-gluster <= %{epoch}:%{version} \ -Obsoletes: %{name}-block-iscsi <= %{epoch}:%{version} \ -Obsoletes: %{name}-block-ssh <= %{epoch}:%{version} \ - - Summary: QEMU is a machine emulator and virtualizer Name: qemu-kvm Version: 8.2.0 -Release: 11%{?rcrel}%{?dist}%{?cc_suffix}.4.inferit +Release: 11%{?rcrel}%{?dist}%{?cc_suffix}.4.inferit.1 # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped # Epoch 15 used for RHEL 8 # Epoch 17 used for RHEL 9 (due to release versioning offset in RHEL 8.5) @@ -661,9 +685,18 @@ BuildRequires: python3-sphinx_rtd_theme BuildRequires: libseccomp-devel >= %{libseccomp_version} # For network block driver BuildRequires: libcurl-devel +%if %{have_block_gluster} +BuildRequires: glusterfs-api-devel +%endif +%if %{have_block_iscsi} +BuildRequires: libiscsi-devel +%endif %if %{have_block_rbd} BuildRequires: librbd-devel %endif +%if %{have_block_ssh} +BuildRequires: libssh-devel +%endif # We need both because the 'stap' binary is probed for by configure BuildRequires: systemtap BuildRequires: systemtap-sdt-devel @@ -703,6 +736,16 @@ BuildRequires: perl-Test-Harness BuildRequires: libslirp-devel BuildRequires: pulseaudio-libs-devel BuildRequires: spice-protocol +%if %{have_spice} +BuildRequires: spice-server-devel +BuildRequires: libcacard-devel +# For smartcard NSS support +BuildRequires: nss-devel +%endif +%if %{have_virgl} +# virgl 3d support +BuildRequires: virglrenderer-devel +%endif BuildRequires: capstone-devel # Requires for qemu-kvm package @@ -722,7 +765,6 @@ hardware for a full system such as a PC and its associated peripherals. %package core Summary: %{name} core components -%{obsoletes_some_modules} Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: qemu-img = %{epoch}:%{version}-%{release} %ifarch %{ix86} x86_64 @@ -769,10 +811,6 @@ Requires: seabios-bin >= 1.10.2-1 Requires: seavgabios-bin >= 1.12.0-3 Requires: ipxe-roms-qemu >= %{ipxe_version} %endif -# Removal -gl modules as they do not provide any functionality - see bz#2149022 -Obsoletes: %{name}-device-display-virtio-gpu-gl <= %{epoch}:%{version} -Obsoletes: %{name}-device-display-virtio-gpu-pci-gl <= %{epoch}:%{version} -Obsoletes: %{name}-device-display-virtio-vga-gl <= %{epoch}:%{version} %description common %{name} is an open source virtualizer that provides hardware emulation for @@ -854,7 +892,26 @@ This package provides the additional CURL block driver for QEMU. Install this package if you want to access remote disks over http, https, ftp and other transports provided by the CURL library. +%if %{have_block_gluster} +%package block-gluster +Summary: QEMU Gluster block driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description block-gluster +This package provides the additional Gluster block driver for QEMU. +Install this package if you want to access remote Gluster storage. +%endif + +%if %{have_block_iscsi} +%package block-iscsi +Summary: QEMU iSCSI block driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} + +%description block-iscsi +This package provides the additional iSCSI block driver for QEMU. + +Install this package if you want to access iSCSI volumes. +%endif %if %{have_block_rbd} %package block-rbd @@ -867,6 +924,17 @@ Install this package if you want to access remote Ceph volumes using the rbd protocol. %endif +%if %{have_block_ssh} +%package block-ssh +Summary: QEMU SSH block driver +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} + +%description block-ssh +This package provides the additional SSH block driver for QEMU. + +Install this package if you want to access remote disks using +the Secure Shell (SSH) protocol. +%endif %package audio-pa Summary: QEMU PulseAudio audio driver @@ -874,6 +942,16 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description audio-pa This package provides the additional PulseAudio audio driver for QEMU. +%if %{have_spice} +%package ui-spice +Summary: QEMU spice support +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%if %{have_opengl} +Requires: %{name}-ui-opengl%{?_isa} = %{epoch}:%{version}-%{release} +%endif +%description ui-spice +This package provides spice support. +%endif %if %{have_opengl} %package ui-opengl @@ -893,6 +971,13 @@ Requires: %{name}-ui-opengl%{?_isa} = %{epoch}:%{version}-%{release} This package provides the additional egl-headless UI for QEMU. %endif +%if %{have_virgl} +%package device-display-vhost-user-gpu +Summary: QEMU QXL display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-vhost-user-gpu +This package provides the vhost-user-gpu display device for QEMU. +%endif %package device-display-virtio-gpu Summary: QEMU virtio-gpu display device @@ -900,20 +985,35 @@ Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description device-display-virtio-gpu This package provides the virtio-gpu display device for QEMU. +%ifarch x86_64 aarch64 %{power64} +%package device-display-virtio-gpu-gl +Summary: QEMU virtio-gpu-gl display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-virtio-gpu-gl +This package provides the virtio-gpu-gl display device for QEMU. +%endif + %ifarch s390x %package device-display-virtio-gpu-ccw Summary: QEMU virtio-gpu-ccw display device Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-device-display-virtio-gpu = %{epoch}:%{version}-%{release} %description device-display-virtio-gpu-ccw This package provides the virtio-gpu-ccw display device for QEMU. %else %package device-display-virtio-gpu-pci Summary: QEMU virtio-gpu-pci display device Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-device-display-virtio-gpu = %{epoch}:%{version}-%{release} %description device-display-virtio-gpu-pci This package provides the virtio-gpu-pci display device for QEMU. +%ifarch x86_64 aarch64 %{power64} +%package device-display-virtio-gpu-pci-gl +Summary: QEMU virtio-gpu-pci-gl display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-virtio-gpu-pci-gl +This package provides the virtio-gpu-pci-gl display device for QEMU. +%else +Obsoletes: %{name}-device-display-virtio-gpu-pci-gl <= %{epoch}:%{version} +%endif %endif %ifarch x86_64 %{power64} @@ -922,6 +1022,11 @@ Summary: QEMU virtio-vga display device Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} %description device-display-virtio-vga This package provides the virtio-vga display device for QEMU. +%package device-display-virtio-vga-gl +Summary: QEMU virtio-vga-gl display device +Requires: %{name}-common%{?_isa} = %{epoch}:%{version}-%{release} +%description device-display-virtio-vga-gl +This package provides the virtio-vga-gl display device for QEMU. %endif %package device-usb-host @@ -1162,12 +1267,21 @@ run_configure \ --enable-fdt=system \ %endif --enable-gio \ +%if %{have_block_gluster} + --enable-glusterfs \ +%endif --enable-gnutls \ --enable-guest-agent \ --enable-iconv \ --enable-kvm \ +%if %{have_block_iscsi} + --enable-libiscsi \ +%endif %if %{have_pmem} --enable-libpmem \ +%endif +%if %{have_block_ssh} + --enable-libssh \ %endif --enable-libusb \ --enable-libudev \ @@ -1195,6 +1309,10 @@ run_configure \ --enable-selinux \ --enable-slirp \ --enable-snappy \ +%if %{have_spice} + --enable-smartcard \ + --enable-spice \ +%endif --enable-spice-protocol \ --enable-system \ --enable-tcg \ @@ -1209,6 +1327,9 @@ run_configure \ --enable-vhost-user \ --enable-vhost-user-blk-server \ --enable-vhost-vdpa \ +%if %{have_virgl} + --enable-virglrenderer \ +%endif --enable-vnc \ --enable-png \ --enable-vnc-sasl \ @@ -1473,16 +1594,6 @@ install -D -m 0644 %{_sourcedir}/bridge.conf %{buildroot}%{_sysconfdir}/%{name}/ install -m 0644 contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir} install -m 0644 contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir} -# We do not support gl display devices so we can remove their modules as they -# do not have expected functionality included. -# -# https://gitlab.com/qemu-project/qemu/-/issues/1352 was filed to stop building these -# modules in case all dependencies are not satisfied. - -rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-virtio-gpu-gl.so -rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-virtio-gpu-pci-gl.so -rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-virtio-vga-gl.so - # We need to make the block device modules and other qemu SO files executable # otherwise RPM won't pick up their dependencies. chmod +x %{buildroot}%{_libdir}/%{name}/*.so @@ -1494,6 +1605,12 @@ rm -rf %{buildroot}%{qemudocdir}/specs # endif !tools_only %endif +%if %{have_virgl} +# Move vhost-user JSON files to the standard "qemu" directory +mkdir -p %{buildroot}%{_datadir}/qemu +mv %{buildroot}%{_datadir}/%{name}/vhost-user %{buildroot}%{_datadir}/qemu/ +%endif + %check %if !%{tools_only} @@ -1634,20 +1751,37 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_libdir}/%{name}/accel-tcg-%{kvm_target}.so %endif +%if %{have_virgl} +%files device-display-vhost-user-gpu + %{_datadir}/qemu/vhost-user/50-qemu-gpu.json + %{_libexecdir}/vhost-user-gpu +%endif + %files device-display-virtio-gpu %{_libdir}/%{name}/hw-display-virtio-gpu.so +%ifarch x86_64 aarch64 %{power64} +%files device-display-virtio-gpu-gl + %{_libdir}/%{name}/hw-display-virtio-gpu-gl.so +%endif + %ifarch s390x %files device-display-virtio-gpu-ccw %{_libdir}/%{name}/hw-s390x-virtio-gpu-ccw.so %else %files device-display-virtio-gpu-pci %{_libdir}/%{name}/hw-display-virtio-gpu-pci.so +%ifarch x86_64 aarch64 %{power64} +%files device-display-virtio-gpu-pci-gl + %{_libdir}/%{name}/hw-display-virtio-gpu-pci-gl.so +%endif %endif %ifarch x86_64 %{power64} %files device-display-virtio-vga %{_libdir}/%{name}/hw-display-virtio-vga.so +%files device-display-virtio-vga-gl + %{_libdir}/%{name}/hw-display-virtio-vga-gl.so %endif %files tests @@ -1659,18 +1793,47 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %files block-curl %{_libdir}/%{name}/block-curl.so + +%if %{have_block_gluster} +%files block-gluster + %{_libdir}/%{name}/block-gluster.so +%endif + +%if %{have_block_iscsi} +%files block-iscsi + %{_libdir}/qemu-kvm/block-iscsi.so +%endif + %if %{have_block_rbd} %files block-rbd -%{_libdir}/%{name}/block-rbd.so + %{_libdir}/%{name}/block-rbd.so +%endif + +%if %{have_block_ssh} +%files block-ssh + %{_libdir}/qemu-kvm/block-ssh.so %endif + %files audio-pa %{_libdir}/%{name}/audio-pa.so +%if 0%{have_spice} +%files ui-spice + %{_libdir}/qemu-kvm/audio-spice.so + %{_libdir}/qemu-kvm/chardev-spice.so + %{_libdir}/qemu-kvm/ui-spice-core.so + %{_libdir}/qemu-kvm/ui-spice-app.so + %{_libdir}/qemu-kvm/hw-usb-smartcard.so +%ifarch x86_64 aarch64 + %{_libdir}/qemu-kvm/hw-display-qxl.so +%endif +%endif + %if %{have_opengl} %files ui-opengl -%{_libdir}/%{name}/ui-opengl.so + %{_libdir}/%{name}/ui-opengl.so %files ui-egl-headless -%{_libdir}/%{name}/ui-egl-headless.so + %{_libdir}/%{name}/ui-egl-headless.so %endif %files device-usb-host @@ -1691,6 +1854,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %changelog +* Tue Aug 16 2024 Dmitry Samoylik - 8.2.0-11.4.inferit.1 +- SPICE enable + * Wed Jul 03 2024 Sergey Cherevko - 8.2.0-11.4.inferit - Update to 8.2.0-11.el9_4.4