qemu/qemu.spec

766 lines
30 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:15:46 -04:00
Name: qemu
Version: 6.2.0
Release: 13
2019-09-30 11:15:46 -04:00
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
2019-09-30 11:15:46 -04:00
URL: http://www.qemu.org
Source0: https://www.qemu.org/download/%{name}-%{version}%{?rcstr}.tar.xz
2019-11-06 19:50:55 +08:00
Source1: 80-kvm.rules
Source2: 99-qemu-guest-agent.rules
Source3: bridge.conf
2019-09-30 11:15:46 -04:00
Patch0001: net-dump.c-Suppress-spurious-compiler-warning.patch
Patch0002: cpu-parse-feature-to-avoid-failure.patch
Patch0003: cpu-add-Kunpeng-920-cpu-support.patch
Patch0004: cpu-add-Cortex-A72-processor-kvm-target-support.patch
Patch0005: add-Phytium-s-CPU-models-FT-2000-and-Tengyun-S2500.patch
Patch0006: qapi-block-core-Add-retry-option-for-error-action.patch
Patch0007: block-backend-Introduce-retry-timer.patch
Patch0008: block-backend-Add-device-specific-retry-callback.patch
Patch0009: block-backend-Enable-retry-action-on-errors.patch
Patch0010: block-backend-Add-timeout-support-for-retry.patch
Patch0011: block-Add-error-retry-param-setting.patch
Patch0012: virtio_blk-Add-support-for-retry-on-errors.patch
Patch0013: vhost-cancel-migration-when-vhost-user-restarted-dur.patch
Patch0014: migration-Add-multi-thread-compress-method.patch
Patch0015: migration-Refactoring-multi-thread-compress-migratio.patch
Patch0016: migration-Add-multi-thread-compress-ops.patch
Patch0017: migration-Add-zstd-support-in-multi-thread-compressi.patch
Patch0018: migration-Add-compress_level-sanity-check.patch
Patch0019: doc-Update-multi-thread-compression-doc.patch
Patch0020: Revert-cpu-parse-feature-to-avoid-failure.patch
Patch0021: Revert-cpu-add-Cortex-A72-processor-kvm-target-suppo.patch
Patch0022: 0003-cpu-add-Cortex-A72-processor-kvm-target-support.patch
Patch0023: hugepages-hugepages-files-maybe-leftover.patch
Patch0024: target-i386-Modify-the-VM-s-physical-bits-value-set-.patch
Patch0025: vfio-pci-Ascend310-need-4Bytes-quirk-in-bar4.patch
Patch0026: vfio-pci-Ascend710-need-4Bytes-quirk-in-bar0.patch
Patch0027: vfio-pci-Ascend910-need-4Bytes-quirk-in-bar0.patch
Patch0028: scsi-bus-Refactor-the-code-that-retries-requests.patch
Patch0029: scsi-disk-Add-support-for-retry-on-errors.patch
Patch0030: block-backend-Stop-retrying-when-draining.patch
Patch0031: block-Add-sanity-check-when-setting-retry-parameters.patch
Patch0032: migration-skip-cache_drop-for-bios-bootloader-and-nv.patch
Patch0033: ps2-fix-oob-in-ps2-kbd.patch
Patch0034: Currently-while-kvm-and-qemu-can-not-handle-some-kvm.patch
Patch0035: cpu-features-fix-bug-for-memory-leakage.patch
Patch0036: monitor-qmp-drop-inflight-rsp-if-qmp-client-broken.patch
Patch0037: oslib-posix-optimise-vm-startup-time-for-1G-hugepage.patch
Patch0038: nbd-server.c-fix-invalid-read-after-client-was-alrea.patch
Patch0039: qemu-nbd-make-native-as-the-default-aio-mode.patch
Patch0040: qemu-nbd-set-timeout-to-qemu-nbd-socket.patch
Patch0041: qemu-pr-fixed-ioctl-failed-for-multipath-disk.patch
Patch0042: block-enable-cache-mode-of-empty-cdrom.patch
Patch0043: block-disallow-block-jobs-when-there-is-a-BDRV_O_INA.patch
Patch0044: scsi-cdrom-Fix-crash-after-remote-cdrom-detached.patch
Patch0045: block-bugfix-disable-process-AIO-when-attach-scsi-di.patch
Patch0046: block-bugfix-Don-t-pause-vm-when-NOSPACE-EIO-happene.patch
Patch0047: scsi-bugfix-fix-division-by-zero.patch
Patch0048: i386-cache-passthrough-Update-Intel-CPUID4.EAX-25-14.patch
Patch0049: i386-cache-passthrough-Update-AMD-8000_001D.EAX-25-1.patch
Patch0050: target-arm-convert-isar-regs-to-array.patch
Patch0051: target-arm-parse-cpu-feature-related-options.patch
Patch0052: target-arm-register-CPU-features-for-property.patch
Patch0053: target-arm-Allow-ID-registers-to-synchronize-to-KVM.patch
Patch0054: target-arm-introduce-CPU-feature-dependency-mechanis.patch
Patch0055: target-arm-introduce-KVM_CAP_ARM_CPU_FEATURE.patch
Patch0056: target-arm-Add-CPU-features-to-query-cpu-model-expan.patch
Patch0057: target-arm-Add-more-CPU-features.patch
Patch0058: target-arm-ignore-evtstrm-and-cpuid-CPU-features.patch
Patch0059: target-arm-only-set-ID_PFR1_EL1.GIC-for-AArch32-gues.patch
Patch0060: target-arm-Fix-write-redundant-values-to-kvm.patch
Patch0061: target-arm-clear-EL2-and-EL3-only-when-kvm-is-not-en.patch
Patch0062: target-arm-Update-the-ID-registers-of-Kunpeng-920.patch
Patch0063: freeclock-add-qmp-command-to-get-time-offset-of-vm-i.patch
Patch0064: freeclock-set-rtc_date_diff-for-arm.patch
Patch0065: freeclock-set-rtc_date_diff-for-X86.patch
Patch0066: hw-usb-reduce-the-vpcu-cost-of-UHCI-when-VNC-disconn.patch
Patch0067: hw-net-rocker-fix-security-vulnerability.patch
Patch0068: tests-Disable-filemonitor-testcase.patch
Patch0069: seabios-convert-value-of-be16_to_cpu-to-u64-before-s.patch
Patch0070: seabios-do-not-give-back-high-ram.patch
Patch0071: seabios-drop-yield-in-smp_setup.patch
Patch0072: seabios-fix-memory-leak-when-pci-check.patch
Patch0073: seabios-increase-the-seabios-high-mem-zone-size.patch
Patch0074: seabios-increase-the-seabios-minibiostable.patch
Patch0075: IPv6-add-support-for-IPv6-protocol.patch
Patch0076: Use-post-increment-only-in-inffast.c.patch
Patch0077: util-log-add-CONFIG_DISABLE_QEMU_LOG-macro.patch
Patch0078: log-Add-some-logs-on-VM-runtime-path.patch
Patch0079: qdev-monitors-Fix-reundant-error_setg-of-qdev_add_de.patch
Patch0080: bios-tables-test-Allow-changes-to-q35-SSDT.dimmpxm-f.patch
Patch0081: smbios-Add-missing-member-of-type-4-for-smbios-3.0.patch
Patch0082: net-eepro100-validate-various-address-valuesi-CVE-20.patch
Patch0083: pci-check-bus-pointer-before-dereference.patch
Patch0084: ide-ahci-add-check-to-avoid-null-dereference-CVE-201.patch
Patch0085: tap-return-err-when-tap-TUNGETIFF-fail.patch
Patch0086: xhci-check-reg-to-avoid-OOB-read.patch
Patch0087: monitor-Discard-BLOCK_IO_ERROR-event-when-VM-reboote.patch
Patch0088: monitor-limit-io-error-qmp-event-to-at-most-once-per.patch
spec: Update patch and changelog with !243 Support VFIO migration manual clear interface & vSMMUv3/pSMMUv3 2 stage VFIO integration & Support migration in SMMUv3 nested mode !243 linux-headers: update against 5.10 and manual clear vfio dirty log series vfio: Maintain DMA mapping range for the container vfio/migration: Add support for manual clear vfio dirty log update-linux-headers: Import iommu.h vfio.h and iommu.h header update against 5.10 memory: Add new fields in IOTLBEntry hw/arm/smmuv3: Improve stage1 ASID invalidation hw/arm/smmu-common: Allow domain invalidation for NH_ALL/NSNH_ALL memory: Add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute memory: Add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute memory: Introduce IOMMU Memory Region inject_faults API iommu: Introduce generic header pci: introduce PCIPASIDOps to PCIDevice vfio: Force nested if iommu requires it vfio: Introduce hostwin_from_range helper vfio: Introduce helpers to DMA map/unmap a RAM section vfio: Set up nested stage mappings vfio: Pass stage 1 MSI bindings to the host vfio: Helper to get IRQ info including capabilities vfio/pci: Register handler for iommu fault vfio/pci: Set up the DMA FAULT region vfio/pci: Implement the DMA fault handler hw/arm/smmuv3: Advertise MSI_TRANSLATE attribute hw/arm/smmuv3: Store the PASID table GPA in the translation config hw/arm/smmuv3: Fill the IOTLBEntry arch_id on NH_VA invalidation hw/arm/smmuv3: Fill the IOTLBEntry leaf field on NH_VA invalidation hw/arm/smmuv3: Pass stage 1 configurations to the host hw/arm/smmuv3: Implement fault injection hw/arm/smmuv3: Allow MAP notifiers pci: Add return_page_response pci ops vfio/pci: Implement return_page_response page response callback vfio/common: Avoid unmap ram section at vfio_listener_region_del() in nested mode vfio: Introduce helpers to mark dirty pages of a RAM section vfio: Add vfio_prereg_listener_log_sync in nested stage vfio: Add vfio_prereg_listener_log_clear to re-enable mark dirty pages vfio: Add vfio_prereg_listener_global_log_start/stop in nested stage hw/arm/smmuv3: Post-load stage 1 configurations to the host vfio/common: Fix incorrect address alignment in vfio_dma_map_ram_section vfio/common: Add address alignment check in vfio_listener_region_del Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com> Signed-off-by: imxcc <xingchaochao@huawei.com> (cherry picked from commit 45d983f4507f9f6089de83fcd4d3a2136876b566)
2022-02-12 17:20:34 +08:00
Patch0089: linux-headers-update-against-5.10-and-manual-clear-v.patch
Patch0090: vfio-Maintain-DMA-mapping-range-for-the-container.patch
Patch0091: vfio-migration-Add-support-for-manual-clear-vfio-dir.patch
Patch0092: update-linux-headers-Import-iommu.h.patch
Patch0093: vfio.h-and-iommu.h-header-update-against-5.10.patch
Patch0094: memory-Add-new-fields-in-IOTLBEntry.patch
Patch0095: hw-arm-smmuv3-Improve-stage1-ASID-invalidation.patch
Patch0096: hw-arm-smmu-common-Allow-domain-invalidation-for-NH_.patch
Patch0097: memory-Add-IOMMU_ATTR_VFIO_NESTED-IOMMU-memory-regio.patch
Patch0098: memory-Add-IOMMU_ATTR_MSI_TRANSLATE-IOMMU-memory-reg.patch
Patch0099: memory-Introduce-IOMMU-Memory-Region-inject_faults-A.patch
Patch0100: iommu-Introduce-generic-header.patch
Patch0101: pci-introduce-PCIPASIDOps-to-PCIDevice.patch
Patch0102: vfio-Force-nested-if-iommu-requires-it.patch
Patch0103: vfio-Introduce-hostwin_from_range-helper.patch
Patch0104: vfio-Introduce-helpers-to-DMA-map-unmap-a-RAM-sectio.patch
Patch0105: vfio-Set-up-nested-stage-mappings.patch
Patch0106: vfio-Pass-stage-1-MSI-bindings-to-the-host.patch
Patch0107: vfio-Helper-to-get-IRQ-info-including-capabilities.patch
Patch0108: vfio-pci-Register-handler-for-iommu-fault.patch
Patch0109: vfio-pci-Set-up-the-DMA-FAULT-region.patch
Patch0110: vfio-pci-Implement-the-DMA-fault-handler.patch
Patch0111: hw-arm-smmuv3-Advertise-MSI_TRANSLATE-attribute.patch
Patch0112: hw-arm-smmuv3-Store-the-PASID-table-GPA-in-the-trans.patch
Patch0113: hw-arm-smmuv3-Fill-the-IOTLBEntry-arch_id-on-NH_VA-i.patch
Patch0114: hw-arm-smmuv3-Fill-the-IOTLBEntry-leaf-field-on-NH_V.patch
Patch0115: hw-arm-smmuv3-Pass-stage-1-configurations-to-the-hos.patch
Patch0116: hw-arm-smmuv3-Implement-fault-injection.patch
Patch0117: hw-arm-smmuv3-Allow-MAP-notifiers.patch
Patch0118: pci-Add-return_page_response-pci-ops.patch
Patch0119: vfio-pci-Implement-return_page_response-page-respons.patch
Patch0120: vfio-common-Avoid-unmap-ram-section-at-vfio_listener.patch
Patch0121: vfio-Introduce-helpers-to-mark-dirty-pages-of-a-RAM-.patch
Patch0122: vfio-Add-vfio_prereg_listener_log_sync-in-nested-sta.patch
Patch0123: vfio-Add-vfio_prereg_listener_log_clear-to-re-enable.patch
Patch0124: vfio-Add-vfio_prereg_listener_global_log_start-stop-.patch
Patch0125: hw-arm-smmuv3-Post-load-stage-1-configurations-to-th.patch
Patch0126: vfio-common-Fix-incorrect-address-alignment-in-vfio_.patch
Patch0127: vfio-common-Add-address-alignment-check-in-vfio_list.patch
Patch0128: log-Add-log-at-boot-cpu-init-for-aarch64.patch
Patch0129: feature-Add-log-for-each-modules.patch
Patch0130: feature-Add-logs-for-vm-start-and-destroy.patch
2019-09-30 11:15:46 -04:00
BuildRequires: flex
BuildRequires: gcc
2019-09-30 11:15:46 -04:00
BuildRequires: bison
BuildRequires: texinfo
BuildRequires: perl-podlators
BuildRequires: kernel
BuildRequires: chrpath
BuildRequires: gettext
BuildRequires: python-sphinx
BuildRequires: ninja-build
2019-09-30 11:15:46 -04:00
BuildRequires: zlib-devel
BuildRequires: zstd-devel
2019-09-30 11:15:46 -04:00
BuildRequires: gtk3-devel
BuildRequires: gnutls-devel
BuildRequires: numactl-devel
BuildRequires: device-mapper-multipath-devel
BuildRequires: rdma-core-devel
BuildRequires: libcap-devel
BuildRequires: libcap-ng-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: libaio-devel
BuildRequires: usbredir-devel >= 0.5.2
BuildRequires: libseccomp-devel >= 2.3.0
BuildRequires: systemd-devel
BuildRequires: libiscsi-devel
BuildRequires: snappy-devel
BuildRequires: lzo-devel
BuildRequires: ncurses-devel
BuildRequires: libattr-devel
BuildRequires: libcurl-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: pixman-devel
BuildRequires: libusbx-devel
BuildRequires: bzip2-devel
BuildRequires: libepoxy-devel
BuildRequires: libtasn1-devel
BuildRequires: libxml2-devel
BuildRequires: libudev-devel
BuildRequires: pam-devel
BuildRequires: perl-Test-Harness
BuildRequires: python3-devel
BuildRequires: librbd-devel
BuildRequires: krb5-devel
BuildRequires: libssh-devel
BuildRequires: glib2
BuildRequires: spice-server-devel >= 0.12.5
BuildRequires: spice-protocol >= 0.12.3
2019-12-13 16:06:06 +08:00
%ifarch aarch64
BuildRequires: libfdt-devel
BuildRequires: virglrenderer-devel
%endif
2019-09-30 11:15:46 -04:00
Requires(post): /usr/bin/getent
Requires(post): /usr/sbin/groupadd
Requires(post): /usr/sbin/useradd
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
2021-03-11 21:08:52 +08:00
Requires(postun): qemu-block-iscsi
Requires(postun): qemu-block-curl
2021-03-11 21:08:52 +08:00
2019-09-30 11:15:46 -04:00
%description
QEMU is a FAST! processor emulator using dynamic translation to achieve good emulation speed.
QEMU has two operating modes:
Full system emulation. In this mode, QEMU emulates a full system (for example a PC),
including one or several processors and various peripherals. It can be used to launch
different Operating Systems without rebooting the PC or to debug system code.
User mode emulation. In this mode, QEMU can launch processes compiled for one CPU on another CPU.
It can be used to launch the Wine Windows API emulator (https://www.winehq.org) or to ease
cross-compilation and cross-debugging.
You can refer to https://www.qemu.org for more infortmation.
%package guest-agent
Summary: QEMU guest agent
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description guest-agent
This package provides an agent to run inside guests, which communicates
with the host over a virtio-serial channel named "org.qemu.guest_agent.0"
Please refer to https://wiki.qemu.org/Features/GuestAgent for more information.
%package help
Summary: Documents for qemu
Buildarch: noarch
%description help
This package provides documents for qemu related man help and information.
%package img
Summary: QEMU command line tool for manipulating disk images
%description img
This package provides a command line tool for manipulating disk images
%package block-rbd
Summary: Qemu-block-rbd
%description block-rbd
This package provides RBD support for Qemu
%package block-ssh
Summary: Qemu-block-ssh
%description block-ssh
This package provides block-ssh support for Qemu
%package block-iscsi
Summary: Qemu-block-iscsi
%description block-iscsi
This package provides block-iscsi support for Qemu
%package block-curl
Summary: Qemu-block-curl
%description block-curl
This package provides block-curl support for Qemu
2019-12-13 16:06:06 +08:00
%ifarch %{ix86} x86_64
%package seabios
Summary: QEMU seabios
%description seabios
This package include bios-256k.bin and bios.bin of seabios
%endif
2019-09-30 11:15:46 -04:00
%prep
%setup -q -n qemu-%{version}%{?rcstr}
%autopatch -p1
%build
%ifarch x86_64
buildarch="x86_64-softmmu"
%endif
%ifarch aarch64
buildarch="aarch64-softmmu"
%endif
buildldflags="VL_LDFLAGS=-Wl,--build-id"
qemubuilddir="build"
2019-09-30 11:15:46 -04:00
./configure \
--prefix=%{_prefix} \
--target-list=${buildarch} \
--extra-cflags="%{optflags} -fPIE -DPIE -fPIC" \
--extra-ldflags="-Wl,--build-id -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack" \
2019-09-30 11:15:46 -04:00
--datadir=%{_datadir} \
--docdir=%{_docdir}/ \
2019-09-30 11:15:46 -04:00
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
--localstatedir=%{_localstatedir} \
--sysconfdir=%{_sysconfdir} \
--interp-prefix=%{_prefix}/qemu-%%M \
--firmwarepath=%{_datadir}/%{name} \
--with-pkgversion=%{name}-%{version}-%{release} \
--python=/usr/bin/python3 \
2019-09-30 11:15:46 -04:00
--disable-slirp \
--enable-gtk \
--enable-docs \
--enable-guest-agent \
--enable-pie \
--enable-numa \
--enable-mpath \
--disable-libnfs \
--disable-bzip2 \
--enable-kvm \
--enable-tcg \
--enable-rdma \
--enable-linux-aio \
--enable-cap-ng \
--enable-vhost-user \
--enable-tpm \
--enable-modules \
--enable-libssh \
--enable-spice \
2019-12-13 16:06:06 +08:00
%ifarch aarch64
--enable-fdt \
2019-09-30 11:15:46 -04:00
--enable-virglrenderer \
2019-12-13 16:06:06 +08:00
%endif
2019-09-30 11:15:46 -04:00
--enable-cap-ng \
--enable-libusb \
--disable-dmg \
--disable-qcow1 \
--disable-vdi \
--disable-vvfat \
--disable-qed \
--disable-parallels \
--disable-capstone \
--disable-smartcard \
--enable-zstd \
--disable-brlapi \
--disable-plugins
2019-09-30 11:15:46 -04:00
make %{?_smp_mflags} $buildldflags V=1
cp ${qemubuilddir}/${buildarch}/qemu-system-* qemu-kvm
2019-09-30 11:15:46 -04:00
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} \
install
%find_lang %{name}
install -m 0755 qemu-kvm %{buildroot}%{_libexecdir}/
2019-11-06 19:50:55 +08:00
ln -s %{_libexecdir}/qemu-kvm %{buildroot}/%{_bindir}/qemu-kvm
rm %{buildroot}/%{_bindir}/qemu-system-*
2019-09-30 11:15:46 -04:00
install -D -p -m 0644 contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir}/qemu-pr-helper.service
install -D -p -m 0644 contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir}/qemu-pr-helper.socket
install -D -p -m 0644 qemu.sasl %{buildroot}%{_sysconfdir}/sasl2/qemu.conf
install -D -m 0644 %{_sourcedir}/bridge.conf %{buildroot}%{_sysconfdir}/qemu/bridge.conf
2019-11-06 19:50:55 +08:00
install -D -m 0644 %{_sourcedir}/80-kvm.rules %{buildroot}/usr/lib/udev/rules.d/80-kvm.rules
2019-09-30 11:15:46 -04:00
# For qemu-guest-agent package
%global _udevdir /lib/udev/rules.d
install -D -p -m 0644 contrib/systemd/qemu-guest-agent.service %{buildroot}%{_unitdir}/qemu-guest-agent.service
install -D -m 0644 %{_sourcedir}/99-qemu-guest-agent.rules %{buildroot}%{_udevdir}/99-qemu-guest-agent.rules
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/qga-fsfreeze-hook.log
# For qemu docs package
2019-09-30 11:15:46 -04:00
%global qemudocdir %{_docdir}/%{name}
rm -rf %{buildroot}%{qemudocdir}/specs
rm -rf %{buildroot}%{qemudocdir}/.buildinfo
rm -rf %{buildroot}%{qemudocdir}/objects.inv
rm -rf %{buildroot}%{qemudocdir}/genindex.html
rm -rf %{buildroot}%{qemudocdir}/index.html
install -D -p -m 0644 -t %{buildroot}%{qemudocdir} README.rst COPYING COPYING.LIB LICENSE
2019-09-30 11:15:46 -04:00
chmod -x %{buildroot}%{_mandir}/man1/*
%ifarch aarch64
rm -rf %{buildroot}%{_datadir}/%{name}/vgabios*bin
rm -rf %{buildroot}%{_datadir}/%{name}/bios*.bin
rm -rf %{buildroot}%{_datadir}/%{name}/linuxboot.bin
rm -rf %{buildroot}%{_datadir}/%{name}/kvmvapic.bin
rm -rf %{buildroot}%{_datadir}/%{name}/sgabios.bin
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot.bin
rm -rf %{buildroot}%{_datadir}/%{name}/linuxboot_dma.bin
rm -rf %{buildroot}%{_datadir}/%{name}/pvh.bin
2019-09-30 11:15:46 -04:00
%endif
%ifarch x86_64
rm -rf %{buildroot}%{_datadir}/%{name}/vgabios-ati.bin
%endif
rm -rf %{buildroot}%{_datadir}/%{name}/bios-microvm.bin
rm -rf %{buildroot}%{_datadir}/%{name}/multiboot_dma.bin
rm -rf %{buildroot}%{_datadir}/%{name}/npcm7xx_bootrom.bin
2019-09-30 11:15:46 -04:00
rm -rf %{buildroot}%{_datadir}/%{name}/openbios-*
rm -rf %{buildroot}%{_datadir}/%{name}/slof.bin
rm -rf %{buildroot}%{_datadir}/%{name}/QEMU,*.bin
rm -rf %{buildroot}%{_datadir}/%{name}/bamboo.dtb
rm -rf %{buildroot}%{_datadir}/%{name}/canyonlands.dtb
rm -rf %{buildroot}%{_datadir}/%{name}/hppa-firmware.img
rm -rf %{buildroot}%{_datadir}/%{name}/palcode-clipper
rm -rf %{buildroot}%{_datadir}/%{name}/petalogix-*
rm -rf %{buildroot}%{_datadir}/%{name}/ppc_*
rm -rf %{buildroot}%{_datadir}/%{name}/qemu_vga.ndrv
rm -rf %{buildroot}%{_datadir}/%{name}/s390-*
rm -rf %{buildroot}%{_datadir}/%{name}/skiboot.lid
rm -rf %{buildroot}%{_datadir}/%{name}/spapr-*
rm -rf %{buildroot}%{_datadir}/%{name}/u-boot*
rm -rf %{buildroot}%{_bindir}/ivshmem*
rm -f %{buildroot}%{_datadir}/%{name}/edk2*
rm -rf %{buildroot}%{_datadir}/%{name}/firmware
rm -rf %{buildroot}%{_datadir}/%{name}/opensbi*
rm -rf %{buildroot}%{_datadir}/%{name}/qemu-nsis.bmp
rm -rf %{buildroot}%{_libdir}/%{name}/audio-oss.so
rm -rf %{buildroot}%{_libdir}/%{name}/audio-pa.so
rm -rf %{buildroot}%{_libdir}/%{name}/block-gluster.so
rm -rf %{buildroot}%{_libdir}/%{name}/ui-curses.so
rm -rf %{buildroot}%{_libdir}/%{name}/ui-gtk.so
rm -rf %{buildroot}%{_libdir}/%{name}/ui-sdl.so
rm -rf %{buildroot}%{_libdir}/%{name}/audio-spice.so
rm -rf %{buildroot}%{_libdir}/%{name}/chardev-baum.so
rm -rf %{buildroot}%{_libdir}/%{name}/chardev-spice.so
rm -rf %{buildroot}%{_libdir}/%{name}/hw-display-qxl.so
rm -rf %{buildroot}%{_libdir}/%{name}/hw-s390x-virtio-gpu-ccw.so
rm -rf %{buildroot}%{_libdir}/%{name}/hw-usb-host.so
rm -rf %{buildroot}%{_libdir}/%{name}/hw-usb-redirect.so
rm -rf %{buildroot}%{_libdir}/%{name}/ui-opengl.so
rm -rf %{buildroot}%{_libdir}/%{name}/ui-spice-app.so
rm -rf %{buildroot}%{_libdir}/%{name}/ui-spice-core.so
rm -rf %{buildroot}%{_libexecdir}/vhost-user-gpu
rm -rf %{buildroot}%{_datadir}/%{name}/vhost-user/50-qemu-gpu.json
rm -rf %{buildroot}%{_datadir}/%{name}/vhost-user/50-qemu-virtiofsd.json
2019-09-30 11:15:46 -04:00
strip %{buildroot}%{_libdir}/%{name}/block-rbd.so
strip %{buildroot}%{_libdir}/%{name}/block-iscsi.so
strip %{buildroot}%{_libdir}/%{name}/block-curl.so
strip %{buildroot}%{_libdir}/%{name}/block-ssh.so
2019-09-30 11:15:46 -04:00
for f in %{buildroot}%{_bindir}/* %{buildroot}%{_libdir}/* \
%{buildroot}%{_libexecdir}/*; do
if file $f | grep -q ELF | grep -q -i shared; then chrpath --delete $f; fi
done
%check
echo "#define CONFIG_DISABLE_QEMU_LOG" >> build/config-host.h
make %{?_smp_mflags} $buildldflags V=1
2019-09-30 11:15:46 -04:00
make check V=1
%pre
getent group kvm >/dev/null || groupadd -g 36 -r kvm
getent group qemu >/dev/null || groupadd -g 107 -r qemu
getent passwd qemu >/dev/null || \
useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \
-c "qemu user" qemu
%post guest-agent
%systemd_post qemu-guest-agent.service
%preun guest-agent
%systemd_preun qemu-guest-agent.service
%postun guest-agent
%systemd_postun_with_restart qemu-guest-agent.service
%files -f %{name}.lang
%dir %{_datadir}/%{name}/
%{_libexecdir}/qemu-kvm
2019-11-06 19:50:55 +08:00
%{_bindir}/qemu-kvm
%{_libdir}/%{name}/accel-qtest-*.so
%ifarch x86_64
%{_libdir}/%{name}/accel-tcg-*.so
%{_libdir}/%{name}/hw-display-virtio-vga-gl.so
%{_libdir}/%{name}/hw-display-virtio-vga.so
%endif
%{_libdir}/%{name}/hw-display-virtio-gpu-gl.so
%{_libdir}/%{name}/hw-display-virtio-gpu-pci-gl.so
%{_libdir}/%{name}/hw-display-virtio-gpu-pci.so
%{_libdir}/%{name}/hw-display-virtio-gpu.so
2019-09-30 11:15:46 -04:00
%{_datadir}/%{name}/efi-virtio.rom
%{_datadir}/%{name}/efi-e1000.rom
%{_datadir}/%{name}/efi-e1000e.rom
%{_datadir}/%{name}/efi-rtl8139.rom
%{_datadir}/%{name}/efi-pcnet.rom
%{_datadir}/%{name}/efi-ne2k_pci.rom
%{_datadir}/%{name}/efi-eepro100.rom
%{_datadir}/%{name}/efi-vmxnet3.rom
%{_datadir}/%{name}/pxe-virtio.rom
%{_datadir}/%{name}/pxe-e1000.rom
%{_datadir}/%{name}/pxe-ne2k_pci.rom
%{_datadir}/%{name}/pxe-pcnet.rom
%{_datadir}/%{name}/pxe-rtl8139.rom
%{_datadir}/%{name}/pxe-eepro100.rom
%{_datadir}/%{name}/qboot.rom
2019-09-30 11:15:46 -04:00
%{_datadir}/%{name}/trace-events-all
%{_datadir}/applications/qemu.desktop
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/%{name}/keymaps/
%{_bindir}/elf2dmp
%{_bindir}/qemu-edid
%{_bindir}/qemu-keymap
%{_bindir}/qemu-pr-helper
%{_libexecdir}/virtfs-proxy-helper
%{_libexecdir}/virtiofsd
2019-09-30 11:15:46 -04:00
%{_unitdir}/qemu-pr-helper.service
%{_unitdir}/qemu-pr-helper.socket
%attr(4755, root, root) %{_libexecdir}/qemu-bridge-helper
%config(noreplace) %{_sysconfdir}/sasl2/qemu.conf
%dir %{_sysconfdir}/qemu
%config(noreplace) %{_sysconfdir}/qemu/bridge.conf
2019-11-06 19:50:55 +08:00
/usr/lib/udev/rules.d/80-kvm.rules
%doc %{qemudocdir}/COPYING
%doc %{qemudocdir}/COPYING.LIB
%doc %{qemudocdir}/LICENSE
2019-09-30 11:15:46 -04:00
%ifarch x86_64
%{_datadir}/%{name}/bios.bin
%{_datadir}/%{name}/bios-256k.bin
%{_datadir}/%{name}/vgabios.bin
%{_datadir}/%{name}/vgabios-cirrus.bin
%{_datadir}/%{name}/vgabios-qxl.bin
%{_datadir}/%{name}/vgabios-stdvga.bin
%{_datadir}/%{name}/vgabios-vmware.bin
%{_datadir}/%{name}/vgabios-virtio.bin
%{_datadir}/%{name}/vgabios-ramfb.bin
%{_datadir}/%{name}/vgabios-bochs-display.bin
%{_datadir}/%{name}/linuxboot.bin
%{_datadir}/%{name}/linuxboot_dma.bin
%{_datadir}/%{name}/pvh.bin
2019-09-30 11:15:46 -04:00
%{_datadir}/%{name}/multiboot.bin
%{_datadir}/%{name}/kvmvapic.bin
%{_datadir}/%{name}/sgabios.bin
%endif
%files help
%dir %{qemudocdir}
%doc %{qemudocdir}/about
%doc %{qemudocdir}/devel
%doc %{qemudocdir}/interop
%doc %{qemudocdir}/search*
%doc %{qemudocdir}/_static
%doc %{qemudocdir}/system
%doc %{qemudocdir}/tools
%doc %{qemudocdir}/user
%doc %{qemudocdir}/README.rst
2019-09-30 11:15:46 -04:00
%{_mandir}/man1/qemu.1*
%{_mandir}/man1/qemu-img.1*
%{_mandir}/man1/qemu-storage-daemon.1*
2019-09-30 11:15:46 -04:00
%{_mandir}/man1/virtfs-proxy-helper.1*
%{_mandir}/man1/virtiofsd.1*
2019-09-30 11:15:46 -04:00
%{_mandir}/man7/qemu-block-drivers.7*
%{_mandir}/man7/qemu-cpu-models.7*
%{_mandir}/man7/qemu-ga-ref.7*
%{_mandir}/man7/qemu-qmp-ref.7*
%{_mandir}/man7/qemu-storage-daemon-qmp-ref.7*
%{_mandir}/man8/qemu-ga.8*
2019-09-30 11:15:46 -04:00
%{_mandir}/man8/qemu-nbd.8*
%{_mandir}/man8/qemu-pr-helper.8*
2019-09-30 11:15:46 -04:00
%files guest-agent
%defattr(-,root,root,-)
%{_bindir}/qemu-ga
%{_mandir}/man8/qemu-ga.8*
%{_unitdir}/qemu-guest-agent.service
%{_udevdir}/99-qemu-guest-agent.rules
%ghost %{_localstatedir}/log/qga-fsfreeze-hook.log
%files img
%{_bindir}/qemu-img
%{_bindir}/qemu-io
%{_bindir}/qemu-nbd
%{_bindir}/qemu-storage-daemon
2019-09-30 11:15:46 -04:00
%files block-rbd
%{_libdir}/%{name}/block-rbd.so
%files block-ssh
%{_libdir}/%{name}/block-ssh.so
%files block-iscsi
%{_libdir}/%{name}/block-iscsi.so
%files block-curl
%{_libdir}/%{name}/block-curl.so
2019-12-13 16:06:06 +08:00
%ifarch %{ix86} x86_64
%files seabios
%{_datadir}/%{name}/bios-256k.bin
%{_datadir}/%{name}/bios.bin
%endif
2019-09-30 11:15:46 -04:00
%changelog
* Sat Feb 12 2022 Chen Qun <kuhn.chenqun@huawei.com>
- log: Add log at boot & cpu init for aarch64
- feature: Add log for each modules
- feature: Add logs for vm start and destroy
spec: Update patch and changelog with !243 Support VFIO migration manual clear interface & vSMMUv3/pSMMUv3 2 stage VFIO integration & Support migration in SMMUv3 nested mode !243 linux-headers: update against 5.10 and manual clear vfio dirty log series vfio: Maintain DMA mapping range for the container vfio/migration: Add support for manual clear vfio dirty log update-linux-headers: Import iommu.h vfio.h and iommu.h header update against 5.10 memory: Add new fields in IOTLBEntry hw/arm/smmuv3: Improve stage1 ASID invalidation hw/arm/smmu-common: Allow domain invalidation for NH_ALL/NSNH_ALL memory: Add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute memory: Add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute memory: Introduce IOMMU Memory Region inject_faults API iommu: Introduce generic header pci: introduce PCIPASIDOps to PCIDevice vfio: Force nested if iommu requires it vfio: Introduce hostwin_from_range helper vfio: Introduce helpers to DMA map/unmap a RAM section vfio: Set up nested stage mappings vfio: Pass stage 1 MSI bindings to the host vfio: Helper to get IRQ info including capabilities vfio/pci: Register handler for iommu fault vfio/pci: Set up the DMA FAULT region vfio/pci: Implement the DMA fault handler hw/arm/smmuv3: Advertise MSI_TRANSLATE attribute hw/arm/smmuv3: Store the PASID table GPA in the translation config hw/arm/smmuv3: Fill the IOTLBEntry arch_id on NH_VA invalidation hw/arm/smmuv3: Fill the IOTLBEntry leaf field on NH_VA invalidation hw/arm/smmuv3: Pass stage 1 configurations to the host hw/arm/smmuv3: Implement fault injection hw/arm/smmuv3: Allow MAP notifiers pci: Add return_page_response pci ops vfio/pci: Implement return_page_response page response callback vfio/common: Avoid unmap ram section at vfio_listener_region_del() in nested mode vfio: Introduce helpers to mark dirty pages of a RAM section vfio: Add vfio_prereg_listener_log_sync in nested stage vfio: Add vfio_prereg_listener_log_clear to re-enable mark dirty pages vfio: Add vfio_prereg_listener_global_log_start/stop in nested stage hw/arm/smmuv3: Post-load stage 1 configurations to the host vfio/common: Fix incorrect address alignment in vfio_dma_map_ram_section vfio/common: Add address alignment check in vfio_listener_region_del Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com> Signed-off-by: imxcc <xingchaochao@huawei.com> (cherry picked from commit 45d983f4507f9f6089de83fcd4d3a2136876b566)
2022-02-12 17:20:34 +08:00
* Sat Feb 12 2022 Chen Qun <kuhn.chenqun@huawei.com>
- linux-headers: update against 5.10 and manual clear vfio dirty log series
- vfio: Maintain DMA mapping range for the container
- vfio/migration: Add support for manual clear vfio dirty log
- update-linux-headers: Import iommu.h
- vfio.h and iommu.h header update against 5.10
- memory: Add new fields in IOTLBEntry
- hw/arm/smmuv3: Improve stage1 ASID invalidation
- hw/arm/smmu-common: Allow domain invalidation for NH_ALL/NSNH_ALL
- memory: Add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute
- memory: Add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute
- memory: Introduce IOMMU Memory Region inject_faults API
- iommu: Introduce generic header
- pci: introduce PCIPASIDOps to PCIDevice
- vfio: Force nested if iommu requires it
- vfio: Introduce hostwin_from_range helper
- vfio: Introduce helpers to DMA map/unmap a RAM section
- vfio: Set up nested stage mappings
- vfio: Pass stage 1 MSI bindings to the host
- vfio: Helper to get IRQ info including capabilities
- vfio/pci: Register handler for iommu fault
- vfio/pci: Set up the DMA FAULT region
- vfio/pci: Implement the DMA fault handler
- hw/arm/smmuv3: Advertise MSI_TRANSLATE attribute
- hw/arm/smmuv3: Store the PASID table GPA in the translation config
- hw/arm/smmuv3: Fill the IOTLBEntry arch_id on NH_VA invalidation
- hw/arm/smmuv3: Fill the IOTLBEntry leaf field on NH_VA invalidation
- hw/arm/smmuv3: Pass stage 1 configurations to the host
- hw/arm/smmuv3: Implement fault injection
- hw/arm/smmuv3: Allow MAP notifiers
- pci: Add return_page_response pci ops
- vfio/pci: Implement return_page_response page response callback
- vfio/common: Avoid unmap ram section at vfio_listener_region_del() in nested mode
- vfio: Introduce helpers to mark dirty pages of a RAM section
- vfio: Add vfio_prereg_listener_log_sync in nested stage
- vfio: Add vfio_prereg_listener_log_clear to re-enable mark dirty pages
- vfio: Add vfio_prereg_listener_global_log_start/stop in nested stage
- hw/arm/smmuv3: Post-load stage 1 configurations to the host
- vfio/common: Fix incorrect address alignment in vfio_dma_map_ram_section
- vfio/common: Add address alignment check in vfio_listener_region_del
* Sat Feb 12 2022 Chen Qun <kuhn.chenqun@huawei.com>
- log: Add some logs on VM runtime path
- qdev/monitors: Fix reundant error_setg of qdev_add_device
- bios-tables-test: Allow changes to q35/SSDT.dimmpxm file
- smbios: Add missing member of type 4 for smbios 3.0
- net: eepro100: validate various address valuesi(CVE-2021-20255)
- pci: check bus pointer before dereference
- ide: ahci: add check to avoid null dereference (CVE-2019-12067)
- tap: return err when tap TUNGETIFF fail
- xhci: check reg to avoid OOB read
- monitor: Discard BLOCK_IO_ERROR event when VM rebooted
- monitor: limit io error qmp event to at most once per 60s
* Sat Feb 12 2022 Chen Qun <kuhn.chenqun@huawei.com>
- util/log: add CONFIG_DISABLE_QEMU_LOG macro
* Sat Feb 12 2022 Yan Wang <wangyan122@huawei.com>
- ipxe: IPv6 add support for IPv6 protocol
- u-boot: Use post increment only in inffast.c
* Sat Feb 12 2022 jiangdongxu <jiangdongxu1@huawei.com>
- seabios: convert value of be16_to_cpu to u64 before shifting
- seabios: do not give back high ram
- seabios: fix memory leak when pci check
- seabios: drop yield() in smp_setup()
- seabios: increase the seabios minibiostable
- seabios: increase the seabios high mem zone size
* Fri Feb 11 2022 Chen Qun <kuhn.chenqun@huawei.com>
- hw/net/rocker: fix security vulnerability
- tests: Disable filemonitor testcase
* Fri Feb 11 2022 Chen Qun <kuhn.chenqun@huawei.com>
- hw/usb: reduce the vpcu cost of UHCI when VNC disconnect
* Fri Feb 11 2022 Chen Qun <kuhn.chenqun@huawei.com>
- freeclock: add qmp command to get time offset of vm in seconds
- freeclock: set rtc_date_diff for arm
- freeclock: set rtc_date_diff for X86
* Fri Feb 11 2022 Chen Qun <kuhn.chenqun@huawei.com>
- target/arm: convert isar regs to array
- target/arm: parse cpu feature related options
- target/arm: register CPU features for property
- target/arm: Allow ID registers to synchronize to KVM
- target/arm: introduce CPU feature dependency mechanism
- target/arm: introduce KVM_CAP_ARM_CPU_FEATURE
- target/arm: Add CPU features to query-cpu-model-expansion
- target/arm: Add more CPU features
- target/arm: ignore evtstrm and cpuid CPU features
- target/arm: only set ID_PFR1_EL1.GIC for AArch32 guest
- target/arm: Fix write redundant values to kvm
- target/arm: clear EL2 and EL3 only when kvm is not enabled
- target/arm: Update the ID registers of Kunpeng-920
* Fri Feb 11 2022 Chen Qun <kuhn.chenqun@huawei.com>
- i386: cache passthrough: Update Intel CPUID4.EAX[25:14] based on vCPU topo
- i386: cache passthrough: Update AMD 8000_001D.EAX[25:14] based on vCPU topo
* Fri Feb 11 2022 Chen Qun <kuhn.chenqun@huawei.com>
- nbd/server.c: fix invalid read after client was already free
- qemu-nbd: make native as the default aio mode
- qemu-nbd: set timeout to qemu-nbd socket
- qemu-pr: fixed ioctl failed for multipath disk
- block: enable cache mode of empty cdrom
- block: disallow block jobs when there is a BDRV_O_INACTIVE flag
- scsi: cdrom: Fix crash after remote cdrom detached
- block: bugfix: disable process AIO when attach scsi disk
- block: bugfix: Don't pause vm when NOSPACE EIO happened
- scsi: bugfix: fix division by zero
* Fri Feb 11 2022 imxcc <xingchaochao@huawei.com>
- migration: skip cache_drop for bios bootloader and
- ps2: fix oob in ps2 kbd
- Currently, while kvm and qemu can not handle some kvm
- cpu/features: fix bug for memory leakage
- monitor/qmp: drop inflight rsp if qmp client broken
- oslib-posix: optimise vm startup time for 1G hugepage
* Fri Feb 11 2022 imxcc <xingchaochao@huawei.com>
- scsi-bus: Refactor the code that retries requests
- scsi-disk: Add support for retry on errors
- block-backend: Stop retrying when draining
- block: Add sanity check when setting retry parameters
* Fri Feb 11 2022 imxcc <xingchaochao@huawei.com>
- vfio/pci: Ascend310 need 4Bytes quirk in bar4
- vfio/pci: Ascend710 need 4Bytes quirk in bar0
- vfio/pci: Ascend910 need 4Bytes quirk in bar0
* Fri Feb 11 2022 imxcc <xingchaochao@huawei.com>
- hugepages: hugepages files maybe leftover
- Patch0024: target-i386: Modify the VM's physical bits value set
* Fri Feb 11 2022 Yan Wang <wangyan122@huawei.com>
- log: disable qemu_log function for "make check V=1"
* Fri Feb 11 2022 Yan Wang <wangyan122@huawei.com>
- chardev/baum: disable unused brlapi
* Fri Feb 11 2022 imxcc <xingchaochao@huawei.com>
- Revert "cpu: parse +/- feature to avoid failure"
- Revert "cpu: add Cortex-A72 processor kvm target support"
- cpu: add Cortex-A72 processor kvm target support
* Thu Feb 10 2022 imxcc <xingchaochao@huawei.com>
- qapi/block-core: Add retry option for error action
- qapi/block-core: Add retry option for error action
- block-backend: Introduce retry timer
- block-backend: Add device specific retry callback
- block-backend: Enable retry action on errors
- block-backend: Add timeout support for retry
- block: Add error retry param setting
- virtio_blk: Add support for retry on errors
- vhost: cancel migration when vhost-user restarted
- migration: Add multi-thread compress method
- migration: Refactoring multi-thread compress migration
- migration: Add multi-thread compress ops
- migration: Add zstd support in multi-thread compression
- migration: Add compress_level sanity check
- doc: Update multi-thread compression doc
* Wed Feb 09 2022 Chen Qun <kuhn.chenqun@huawei.com>
- cpu: parse +/- feature to avoid failure
- cpu: add Kunpeng-920 cpu support
- cpu: add Cortex-A72 processor kvm target support
- add Phytium's CPU models: FT-2000+ and Tengyun-S2500.
* Tue Feb 8 2022 Xiangdong Liu <liuxiangdong5@huawei.com>
- net/dump.c: Suppress spurious compiler warning
* Thu Jan 27 2022 Xiangdong Liu <liuxiangdong5@huawei.com>
2019-09-30 11:15:46 -04:00
- Package init