From c8eaeb7c8df364c7ef82aa1f64a44983c093bf04 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 26 Apr 2023 10:49:36 +0200 Subject: [PATCH 001/102] [openSUSE][RPM] Add downstream packaging files Stash the "packaging files" in the QEMU repository, in the rpm/ directory. During package build, they will be pulled out from there and used as appropriate. Signed-off-by: Dario Faggioli --- rpm/50-seabios-256k.json | 35 + rpm/60-seabios-128k.json | 47 + rpm/80-kvm.rules | 1 + rpm/80-qemu-ga.rules | 1 + rpm/APIC.core-count2 | Bin 0 -> 2478 bytes rpm/DSDT.core-count2 | Bin 0 -> 32552 bytes rpm/DSDT.pcie | Bin 0 -> 3023 bytes rpm/FACP.core-count2 | Bin 0 -> 244 bytes rpm/README.PACKAGING | 202 ++ rpm/bridge.conf | 11 + rpm/config.sh | 122 + rpm/ksm.service | 13 + rpm/kvm.conf | 3 + ...SUSE-pcbios-stub-out-the-SAN-req-s-i.patch | 106 + rpm/qemu-guest-agent.service | 14 + rpm/qemu-ifup | 23 + rpm/qemu-kvm.1.gz | Bin 0 -> 47 bytes rpm/qemu-rpmlintrc | 7 + rpm/qemu-supportconfig | 81 + rpm/qemu.keyring | 493 ++++ rpm/qemu.spec | 2296 +++++++++++++++++ rpm/supported.arm.txt | 926 +++++++ rpm/supported.ppc.txt | 6 + rpm/supported.s390.txt | 868 +++++++ rpm/supported.x86.txt | 963 +++++++ 25 files changed, 6218 insertions(+) create mode 100644 rpm/50-seabios-256k.json create mode 100644 rpm/60-seabios-128k.json create mode 100644 rpm/80-kvm.rules create mode 100644 rpm/80-qemu-ga.rules create mode 100644 rpm/APIC.core-count2 create mode 100644 rpm/DSDT.core-count2 create mode 100644 rpm/DSDT.pcie create mode 100644 rpm/FACP.core-count2 create mode 100644 rpm/README.PACKAGING create mode 100644 rpm/bridge.conf create mode 100644 rpm/config.sh create mode 100644 rpm/ksm.service create mode 100644 rpm/kvm.conf create mode 100644 rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch create mode 100644 rpm/qemu-guest-agent.service create mode 100644 rpm/qemu-ifup create mode 100644 rpm/qemu-kvm.1.gz create mode 100644 rpm/qemu-rpmlintrc create mode 100644 rpm/qemu-supportconfig create mode 100644 rpm/qemu.keyring create mode 100644 rpm/qemu.spec create mode 100644 rpm/supported.arm.txt create mode 100644 rpm/supported.ppc.txt create mode 100644 rpm/supported.s390.txt create mode 100644 rpm/supported.x86.txt diff --git a/rpm/50-seabios-256k.json b/rpm/50-seabios-256k.json new file mode 100644 index 0000000000..3109f131a2 --- /dev/null +++ b/rpm/50-seabios-256k.json @@ -0,0 +1,35 @@ +{ + "description": "SeaBIOS", + "interface-types": [ + "bios" + ], + "mapping": { + "device": "memory", + "filename": "/usr/share/qemu/bios-256k.bin" + }, + "targets": [ + { + "architecture": "i386", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + }, + { + "architecture": "x86_64", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + } + ], + "features": [ + "acpi-s3", + "acpi-s4" + ], + "tags": [ + "CONFIG_QEMU=y", + "CONFIG_ROM_SIZE=256", + "CONFIG_ATA_DMA=n" + ] +} diff --git a/rpm/60-seabios-128k.json b/rpm/60-seabios-128k.json new file mode 100644 index 0000000000..6c0ed15bb2 --- /dev/null +++ b/rpm/60-seabios-128k.json @@ -0,0 +1,47 @@ +{ + "description": "SeaBIOS", + "interface-types": [ + "bios" + ], + "mapping": { + "device": "memory", + "filename": "/usr/share/qemu/bios.bin" + }, + "targets": [ + { + "architecture": "i386", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + }, + { + "architecture": "x86_64", + "machines": [ + "pc-i440fx-*", + "pc-q35-*" + ] + } + ], + "features": [ + "acpi-s3", + "acpi-s4" + ], + "tags": [ + "CONFIG_QEMU=y", + "CONFIG_ROM_SIZE=128", + "CONFIG_ATA_DMA=n", + "CONFIG_BOOTSPLASH=n", + "CONFIG_XEN=n", + "CONFIG_USB_OHCI=n", + "CONFIG_USB_XHCI=n", + "CONFIG_USB_UAS=n", + "CONFIG_SDCARD=n", + "CONFIG_TCGBIOS=n", + "CONFIG_MPT_SCSI=n", + "CONFIG_PVSCSI=n", + "CONFIG_NVME=n", + "CONFIG_USE_SMM=n", + "CONFIG_VGAHOOKS=n" + ] +} diff --git a/rpm/80-kvm.rules b/rpm/80-kvm.rules new file mode 100644 index 0000000000..29ad001729 --- /dev/null +++ b/rpm/80-kvm.rules @@ -0,0 +1 @@ +KERNEL=="kvm", MODE="0666", GROUP="kvm" diff --git a/rpm/80-qemu-ga.rules b/rpm/80-qemu-ga.rules new file mode 100644 index 0000000000..f38ace1b34 --- /dev/null +++ b/rpm/80-qemu-ga.rules @@ -0,0 +1 @@ +SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="qemu-guest-agent.service" diff --git a/rpm/APIC.core-count2 b/rpm/APIC.core-count2 new file mode 100644 index 0000000000000000000000000000000000000000..a255082ef5bc39f0d92d3e372b91f09dd6d0d9a1 GIT binary patch literal 2478 zcmXZeWl$AS7=Youz=a#M-K}6ZwgLuNAQ;$~*xjvQcY@uCVs{~Sf`WpLVt2Rbe!ORA z_B`J^b9R56*&pj2=M2p(=#;b`y@>U1KQZ2 ztu5Nwq0xx;_UPb%CKH;?XtAKxijI!xf-7uzGc@Q3Gq% z#9Fnmc5SRv2fe+~#|M4+PE2*{()H?L{rcFT0s8r&zdtr?h>aRyuWjcwXs+qT%Q9ky?e9Xepgju;w>ojPIX&e)|3 zcI}GYx?%V37#4;-dSK6<*sB-z?u~u=VBfyjuOIgBj{^qaz=1eu5Dp%ULx$kcp*U<9 z4j+yqM&QViIBFD*9*twh;MlP^ZXAvuj}s=~#ECd*5{8FkL5Yu4b}wYY8_u3wKEHsHpMxM>q^-i%we;MT3UZ5u{MiV+Y2>;Le@6 zYZva`jeGXs-o3bQAMW3e2M*xDgLvo=9zKjmj^NRwcZnq0$#t4H*R2JA|@r_&6{}Z z7A7ZSN($b-jd$+g-Me`29^Su?4<6vdhnSj*j~?OU$C#FePoCh@r}*p{K7WocUf|1@ z`05qDevNP5;M=$O?j62=j~_nZ$B+2w6Mp`TU%ueiulVg7e*ca?e&Ela`0E$`{*8bB z;NQQPo-UeQHSM3S%%ZeJ#vXl>ElNA87Nwn3i_*@jMQIn+qO_}OQQA$lDDAE~Lr49*wAgf6Z7ljNgG@%F cu9Hk={TGbMqHkcbS~Dh#{`5cn(qE|k2lzA_5C8xG literal 0 HcmV?d00001 diff --git a/rpm/DSDT.core-count2 b/rpm/DSDT.core-count2 new file mode 100644 index 0000000000000000000000000000000000000000..ca309f6569f1f4016cf7e67117b208d57fbc7365 GIT binary patch literal 32552 zcmb8&cYKpo7YFbsooSl3X(=0_g1ASzTX$w#pry10)S_(xmEnj2Dk2I+5phDrJqp&n z_g36napT^5Z=Ag6JkL$;?>V=AKCk@IoRi-BJ?ExvZu8`!Pqa1Kw(SX)^;J&Sp|{khWK0jqoLPdoPo_%n%4zGto9 zxr?dNzPat)HPMz(#O^V#xv4oA36@e{k(SoNQN9r;54J2nKREpFrp=o-Kj?&3V4)S5 zP`ooQlb6`Oq&d>s=E+^}_j%iw1~`e({gX@RL$suQNo#BzJ*ZFmeHrwqauNv#W8>%( z;ikqGPwob18Yhu()8xjI=7#7#CGDQ@gvfZScx-bdHZHAw3}>4+CuZ@8#6r((i;ebe z`0hTdc!v

2DNU3I5Qj#&#BmbDE>Ajd{J%te!bmqA=ZKbtbH?-eIeq2Yy5KQ=ha} z9^1HT@RyB4ABi;fb@pbjne9vK>r8NwWh)M`Ec)QFrqh(gJ=3k8>3(`_Hd~9kJY9>s z7J7WyR#&2HMWc$?MZqH11kZ$qJxYn8DT4#=Xos{A_eXe!-T_L&nde?7rMS*~*E;iE>&$nr zlTut~foq)wu5}i;*GVa^GvHchz_reRd!3ZxItyLvEOf22(7jGdah*l3br!kSS>#?P zrMS)ku5}J@t#g2Tos{A_i(Tt1cCEA6y-rGTodaF#9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B+J>q{)dtgi&eyEOqtbV&)_#q{*oS zrxKh>azdJ%I6ZVt;%Af>oO#I!X>#Hp3(w?v76fNOazdJ%MZsAVoJGkAX>yhXXGw6D zBqyZFIWIWp1?Rlvgfux_!RZQ4S8_s{oMpjT7Mx|t32Aax1ZPEXRwO5+$+;jn7X;^m zoJ)dpNpLPnPDqmzhqUp#tqIPWf9{kz* zuTj7K{qbk*$8Y`d(Zz|fVX%d}gL~_g1;^n*i$gu&i)!$7>OPv>v%bViGq!F{mmW3HB|XoZG%ru8uSeZ*U{7Ds**v-R>)+w_7lZF={|r`s@dwk~GqueIL%@c2vpQ3Ox?}58cY6 A9{>OV literal 0 HcmV?d00001 diff --git a/rpm/FACP.core-count2 b/rpm/FACP.core-count2 new file mode 100644 index 0000000000000000000000000000000000000000..31fa5dd19c213034eef4eeefa6a04e61dadd8a2a GIT binary patch literal 244 zcmZ>BbPo8!z`($~*~#D8BUr&HBEVSz2pEB4AU24G0Y(N+hD|^Y6El!tgNU*~X%LSC z$X0-fGcm9T0LA|E|L2FOWMD92VqjR>!otAF!NBm72Obk1 YBHITON2VDSAnpK(F*YFF1LDH~0O^Si0RR91 literal 0 HcmV?d00001 diff --git a/rpm/README.PACKAGING b/rpm/README.PACKAGING new file mode 100644 index 0000000000..b744ebfa3e --- /dev/null +++ b/rpm/README.PACKAGING @@ -0,0 +1,202 @@ +# PACKAGING WORKFLOW(S) + +The qemu package follows a special maintenance workflow in order to support +git based patching, including of submodules. Please use it in order to have +changes you make be acceptable to the package maintainers. + +All the development happens at https://github.com/openSUSE/qemu. The relevant +branch is `factory`. + +Any change to the package should be submitted in the form of a Pull Request +against such repository and branch. + +The reminder of this document provides more details, explanations and examples +for both contributors and maintainers. + + +# FOR CONTRIBUTORS + +## BACKPORTING AN UPSTREAM PATCH + +For submitting a backport of an upstream patch, proceed as follows (a local +copy of the repository is of course necessary). + +Identify the hash of the commit that needs backporting and do: + + git cherry-pick -esx + +This way, the changelog will already contain the reference to the upstream +commit itself, and the appropriate "Signed-off-by:" tag. + +If the backport is related to Bugzilla (or Jira, and/or CVEs, etc) entry, add a +reference to that, such as: + + Resolves: bsc#123456 + +Or: + + References: jsc#PED-1234 + +Or: + + Resolves: bsc#7891011 (CVE-1234-5678) + +Add it between the "(cherry picked from commit ...)" line and the "Signed-off-by:" +line that follows it. + +An example of the end result, where Dario Faggioli () is +backporting upstream commit abe2c4bdb65e8dd in order to fix bug 1209546 from +bugzilla.opensuse.org is: + + test-vmstate: fix bad GTree usage, use-after-free + + According to g_tree_foreach() documentation: + "The tree may not be modified while iterating over it (you can't + add/remove items)." + + [...] + + Get rid of the node removal within the tree traversal. Also + check the trees have the same number of nodes before the actual + diff. + + Fixes: 9a85e4b8f6 ("migration: Support gtree migration") + Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1518 + Signed-off-by: Marc-Andr303251 Lureau + Signed-off-by: Eric Auger + Reported-by: Richard W.M. Jones + Tested-by: Richard W.M. Jones + Reviewed-by: Richard W.M. Jones + Reviewed-by: Daniel P. Berrang303251 + Reviewed-by: Juan Quintela + Signed-off-by: Juan Quintela + (cherry picked from commit abe2c4bdb65e8dd9cb2f01c355baa394bf49a8af) + Resolves: bsc#1209546 + Signed-off-by: Dario Faggioli + +Of course, all conflicts and issues should be resolved, before committing the +result/completing the cherry-picking. + +At this point, the PR should be opened. As soon as that happens, some checks +will be run automatically and the maintainers of the QEMU package will review +and, eventually, merge or reject it. + +PRs containing multiple commits are allowed. They are actually encouraged, if +the patches being backported are related and/or dependant among each others. It +must, however, always be the case that each upstream commit is cherry-picked +individually. + +Note that there is no need to change any 'qemu.changes' file. That will, in +fact be handled by the package maintainers (and such RPM changelog entries will +be automatically generated out of the git commit messages). + +## ADDING A PATCH NOT COMING FROM UPSTREAM + +Downstream patches, i.e., patches that are not backports of upstream commits, +should be avoided as much as possible. The (largely!) recommended approach is +to submit the patch upstream and then, once it is accepted and committed, +backport it. + +If that is not possible (for whatever reason), a pull request with a downstream +only patch can be opened. The procedure is almost identical to the one described +above for upstream backports. The main differences are: + +1) Downstream only patch cannot be cherry-picked from upstream commits, of + course. Therefore, the PR will consist of the commit(s) that introduces the + patch. + +2) There will be no "(cherry picked from commit ...") line in the changelog + of a downstream only patch. On the other hand, the "Resolves:" or + "Reference:" tag, that link the patch to the issue it's trying to solve, + must be there, and the same is true for the "Signed-off-by:" tag + indicating who is proposing adding it. + +3) It is required that the subject of the commit starts with the [openSUSE] tag. + +An example of a downstream only commit is: + + [openSUSE] pc: q35: Bump max_cpus to 1024 + + And use the new limit for machine version 7.1 too. + Keep the old limit of 288 for machine versions 7.0 and earlier. + + Signed-off-by: Dario Faggioli + References: bsc#1202282, jsc#PED-2592 + Signed-off-by: Dario Faggioli + +## CHANGING THE PACKAGING FILES + +Files that are necessary for building the RPM (like the spec file) or that +are part of the RPM and will be copied in the appropriate places in the +filesystem when it is installed are also part of the git repository. In fact, +they can be found in the `rpm/` directory. + +Any addition, removal or change of and on any of those file should just be done +as a regular commit, and a pull request including such commit(s) should be +opened. + +Commits to packaging files should be prefixed with both the [openSUSE] tag and +an [RPM] tag. An example can be this one: + + [openSUSE][RPM] Add downstream packaging files + + Stash the "packaging files" in the QEMU repository, in the rpm/ + directory. During package build, they will be pulled out from there + and used as appropriate. + + Signed-off-by: Dario Faggioli + +## ADDING A PATCH IN A SUBMODULE + +For including a backport, or in general adding a patch, to a submodule, the +downstream git repository for the submodule must be checkedout at the location +where the submodule resides, in the main QEMU git repository. + +For example, for including a downstream patch in the ipxe submodule, a local +copy of the repository https://github.com/openSUSE/qemu-ipxe.git is necessary. +After checking out the `factory` branch, add the patch there (cherry-picking +it from upstream, if it is a backport, and respecting all the tagging rules +explained in the previous sections). + +At this point: +- the branch must be pushed; +- in the main (qemu) repository, a commit must be added and pushed, for making + sure that the new patch is picked up. + +Basically, the commit in the main repository is how the information that a +submodule as a new head is recorded. + +The changelog of such commit shall include a reference to the subjects of all +the new commits in the various submodules. Unfortinately, there is not yet a +good way of achieving this automatically. + +As last step, a pull request should be opened, as usual. + +## REMOVING PATCHES + +If a patch, or, in general, a commit, that is already part of the repository +must be removed, this must be done without rewriting the git history, i.e., with +a revert (and then a pull request with the revert should be opened). + + +# FOR MAINTAINERS + +## REVIEWING AND ACCEPTING PRs + +TODO + +## COMMITTING CHANGES INTO FACTORY + +TODO + +## UPDATING THE BASE QEMU VERSION + +TODO + + +# MANUAL AND AUTOMATED CHECKS + +TODO + + + diff --git a/rpm/bridge.conf b/rpm/bridge.conf new file mode 100644 index 0000000000..d06c62a338 --- /dev/null +++ b/rpm/bridge.conf @@ -0,0 +1,11 @@ +# Access control file for qemu bridge helper +# Syntax consists of: +# # comment (ignored) +# allow all +# allow +# deny all +# deny +# include /path/to/additional/ACL/file +# Users are blacklisted by default and 'deny' takes precedence over 'allow'. +# Including additional ACL files allows file access permissions to be used as +# a component of the policy to allow access or deny access to specific bridges. diff --git a/rpm/config.sh b/rpm/config.sh new file mode 100644 index 0000000000..b061b05647 --- /dev/null +++ b/rpm/config.sh @@ -0,0 +1,122 @@ +#!/bin/bash + +# config.sh: + +# The next few VARIABLES are to be edited as required: + +# Package name. (In multibuild, it's the base package). Used to ref spec file. +PKG=qemu + +# Here is the git repo which tracks a separate upstream git based project +# We take this approach so we can have our own tags and branches, and store +# the patches in git for others to access outside of the bundle. +PACKAGE_MAIN_GIT_REPO=https://github.com/openSUSE/qemu.git + +# This is the upstream for the PACKAGE_MAIN_GIT_REPO +UPSTREAM_GIT_REPO=https://gitlab.com/qemu-project/qemu.git + +# The following specifies the upstream tag or commit upon which our patchqueue +# gets rebased. The special value LATEST may be used to "automatically" track +# the upstream development tree in the master branch +#GIT_UPSTREAM_COMMIT_ISH=v7.0.0 +GIT_UPSTREAM_COMMIT_ISH=v7.1.0 +# WARNING: If transitioning from using LATEST to not, MANUALLY re-set the +# tarball present. If transitioning TO LATEST, make sure that +# NEXT_RELEASE_IS_MAJOR is set correctly +# This is used to choose the version number when LATEST processing is active +NEXT_RELEASE_IS_MAJOR=1 + +# Unfortunately, SeaBIOS doesn't always follow an "always increasing" version +# model, so there may be times we should overide the automated version setting. +# We can do so by specifing the value here: +#SEABIOS_VERSION=1.13.0 + +# In following, use 1 or 0 as needed (representing true or false respectively) +NUMBERED_PATCHES=0 + +PATCH_RANGE=1000 + +# For compatibility with old packages, we include this option +OVERRIDE_FIVE_DIGIT_NUMBERING=0 + +# Path to be used for temporary files, directories, repositories, etc. +# Default is /dev/shm. An alternative could be /tmp (e.g., when building +# in containers, or whatever). +#TMPDIR=/dev/shm +TMPDIR=/tmp + +# This array tracks all git submodule paths within the superproject (1st entry) +PATCH_PATH_MAP=( + "" + "roms/seabios/" + "roms/ipxe/" + "roms/sgabios/" + "roms/edk2/" + "roms/skiboot/" + "roms/SLOF/" + "roms/openbios/" + "ui/keycodemapdb/" + "slirp/" + "roms/u-boot/" + "roms/qboot/" + "dtc/" + "roms/opensbi/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/" + "capstone/" + "roms/qemu-palcode/" + "roms/seabios-hppa/" + "roms/u-boot-sam460ex/" + "roms/QemuMacDrivers/" + "meson/" + "tests/fp/berkeley-softfloat-3/" + "tests/fp/berkeley-testfloat-3/" + "tests/lcitool/libvirt-ci" + "roms/edk2/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/boringssl/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/krb5/" + "roms/edk2/CryptoPkg/Library/OpensslLib/openssl/pyca-cryptography/" + "roms/edk2/BaseTools/Source/C/BrotliCompress/brotli/" + "roms/edk2/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/" + "roms/edk2/MdeModulePkg/Universal/RegularExpressionDxe/oniguruma/" + "roms/edk2/UnitTestFrameworkPkg/Library/CmockaLib/cmocka/" + "roms/vbootrom/" + "roms/edk2/RedfishPkg/Library/JsonLib/jansson" +) + +# (order and count must correspond to PATCH_PATH_MAP) +LOCAL_REPO_MAP=( + ~/git/qemu-opensuse + ~/git/qemu-seabios + ~/git/qemu-ipxe + ~/git/qemu-sgabios + ~/git/qemu-edk2 + ~/git/qemu-skiboot + ~/git/qemu-SLOF + ~/git/qemu-openbios + ~/git/qemu-keycodemapdb + ~/git/qemu-slirp + ~/git/qemu-u-boot + ~/git/qemu-qboot + ~/git/qemu-dtc + ~/git/qemu-opensbi + ~/git/qemu-edk2-openssl + ~/git/qemu-capstone + ~/git/qemu-qemu-palcode + ~/git/qemu-seabios-hppa + ~/git/qemu-u-boot-sam460ex + ~/git/qemu-QemuMacDrivers + ~/git/qemu-meson + ~/git/qemu-tests-berkeley-softfloat-3 + ~/git/qemu-tests-berkeley-testfloat-3 + ~/git/qemu-tests-lcitool-libvirt-ci + ~/git/qemu-edk2-berkeley-softfloat-3 + ~/git/qemu-edk2-openssl-boringssl + ~/git/qemu-edk2-openssl-krb5 + ~/git/qemu-edk2-openssl-pyca-cryptography + ~/git/qemu-edk2-BrotliCompress-brotli + ~/git/qemu-edk2-BrotliCustomDecompressLib-brotli + ~/git/qemu-edk2-oniguruma + ~/git/qemu-edk2-cmocka + ~/git/qemu-vbootrom + ~/git/qemu-edk2-jansson +) diff --git a/rpm/ksm.service b/rpm/ksm.service new file mode 100644 index 0000000000..fec1e7eaf0 --- /dev/null +++ b/rpm/ksm.service @@ -0,0 +1,13 @@ +[Unit] +Description=Kernel Samepage Merging +ConditionPathExists=/sys/kernel/mm/ksm +ConditionVirtualization=no + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/bin/bash -c "/bin/echo 1 > /sys/kernel/mm/ksm/run" +ExecStop=/bin/bash -c "/bin/echo 0 > /sys/kernel/mm/ksm/run" + +[Install] +WantedBy=multi-user.target diff --git a/rpm/kvm.conf b/rpm/kvm.conf new file mode 100644 index 0000000000..c1c76e682c --- /dev/null +++ b/rpm/kvm.conf @@ -0,0 +1,3 @@ +# load kvm module at boot time +kvm + diff --git a/rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch b/rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch new file mode 100644 index 0000000000..4f88af1ef9 --- /dev/null +++ b/rpm/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch @@ -0,0 +1,106 @@ +From: Bruce Rogers +Date: Mon, 24 Jul 2017 10:44:24 -0600 +Subject: [openSUSE] [pcbios] stub out the SAN req's in int13 + +Include-If: %if 0%{?patch-possibly-applied-elsewhere} + +We need to find some code or data to change so we can make the rom fit +into the legacy size requirements. Comment out SAN support, and +hopefully nobody will be impacted. + +Signed-off-by: Bruce Rogers +--- + src/arch/x86/interface/pcbios/int13.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/roms/ipxe/src/arch/x86/interface/pcbios/int13.c b/roms/ipxe/src/arch/x86/interface/pcbios/int13.c +index ca789a0d154e1fe3c2508a3aefea..40c61419c0c134120d1ce7c81a1e 100644 +--- a/roms/ipxe/src/arch/x86/interface/pcbios/int13.c ++++ b/roms/ipxe/src/arch/x86/interface/pcbios/int13.c +@@ -23,6 +23,12 @@ + + FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + ++#define INCLUDE_SAN_HOOKS 0 ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wunused-parameter" ++#pragma GCC diagnostic ignored "-Wunused-function" ++#pragma GCC diagnostic ignored "-Wunused-variable" ++ + #include + #include + #include +@@ -1243,6 +1249,7 @@ static void int13_unhook_vector ( void ) { + */ + static int int13_hook ( unsigned int drive, struct uri **uris, + unsigned int count, unsigned int flags ) { ++#if INCLUDE_SAN_HOOKS + struct san_device *sandev; + struct int13_data *int13; + unsigned int natural_drive; +@@ -1315,6 +1322,9 @@ static int int13_hook ( unsigned int drive, struct uri **uris, + sandev_put ( sandev ); + err_alloc: + return rc; ++#else ++ return -1; ++#endif + } + + /** +@@ -1328,6 +1338,7 @@ static int int13_hook ( unsigned int drive, struct uri **uris, + */ + static void int13_unhook ( unsigned int drive ) { + struct san_device *sandev; ++#if INCLUDE_SAN_HOOKS + + /* Find drive */ + sandev = sandev_find ( drive ); +@@ -1353,6 +1364,7 @@ static void int13_unhook ( unsigned int drive ) { + + /* Drop reference to drive */ + sandev_put ( sandev ); ++#endif + } + + /** +@@ -1514,6 +1526,7 @@ static int int13_load_eltorito ( unsigned int drive, struct segoff *address ) { + * Note that this function can never return success, by definition. + */ + static int int13_boot ( unsigned int drive, const char *filename __unused ) { ++#if INCLUDE_SAN_HOOKS + struct memory_map memmap; + struct segoff address; + int rc; +@@ -1539,6 +1552,9 @@ static int int13_boot ( unsigned int drive, const char *filename __unused ) { + } + + return -ECANCELED; /* -EIMPOSSIBLE */ ++#else ++ return -1; ++#endif + } + + /** Maximum size of boot firmware table(s) */ +@@ -1605,6 +1621,7 @@ static int int13_install ( struct acpi_header *acpi ) { + * @ret rc Return status code + */ + static int int13_describe ( void ) { ++#if INCLUDE_SAN_HOOKS + int rc; + + /* Clear tables */ +@@ -1619,9 +1636,13 @@ static int int13_describe ( void ) { + } + + return 0; ++#else ++ return -1; ++#endif + } + + PROVIDE_SANBOOT ( pcbios, san_hook, int13_hook ); + PROVIDE_SANBOOT ( pcbios, san_unhook, int13_unhook ); + PROVIDE_SANBOOT ( pcbios, san_boot, int13_boot ); + PROVIDE_SANBOOT ( pcbios, san_describe, int13_describe ); ++#pragma GCC diagnostic pop diff --git a/rpm/qemu-guest-agent.service b/rpm/qemu-guest-agent.service new file mode 100644 index 0000000000..2d6da4250a --- /dev/null +++ b/rpm/qemu-guest-agent.service @@ -0,0 +1,14 @@ +[Unit] +Description=QEMU Guest Agent +Documentation=http://wiki.qemu.org/Features/GuestAgent +BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device +After=dev-virtio\x2dports-org.qemu.guest_agent.0.device + +[Service] +Type=simple +ExecStart=-/usr/bin/qemu-ga -p /dev/virtio-ports/org.qemu.guest_agent.0 +Restart=always +RestartSec=0 + +[Install] +WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device diff --git a/rpm/qemu-ifup b/rpm/qemu-ifup new file mode 100644 index 0000000000..7716b12446 --- /dev/null +++ b/rpm/qemu-ifup @@ -0,0 +1,23 @@ +#!/bin/sh + +# sample bridge qemu-ifup script + +echo 'configuring qemu network with bridge for' $* + +# If bridge is not specified, try device with default route. +bridge=$2 +if [ -z "$bridge" ]; then + bridge=$(/usr/sbin/ip route list | /usr/bin/awk '/^default / { print $5 }') +fi + +# Exit if $bridge is not a bridge. Exit with 0 status +# so qemu process is not terminated and provide message +# about failure to setup network. +if [ ! -e "/sys/class/net/${bridge}/bridge" ] +then + echo "WARNING! ${bridge} is not a bridge. qemu-ifup exiting. VM may not have a functioning networking stack." + exit 0 +fi + +/usr/sbin/ip link set $1 up +/usr/sbin/ip link set $1 master $bridge || true diff --git a/rpm/qemu-kvm.1.gz b/rpm/qemu-kvm.1.gz new file mode 100644 index 0000000000000000000000000000000000000000..48e8ae91e9c89d2b1e0d3850ea2696234a03383a GIT binary patch literal 47 zcmb2|=HU42x+#!>xiB@iR5!aUSI>~)vi7;~6TWARuju=n)xB!`go$Cr#NGJ<3=9ka DqdXCI literal 0 HcmV?d00001 diff --git a/rpm/qemu-rpmlintrc b/rpm/qemu-rpmlintrc new file mode 100644 index 0000000000..9664dfe394 --- /dev/null +++ b/rpm/qemu-rpmlintrc @@ -0,0 +1,7 @@ +# This line is mandatory to access the configuration functions +from Config import * + +addFilter("arch-dependent-file-in-usr-share") +addFilter("obsolete-not-provided") +addFilter("summary-not-capitalized") +addFilter("executable-stack") diff --git a/rpm/qemu-supportconfig b/rpm/qemu-supportconfig new file mode 100644 index 0000000000..9cd1e67981 --- /dev/null +++ b/rpm/qemu-supportconfig @@ -0,0 +1,81 @@ +#!/bin/bash +############################################################# +# Name: Supportconfig Plugin for QEMU/KVM +# Description: Gathers important troubleshooting information +# about QEMU +# Author: Jim Fehlig +############################################################# + +RCFILE="/usr/lib/supportconfig/resources/scplugin.rc" + +if [ -s $RCFILE ]; then + if ! source $RCFILE; then + echo "ERROR: Initializing resource file: $RCFILE" >&2 + exit 1 + fi +fi + +rpm_verify() { + thisrpm="$1" + local ret=0 + + echo + echo "#==[ Validating RPM ]=================================#" + if rpm -q "$thisrpm" >/dev/null 2>&1; then + echo "# rpm -V $thisrpm" + + if rpm -V "$thisrpm"; then + echo "Status: Passed" + else + echo "Status: WARNING" + fi + else + echo "package $thisrpm is not installed" + ret=1 + fi + echo + return $ret +} + +if ! rpm_verify qemu; then + echo "Skipped" + exit 0 +fi + +# skip if the host is xen +echo "#==[ Checking if booted Xen ]=================================#" +if [ -d /proc/xen ] && [ -e /proc/xen/capabilities ] && [ `cat /proc/xen/capabilities` = "control_d" ]; then + echo "Yes" + echo "Skipped" + exit 0 +else + echo "No" + echo +fi + +# basic system information +plugin_command "uname -r" +plugin_command "lscpu" +plugin_command "lspci -v" +plugin_command "lsscsi" +plugin_command "kvm_stat -1" +plugin_command "lsmod | grep ^kvm" +for MODULE in `lsmod | grep ^kvm | cut -d ' ' -f 1`; do + plugin_command "modinfo $MODULE" +done +plugin_command "ps -ef | grep qemu" + +# list contents of common config and image directories +plugin_command "ls -alR /var/lib/libvirt/images/" + +# network-related info often useful for debugging +nm_enabled=$(systemctl is-enabled NetworkManager.service > /dev/null 2>&1; echo $?) +if [ $nm_enabled -eq 0 ]; then + echo "NOTE: NetworkManager should not be enabled on a KVM host" +fi +plugin_command "ip route list" +plugin_command "ip neigh list" +plugin_command "ip link show type bridge" +plugin_command "bridge link show" + +echo "Done" diff --git a/rpm/qemu.keyring b/rpm/qemu.keyring new file mode 100644 index 0000000000..cce2e0110f --- /dev/null +++ b/rpm/qemu.keyring @@ -0,0 +1,493 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQENBFJhQQ8BCAChk4A3y0VfqeGfuhBZK4nvpZP/cSIQntWDheF3Tx7m9CxEGbc+ +5aHxfrvm45LSjwPCK020WjeqYX2UFQfcvcjoW6iMbth1BLydu11vx6Gk/CJuB7Ss +8AbyvEXBcOfHbginUdqr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2gJox0iYrqpnFOFlK/XdSYnZNYp +IyBin1e+K2CG+TzF2M+KmdZE7FMhnTz95estAG2kC37VIVkCq8yHNVZqsgyAfMqp +B1ayQI2r3FUBM0Hxp6z2+8v/Ezp6zhYCI+BiUC7VbrWSSuTlp4UAEQEAAYkBHwQY +AQIACQUCUmFBDwIbDAAKCRAzU8nO8Qi1hKWYB/0R6ct3W2SEyoNuHTTKd5szIJig +HYXrsqBa4XQGaVuFz7XZtcIbFFhEHjMrvTJpBWhuZ091Gp0AjV2ACNi2z+dSpXi1 +6QxdFb1/4us6mFEm86UIu4tcNN1V3WPiODpWfFkEys/vmqQImLjfSsdxzhMdX7Ye +n1B3fxiKzwzsTlFbnNiBr2Mv7flDiUvMdbHmb/n0/B6a69SRYfVkJ3MZdl0gptJl +XhJVdwjwVVl3bjvlQd0aZoLwJ7ntrWeMxOkbf8950vPVxemQ1frblB0zR98fuUNh +X4cjrFTI9iJck7xLUwNZfgOz9PodfqUv4riMLczMmw3nwGZO/aJg0m6uWSWk +=YraJ +-----END PGP PUBLIC KEY BLOCK----- diff --git a/rpm/qemu.spec b/rpm/qemu.spec new file mode 100644 index 0000000000..b3b787bc3f --- /dev/null +++ b/rpm/qemu.spec @@ -0,0 +1,2296 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%define name_suffix %{nil} + +%if "%{flavor}" == "linux-user" +%define name_suffix -linux-user +%define summary_string CPU emulator for user space +%else +%define summary_string Machine emulator and virtualizer +%endif + +%define _buildshell /bin/bash + +%define srcdir %{_builddir}/%buildsubdir +%define blddir %srcdir/build +%define rpmfilesdir %{_builddir}/%{srcname}-%{qemuver}/rpm + +%define build_x86_firmware 0 +%define build_ppc_firmware 0 +%define build_opensbi_firmware 0 +%define kvm_available 0 +%define legacy_qemu_kvm 0 +%define force_fit_virtio_pxe_rom 1 + +%if "%{?distribution}" == "" +%define distro private-build +%else +%define distro %{distribution} +%endif + +# So, we have openSUSE:Factory, and we have "ports". In openSUSE:Factory, we +# have i586 and x86_64. In the :ARM port, we have aarch64, armv6l and armv7l. +# In the :PowerPC port, we have ppc64, ppc and ppc64le. In the :zSystems port +# we have s390x. And in the :RISCV we have riscv. +# +# Ideally, we'd want to build the firmwares at least once per port, and then +# share the resulting packages among the arch-es within each port (check the +# `ExportFilter` directives in the project config). +# +# Of course, we always build the "native fimrwares" (e.g., x86 firmwares on +# x86_64, PPC firmwares on ppc64le, etc). But we also cross compile as much +# firmwares as we can (e.g., both x86 and PPC firmwares on aarch64) so they'll +# be available in as many ports as possible (as noarch packages). + +%ifarch x86_64 aarch64 +%define build_ppc_firmware 1 +# Currently, opensbi does not cross build cleanly on 15.3 and 15.4 +%if ! 0%{?sle_version} +%define build_opensbi_firmware 1 +%endif +%define build_x86_firmware 1 +%endif +%ifarch ppc64 ppc64le +%define build_ppc_firmware 1 +%if ! 0%{?sle_version} +%define build_opensbi_firmware 1 +%endif +# FIXME: Try to enable cross building of x86 firmwares here on PPC +%endif +%ifarch riscv64 +%define build_opensbi_firmware 1 +%endif + +%ifarch %ix86 x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64 riscv64 +%define kvm_available 1 +%define with_uring 1 +%define liburing_min_version 1.0 +%endif + +%ifarch %ix86 x86_64 s390x +%define legacy_qemu_kvm 1 +%endif + +%ifarch x86_64 aarch64 ppc64le s390x +%define with_rbd 1 +%endif + +%ifarch x86_64 ppc64le +%define with_daxctl 1 +%endif + +%bcond_with chkqtests + +# enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward +# the following need to be > 64K +%define supported_nics_large {e1000 rtl8139} +# the following need to be <= 64K +%define supported_nics_small {virtio} +# Though not required, make unsupported pxe roms migration compatable as well +%define unsupported_nics {eepro100 ne2k_pci pcnet} + +# non-x86 archs still seem to have some issues with Link Time Optimization +%ifnarch %ix86 x86_64 +%define _lto_cflags %{nil} +%endif + +%define generic_qemu_description \ +QEMU provides full machine emulation and cross architecture usage. It closely\ +integrates with KVM and Xen virtualization, allowing for excellent performance.\ +Many options are available for defining the emulated environment, including\ +traditional devices, direct host device access, and interfaces specific to\ +virtualization. + +%bcond_with system_membarrier +%bcond_with malloc_trim + +%define qemuver 7.1.0 +%define srcver 7.1.0 +%define sbver 1.16.0_0_gd239552 +%define srcname qemu +Name: qemu%{name_suffix} +URL: https://www.qemu.org/ +Summary: %{summary_string} +License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +Group: System/Emulators/PC +Version: %qemuver +Release: 0 +Source: %{srcname}-%{srcver}.tar.xz +Source200: qemu-rpmlintrc +Source303: README.PACKAGING +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if "%{name}" == "qemu-linux-user" +# Build dependencies exclusive to qemu-linux-user +BuildRequires: glib2-devel-static >= 2.56 +BuildRequires: glibc-devel-static +BuildRequires: (pcre-devel-static if glib2-devel-static < 2.73 else pcre2-devel-static) +# passing filelist check for /usr/lib/binfmt.d +BuildRequires: systemd +BuildRequires: zlib-devel-static +# we must not install the qemu-linux-user package when under QEMU build +%if 0%{?qemu_user_space_build:1} +#!BuildIgnore: post-build-checks +%endif +# End of build dependencies for qemu-linux-user +%else +# Build dependencies exclusive to qemu +%if %{build_x86_firmware} +%ifnarch %ix86 x86_64 +# We must cross-compile on non-x86* +BuildRequires: cross-x86_64-binutils +BuildRequires: cross-x86_64-gcc%gcc_version +%endif +BuildRequires: acpica +BuildRequires: binutils-devel +BuildRequires: dos2unix +BuildRequires: glibc-devel-32bit +BuildRequires: pkgconfig(liblzma) +%endif +%if %{build_opensbi_firmware} +%ifnarch riscv64 +BuildRequires: cross-riscv64-binutils +BuildRequires: cross-riscv64-gcc%gcc_version +%endif +%endif +%if %{build_ppc_firmware} +%ifnarch ppc64 ppc64le +BuildRequires: cross-ppc64-binutils +BuildRequires: cross-ppc64-gcc%gcc_version +%endif +%endif +%ifarch x86_64 +BuildRequires: gcc-32bit +BuildRequires: xen-devel >= 4.2 +BuildRequires: pkgconfig(libpmem) +%endif +%ifnarch %arm s390x +BuildRequires: libnuma-devel +%endif +%if 0%{?with_daxctl} +BuildRequires: pkgconfig(libndctl) +%endif +%if 0%{?with_rbd} +BuildRequires: librbd-devel +%endif +%if 0%{?with_uring} +BuildRequires: pkgconfig(liburing) >= %liburing_min_version +%endif +%if %{kvm_available} +BuildRequires: pkgconfig(udev) +%endif +BuildRequires: Mesa-devel +BuildRequires: bison +BuildRequires: brlapi-devel +BuildRequires: flex +BuildRequires: libaio-devel +BuildRequires: libattr-devel +BuildRequires: libbpf-devel +BuildRequires: libbz2-devel +BuildRequires: libcapstone-devel +BuildRequires: libfdt-devel >= 1.4.2 +BuildRequires: libgcrypt-devel >= 1.8.0 +BuildRequires: lzfse-devel +BuildRequires: multipath-tools-devel +BuildRequires: pam-devel +BuildRequires: pkgconfig +BuildRequires: python3-Sphinx +BuildRequires: rdma-core-devel +BuildRequires: snappy-devel +BuildRequires: update-desktop-files +BuildRequires: usbredir-devel >= 0.6 +BuildRequires: xfsprogs-devel +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(epoxy) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(glib-2.0) >= 2.56 +BuildRequires: pkgconfig(glusterfs-api) >= 3 +BuildRequires: pkgconfig(gnutls) >= 3.5.18 +BuildRequires: pkgconfig(gtk+-3.0) >= 3.22 +BuildRequires: pkgconfig(jack) +BuildRequires: pkgconfig(libcacard) >= 2.5.1 +BuildRequires: pkgconfig(libcap-ng) +BuildRequires: pkgconfig(libcurl) >= 7.29 +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libiscsi) >= 1.9.0 +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libnfs) >= 1.9.3 +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libsasl2) +BuildRequires: pkgconfig(libseccomp) >= 2.3.0 +BuildRequires: pkgconfig(libssh) >= 0.8.7 +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(lzo2) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(pixman-1) >= 0.21.8 +BuildRequires: pkgconfig(slirp) >= 4.2.0 +BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 +BuildRequires: pkgconfig(spice-server) >= 0.12.5 +BuildRequires: pkgconfig(systemd) +BuildRequires: pkgconfig(vdeplug) +BuildRequires: pkgconfig(virglrenderer) >= 0.4.1 +BuildRequires: pkgconfig(vte-2.91) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(zlib) +%{?systemd_ordering} +# End of build dependencies for qemu +%endif +# Common build dependencies between qemu and qemu-linux-user +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: git-core +BuildRequires: meson +BuildRequires: ninja >= 1.7 +BuildRequires: perl-Text-Markdown +BuildRequires: python3-base >= 3.6 +BuildRequires: python3-setuptools +%if "%{name}" == "qemu" +# Requires, Recommends, etc exclusive to qemu +%if %{kvm_available} +%ifarch %ix86 x86_64 +Requires: qemu-x86 +%else +Suggests: qemu-x86 +%endif +%ifarch ppc ppc64 ppc64le +Requires: qemu-ppc +%else +Suggests: qemu-ppc +%endif +%ifarch s390x +Requires: qemu-s390x +Requires(post): procps +%else +Suggests: qemu-s390x +%endif +%ifarch %arm aarch64 +Requires: qemu-arm +%else +Suggests: qemu-arm +%endif +%ifarch riscv64 +Requires: qemu-extra +%else +Suggests: qemu-extra +%endif +Requires(post): acl +Requires(post): udev +Recommends: kvm_stat +# End of "if kvm_available" +%endif +Requires: group(kvm) +Requires: group(qemu) +Requires: user(qemu) +Requires(post): coreutils +%ifarch s390x +Recommends: qemu-hw-s390x-virtio-gpu-ccw +%else +# Due to change in where some documentation files are, if qemu-guest-agent +# is installed, we need to make sure we update it to our version. +Requires: (qemu-guest-agent = %{qemuver} if qemu-guest-agent) +Recommends: qemu-hw-display-qxl +Recommends: qemu-hw-display-virtio-gpu +Recommends: qemu-hw-display-virtio-gpu-pci +Recommends: qemu-hw-display-virtio-vga +Recommends: qemu-hw-usb-host +Recommends: qemu-hw-usb-redirect +Recommends: qemu-hw-usb-smartcard +Recommends: qemu-ui-gtk +Recommends: qemu-ui-spice-app +# End of "ifarch s390x" +%endif +Recommends: qemu-block-curl +Recommends: qemu-block-nfs +Recommends: qemu-ksm = %{qemuver} +Recommends: qemu-tools +Recommends: qemu-ui-curses +%if 0%{?with_rbd} +Suggests: qemu-block-rbd +%endif +Suggests: qemu-accel-qtest +Suggests: qemu-block-dmg +Suggests: qemu-block-gluster +Suggests: qemu-block-iscsi +Suggests: qemu-block-ssh +Suggests: qemu-chardev-baum +Suggests: qemu-extra +Suggests: qemu-lang +Suggests: qemu-microvm +Suggests: qemu-skiboot +Suggests: qemu-vhost-user-gpu +Obsoletes: qemu-audio-oss < %{qemuver} +Obsoletes: qemu-audio-sdl < %{qemuver} +Obsoletes: qemu-ui-sdl < %{qemuver} +# End of Requires, Recommends, etc for qemu. +# There isn't any for qemu-linux-user. +%endif + +%package headless +Summary: Minimum set of packages for having a functional QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu +Requires: qemu-tools +%if %{legacy_qemu_kvm} +Requires: qemu-kvm +%endif +Requires: qemu-hw-usb-redirect +# qemu-ui-spice-core will bring in qemu-audio-spice qemu-ui-opengl too +Requires: qemu-ui-spice-core +Requires: qemu-chardev-spice + +%description headless +%{generic_qemu_description} + +This meta-package brings in, as dependencies, the minimum set of packages +currently necessary for having a functional (headless) QEMU/KVM stack. + +%if "%{name}" == "qemu-linux-user" +# Description and files for the qemu-linux-user package + +%description +QEMU provides CPU emulation along with other related capabilities. This package +provides programs to run user space binaries and libraries meant for another +architecture. The syscall interface is intercepted and execution below the +syscall layer occurs on the native hardware and operating system. + +%files +%defattr(-, root, root) +%doc README.rst VERSION +%license COPYING COPYING.LIB LICENSE +%_bindir/qemu-aarch64 +%_bindir/qemu-aarch64_be +%_bindir/qemu-alpha +%_bindir/qemu-arm +%_bindir/qemu-armeb +%_bindir/qemu-cris +%_bindir/qemu-hexagon +%_bindir/qemu-hppa +%_bindir/qemu-i386 +%_bindir/qemu-loongarch64 +%_bindir/qemu-m68k +%_bindir/qemu-microblaze +%_bindir/qemu-microblazeel +%_bindir/qemu-mips +%_bindir/qemu-mips64 +%_bindir/qemu-mips64el +%_bindir/qemu-mipsel +%_bindir/qemu-mipsn32 +%_bindir/qemu-mipsn32el +%_bindir/qemu-nios2 +%_bindir/qemu-or1k +%_bindir/qemu-ppc +%_bindir/qemu-ppc64 +%_bindir/qemu-ppc64le +%_bindir/qemu-riscv32 +%_bindir/qemu-riscv64 +%_bindir/qemu-s390x +%_bindir/qemu-sh4 +%_bindir/qemu-sh4eb +%_bindir/qemu-sparc +%_bindir/qemu-sparc32plus +%_bindir/qemu-sparc64 +%_bindir/qemu-x86_64 +%_bindir/qemu-xtensa +%_bindir/qemu-xtensaeb +%_sbindir/qemu-binfmt-conf.sh +%_prefix/lib/binfmt.d/qemu-*.conf + +# End of description and files for qemu-linux-user +%else +# Description and files for qemu and all its subpackages + +%description +%{generic_qemu_description} + +This package acts as an umbrella package to the other QEMU sub-packages. + +%files +%defattr(-, root, root) +%dir %_datadir/icons/hicolor +%dir %_datadir/icons/hicolor/*/ +%dir %_datadir/icons/hicolor/*/apps +%dir %_datadir/%name +%dir %_datadir/%name/firmware +%dir %_datadir/%name/vhost-user +%dir %_sysconfdir/%name +%dir %_sysconfdir/%name/firmware +%dir /usr/lib/supportconfig +%dir /usr/lib/supportconfig/plugins +%doc %_docdir/%name +%if %{kvm_available} +%ifarch s390x +%{_prefix}/lib/modules-load.d/kvm.conf +%endif +/usr/lib/udev/rules.d/80-kvm.rules +%endif +%_datadir/applications/qemu.desktop +%_datadir/icons/hicolor/16x16/apps/qemu.png +%_datadir/icons/hicolor/24x24/apps/qemu.png +%_datadir/icons/hicolor/32x32/apps/qemu.bmp +%_datadir/icons/hicolor/32x32/apps/qemu.png +%_datadir/icons/hicolor/48x48/apps/qemu.png +%_datadir/icons/hicolor/64x64/apps/qemu.png +%_datadir/icons/hicolor/128x128/apps/qemu.png +%_datadir/icons/hicolor/256x256/apps/qemu.png +%_datadir/icons/hicolor/512x512/apps/qemu.png +%_datadir/icons/hicolor/scalable/apps/qemu.svg +%_datadir/%name/keymaps +%_datadir/%name/qemu-ifup +%_datadir/%name/qemu-nsis.bmp +%_datadir/%name/trace-events-all +%_datadir/%name/vhost-user/50-qemu-virtiofsd.json +%_mandir/man1/%name.1.gz +%_mandir/man1/qemu-storage-daemon.1.gz +%_mandir/man1/virtiofsd.1.gz +%_mandir/man7/qemu-block-drivers.7.gz +%_mandir/man7/qemu-cpu-models.7.gz +%_mandir/man7/qemu-qmp-ref.7.gz +%_mandir/man7/qemu-ga-ref.7.gz +%_mandir/man7/qemu-storage-daemon-qmp-ref.7.gz +/usr/lib/supportconfig/plugins/%name +%license COPYING COPYING.LIB LICENSE + +%if %{kvm_available} +%post +# Do not execute operations affecting host devices while running in a chroot +if [ $(stat -L -c "%i" /proc/1/root/) = $(stat -L -c "%i" /) ]; then + setfacl --remove-all /dev/kvm &> /dev/null || : +%ifarch s390x + if [ -c /dev/kvm ]; then + %_bindir/chmod 0666 /dev/kvm + %_bindir/chgrp kvm /dev/kvm + fi +%endif + %udev_rules_update + %_bindir/udevadm trigger -y kvm || : +%ifarch s390x + sysctl vm.allocate_pgste=1 || : +%endif +fi +# End of "if {kvm_available}" +%endif + +# Modules need to match {qemu-system-*,qemu-img} version. +# We cannot have qemu and qemu-tools require them in the right version, +# as that would drag in the dependencies the modules are supposed to avoid. +# Nor can we have modules require the right version of qemu and qemu-tools +# as Xen reuses our qemu-tools but does not want our qemu and qemu-x86. +%define qemu_module_conflicts \ +Conflicts: %name < %{qemuver}-%{release} \ +Conflicts: %name > %{qemuver}-%{release} \ +Conflicts: qemu-tools < %{qemuver}-%{release} \ +Conflicts: qemu-tools > %{qemuver}-%{release} + +%package x86 +Summary: Machine emulator and virtualizer for x86 architectures +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: %name = %{qemuver} +Requires: qemu-accel-tcg-x86 +Requires: qemu-ipxe +Requires: qemu-seabios +Requires: qemu-sgabios +Requires: qemu-vgabios +%ifarch x86_64 +Requires: qemu-ovmf-x86_64 +%else +Recommends: qemu-ovmf-ia32 +Recommends: qemu-ovmf-x86_64 +%endif +Recommends: ovmf +Recommends: qemu-microvm + +%description x86 +%{generic_qemu_description} + +This package provides i386 and x86_64 emulation. + +%files x86 +%defattr(-, root, root) +%_bindir/qemu-system-i386 +%_bindir/qemu-system-x86_64 +%_datadir/%name/kvmvapic.bin +%_datadir/%name/linuxboot.bin +%_datadir/%name/linuxboot_dma.bin +%_datadir/%name/multiboot.bin +%_datadir/%name/multiboot_dma.bin +%_datadir/%name/pvh.bin +%doc %_docdir/qemu-x86 + +%package ppc +Summary: Machine emulator and virtualizer for Power architectures +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: %name = %{qemuver} +Requires: qemu-SLOF +Recommends: qemu-ipxe +Recommends: qemu-vgabios + +%description ppc +%{generic_qemu_description} + +This package provides ppc and ppc64 emulation. + +%files ppc +%defattr(-, root, root) +%_bindir/qemu-system-ppc +%_bindir/qemu-system-ppc64 +%_datadir/%name/bamboo.dtb +%_datadir/%name/canyonlands.dtb +%_datadir/%name/openbios-ppc +%_datadir/%name/qemu_vga.ndrv +%_datadir/%name/u-boot.e500 +%_datadir/%name/u-boot-sam460-20100605.bin +%_datadir/%name/vof*.bin +%doc %_docdir/qemu-ppc + +%package s390x +Summary: Machine emulator and virtualizer for S/390 architectures +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: %name = %{qemuver} +Provides: qemu-s390 = %{qemuver} +Obsoletes: qemu-s390 < %{qemuver} + +%description s390x +%{generic_qemu_description} + +This package provides s390x emulation. + +%files s390x +%defattr(-, root, root) +%_bindir/qemu-system-s390x +%_datadir/%name/s390-ccw.img +%_datadir/%name/s390-netboot.img +%doc %_docdir/qemu-s390x + +%package arm +Summary: Machine emulator and virtualizer for ARM architectures +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: %name = %{qemuver} +Recommends: ovmf +Recommends: qemu-ipxe +Recommends: qemu-uefi-aarch64 +Recommends: qemu-vgabios + +%description arm +%{generic_qemu_description} + +This package provides arm emulation. + +%files arm +%defattr(-, root, root) +%_bindir/qemu-system-arm +%_bindir/qemu-system-aarch64 +%_datadir/%name/npcm7xx_bootrom.bin +%doc %_docdir/qemu-arm + +%package extra +Summary: Machine emulator and virtualizer for "extra" architectures +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: %name = %{qemuver} +Recommends: qemu-ipxe +Recommends: qemu-skiboot +Recommends: qemu-vgabios + +%description extra +%{generic_qemu_description} + +This package provides some lesser used emulations, including alpha, m68k, +mips, sparc, and xtensa. (The term "extra" is juxtapositioned against more +popular QEMU packages which are dedicated to a single architecture.) + +%files extra +%defattr(-, root, root) +%_bindir/qemu-system-alpha +%_bindir/qemu-system-avr +%_bindir/qemu-system-cris +%_bindir/qemu-system-hppa +%_bindir/qemu-system-loongarch64 +%_bindir/qemu-system-m68k +%_bindir/qemu-system-microblaze +%_bindir/qemu-system-microblazeel +%_bindir/qemu-system-mips +%_bindir/qemu-system-mipsel +%_bindir/qemu-system-mips64 +%_bindir/qemu-system-mips64el +%_bindir/qemu-system-nios2 +%_bindir/qemu-system-or1k +%_bindir/qemu-system-riscv32 +%_bindir/qemu-system-riscv64 +%_bindir/qemu-system-rx +%_bindir/qemu-system-sh4 +%_bindir/qemu-system-sh4eb +%_bindir/qemu-system-sparc +%_bindir/qemu-system-sparc64 +%_bindir/qemu-system-tricore +%_bindir/qemu-system-xtensa +%_bindir/qemu-system-xtensaeb +%_datadir/%name/hppa-firmware.img +%_datadir/%name/openbios-sparc32 +%_datadir/%name/openbios-sparc64 +%_datadir/%name/opensbi-riscv32-generic-fw_dynamic.bin +%_datadir/%name/opensbi-riscv64-generic-fw_dynamic.bin +%_datadir/%name/palcode-clipper +%_datadir/%name/petalogix-ml605.dtb +%_datadir/%name/petalogix-s3adsp1800.dtb +%_datadir/%name/QEMU,cgthree.bin +%_datadir/%name/QEMU,tcx.bin + +%package lang +Summary: Translations for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 + +%description lang +This package contains a few language translations, particularly for the +graphical user interface components that come with QEMU. The bulk of strings +in QEMU are not localized. + +%files lang -f %blddir/%name.lang +%defattr(-, root, root) + +%package audio-alsa +Summary: ALSA based audio support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description audio-alsa +This package contains a module for ALSA based audio support for QEMU. + +%files audio-alsa +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-alsa.so + +%package audio-dbus +Summary: D-Bus based audio support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description audio-dbus +This package provides a module for D-Bus based audio support for QEMU. + +%files audio-dbus +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-dbus.so + +%package audio-pa +Summary: Pulse Audio based audio support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description audio-pa +This package contains a module for Pulse Audio based audio support for QEMU. + +%files audio-pa +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-pa.so + +%package audio-jack +Summary: JACK based audio support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description audio-jack +This package contains a module for JACK based audio support for QEMU. + +%files audio-jack +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-jack.so + +%package audio-spice +Summary: Spice based audio support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description audio-spice +This package contains a module for Spice based audio support for QEMU. + +%files audio-spice +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-spice.so + +%package audio-oss +Summary: OSS based audio support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description audio-oss +This package contains a module for OSS based audio support for QEMU. + +%files audio-oss +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-oss.so + +%package block-curl +Summary: cURL block support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-curl +This package contains a module for accessing network-based image files over +a network connection from qemu-img tool and QEMU system emulation. + +%files block-curl +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-curl.so + +%package block-dmg +Summary: DMG block support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-dmg +This package contains a module for accessing Mac OS X image files from +qemu-img tool and QEMU system emulation. + +%files block-dmg +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-dmg-bz2.so +%_libdir/%name/block-dmg-lzfse.so + +%package block-gluster +Summary: GlusterFS block support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-gluster +This package contains a module for accessing network-based image files over a +GlusterFS network connection from qemu-img tool and QEMU system emulation. + +%files block-gluster +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-gluster.so + +%package block-iscsi +Summary: iSCSI block support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-iscsi +This package contains a module for accessing network-based image files over an +iSCSI network connection from qemu-img tool and QEMU system emulation. + +%files block-iscsi +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-iscsi.so + +%package block-nfs +Summary: direct Network File System support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-nfs +This package contains a module for directly accessing nfs based image files +for QEMU. + +%files block-nfs +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-nfs.so + +%package block-ssh +Summary: SSH (SFTP) block support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-ssh +This package contains a module for accessing network-based image files over an +SSH network connection from qemu-img tool and QEMU system emulation. + +%files block-ssh +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-ssh.so + +%package chardev-baum +Summary: Baum braille chardev support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description chardev-baum +This package contains a module for baum braille chardev support for QEMU. + +%files chardev-baum +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-baum.so + +%package chardev-spice +Summary: Spice vmc and port chardev support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description chardev-spice +This package contains a module for Spice chardev support for QEMU. + +%files chardev-spice +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-spice.so + +%package hw-display-qxl +Summary: QXL display support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description hw-display-qxl +This package contains a module for QXL display support for QEMU. + +%files hw-display-qxl +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-qxl.so + +%package hw-display-virtio-gpu +Summary: Virtio GPU display support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description hw-display-virtio-gpu +This package contains a module for Virtio GPU display support for QEMU. + +%files hw-display-virtio-gpu +%defattr(-, root, root) +%dir %_datadir/%name +%_libdir/%name/hw-display-virtio-gpu.so +%_libdir/%name/hw-display-virtio-gpu-gl.so + +%package hw-display-virtio-gpu-pci +Summary: Virtio-gpu pci device for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-hw-display-virtio-gpu +%{qemu_module_conflicts} + +%description hw-display-virtio-gpu-pci +This package contains a module providing the virtio gpu pci device for QEMU. + +%files hw-display-virtio-gpu-pci +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-virtio-gpu-pci.so +%_libdir/%name/hw-display-virtio-gpu-pci-gl.so + +%package hw-display-virtio-vga +Summary: Virtio vga device for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description hw-display-virtio-vga +This package contains a module providing the virtio vga device for QEMU. + +%files hw-display-virtio-vga +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-virtio-vga.so +%_libdir/%name/hw-display-virtio-vga-gl.so + +%package hw-s390x-virtio-gpu-ccw +Summary: S390x virtio-gpu ccw device for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-hw-display-virtio-gpu +%{qemu_module_conflicts} + +%description hw-s390x-virtio-gpu-ccw +This package contains a module providing the s390x virtio gpu ccw device for +QEMU. + +%files hw-s390x-virtio-gpu-ccw +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-s390x-virtio-gpu-ccw.so + +%package hw-usb-redirect +Summary: USB redirection support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description hw-usb-redirect +This package contains a module for USB redirection support for QEMU. + +%files hw-usb-redirect +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-redirect.so + +%package hw-usb-smartcard +Summary: USB smartcard support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description hw-usb-smartcard +This package contains a modules for USB smartcard support for QEMU. + +%files hw-usb-smartcard +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-smartcard.so + +%package hw-usb-host +Summary: USB passthrough driver support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description hw-usb-host +This package contains a modules for USB passthrough driver for QEMU. + +%files hw-usb-host +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-host.so + +%package ui-dbus +Summary: D-Bus based UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description ui-dbus +This package contains a module for doing D-Bus based UI for QEMU. + +%files ui-dbus +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-dbus.so + +%package ui-curses +Summary: Curses based UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description ui-curses +This package contains a module for doing curses based UI for QEMU. + +%files ui-curses +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-curses.so + +%package ui-gtk +Summary: GTK based UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-ui-opengl +%{qemu_module_conflicts} + +%description ui-gtk +This package contains a module for doing GTK based UI for QEMU. + +%files ui-gtk +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-gtk.so + +%package ui-opengl +Summary: OpenGL based UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description ui-opengl +This package contains a module for doing OpenGL based UI for QEMU. + +%files ui-opengl +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-egl-headless.so +%_libdir/%name/ui-opengl.so + +%package ui-spice-app +Summary: Spice UI support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-chardev-spice +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. + +%files ui-spice-app +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-spice-app.so + +%package ui-spice-core +Summary: Core Spice support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: qemu-ui-opengl +# This next Requires is only since virt-manager expects audio support +Requires: qemu-audio-spice +%{qemu_module_conflicts} + +%description ui-spice-core +This package contains a module with core Spice support for QEMU. + +%files ui-spice-core +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-spice-core.so + +%package vhost-user-gpu +Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description vhost-user-gpu +This package contains a vhost user mode virtio-gpu 2D/3D rendering backend for +QEMU. + +%files vhost-user-gpu +%defattr(-, root, root) +%dir %_datadir/%name/vhost-user +%_datadir/%name/vhost-user/50-qemu-gpu.json +%_libexecdir/vhost-user-gpu + +%package tools +Summary: Tools for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires(pre): permissions +Requires: group(kvm) +Recommends: multipath-tools +Recommends: qemu-block-curl +%if 0%{?with_rbd} +Recommends: qemu-block-rbd +%endif + +%description tools +This package contains various QEMU related tools, including a bridge helper, +a virtfs helper, ivshmem, disk utilities and scripts for various purposes. + +%files tools +%defattr(-, root, root) +%_bindir/analyze-migration.py +%_bindir/qemu-edid +%_bindir/qemu-img +%_bindir/qemu-io +%_bindir/qemu-keymap +%_bindir/qemu-nbd +%_bindir/qemu-pr-helper +%_bindir/qemu-storage-daemon +%_bindir/vmstate-static-checker.py +%_bindir/vmxcap +%verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper +%_libexecdir/virtfs-proxy-helper +%_libexecdir/virtiofsd +%_mandir/man1/qemu-img.1.gz +%_mandir/man1/virtfs-proxy-helper.1.gz +%_mandir/man8/qemu-nbd.8.gz +%_mandir/man8/qemu-pr-helper.8.gz +%dir %_sysconfdir/%name +%config(noreplace) %_sysconfdir/%name/bridge.conf + +%post tools +%set_permissions %_libexecdir/qemu-bridge-helper + +%verifyscript tools +%verify_permissions %_libexecdir/qemu-bridge-helper + +%package ivshmem-tools +Summary: Inter-VM Shared Memory Tools for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 + +%description ivshmem-tools +This package contains a sample shared memory client and server which utilize +QEMU's Inter-VM shared memory device as specified by the ivshmem client-server +protocol specification documented in docs/specs/ivshmem-spec.txt in QEMU source +code. + +%files ivshmem-tools +%defattr(-, root, root) +%dir %_datadir/%name +%_bindir/ivshmem-client +%_bindir/ivshmem-server + +%package guest-agent +Summary: Guest agent for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires: group(kvm) +Requires(post): udev +Supplements: modalias(acpi*:QEMU0002%3A*) +Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*) +Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*) +%{?systemd_ordering} + +%description guest-agent +This package contains the QEMU guest agent. It is installed in the linux guest +to provide information and control at the guest OS level. + +%files guest-agent +%defattr(-, root, root) +%attr(0755,root,kvm) %_bindir/qemu-ga +%_mandir/man8/qemu-ga.8.gz +%{_unitdir}/qemu-guest-agent.service +/usr/lib/udev/rules.d/80-qemu-ga.rules + +%pre guest-agent +%service_add_pre qemu-guest-agent.service + +%post guest-agent +%service_add_post qemu-guest-agent.service +if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl start qemu-guest-agent.service || : +fi + +%preun guest-agent +if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl stop qemu-guest-agent.service || : +fi + +%postun guest-agent +%service_del_postun_without_restart qemu-guest-agent.service +if [ "$1" = "1" ] ; then + if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl restart qemu-guest-agent.service || : + fi +fi + +%package ksm +Summary: Kernel Samepage Merging services +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +Requires(pre): coreutils +Requires(post): coreutils + +%description ksm +Kernel Samepage Merging (KSM) is a memory-saving de-duplication feature, that +merges anonymous (private) pages (not pagecache ones). + +This package provides a service file for starting and stopping KSM. + +%files ksm +%defattr(-, root, root) +%{_unitdir}/ksm.service + +%pre ksm +%service_add_pre ksm.service + +%post ksm +%service_add_post ksm.service + +%preun ksm +%service_del_preun ksm.service + +%postun ksm +%service_del_postun ksm.service + +%package accel-tcg-x86 +Summary: TCG accelerator for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description accel-tcg-x86 +TCG is the QEMU binary translator, responsible for converting from target to +host instruction set. + +This package provides the TCG accelerator for QEMU. + +%files accel-tcg-x86 +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/accel-tcg-i386.so +%_libdir/%name/accel-tcg-x86_64.so + +%package accel-qtest +Summary: QTest accelerator for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description accel-qtest +QTest is a device emulation testing framework. It is useful to test device +models. + +This package provides QTest accelerator for testing QEMU. + +%files accel-qtest +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/accel-qtest-aarch64.so +%_libdir/%name/accel-qtest-alpha.so +%_libdir/%name/accel-qtest-arm.so +%_libdir/%name/accel-qtest-avr.so +%_libdir/%name/accel-qtest-cris.so +%_libdir/%name/accel-qtest-hppa.so +%_libdir/%name/accel-qtest-i386.so +%_libdir/%name/accel-qtest-loongarch64.so +%_libdir/%name/accel-qtest-m68k.so +%_libdir/%name/accel-qtest-microblaze.so +%_libdir/%name/accel-qtest-microblazeel.so +%_libdir/%name/accel-qtest-mips.so +%_libdir/%name/accel-qtest-mips64.so +%_libdir/%name/accel-qtest-mips64el.so +%_libdir/%name/accel-qtest-mipsel.so +%_libdir/%name/accel-qtest-nios2.so +%_libdir/%name/accel-qtest-or1k.so +%_libdir/%name/accel-qtest-ppc.so +%_libdir/%name/accel-qtest-ppc64.so +%_libdir/%name/accel-qtest-riscv32.so +%_libdir/%name/accel-qtest-riscv64.so +%_libdir/%name/accel-qtest-rx.so +%_libdir/%name/accel-qtest-s390x.so +%_libdir/%name/accel-qtest-sh4.so +%_libdir/%name/accel-qtest-sh4eb.so +%_libdir/%name/accel-qtest-sparc.so +%_libdir/%name/accel-qtest-sparc64.so +%_libdir/%name/accel-qtest-tricore.so +%_libdir/%name/accel-qtest-x86_64.so +%_libdir/%name/accel-qtest-xtensa.so +%_libdir/%name/accel-qtest-xtensaeb.so + +%if 0%{?with_rbd} +%package block-rbd +Summary: Rados Block Device (Ceph) support for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%{qemu_module_conflicts} + +%description block-rbd +This package contains a module for accessing ceph (rbd,rados) image files +for QEMU. + +%files block-rbd +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-rbd.so +# End of "if with_rbd" +%endif + +%if %{legacy_qemu_kvm} +%package kvm +Summary: Wrapper to enable KVM acceleration under QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +%ifarch %ix86 x86_64 +Requires: qemu-x86 = %{qemuver} +%endif +%ifarch s390x +Requires: qemu-s390x = %{qemuver} +%endif +Provides: kvm = %{qemuver} +Obsoletes: kvm < %{qemuver} + +%description kvm +%{generic_qemu_description} + +This package provides a symlink to the main QEMU emulator used for KVM +virtualization. The symlink is named qemu-kvm, which causes the QEMU program +to enable the KVM accelerator, due to the name reference ending with 'kvm'. +This package is an artifact of the early origins of QEMU, and is deprecated. + +%files kvm +%defattr(-,root,root) +%_bindir/qemu-kvm +%doc %_docdir/qemu-kvm +%_mandir/man1/qemu-kvm.1.gz +# End of "if legacy_qemu_kvm" +%endif + +%if %{build_ppc_firmware} +%package SLOF +Summary: Slimline Open Firmware - SLOF +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +BuildArch: noarch + +%description SLOF +Slimline Open Firmware (SLOF) is an implementation of the IEEE 1275 standard. +It can be used as partition firmware for pSeries machines running on QEMU or KVM. + +%files SLOF +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/slof.bin + +%package skiboot +Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +BuildArch: noarch +Requires(post): update-alternatives +Requires(postun):update-alternatives + +%description skiboot +Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as +traditionally packaged with QEMU. + +%files skiboot +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/skiboot.lid +%_datadir/%name/skiboot.lid.qemu +%ghost %_sysconfdir/alternatives/skiboot.lid + +%post skiboot +update-alternatives --install \ + %{_datadir}/%name/skiboot.lid skiboot.lid %{_datadir}/%name/skiboot.lid.qemu 15 + +%preun skiboot +if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then + update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu +fi +# End of "if build_ppc_firmware" +%endif + +%if %{build_x86_firmware} +%package microvm +Summary: x86 MicroVM firmware for QEMU +Group: System/Emulators/PC +Version: %{qemuver} +Release: 0 +BuildArch: noarch + +%description microvm +This package provides minimal x86 firmware for booting certain guests under +QEMU. qboot provides the minimum resources needed to boot PVH and bzImages. +bios-microvm, created from a minimal seabios configuration, provides slightly +wider support than qboot, but still focuses on quick boot up. + +%files microvm +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/bios-microvm.bin +%_datadir/%name/qboot.rom + +%package seabios +Summary: x86 Legacy BIOS for QEMU +Group: System/Emulators/PC +Version: %{sbver} +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description seabios +SeaBIOS is an open source implementation of a 16bit x86 BIOS. SeaBIOS +is the default and legacy BIOS for QEMU. + +%files seabios +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/bios.bin +%_datadir/%name/bios-256k.bin +%_datadir/%name/firmware/50-seabios-256k.json +%_datadir/%name/firmware/60-seabios-128k.json +%license roms/seabios/COPYING +%doc %_docdir/qemu-seabios + +%package vgabios +Summary: VGA BIOSes for QEMU +Group: System/Emulators/PC +Version: %{sbver} +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description vgabios +VGABIOS provides the video ROM BIOSes for the following variants of VGA +emulated devices: Std VGA, QXL, Cirrus CLGD 5446 and VMware emulated +video card. For use with QEMU. + +%files vgabios +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/vgabios.bin +%_datadir/%name/vgabios-ati.bin +%_datadir/%name/vgabios-bochs-display.bin +%_datadir/%name/vgabios-cirrus.bin +%_datadir/%name/vgabios-qxl.bin +%_datadir/%name/vgabios-ramfb.bin +%_datadir/%name/vgabios-stdvga.bin +%_datadir/%name/vgabios-virtio.bin +%_datadir/%name/vgabios-vmware.bin +%license roms/seabios/COPYING + +%package sgabios +Summary: Serial Graphics Adapter BIOS for QEMU +Group: System/Emulators/PC +Version: 8 +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description sgabios +The Google Serial Graphics Adapter BIOS or SGABIOS provides a means for legacy +x86 software to communicate with an attached serial console as if a video card +were attached. For use with QEMU. + +%files sgabios +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/sgabios.bin + +%package ipxe +Summary: PXE ROMs for QEMU NICs +Group: System/Emulators/PC +Version: 1.0.0+ +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description ipxe +Provides Preboot Execution Environment (PXE) ROM support for various emulated +network adapters available with QEMU. + +%files ipxe +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/efi-e1000.rom +%_datadir/%name/efi-e1000e.rom +%_datadir/%name/efi-eepro100.rom +%_datadir/%name/efi-ne2k_pci.rom +%_datadir/%name/efi-pcnet.rom +%_datadir/%name/efi-rtl8139.rom +%_datadir/%name/efi-virtio.rom +%_datadir/%name/efi-vmxnet3.rom +%_datadir/%name/pxe-e1000.rom +%_datadir/%name/pxe-eepro100.rom +%_datadir/%name/pxe-ne2k_pci.rom +%_datadir/%name/pxe-pcnet.rom +%_datadir/%name/pxe-rtl8139.rom +%_datadir/%name/pxe-virtio.rom +# End of "if build_x86_firmware" +%endif + +# End of description and files for qemu and all its subpackages +%endif + +%prep +%autosetup -n %{srcname}-%{srcver} + +%if "%{name}" == "qemu" +# Specific preparation steps for builfding qemu + +# for the record, this set of firmware files is installed, but we don't +# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc +# openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb +# petalogix-s3adsp1800.dtb QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv +# u-boot.e500 u-boot-sam460-20100605.bin opensbi-riscv32-generic-fw_dynamic.bin +# opensbi-riscv32-generic-fw_dynamic.elfnpcm7xx_bootrom.bin vof.bin +# vof-nvram.bin + +# Note that: +# - default firmwares are built "by default", i.e., they're built automatically +# during the process of building QEMU (on each specific arch) +# - extra firmwares are built "manually" (see below) from their own sources +# (which, typically, are submodules checked out in the {srcdi}r/roms directory) +%define ppc_default_firmware %{nil} +#{vof.bin vof-nvram.bin} +%define ppc_extra_firmware {skiboot.lid slof.bin} +%define riscv64_default_firmware %{nil} +%define riscv64_extra_firmware {opensbi-riscv64-generic-fw_dynamic.bin} +%define s390x_default_firmware {s390-ccw.img s390-netboot.img} +%define s390x_extra_firmware %{nil} +%define x86_default_firmware {linuxboot.bin linuxboot_dma.bin multiboot.bin \ +multiboot_dma.bin kvmvapic.bin pvh.bin} +%define x86_extra_firmware {bios.bin bios-256k.bin bios-microvm.bin qboot.rom \ +pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom \ +pxe-virtio.rom sgabios.bin vgabios-ati.bin vgabios-bochs-display.bin \ +vgabios.bin vgabios-cirrus.bin vgabios-qxl.bin vgabios-ramfb.bin \ +vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \ +efi-e1000.rom efi-e1000e.rom efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom \ +efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom} + +# Complete list of all the firmwares that we build, if we consider +# all the builds, on all the arches. +%define firmware { \ +%{ppc_default_firmware} %{ppc_extra_firmware} \ +%{riscv64_default_firmware} %{riscv64_extra_firmware} \ +%{s390x_default_firmware} %{s390x_extra_firmware} \ +%{x86_default_firmware} %{x86_extra_firmware} } + +# Note that: +# - {arch}_default_built_firmware are the firmwares that we will be built by +# default in this particular build, on the arch where we currently are on +# - {arch}_extra_built_fimrware, likewise, but for extra firmwares, built manually +%ifarch ppc64 ppc64le +%define ppc_default_built_firmware %{ppc_default_firmware} +%endif +%ifarch riscv64 +%define riscv64_default_built_firmware %{riscv64_default_firmware} +%endif +%ifarch s390x +%define s390x_default_built_firmware %{s390x_default_firmware} +%endif +%ifarch %ix86 x86_64 +%define x86_default_built_firmware %{x86_default_firmware} +%endif + +%if %{build_opensbi_firmware} +%define riscv64_extra_built_firmware %{riscv64_extra_firmware} +%endif +%if %{build_ppc_firmware} +%define ppc_extra_built_firmware %{ppc_extra_firmware} +%endif +%if %{build_x86_firmware} +%define x86_extra_built_firmware %{x86_extra_firmware} +%endif + +# List of only firmwares that will actually be built, in this instance +%define built_firmware { \ +%{?ppc_default_built_firmware} %{?ppc_extra_built_firmware} \ +%{?riscv64_default_built_firmware} %{?riscv64_extra_built_firmware} \ +%{?s390x_default_built_firmware} %{?s390x_extra_built_firmware} \ +%{?x86_default_built_firmware} %{?x86_extra_built_firmware} } + +# End of source preparation for qemu +%endif + +%build + +%if %{legacy_qemu_kvm} +# FIXME: Why are we copying the s390 specific one? +cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst +sed -i '/^\ \ \ about\/index.*/i \ \ \ supported.rst' docs/index.rst +%endif + +# This is typically done when generating tarballs (see scripts/make-release). +# Since we're building from a git clone, we need to do it ourselves (and +# it's the reason why we need git as a BuildRequires:). +(cd roms/seabios && git describe --tags --long --dirty > .version) +(cd roms/skiboot && ./make_version.sh > .version) +find . -iname ".git" -exec rm -rf {} + + +mkdir -p %blddir +cd %blddir + +# We define a few general and common options and then we disable +# pretty much everything. Afterwards, there is a section for each +# of the flavors where we explicitly enable all the feature we want +# for them. + +# TODO: Check whether we want to enable the followings: +# * avx512f +# * debug-info +# * fuse +# * malloc-trim +# * multiprocess +# * qom-cast-debug +# * trace-backends=dtrace +# +# Fedora has avx2 enabled for ix86, while we can't (I tried). Guess it's +# because, for them, ix86 == i686 (while for us it's i586). + +# Let's try to stick to _FORTIFY_SOURCE=2 for now +EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-error" + +%srcdir/configure \ + --docdir=%_docdir \ + --datadir=%_datadir \ + --extra-cflags="${EXTRA_CFLAGS}" \ + --firmwarepath=%_datadir/%name \ + --libdir=%_libdir \ + --libexecdir=%_libexecdir \ + --localstatedir=%_localstatedir \ + --prefix=%_prefix \ + --python=%_bindir/python3 \ + --sysconfdir=%_sysconfdir \ + --with-git-submodules=ignore \ + --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --disable-alsa \ + --disable-attr \ + --disable-auth-pam \ + --disable-avx2 \ + --disable-avx512f \ + --disable-block-drv-whitelist-in-tools \ + --disable-bochs \ + --disable-bpf \ + --disable-brlapi \ + --disable-bsd-user \ + --disable-bzip2 \ + --disable-cap-ng \ + --disable-capstone \ + --disable-cfi \ + --disable-cfi-debug \ + --disable-cloop \ + --disable-cocoa \ + --disable-coreaudio \ + --disable-coroutine-pool \ + --disable-crypto-afalg \ + --disable-curl \ + --disable-curses \ + --disable-dbus-display \ + --disable-debug-info \ + --disable-debug-mutex \ + --disable-debug-tcg \ + --disable-dmg \ + --disable-docs \ + --disable-dsound \ + --disable-fdt \ + --disable-fuse \ + --disable-fuse-lseek \ + --disable-gcrypt \ + --disable-gettext \ + --disable-gio \ + --disable-glusterfs \ + --disable-gnutls \ + --disable-gtk \ + --disable-guest-agent \ + --disable-guest-agent-msi \ + --disable-hax \ + --disable-hvf \ + --disable-iconv \ + --disable-jack \ + --disable-kvm \ + --disable-l2tpv3 \ + --disable-libdaxctl \ + --disable-libiscsi \ + --disable-libnfs \ + --disable-libpmem \ + --disable-libssh \ + --disable-libudev \ + --disable-libusb \ + --disable-linux-aio \ + --disable-linux-io-uring \ + --disable-linux-user \ + --disable-live-block-migration \ + --disable-lto \ + --disable-lzfse \ + --disable-lzo \ + --disable-malloc-trim \ + --disable-membarrier \ + --disable-module-upgrades \ + --disable-modules \ + --disable-mpath \ + --disable-multiprocess \ + --disable-netmap \ + --disable-nettle \ + --disable-numa \ + --disable-nvmm \ + --disable-opengl \ + --disable-oss \ + --disable-pa \ + --disable-parallels \ + --disable-pie \ + --disable-plugins \ + --disable-png \ + --disable-pvrdma \ + --disable-qcow1 \ + --disable-qed \ + --disable-qom-cast-debug \ + --disable-rbd \ + --disable-rdma \ + --disable-replication \ + --disable-rng-none \ + --disable-safe-stack \ + --disable-sanitizers \ + --disable-sdl \ + --disable-sdl-image \ + --disable-seccomp \ + --disable-selinux \ + --disable-slirp \ + --disable-slirp-smbd \ + --disable-smartcard \ + --disable-snappy \ + --disable-sparse \ + --disable-spice \ + --disable-spice-protocol \ + --disable-strip \ + --disable-system \ + --disable-tcg \ + --disable-tcg-interpreter \ + --disable-tools \ + --disable-tpm \ + --disable-u2f \ + --disable-usb-redir \ + --disable-user \ + --disable-vde \ + --disable-vdi \ + --disable-vhost-crypto \ + --disable-vhost-kernel \ + --disable-vhost-net \ + --disable-vhost-user \ + --disable-vhost-user-blk-server \ + --disable-vhost-vdpa \ + --disable-virglrenderer \ + --disable-virtfs \ + --disable-virtiofsd \ + --disable-vnc \ + --disable-vnc-jpeg \ + --disable-vnc-sasl \ + --disable-vte \ + --disable-vvfat \ + --disable-werror \ + --disable-whpx \ + --disable-xen \ + --disable-xen-pci-passthrough \ + --disable-xkbcommon \ + --disable-zstd \ + --without-default-devices \ +%if %{with system_membarrier} + --enable-membarrier \ +%endif +%if %{with malloc_trim} + --enable-malloc-trim \ +%endif +%if "%{_lto_cflags}" != "%{nil}" + --enable-lto \ +%endif +%if "%{name}" == "qemu-linux-user" + --disable-install-blobs \ + --enable-attr \ + --enable-coroutine-pool \ + --enable-linux-user \ + --enable-selinux \ + --enable-tcg \ + --static \ +%else + --audio-drv-list=pa,alsa,jack,oss \ + --enable-auth-pam \ +%ifarch x86_64 + --enable-avx2 \ + --enable-libpmem \ + --enable-xen \ + --enable-xen-pci-passthrough \ +%endif +%ifnarch %arm s390x + --enable-numa \ +%endif +%if %{kvm_available} + --enable-kvm \ +%endif +%if 0%{?with_daxctl} + --enable-libdaxctl \ +%endif +%if 0%{?with_uring} + --enable-linux-io-uring \ +%endif +%if 0%{?with_rbd} + --enable-rbd \ +%endif + --enable-alsa \ + --enable-attr \ + --enable-bochs \ + --enable-brlapi \ + --enable-bpf \ + --enable-bzip2 \ + --enable-cap-ng \ + --enable-capstone \ + --enable-cloop \ + --enable-coroutine-pool \ + --enable-curl \ + --enable-curses \ + --enable-dbus-display \ + --enable-dmg \ + --enable-docs \ + --enable-fdt=system \ + --enable-gcrypt \ + --enable-gettext \ + --enable-gio \ + --enable-glusterfs \ + --enable-gnutls \ + --enable-gtk \ + --enable-guest-agent \ + --enable-iconv \ + --enable-jack \ + --enable-l2tpv3 \ + --enable-libiscsi \ + --enable-libnfs \ + --enable-libssh \ + --enable-libudev \ + --enable-libusb \ + --enable-linux-aio \ + --enable-live-block-migration \ + --enable-lzfse \ + --enable-lzo \ + --enable-modules \ + --enable-mpath \ + --enable-opengl \ + --enable-oss \ + --enable-pa \ + --enable-parallels \ + --enable-pie \ + --enable-png \ + --enable-pvrdma \ + --enable-qcow1 \ + --enable-qed \ + --enable-rdma \ + --enable-replication \ + --enable-seccomp \ + --enable-selinux \ + --enable-slirp-smbd \ + --enable-slirp=system \ + --enable-smartcard \ + --enable-snappy \ + --enable-spice \ + --enable-spice-protocol \ + --enable-system \ + --enable-tcg \ + --enable-tools \ + --enable-tpm \ + --enable-usb-redir \ + --enable-vde \ + --enable-vdi \ + --enable-vhost-crypto \ + --enable-vhost-kernel \ + --enable-vhost-net \ + --enable-vhost-user \ + --enable-vhost-user-blk-server \ + --enable-vhost-vdpa \ + --enable-virglrenderer \ + --enable-virtfs \ + --enable-virtiofsd \ + --enable-vnc \ + --enable-vnc-jpeg \ + --enable-vnc-sasl \ + --enable-vte \ + --enable-vvfat \ + --enable-werror \ + --enable-xkbcommon \ + --enable-zstd \ + --with-coroutine=ucontext \ + --with-default-devices +# End of configure option ("name == qemu-linux-user" above) +%endif + +echo "=== Content of config-host.mak: ===" +cat config-host.mak +echo "=== ===" + +%if "%{name}" == "qemu" +# For building QEMU and all the "default" firmwares, for each arch, +# for the package qemu, we first need to delete the firmware files that +# we intend to build... +# +# TODO: check if this can be common to qemu and qemu-linux-user +for i in %built_firmware +do + unlink %srcdir/pc-bios/$i +done +# End of unlinking pre-built firmwares for qemu +%endif + +# Common build steps for qemu and qemu-linux-user + +%make_build + +%if "%{name}" == "qemu" +# ... Then, we need to reinstate the firmwares that have been built already +for i in %{?s390x_default_built_firmware} +do + cp pc-bios/s390-ccw/$i %srcdir/pc-bios/ +done + +for i in %{?x86_default_built_firmware} +do + cp pc-bios/optionrom/$i %srcdir/pc-bios/ +done + +# Build the "extra" firmwares. Note that the QEMU Makefile in {srcdir}/roms +# does some cross-compiler auto detection. So we often don't need to define +# or pass CROSS= and CROSS_COMPILE ourselves. + +%if %{build_ppc_firmware} +# FIXME: check if we can upstream: Makefile-define-endianess-for-cross-buil.patch +%make_build -C %srcdir/roms skiboot + +%make_build -C %srcdir/roms slof +%endif + +%if %{build_opensbi_firmware} +%make_build -C %srcdir/roms opensbi64-generic +# End of "if build_ppc_firmware" +%endif + +%if %{build_x86_firmware} +%make_build %{?_smp_mflags} -C %srcdir/roms bios \ + SEABIOS_EXTRAVERSION="-rebuilt.opensuse.org" \ + +pushd %srcdir/roms/seabios/docs +for f in *.md +do + b="${f%.md}" + # Ensure the correct media type + Markdown.pl "${f}" >"${b}.html" + # Links to b.md will be rendered as to b + ln -Ts "${b}.html" "${b}" +done +popd + +# FIXME: check if we can upstream: roms-Makefile-add-cross-file-to-qboot-me.patch +# and qboot-add-cross.ini-file-to-handle-aarch.patch +%make_build -C %srcdir/roms qboot + +%make_build -C %srcdir/roms seavgabios \ + +%make_build -C %srcdir/roms seavgabios-ati \ + +%make_build -C %srcdir/roms pxerom + +%make_build -C %srcdir/roms efirom \ + EDK2_BASETOOLS_OPTFLAGS='-fPIE' + +# We're currently not building firmware on ix86, but let's make sure this works +# fine if one enables it, e.g., locally (for debugging or something). +# FIXME: check if we can get rid or upstream: roms-sgabios-Fix-csum8-to-be-built-by-ho.patch +make -C %srcdir/roms sgabios HOSTCC=cc \ +%ifnarch %ix86 x86_64 + CC=x86_64-suse-linux-gcc LD=x86_64-suse-linux-ld \ +%endif + +%if %{force_fit_virtio_pxe_rom} +pushd %srcdir +patch -p1 < %{rpmfilesdir}/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch +popd +%make_build -C %srcdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom +%endif + +for i in %supported_nics_large %unsupported_nics + do + if test "`stat -c '%s' %srcdir/pc-bios/pxe-$i.rom`" -gt "131072" ; then + echo "pxe rom is too large" + exit 1 + fi + if test "`stat -c '%s' %srcdir/pc-bios/pxe-$i.rom`" -le "65536" ; then + %srcdir/roms/ipxe/src/util/padimg.pl %srcdir/pc-bios/pxe-$i.rom -s 65536 -b 255 + echo -ne "SEGMENT OVERAGE\0" >> %srcdir/pc-bios/pxe-$i.rom + fi +done +for i in %supported_nics_small + do + if test "`stat -c '%s' %srcdir/pc-bios/pxe-$i.rom`" -gt "65536" ; then + echo "pxe rom is too large" + exit 1 + fi +done +# End of "if build_x86_firmware" +%endif + +# End of the build for qemu +%endif + +%install +cd %blddir + +%make_build install DESTDIR=%{buildroot} + +%if "%{name}" == "qemu-linux-user" +# Additional installation steps specific to qemu-linux-user + +rm -rf %{buildroot}%_datadir/qemu/keymaps +unlink %{buildroot}%_datadir/qemu/trace-events-all +install -d -m 755 %{buildroot}%_sbindir +install -m 755 scripts/qemu-binfmt-conf.sh %{buildroot}%_sbindir +install -d -m 755 %{buildroot}%{_prefix}/lib/binfmt.d/ +scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --exportdir %{buildroot}%{_prefix}/lib/binfmt.d/ + +# End of additional installation steps for qemu-linux-user +%else +# Additional installation steps specific to qemu + +%find_lang %name +install -d -m 0755 %{buildroot}%_datadir/%name/firmware +install -d -m 0755 %{buildroot}/usr/lib/supportconfig/plugins +install -d -m 0755 %{buildroot}%_sysconfdir/%name/firmware +install -D -m 0644 %{rpmfilesdir}/bridge.conf %{buildroot}%_sysconfdir/%name/bridge.conf +install -D -m 0755 %{rpmfilesdir}/qemu-ifup %{buildroot}%_datadir/%name/qemu-ifup +install -D -p -m 0644 %{rpmfilesdir}/80-qemu-ga.rules %{buildroot}/usr/lib/udev/rules.d/80-qemu-ga.rules +install -D -m 0755 scripts/analyze-migration.py %{buildroot}%_bindir/analyze-migration.py +install -D -m 0755 scripts/vmstate-static-checker.py %{buildroot}%_bindir/vmstate-static-checker.py +install -D -m 0755 scripts/kvm/vmxcap %{buildroot}%_bindir/vmxcap +install -D -m 0755 %{rpmfilesdir}/qemu-supportconfig %{buildroot}/usr/lib/supportconfig/plugins/%name +install -D -m 0644 %{rpmfilesdir}/supported.arm.txt %{buildroot}%_docdir/qemu-arm/supported.txt +install -D -m 0644 %{rpmfilesdir}/supported.ppc.txt %{buildroot}%_docdir/qemu-ppc/supported.txt +install -D -m 0644 %{rpmfilesdir}/supported.x86.txt %{buildroot}%_docdir/qemu-x86/supported.txt +install -D -m 0644 %{rpmfilesdir}/supported.s390.txt %{buildroot}%_docdir/qemu-s390x/supported.txt + +%if %{legacy_qemu_kvm} +install -D -m 0644 %{rpmfilesdir}/qemu-kvm.1.gz %{buildroot}%_mandir/man1/qemu-kvm.1.gz +install -d %{buildroot}%_docdir/qemu-kvm +# FIXME: Why do we onlly generate the HTML for the legacy package documentation? +%ifarch s390x +ln -s qemu-system-s390x %{buildroot}%_bindir/qemu-kvm +ln -s ../qemu-s390x/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-s390x/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html +%else +ln -s qemu-system-x86_64 %{buildroot}%_bindir/qemu-kvm +ln -s ../qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt +rst2html --exit-status=2 %{buildroot}%_docdir/qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html +# End of "ifarch s390x" +%endif +# End of "if legacy_qemu_kvm" +%endif + +%if %{kvm_available} +install -D -m 0644 %{rpmfilesdir}/80-kvm.rules %{buildroot}/usr/lib/udev/rules.d/80-kvm.rules +%endif +install -D -p -m 0644 %{rpmfilesdir}/qemu-guest-agent.service %{buildroot}%{_unitdir}/qemu-guest-agent.service +install -D -p -m 0644 %{rpmfilesdir}/ksm.service %{buildroot}%{_unitdir}/ksm.service +%ifarch s390x +install -D -m 0644 %{rpmfilesdir}/kvm.conf %{buildroot}%{_prefix}/lib/modules-load.d/kvm.conf +# End of "if kvm_available" +%endif + +# We rely on a separate project / package to provide edk2 firmware +unlink %{buildroot}%_datadir/%name/edk2-licenses.txt +unlink %{buildroot}%_datadir/%name/firmware/50-edk2-i386-secure.json +unlink %{buildroot}%_datadir/%name/firmware/50-edk2-x86_64-secure.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-aarch64.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-arm.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-i386.json +unlink %{buildroot}%_datadir/%name/firmware/60-edk2-x86_64.json +unlink %{buildroot}%_datadir/%name/edk2-aarch64-code.fd +unlink %{buildroot}%_datadir/%name/edk2-arm-code.fd +unlink %{buildroot}%_datadir/%name/edk2-arm-vars.fd +unlink %{buildroot}%_datadir/%name/edk2-i386-code.fd +unlink %{buildroot}%_datadir/%name/edk2-i386-secure-code.fd +unlink %{buildroot}%_datadir/%name/edk2-i386-vars.fd +unlink %{buildroot}%_datadir/%name/edk2-x86_64-code.fd +unlink %{buildroot}%_datadir/%name/edk2-x86_64-secure-code.fd + +# this was never meant for customer consumption - delete even though installed +unlink %{buildroot}%_bindir/elf2dmp + +# For PPC and x86 firmwares, there are a few extra install steps necessary. +# In general, if we know that we have not built a firmware, remove it from the +# install base, as the one that we have there is the upstream binary, that got +# copied there during `make install`. + +%if %{build_ppc_firmware} +# In support of update-alternatives +# +# The reason why we do this, is because we have (only for PPC) an skiboot +# package, shipping an alternative version of skiboot.lid. That is, in fact, +# what's "on the other end" of us supporting update-alternatives for this +# particular firmware. +mv %{buildroot}%_datadir/%name/skiboot.lid %{buildroot}%_datadir/%name/skiboot.lid.qemu +# create a dummy target for /etc/alternatives/skiboot.lid +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -s -f %{_sysconfdir}/alternatives/skiboot.lid %{buildroot}%{_datadir}/%name/skiboot.lid +%else +for f in %{ppc_extra_firmware} ; do + unlink %{buildroot}%_datadir/%name/$f +done +# End of "if build_ppc_fimrware" +%endif + +# For riscv64 firmwares (currently, only opensbi), we leave them there in +# any case, because they're part of the qemu-extra package, and riscv is +# a bit special in many ways already. + +%if %{build_x86_firmware} +install -D -m 0644 %{rpmfilesdir}/50-seabios-256k.json %{buildroot}%_datadir/%name/firmware/50-seabios-256k.json +install -D -m 0644 %{rpmfilesdir}/60-seabios-128k.json %{buildroot}%_datadir/%name/firmware/60-seabios-128k.json +install -d -m 0755 %{buildroot}%_docdir/qemu-seabios +%else +for f in %{x86_extra_firmware} ; do + unlink %{buildroot}%_datadir/%name/$f +done +# End of "if build_x86_firmware" +%endif + +%suse_update_desktop_file qemu + +# End of additional installation steps for qemu +%endif + +# Common install steps for qemu and qemu-linux-user +%fdupes -s %{buildroot} + +%check +cd %blddir + +%if "%{name}" == "qemu" +# Let's try to run 'make check' for the qemu package + +# Patch 'increase x86_64 physical bits to 42' requires that the DSDT used for +# acpi [q]tests is modified too. But it's binary, and that means we cannot +# do that in the patch itself. Instead, we keep a copy of the binary in the +# package sources, and put it in place now, before the tests themselves. +# If that patch is removed, the following line needs to go as well. +cp %{rpmfilesdir}/DSDT.pcie %{srcdir}/tests/data/acpi/microvm/ + +# Patch 'tests/acpi: update tables for new core count test' requires some new +# binaries to be introcuded too. Let's copy them in place as well +cp %{rpmfilesdir}/APIC.core-count2 %{rpmfilesdir}/DSDT.core-count2 %{rpmfilesdir}/FACP.core-count2 %{srcdir}/tests/data/acpi/q35/ + +%if 0%{?qemu_user_space_build} +# Seccomp is not supported by linux-user emulation +echo 'int main (void) { return 0; }' > %{srcdir}/tests/unit/test-seccomp.c +%endif + +# Compile the QOM test binary first, so that ... +%make_build tests/qtest/qom-test +# ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379) +# FIXME: is this still a problem? + +# Let's build everything first +%make_build check-build +# Let's now run the 'make check' component individually, so we have +# more control on the options (like -j, etc) +%make_build check-unit +%make_build check-qapi-schema +%make_build check-softfloat +# This would be `make_build check-block`. But iotests are not reliable +# if ran in parallel in OBS, so let's be slow for now. +make -O V=1 VERBOSE=1 -j1 check-block +%if %{with chkqtests} && !0%{?qemu_user_space_build} +# Run qtests sequentially, as it's too unreliable, when run in OBS, if parallelized +make -O V=1 VERBOSE=1 -j1 check-qtest +%endif +# Last step will be to run a full check-report, but we will +# enable this at a later point +#make -O V=1 VERBOSE=1 -j1 check-report.junit.xml + +# End of checks for qemu +%else +# Let's run the relevant check for the qemu-linux-user package + +%ifarch %ix86 +%define qemu_arch i386 +%endif +%ifarch x86_64 +%define qemu_arch x86_64 +%endif +%ifarch %arm +%define qemu_arch arm +%endif +%ifarch aarch64 +%define qemu_arch aarch64 +%endif +%ifarch ppc +%define qemu_arch ppc +%endif +%ifarch ppc64 +%define qemu_arch ppc64 +%endif +%ifarch ppc64le +%define qemu_arch ppc64le +%endif +%ifarch s390x +%define qemu_arch s390x +%endif + +%ifarch %ix86 x86_64 %arm aarch64 ppc ppc64 ppc64le s390x +%ifnarch %arm +%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null +%endif +%endif + +%make_build check-softfloat +# End of the checks for qemu-linux-user +%endif + +%changelog diff --git a/rpm/supported.arm.txt b/rpm/supported.arm.txt new file mode 100644 index 0000000000..d55ef9b157 --- /dev/null +++ b/rpm/supported.arm.txt @@ -0,0 +1,926 @@ +[qemu-arm package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +Overview +-------- + + The QEMU based packages included with SLES 15 SP4 provide a large variety of + features, from the very latest customer requests to features of questionable + quality or value. The linux kernel includes components which contribute KVM + virtualization features as well. This document was created to assist the user + in deciding which features can be relied upon to build enterprise class + virtualization solutions. KVM based virtualization for x86 (Intel 64/AMD64), + for IBM System z (s390x), and for the ARM64 architecture (AArch64) are offered + at the L3 (full support) level. The bulk of this document deals with L3 + supported features and is primarily ARM64 centric. This document should be + considered a companion to the standard virtualization documentation delivered + with the product. + + KVM is implemented in linux kernel modules which enable the linux kernel to + function as an integral part of the KVM hypervisor. The hypervisor-guest + interaction is managed by QEMU through the /dev/kvm ioctl interface. The linux + host assists in the virtualization of storage, networking and display + resources as well as allowing direct hardware passthrough of PCI and USB + devices. Linux memory and cpu management features are used by QEMU/KVM to + enable guests to share those host resources as efficiently as possible. + + QEMU is a primary component of KVM based virtualization. The QEMU emulator + binary qemu-system-aarch64 is the program to use to access KVM virtualization. + When using this program, the -machine option accel=kvm (or its alias + -enable-kvm) or --accel kvm option must be specified for KVM acceleration to + be used by the guest. + + Libvirt is the preferred means of accessing QEMU/KVM functionality and is + documented elsewhere. This document focuses on the features and direct usage + of QEMU/KVM as provided by the QEMU based packages. + +Major QEMU/KVM Supported Features +--------------------------------- + +- KVM virtualization is accomplished by using the QEMU program in KVM + acceleration mode. KVM acceleration requires that both guest and host have + the same fundamental architecture. + +- Guest images created under previous QEMU versions are supported by machine + version compatibilities built into more recent QEMU versions. + +- For ease of use, the QEMU program has defaults which represent traditional + usage patterns. + +- Guest virtual machine characteristics are specified by a combination of + internal defaults, options provided on the QEMU program command-line, runtime + configurations set via the monitor interfaces and optional config files. The + runtime control of a VM is effected either through the Human Monitor + "Protocol" (HMP), or the JSON based programmatical QEMU Monitor Protocol (QMP) + interface. For QMP details, see qemu-qmp-ref man page. + Since a KVM guest runs in the context of a normal linux process, some types + of execution controls are managed with linux tools. + +- QEMU is compatible with EDK II based UEFI firmware available with SLES 15 SP4, + which allow boot options common to physical systems, along with other features + tailored to virtualization. Various VGABIOS ROMs, from the SEABIOS project, + are also available. + +- Some QEMU messages have been localized to various languages. This is provided + by the optional qemu-lang package. Keyboard mappings for various nationalities + is also provided. + +- Virtual machine lifecycle controls include startup through the UEFI BIOS or + kernel boot, ACPI based shutdown, execution pausing, the saving and restoring + of machine state or disk state, VM migration to another host, and + miscellaneous controls available through the "monitors" mentioned above. + +- Guest execution state may be "moved" in both time (save/restore) and space + (static and live migration). These migrations or save/restore operations can + take place either from certain prior SLES versioned hosts to a SLES 15 SP4 + host or between hosts of the same version. Certain other restrictions also + apply. + +- Security considerations include privileged helpers and a security model which + allows running guests as a non-root user. + +- QEMU provides best effort reuse of existing disk images, including those with + systems installed, through geometry probing. Also disk images produced by + other popular virtualization technologies may be imported into QEMU supported + storage formats. These QEMU formats include features which exploit the + benefits of virtualization. + +- Memory, cpu and disk space overcommit are possible and can be beneficial when + done responsibly. Additional management of these resources comes in the form + of memory ballooning or hotplug, host KSM, vcpu hot-add, online disk resizing, + trim, discard and hole punching. + +- Guest performance is enhanced through the use of virtio devices, various disk + caching modes, network acceleration via the vhost-net kernel module, multi- + queue network transmit capabilities, host transparent huge pages (THP) and + direct hugetlb usage. Physical PCI and USB devices may also be passed through + to the guest, including SR-IOV VF's. + +- The guest UI is accessable via GTK, VNC, Spice, and serial (including curses + TUI) interfaces. + +- Guest timekeeping is supported in a variety of ways, including a paravirtual + clocksource, and options for the various guest clocks for how to handle the + timeslicing of the guest's execution on the host. + +- In addition to the para-virtualized devices already mentioned, other devices + and infrastructure designed to avoid virtualization "problem areas" are + available such as SPICE graphics, vmmouse emulation, tablet style pointer + interfaces and virtio based UI interfaces. + +- A built-in user-mode network (SLIRP) stack is available. + +- Portions of the host file system may be shared with a guest by using virtFS. + +- A guest "agent" is available for SLES 15 SP4 KVM guests via the + qemu-guest-agent package. This allows some introspection and control of the + guest OS environment from the host. + +QEMU/KVM Technology Previews +---------------------------- + +- All features indicated as not being supported in this document fall under the + Technology Preview definition contained in the main product's release notes. + +Noteworthy QEMU/KVM Unsupported Features +---------------------------------------- + +- Note that some features are unsupported simply due to lack of validation. If + an existing feature is desired, but not marked supported, let SUSE know about + your requirements. + +- The TCG "acceleration" mode may be helpful for problem isolation, but + otherwise presents insufficient benefit and stability. + +- GlusterFS integration is not enabled. + +- 32 bit ARM KVM has never been supported by SUSE, but it's worth noting that + this capability will cease to even be possible in a near-future QEMU/KVM + (kernel) combination. + +Deprecated, Superseded, Modified and Dropped Features +----------------------------------------------------- + +- https://qemu-project.gitlab.io/qemu/about/deprecated.html and + https://qemu-project.gitlab.io/qemu/about/removed-features.html + These websites track features deprecation and removal at the upstream + development level. Our qemu package inherits this community direction, but be + aware that we can and will deviate as needed. Those deviations and additional + information can be found in this section. Feature deprecation as well as + removed features are also tracked in the "System Emulation" section of the + documentation installed with the qemu package. + +- qemu-img: Deprecate use of -b without -F. Creating an image that requires + format probing of the backing image is potentially unsafe and is now + deprecated. + +- Aspeed swift-bmc machine is deprecated. It can be easily replaced by the + witherspoon-bmc or the romulus-bmc machines. + +- The previously non-persistent backing file with pmem=on is deprecated. Modify + VM configuration to set pmem=off to continue using fake NVDIMM with backing + file or move backing file to NVDIMM storage and keep pmem=on. + +- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M", + "-machine" and "-d" is now considered deprecated. Use "help" + instead. + +- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC + machine types, as it created an obsolete SCSI controller model. + +- Use of aio=native without direct cache mode also being specified (cache=none, + cache=directsync, or cache.direct=on) is no longer allowed. + +- The use of image encryption in qcow and qcow2 formats is now considered + deprecated. + Analysis has shown it to be weak encryption, in addition to suffering from + poor design. Images can easily be converted to a non-encrypted format. + +- Use of acpi, boot-opts, and smp-opts in a -readconfig config file are now + considered deprecated. In the future those names will be standardized to + acpitable, boot, and smp respectively. + +- These previously supported command line options are now considered deprecated: + -display sdl,window_close= (use -display sdl,window-close) + -no-quit (use -display ...,window-close=off) + -chardev tty (use serial name instead) + -chardev paraport (use parallel name instead) + -device virtio-blk,scsi= (use virtio-scsi instead) + -device virtio-blk-pci,scsi= (use virtio-scsi instead) + -enable-fips (not really helpful - see https://git.qemu.org/?p=qemu.git;a=commit;h=166310299a1e7824bbff17e1f016659d18b4a559 for details) + -realtime mlock= (use -overcommit mem-lock= instead) + -spice password=string (use password-string option instead) + -writeconfig (no replacement - never really worked right) + -share and noshare must be replaced by share=on/share=off + -nodelay must be replaced by nodelay=on rather than delay=off + -object-add options opened=on and loaded=on (both had no effect) + +- These previously supported command line options are no longer supported: + -device ide-drive (use ide-hd or ide-cd instead) + -device scsi-disk (use scsi-hd or scsi-cd instead) + +- These previously supported command line options are no longer recognized: + -balloon (use -device virtio-balloon instead) + -clock + -device ivshmem (use ivshmem-doorbell or ivshmem-plain instead) + -device pc-sysfw (no longer needed) + -device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead) + -display sdl + -no-frame + -nodefconfig (use -no-user-config instead) + -realtime ... + -sdl + -show-cursor + -virtioconsole (use -device virtconsole instead) + +- The previously unsupported machine type xlnx-ep108 is no longer recognized + (used xlnx-zcu102 unstead) + +- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off" + will now cause a warning. The current behavior for this combination where + "+feature/-feature" wins over "feature=on/off", will be changed going forward + so that "+feature" and "-feature" will be synonyms for "feature=on" and + "feature=off" respectively. + +- The previously supported blkdev-add QMP command has been flagged as lacking + and could possibly change syntax in the future. + +- This previously unsupported command line option is now deprecated: + -soundhw (use -device ... instead) + +- These previously unsupported command line options are no longer recognized: + -bt + -device at24c-eeprom + -device mmio_interface + -device ssi-sd + -device tpm-tis-device + -device u2f-passthru + -device vhost-user-vsock-pci-transitional + -device vhost-vsock-pci-transitional + -device virtio-iommu-pci-transitional + -enable-hax + -tb-size + -tdf + -xen-create + +- These previously supported QMP commands are now deprecated: + + +- These previously supported QMP commands are no longer recognized: + info cpustats + block_passwd + change (use blockdev-change-medium or change-vnc-password instead) + cpu-add (use device_add instead) + migrate-set-cache-size (use migrate-set-parameters instead) + migrate_set_downtime (use migrate-set-parameters instead) + migrate_set_speed (use migrate-set-parameters instead) + query-cpus (use query-cpus-fast instead) + query-events + query-migrate-cache-size (use query-migrate-parameters instead) + +- These previously supported monitor commands are now deprecated: + change + +- These previously supported monitor commands are no longer recognized: + info cpustats + block_passwd ... + cpu-add (use device_add instead) + migrate_set_cache_size + migrate_set_downtime + migrate_set_speed + pci_add (use device_add instead) + pci_del (use device_del instead) + usb_add (use device_add instead) + usb_del (use device_del instead) + +- These previously unsupported monitor command are now deprecated: + + +- These previously unsupported monitor commands are no longer recognized: + acl_add ... + acl_policy ... + acl_remove ... + acl_reset ... + acl_show ... + host_net_add + host_net_remove + +- These previously unsupported QMP commands are now supported under a new name: + x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead) + x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead) + x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead) + x-block-latency-histogram-set (use block-latency-histogram-set instead) + x-blockdev-create (use blockdev-create instead) + +- This previously unsupported QMP commands is no longer recognized: + x-nbd-server-add-bitmap + +- Due to upstream's decision to no longer fully support the qed storage format + going forward (since it really provides no benefit over qcow2 and is now no + longer actively maintained upstream), creating qed storage images is no longer + supported and it is highly discouraged to continue using existing qed images. + They should instead be converted to another supported format. + +QEMU Command-Line and Monitor Syntax and Support +------------------------------------------------ + +- The QEMU program command-line syntax is as follows: + qemu-system-aarch64 [options] + + Where 'options' are taken from the options listed below. + The images used with -drive or -cdrom, may be in the raw (no format) or qcow2 + storage formats, and may be located in files within the host filesystem, + logical volumes, host physical disks, or network based storage. Read only + media may also be accessed via URL style protocol specifiers. + + Note that as a general rule, as new command line options are added which serve + to replace an older option or interface, you are strongly encouraged to adapt + your usage to the new option. The new option is being introduced to provide + better functionality and usability going forward. In some cases existing + problems or even bugs in older interfaces cannot be fixed due to functional + expectations, but are resolved in the newer interface or option. + This advice includes moving to the most recent machine type (eg virt-6.1 + instead of virt-6.0) if possible. + +- The following command line options are supported: + -accel ... + -action ... + -add-fd ... + -alt-grab + -append ... + -audio-help + -audiodev + -bios ... + -blockdev ... + -boot ... + -cdrom ... + -chardev ... + -compat ... + -cpu host + -ctrl-grab + -d ... + -daemonize + -debugcon ... + -device + + [VGA|rtl8139|virtio-net-pci|virtio-blk-pci|virtio-balloon-pci| + virtio-9p-pci|usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse| + usb-kbd|virtserialport|virtconsole|virtio-serial-pci|i82559er| + virtio-scsi-pci|scsi-cd|scsi-hd|scsi-generic|scsi-disk|scsi-block| + pci-serial|pci-serial-2x|pci-serial-4x|ich9-ahci|usb-host|usb-serial| + usb-wacom-tablet|usb-braille|usb-net|pci-ohci|virtio-rng-pci|i6300esb| + qxl|qxl-vga|pvpanic|vfio-pci|ivshmem-doorbell|ivshmem-plain| + pci-bridge|megasas-gen2|e1000e|e1000|vmcoreinfo|pcie-pci-bridge| + vhost-user-blk|vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci| + vhost-vsock-pci|virtio-crypto-pci|virtio-vga| + vhost-scsi-pci-non-transitional|vhost-scsi-pci-transitional| + vhost-user-blk-pci-non-transitional|vhost-user-blk-pci-transitional| + vhost-user-scsi-pci-non-transitional|vhost-user-scsi-pci-transitional| + vhost-vsock-pci-non-transitional|virtio-9p-pci-non-transitional| + virtio-9p-pci-transitional|virtio-balloon-pci-non-transitional| + virtio-balloon-pci-transitional|virtio-blk-pci-non-transitional| + virtio-blk-pci-transitional|virtio-input-host-pci-non-transitional| + virtio-input-host-pci-transitional|virtio-net-pci-non-transitional| + virtio-net-pci-transitional|virtio-rng-pci-non-transitional| + virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional| + virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional| + virtio-serial-pci-transitional|vhost-user-fs-pci|vhost-user-gpu| + vhost-user-pci-pci|vhost-user-input|vhost-user-input-pci| + vhost-user-vga|virtio-mmio|guest-loader|nvme-subsys|pvpanic-pci] + (the following are aliases of these supported devices: ahci| + virtio-blk|virtio-net|virtio-serial|virtio-balloon| virtio-9p| + virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet| + virtio-gpu|virtio-scsi|virtio-rng|e1000-82540em) + + -dfilter range, ... + -display ... + -drive + + ... (if specified if=[virtio] and format=[qcow2|raw] and + snapshot=off only) + + -echr ... + -enable-fips + -enable-kvm + -fsdev ... + -full-screen + -fw_cfg ... + -gdb ... + -global ... + -h + -help + -incoming ... + -initrd ... + -iscsi ... + -k ... + -kernel ... + -loadvm ... + -m ... + -M [help|none|virt-2.6|virt-2.11|virtio-3.1|virt-4.2|virt-5.2|virt-6.0|virt-6.1] + -machine [help|none|virt-2.6|virt-2.11|virt-3.1|virt-4.2|virt-5.2|virt-6.0|virt-6.1] + -mem-path ... + -mem-prealloc + -mon ... + -monitor ... + -msg ... + -name ... + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + and virtio are supported) + + -netdev [bridge|tap|user] ... + -nic ... + -no-acpi + -nodefaults + -nographic + -no-quit + -no-reboot + -no-shutdown + -no-user-config + -object ... + -only-migratable + -parallel ... + -pidfile ... + -plugin ... + -qmp ... + -qmp-pretty ... + -readconfig ... + -rtc ... + -runas ... + -s + -S + -sandbox ... + -seed ... + -serial ... + -smbios ... + -smp ... + -spice + -tpmdev passthrough ... + -trace ... + -usb + -usbdevice [braile|disk|host|mouse|net|serial|tablet] + -uuid ... + -version + -vga [none|qxl|std|virtio] + -virtfs ... + -vnc ... + -watchdog ... + -watchdog-action ... + -writeconfig ... + +- The following monitor commands are supported: + ? + announce_self ... + balloon ... + block_resize ... + boot_set ... + c + change ... + chardev-add ... + chardev-change ... + chardev-remove ... + chardev-send-break ... + client_migrate_info ... + closefd ... + cont + cpu ... + delvm ... + device_add ... + device_del ... + drive_add ... + drive_backup ... + drive_del ... + dump_guest_memory ... + eject ... + gdbserver ... + gpa2hpa ... + gpa2hva ... + gva2gpa ... + help + i ... + info ... + loadvm ... + logfile ... + logitem ... + mce ... + memsave ... + migrate ... + migrate_cancel + migrate_continue ... + migrate_incoming + migrate_pause + migrate_recover ... + migrate_set_capability ... + migrate_set_parameter ... + migrate_start_post_copy + mouse_button ... + mouse_move ... + mouse_set ... + nmi ... + o ... + object_add ... + object_del ... + p ... + pmemsave ... + print ... + q + qemu-io ... + qom-list + qom-set + ringbuf_read ... + ringbuf_write ... + savevm ... + screendump ... + sendkey ... + snapshot_blkdev_internal ... + snapshot_delete_blkdev_internal ... + stop + sum ... + system_powerdown + system_reset + system_wakeup + trace-event ... + watchdog_action ... + x ... + xp ... + +- The following QMP commands are supported: + add_client + add-fd + announce-self + balloon + blockdev-add + blockdev-backup + blockdev-change-medium + blockdev-close-tray + blockdev-create + blockdev-del + blockdev-mirror + blockdev-open-tray + blockdev-snapshot + blockdev-snapshot-delete-internal-sync + blockdev-snapshot-internal-sync + blockdev-snapshot-sync + block-commit + block-dirty-bitmap-add + block-dirty-bitmap-clear + block-dirty-bitmap-disable + block-dirty-bitmap-enable + block-dirty-bitmap-merge + block-dirty-bitmap-remove + block-export-add + block-export-del + block-latency-histogram-set + block_resize + block_set_io_throttle + block-set-write-threshold + block_stream + calc-dirty-rate + change-vnc-password + chardev-add + chardev-change + chardev-remove + chardev-send-break + client_migrate_info + closefd + cont + cpu + device_add + device_del + device-list-properties + display-reload + dump-guest-memory + eject + expire_password + getfd + human-monitor-command + inject-nmi + input-send-event + job-cancel + job-complete + job-dismiss + job-finalize + job-pause + job-resume + memsave + migrate + migrate_cancel + migrate-continue + migrate-incoming + migrate-pause + migrate-resume + migrate-set-capabilities + migrate-set-parameters + migrate-start-postcopy + object-add + object-del + pmemsave + qmp_capabilities + qom-get + qom-list + qom-list-types + qom-set + query-acpi-ospm-status + query-balloon + query-block + query-block-exports + query-block-jobs + query-blockstats + query-chardev + query-chardev-backends + query-command-line-options + query-commands + query-cpu-definitions + query-cpu-model-expansion + query-cpus-fast + query-current-machine + query-display-options + query-dirty-rate + query-dump + query-dump-guest-memory-capability + query-fdsets + query-gic-capabilities + query-hotpluggable-cpus + query-iothreads + query-jobs + query-kvm + query-machines + query-memdev + query-memory-devices + query-memory-size-summary + query-mice + query-migrate + query-migrate-capabilities + query-migrate-parameters + query-name + query-named-block-nodes + query-pci + query-pr-managers + query-qmp-schema + query-rocker + query-rocker-of-dpa-flows + query-rocker-of-dpa-groups + query-rocker-ports + query-rx-filter + query-spice + query-status + query-target + query-tpm + query-tpm-models + query-tpm-types + query-uuid + query-version + query-vnc + query-vnc-servers + query-yank + query-xen-replication-status + quit + remove-fd + ringbuf-read + ringbuf-write + screendump + send-key + set-action + set_link + set_password + snapshot-delete + snapshot-load + snapshot-save + stop + system_powerdown + system_reset + system_wakeup + trace-event-get-state + trace-event-set-state + transaction + watchdog-set-action + yank + +- The following command line options are unsupported: + + -acpitable ... + -chroot ... + -cpu ... (all except host) + -curses + -device + + [160s33b|320s33b|640s33b|a15mpcore_priv|a9mpcore_priv|a9-scu|adlib| + ads7846|allwinner-a10|allwinner-a10-pic|allwinner-A10-timer| + allwinner-emac|amd-iommu|AMDVI-PCI|arm1026-arm-cpu|arm1136-arm-cpu| + arm1136-r2-arm-cpu|arm1176-arm-cpu|arm11mpcore-arm-cpu| + arm11mpcore_priv|arm11-scu|arm926-arm-cpu|arm946-arm-cpu| + arm.cortex-a9-global-timer|arm_gic|arm-gicv2m| + arm_mptimer|armv7m_nvic|aspeed.timer|aspeed.vic|ast2400| + at25128a-nonjedec|at25256a-nonjedec|at25df041a|at25df321a|at25df641| + at25fs010|at25fs040|at26df081a|at26df161a|at26df321|at26f004| + at45db081d|bcm2835-aux|bcm2835-dma|bcm2835-fb|bcm2835-ic|bcm2835-mbox| + bcm2835-peripherals|bcm2835-property|bcm2836|bcm2836-control| + bochs-display|cadence_gem|cadence_ttc|cadence_uart|ccid-card-emulated| + ccid-card-passthru|cfi.pflash02|cirrus-vga|cmsdk-apb-dualtimer| + cmsdk-apb-watchdog|corgi-ssp|cortex-a15-arm-cpu|cortex-a53-arm-cpu| + cortex-a57-arm-cpu|cortex-a72-arm-cpu|cortex-a8-arm-cpu| + cortex-a9-arm-cpu|cortex-m0-arm-cpu|cortex-m3-arm-cpu| + cortex-m4-arm-cpu|cortex-r5-arm-cpu|cs4231a|digic|digic-timer| + digic-uart|ds1338|dscm1xxxx|e1000|en25f32|en25p32|en25p64|en25q32b| + en25q64|exynos4210.combiner|exynos4210-ehci-usb|exynos4210.fimd| + exynos4210.gic|exynos4210.i2c|exynos4210.irq_gate|exynos4210.mct| + exynos4210.pmu|exynos4210.pwm|exynos4210.rtc|exynos4210.uart|floppy| + fslimx25|fslimx31|fusbh200-ehci-usb|fw_cfg|gd25q32|gd25q64| + gpex-pcihost|gpex-root|gpio_i2c|gpio-key|gus|hyperv-testdev| + highbank-regs|host-arm-cpu|*-i386-cpu|i8042|ib700|icp-ctrl-regs| + igd-passthrough-isa-bridge|imx25.ccm|imx31.ccm|imx6.ccm|imx.avic| + imx.epit|imx.fec|imx.gpio|imx.gpt|imx.i2c|imx.serial|imx6ul.ccm| + integrator_core|integrator_debug|integrator_pic|integrator_pit| + intel_iommu|iotkit-sysctl|iotkit-sysinfo|ipmi-bmc-extern|ipmi-bmc-sim| + isa-applesmc|isa-cirrus-vga|isa-debugcon|isa-debug-exit|isa-fdc| + isa-ide|isa-ipmi-bt|isa-ipmi-kcs|isa-parallel|isa-vga|kvaser_pci| + kvm-arm-gic|kvm-arm-gicv3|l2x0|lan9118|lm8323|loader|lsi53c810a| + lsi53c895a|m25p05|m25p10|m25p128|m25p16|m25p20|m25p32|m25p40|m25p64| + m25p80|m25pe16|m25pe20|m25pe80|m25px32|m25px32-s0|m25px32-s1|m25px64| + m45pe10|m45pe16|m45pe80|mainstone-fpga|max1110|max1111|max7310| + mioe3680_pci|msf2-soc|msf2-sysreg|mss-sp1|mss-timer|musicpal_gpio| + musicpal_key|musicpal_lcd|musicpal-misc|mv88w8618_audio|mv88w8618_eth| + mv88w8618_flashcfg|mv88w8618_pic|mv88w8618_pit|mv88w8618_wlan| + mx25l12805d|mx25l12855e|mx25l1606e|mx25l2005a|mx25l25635e|mx25l25655e| + mx25l3205d|mx25l4005a|mx25l6405d|mx25l8005|n25q032|n25q032a11| + n25q032a13|n25q064|n25q064a11|n25q064a13|n25q128|n25q128a11| + n25q128a13|n25q256a|n25q256a11|n25q256a13|n25q512a|n25q512a11| + n25q512a13|nand|ne2k_isa|nrf51-soc|nrf51_soc.uart|nvdimm|omap2-gpio| + omap2-intc|omap-gpio|omap_i2c|omap-intc|onenand|pc-dimm|pc-testdev| + piix3-ide|piix3-ide|piix3-ide-xen|piix3-usb-uhci|pl011|pl011_luminary| + pl022|pl031|pl041|pl050_keyboard|pl050_mouse|pl061|pl061_luminary| + pl080|pl081|pl110|pl110_versatile|pl111|pl181|pl190|pl330| + platform-bus-device|pvrdma|pxa250-arm-cpu|pxa255-arm-cpu|pxa25x-timer| + pxa260-arm-cpu|pxa261-arm-cpu|pxa262-arm-cpu|pxa270-a0-arm-cpu| + pxa270-a1-arm-cpu|pxa270-arm-cpu|pxa270-b0-arm-cpu|pxa270-b1-arm-cpu| + pxa270-c0-arm-cpu|pxa270-c5-arm-cpu|pxa27x-timer|pxa2xx-dma| + pxa2xx-fir|pxa2xx-gpio|pxa2xx_i2c|pxa2xx-i2c-slave|pxa2xx-mmci| + pxa2xx-pcmcia|pxa2xx_pic|pxa2xx_rtc|pxa2xx-ssp|ramfb|realview_gic| + realview_mpcore|realview_pci|realview_sysctl|s25fl016k|s25fl064k| + s25fl129p0|s25fl129p1|s25fl256s0|s25fl256s1|s25fl512s|s25sl004a| + s25sl008a|s25sl016a|s25sl032a|s25sl032p|s25sl064a|s25sl064p| + s25sl12800|s25sl12801|s70fl01gs|sa1100-arm-cpu|sa1110-arm-cpu|sb16| + scoop|sdhci-pci|sga|sii9022|sl-nand|smbus-eeprom|smc91c111|sp804| + spitz-keyboard|spitz-lcdtg|ssd0303|ssd0323|sst25vf016b|sst25vf032b| + sst25vf040b|sst25vf080b|sst25wf010|sst25wf020|sst25wf040| sst25wf080| + sst25wf512|stellaris-adc|stellaris_enet|stellaris-gptm|stellaris-i2c| + stm32f205-soc|stm32f2xx-syscfg|stm32f2xx-timer|stm32f2xx-usart| + strongarm-gpio|strongarm_pic|strongarm-ppc|strongarm-rtc| + strongarm-ssp|strongarm-uart|tegra2-ehci-usb|ti925t-arm-cpu|tmp105| + tosa_dac|tosa-ssp|tusb6010|twl92230|tz-msc|usb-redir|versatile_i2c| + versatilepb_sic|versatile_pci|versatile_pci_host|vfio-pci-nohotplug| + vfio-platform|vhost-vsock-device|virtconsole|virtio-crypto-device| + vmgenid|vmware-svga|w25q256|w25q32|w25q32dw|w25q64|w25q80|w25q80bl| + w25x10|w25x16|w25x20|w25x32|w25x40|w25x64|w25x80|wm8750|*-x86_64-cpu| + xen-backend|xen-pci-passthrough|xen-platform|xen-pvdevice|xgmac| + xilinxzynq_slcr|xlnx-versal|xlnx.ps7-qspi|xlnx.ps7-spi|xlnxzynqmp| + xlnxzynq-xadc|armsse-cpuid|armsse-mhu|cpu-cluster|luminary-watchdog| + microbit.i2c|nrf51_soc.gpio|nrf51_soc.nvm|nrf51_soc.rng| + nrf51_soc.timer|platform-ehci-usb|sse-200|vmware-svga|vmxnet3|ati-vga| + cirrus-vga|vhost-user-fs-device|tulip|ati-vga|aw-hc-ehci-usb| + virtio-iommu-device|virtio-iommu-pci| + virtio-iommu-pci-non-transitional|cortex-m7-arm-cpu|allwinner-cpucfg| + allwinner-h3|allwinner-h3-ccu|allwinner-h3-dramc|allwinner-h3-sysctrl| + allwinner-rtc-sun4i|allwinner-rtc-sun6i|allwinner-rtc-sun7i| + allwinner-sdhost-sun4i|allwinner-sdhost-sun5i|allwinner-sid| + allwinner-sun8i-emac|imx.rngc|imx.usbphy|serial|serial-io| + stm32f405-soc|stm32f4xx-exti|stm32f4xx-syscfg|nvdimm| + vhost-user-vsock-device|vhost-user-vsock-pci| + vhost-user-vsock-pci-non-transitional|nvme-ns|ads7846|led|ssd0323| + vhost-user-vga|ctucan_pci|bcm2835-cprman-clock-mux| + bcm2835-cprman-cprman-dsi0hsck-mux|bcm2835-cprman-cprman-pll| + bcm2835-cprman-cprman-pll-channel|mt25ql512ab|mx66l5123f|n25q512ax3| + ssd0323|at24c-eeprom|emc1413|emc1414|is25lp016d|is25lp032|is25lp064| + is25lp080d|is25lp128|is25lp256|is25lq040b|is25wp032|is25wp064| + is25wp128|is25wp256|npcm7xx-clock-divider|npcm7xx-clock-pll| + npcm7xx-clock-sel] + (the following are aliases of these unsupported devices: lsi| + piix3-usb-uhci) + (note that some of these device names represent supported devices and + are used internally, but are not specifyable via -device even though + they appear in the list of devices) + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + raw] + + -dtb file + -enable-sync-profile + -fda/-fdb ... + -g ... + -hda/-hdb/-hdc/-hdd ... + -icount ... + -L ... + -M + + [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie|connex| + cubieboard|emcraft-sf2|g220a-bmc|highbank|imx25-pdk|integratorcp|kzm| + lm3s6965evb|lm3s811evb|mainstone|mcimx6ul-evk|mcimx7d-sabre|microbit| + midway|mps2-an385|mps2-an386|mps2-an500|mps2-an505|mps2-an511|mps2-an521| + mps3-an524|mps3-an547|musca-a|musca-b1|musicpal|n800|n810|netduino2| + netduinoplus2|npcm750-evb|nuri|orangepi-pc|palmetto-bmc|quanta-gsj|raspi0| + raspi1ap|raspi2|raspi2b|raspi3ap|raspi3|raspi3b|realview-eb| + realview-eb-mpcore|realview-pb-a8|realview-pbx-a9|romulus-bmc|sabrelite| + sbsa-ref|smdkc210|sonorapass-bmc|spitz|supermicrox11-bmc|swift-bmc|sx1| + sx1-v1|tacoma-bmc|terrier|tosa|verdex|versatileab|versatilepb| + vexpress-a15|vexpress-a9|virt-2.12|virt-2.7|virt-2.8|virt-3.0|virt-4.0| + virt-4.1|virt-5.0|virt-5.1|virt-6.0|virt|virt-6.1|witherspoon-bmc| + xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + + -machine + + [akita|ast2500-evb|ast2600-evb|borzoi|canon-a1100|cheetah|collie| + connex|cubieboard|emcraft-sf2|g220a-bmc|highbank|imx25-pdk| + integratorcp|kzm|lm3s6965evb|lm3s811evb|mainstone|mcimx6ul-evk| + mcimx7d-sabre|microbit|midway|mps2-an385|mps2-an386|mps2-an500| + mps2-an505|mps2-an511|mps2-an521|mps3-an524|mps3-an547|musca-a| + musca-b1|musicpal|n800|n810|netduino2|netduinoplus2|npcm750-evb| + nuri|orangepi-pc|palmetto-bmc|quanta-gsj|raspi0|raspi1ap|raspi2| + raspi2b|raspi3ap|raspi3|raspi3b|realview-eb|realview-eb-mpcore| + realview-pb-a8|realview-pbx-a9|romulus-bmc|sabrelite|sbsa-ref| + smdkc210|sonorapass-bmc|spitz|supermicrox11-bmc|swift-bmc|sx1| + sx1-v1|tacoma-bmc|terrier|tosa|verdex|versatileab|versatilepb| + vexpress-a15|vexpress-a9|virt-2.12|virt-2.7|virt-2.8|virt-3.0| + virt-4.0|virt-4.1|virt-5.0|virt-5.1|virt-6.0|virt|virt-6.1| + witherspoon-bmc|xilinx-zynq-a9|xlnx-versal-virt|xlnx-zcu102|z2] + + -mtdblock file + -net [socket|vde] ... + -netdev [hubport|l2tpv3|socket|vde] ... + -no-fd-bootchk + -no-hpet + -no-kvm + -no-kvm-irqchip + -no-kvm-pit + -no-kvm-pit-reinjection + -numa cpu ... + -numa dist ... + -numa node ... + -option-rom ... + -overcommit ... + -pflash file + -portrait + -preconfig + -prom-env ... + -qtest ... + -qtest-log ... + -rotate + -sd file + -sdl + -set ... + -singlestep + -snapshot + -soundhw ... + -tpmdev emulator ... + -vga [cg3|tcx|virtio|cirrus|xenfb] + -win2k-hack + -xen-attach ... + -xen-domid ... + -xen-domid-restrict ... + +- The following monitor commands are unsupported: + block_job_cancel ... + block_job_complete ... + block_job_pause ... + block_job_resume ... + block_job_set_speed ... + commit ... + drive_mirror ... + exit_preconfig + expire_password ... + hostfwd_add ... + hostfwd_remove ... + nbd_server_add ... + nbd server_start ... + nbd_server_stop ... + netdev_add + netdev_del ... + pcie_aer_inject_error ... + replay_break ... + replay_delete_break + replay_seek ... + set_link ... + set_password ... + singlestep ... + snapshot_blkdev ... + stopcapture ... + sync-profile ... + wavcapture ... + x_colo_lost_heartbeat + +- The following QMP commands are unsupported: + block-job-cancel + block-job-complete + block-job-pause + block-job-resume + block-job-set-speed + change-backing-file + drive-backup + drive-mirror + netdev_add + netdev_del + nbd-server-add + nbd-server-start + nbd-server-stop + query-colo-status + replay_break + replay_delete_break + replay_seek + x-blockdev-amend + x-blockdev-change + x-blockdev-insert-medium + x-blockdev-remove-medium + x-blockdev-reopen + x-colo-lost-heartbeat + x-debug-block-dirty-bitmap-sha256 + x-debug-query-block-graph + x-exit-preconfig + xen-colo-do-checkpoint + xen-load-devices-state + xen-save-devices-state + xen-set-global-dirty-log + xen-set-replication diff --git a/rpm/supported.ppc.txt b/rpm/supported.ppc.txt new file mode 100644 index 0000000000..ceb67674cf --- /dev/null +++ b/rpm/supported.ppc.txt @@ -0,0 +1,6 @@ +[qemu-ppc package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +QEMU/KVM on ppc is not supported. diff --git a/rpm/supported.s390.txt b/rpm/supported.s390.txt new file mode 100644 index 0000000000..1441d5e428 --- /dev/null +++ b/rpm/supported.s390.txt @@ -0,0 +1,868 @@ +[qemu-s390 package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +Overview +-------- + + The QEMU based packages included with SLES 15 SP4 provide a large variety of + features, from the very latest customer requests to features of questionable + quality or value. The linux kernel includes components which contribute KVM + virtualization features as well. This document was created to assist the user + in deciding which features can be relied upon to build enterprise class + virtualization solutions. KVM based virtualization for x86 (Intel 64/AMD64), + for IBM System z (s390x), and for the ARM64 architecture (AArch64) are offered + at the L3 (full support) level. The bulk of this document deals with L3 + supported features and is primarily s390x centric. This document should be + considered a companion to the standard virtualization documentation delivered + with the product. + + KVM is implemented in linux kernel modules which enable the linux kernel to + function as an integral part of the KVM hypervisor. The hypervisor-guest + interaction is managed by QEMU through the /dev/kvm ioctl interface. The linux + host assists in the virtualization of storage, networking and display + resources as well as allowing direct hardware passthrough of PCI devices. + Linux memory and cpu management features are used by QEMU/KVM to enable guests + to share those host resources as efficiently as possible. + + QEMU is a primary component of KVM based virtualization. The legacy qemu-kvm + program is available for continuity with pre SLES 12 usage, including in + libvirt domain xml references. The QEMU emulator binary qemu-system-s390x is + now the primary program to use to access KVM virtualization. When using this + program, the -machine option accel=kvm (or its alias -enable-kvm) or --accel + kvm option must be specified for KVM acceleration to be used by the guest. + + Libvirt is the preferred means of accessing QEMU/KVM functionality and is + documented elsewhere. This document focuses on the features and direct usage + of QEMU/KVM as provided by the QEMU based packages. + +Major QEMU/KVM Supported Features +--------------------------------- + +- KVM virtualization is accomplished by using the QEMU program in KVM + acceleration mode. KVM acceleration requires that both guest and host have + the same fundamental architecture. + +- Guest images created under previous QEMU versions are supported by machine + version compatibilities built into more recent QEMU versions. + +- For ease of use, the QEMU program has defaults which represent traditional + usage patterns. + +- Guest virtual machine characteristics are specified by a combination of + internal defaults, options provided on the QEMU program command-line, runtime + configurations set via the monitor interfaces and optional config files. The + runtime control of a VM is effected either through the Human Monitor + "Protocol" (HMP), or the JSON based programmatical QEMU Monitor Protocol (QMP) + interface. For QMP details, see qemu-qmp-ref man page. + Since a KVM guest runs in the context of a normal linux process, some types + of execution controls are managed with linux tools. + +- QEMU incorporates virtualized, s390 specific, ccw bus based firmware for + booting s390 guests. This firmware is automatically incorporated and + doesn't need to be explicitly referenced. + +- Some QEMU messages have been localized to various languages. This is provided + by the optional qemu-lang package. Keyboard mappings for various nationalities + is also provided. + +- Virtual machine lifecycle controls include startup through the ccw firmware or + kernel boot, firmware based shutdown, execution pausing, the saving and + restoring of machine state or disk state, VM migration to another host, and + miscellaneous controls available through the "monitors" mentioned above. + +- Guest execution state may be "moved" in both time (save/restore) and space + (static and live migration). These migrations or save/restore operations can + take place either from certain prior SLES versioned hosts to a SLES 15 SP4 + host or between hosts of the same version. Certain other restrictions also + apply. + +- Security considerations include privileged helpers and a security model which + allows running guests as a non-root user. + +- QEMU provides best effort reuse of existing disk images, including those with + systems installed, through geometry probing. Also disk images produced by + other popular virtualization technologies may be imported into QEMU supported + storage formats. These QEMU formats include features which exploit the + benefits of virtualization. + +- Memory, cpu and disk space overcommit are possible and can be beneficial when + done responsibly. Additional management of these resources comes in the form + of memory ballooning or hotplug, host KSM, vcpu hot-add, online disk resizing, + trim, discard and hole punching. + +- Guest performance is enhanced through the use of virtio devices, various disk + caching modes, network acceleration via the vhost-net kernel module, multi- + queue network transmit capabilities, host transparent huge pages (THP) and + direct hugetlb usage. Physical PCI devices may also be passed through to the + guest, including SR-IOV VF's. + +- The guest UI is accessable via GTK, VNC, and serial (including curses TUI) + interfaces. + +- Guest timekeeping is supported in a variety of ways, including a paravirtual + clocksource, and options for the various guest clocks for how to handle the + timeslicing of the guest's execution on the host. + +- In addition to the para-virtualized devices already mentioned, other devices + and infrastructure designed to avoid virtualization "problem areas" are + available such as SPICE graphics, vmmouse emulation, tablet style pointer + interfaces and virtio based UI interfaces. + +- A built-in user-mode network (SLIRP) stack is available. + +- Portions of the host file system may be shared with a guest by using virtFS. + +- A guest "agent" is available for SLES 15 SP4 KVM guests via the + qemu-guest-agent package. This allows some introspection and control of the + guest OS environment from the host. + +QEMU/KVM Technology Previews +---------------------------- + +- All features indicated as not being supported in this document fall under the + Technology Preview definition contained in the main product's release notes. + +Noteworthy QEMU/KVM Unsupported Features +---------------------------------------- + +- Note that some features are unsupported simply due to lack of validation. If + an existing feature is desired, but not marked supported, let SUSE know about + your requirements. + +- The TCG "acceleration" mode may be helpful for problem isolation, but + otherwise presents insufficient benefit and stability. + +- GlusterFS integration is not enabled. + +Deprecated, Superseded, Modified and Dropped Features +----------------------------------------------------- + +- https://qemu-project.gitlab.io/qemu/about/deprecated.html and + https://qemu-project.gitlab.io/qemu/about/removed-features.html + These websites track features deprecation and removal at the upstream + development level. Our qemu package inherits this community direction, but be + aware that we can and will deviate as needed. Those deviations and additional + information can be found in this section. Feature deprecation as well as + removed features are also tracked in the "System Emulation" section of the + documentation installed with the qemu package. + +- qemu-img: Deprecate use of -b without -F. Creating an image that requires + format probing of the backing image is potentially unsafe and is now + deprecated. + +- The previously non-persistent backing file with pmem=on is deprecated. Modify + VM configuration to set pmem=off to continue using fake NVDIMM with backing + file or move backing file to NVDIMM storage and keep pmem=on. + +- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M", + "-machine" and "-d" is now considered deprecated. Use "help" + instead. + +- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC + machine types, as it created an obsolete SCSI controller model. + +- Use of aio=native without direct cache mode also being specified (cache=none, + cache=directsync, or cache.direct=on) is no longer allowed. + +- The use of image encryption in qcow and qcow2 formats is now considered + deprecated. + Analysis has shown it to be weak encryption, in addition to suffering from + poor design. Images can easily be converted to a non-encrypted format. + +- Use of acpi, boot-opts, and smp-opts in a -readconfig config file are now + considered deprecated. In the future those names will be standardized to + acpitable, boot, and smp respectively. + +- These previously supported command line options are now considered deprecated: + -display sdl,window_close= (use -display sdl,window-close) + -no-quit (use -display ...,window-close=off) + -chardev tty (use serial name instead) + -chardev paraport (use parallel name instead) + -device virtio-blk,scsi= (use virtio-scsi instead) + -device virtio-blk-pci,scsi= (use virtio-scsi instead) + -enable-fips (not really helpful - see https://git.qemu.org/?p=qemu.git;a=commit;h=166310299a1e7824bbff17e1f016659d18b4a559 for details) + -realtime mlock= (use -overcommit mem-lock= instead) + -spice password=string (use password-string option instead) + -writeconfig (no replacement - never really worked right) + -share and noshare must be replaced by share=on/share=off + -nodelay must be replaced by nodelay=on rather than delay=off + -object-add options opened=on and loaded=on (both had no effect) + +- These previously supported command line options are no longer supported: + + +- These previously supported command line options are no longer recognized: + -balloon (use -device virtio-balloon instead) + -clock + -device ivshmem (use ivshmem-doorbell or ivshmem-plain instead) + -device pc-sysfw (no longer needed) + -device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead) + -display sdl + -no-frame + -nodefconfig (use -no-user-config instead) + -realtime ... + -sdl + -show-cursor + -virtioconsole (use -device virtconsole instead) + +- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off" + will now cause a warning. The current behavior for this combination where + "+feature/-feature" wins over "feature=on/off", will be changed going forward + so that "+feature" and "-feature" will be synonyms for "feature=on" and + "feature=off" respectively. + +- The previously supported blkdev-add QMP command has been flagged as lacking + and could possibly change syntax in the future. + +- These previously unsupported command line options are now deprecated: + -bt + -soundhw (use -device ... instead) + +- These previously unsupported command line options are no longer recognized: + -device ide-drive (use ide-hd or ide-cd) + -device mmio_interface + -device ramfb + -device scsi-disk (use scsi-hd or scsi-cd) + -device vhost-user-vsock-pci-transitional + -device vhost-vsock-pci-transitional + -device virtio-iommu-pci-transitional + -enable-hax + -tb-size + -tdf + -xen-create + +- These previously supported QMP commands are now deprecated: + + +- These previously supported QMP commands are no longer recognized: + info cpustats + block_passwd + change (use blockdev-change-medium or change-vnc-password instead) + cpu-add (use device_add instead) + migrate-set-cache-size (use migrate-set-parameters instead) + migrate_set_downtime (use migrate-set-parameters instead) + migrate_set_speed (use migrate-set-parameters instead) + query-cpus (use query-cpus-fast instead) + query-events + query-migrate-cache-size (use query-migrate-parameters instead) + +- These previously supported monitor commands are now deprecated: + change + +- These previously supported monitor commands are no longer recognized: + info cpustats + block_passwd ... + cpu-add (use device_add instead) + migrate_set_cache_size + migrate_set_downtime + migrate_set_speed + pci_add (use device_add instead) + pci_del (use device_del instead) + +- These previously unsupported monitor command are now deprecated: + + +- These previously unsupported monitor commands are no longer recognized: + acl_add ... + acl_policy ... + acl_remove ... + acl_reset ... + acl_show ... + host_net_add + host_net_remove + usb_add + usb_del + +- These previously unsupported QMP commands are now supported under a new name: + x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead) + x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead) + x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead) + x-block-latency-histogram-set (use block-latency-histogram-set instead) + x-blockdev-create (use blockdev-create instead) + +- This previously unsupported QMP commands is no longer recognized: + x-nbd-server-add-bitmap + +- Due to upstream's decision to no longer fully support the qed storage format + going forward (since it really provides no benefit over qcow2 and is now no + longer actively maintained upstream), creating qed storage images is no longer + supported and it is highly discouraged to continue using existing qed images. + They should instead be converted to another supported format. + +QEMU Command-Line and Monitor Syntax and Support +------------------------------------------------ + +- The QEMU program command-line syntax is as follows: + qemu-system-s390x [options] + + Where 'options' are taken from the options listed below. + The images used with -drive or -cdrom, may be in the raw (no format) or qcow2 + storage formats, and may be located in files within the host filesystem, + logical volumes, host physical disks, or network based storage. Read only + media may also be accessed via URL style protocol specifiers. + + Note that as a general rule, as new command line options are added which serve + to replace an older option or interface, you are strongly encouraged to adapt + your usage to the new option. The new option is being introduced to provide + better functionality and usability going forward. In some cases existing + problems or even bugs in older interfaces cannot be fixed due to functional + expectations, but are resolved in the newer interface or option. + This advice includes moving to the most recent machine type (eg + s390-ccw-virtio-6.1 instead of s390-ccw-virtio-6.0) if possible. + +- The following command line options are supported: + -accel ... + -action ... + -add-fd ... + -alt-grab + -append ... + -audio-help + -audiodev + -bios ... + -blockdev ... + -boot ... + -cdrom ... + -chardev ... + -compat ... + -cpu host + -ctrl-grab + -d ... + -daemonize + -debugcon ... + -device + + [virtio-net-pci|virtio-blk-pci|virtio-balloon-pci|virtserialport| + virtconsole|virtio-serial-pci|virtio-scsi-pci|scsi-cd|scsi-hd| + scsi-generic|scsi-block|virtio-rng-pci|pci-bridge|megasas-gen2|e1000e| + e1000|zpci|virtio-gpu-ccw|virtio-keyboard-ccw|vhost-user-blk-pci| + vhost-user-scsi|vhost-user-scsi-pci|vhost-vsock-ccw| + virtio-balloon-ccw|virtio-blk-ccw|vhost-scsi-ccw|vhost-user-blk| + virtio-crypto-ccw|virtio-net-ccw|virtio-rng-ccw|virtio-scsi-ccw| + virtio-serial-ccw|virtio-mouse-ccw|virtio-tablet-ccw|vfio-pci| + virtio-vga|vhost-scsi-pci-non-transitional| + vhost-scsi-pci-transitional|vhost-user-blk-pci-non-transitional| + vhost-user-blk-pci-transitional|vhost-user-scsi-pci-non-transitional| + vhost-user-scsi-pci-transitional|vhost-vsock-pci-non-transitional| + virtio-9p-ccw|virtio-9p-pci-non-transitional| + virtio-9p-pci-transitional|virtio-balloon-pci-non-transitional| + virtio-balloon-pci-transitional|virtio-blk-pci-non-transitional| + virtio-blk-pci-transitional|virtio-input-host-pci-non-transitional| + virtio-input-host-pci-transitional|virtio-net-pci-non-transitional| + virtio-net-pci-transitional|virtio-rng-pci-non-transitional| + virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional| + virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional| + virtio-serial-pci-transitional|vhost-user-fs-pci|vhost-user-gpu| + vhost-user-pci-pci|vhost-user-input|vhost-user-input-pci| + vhost-user-vga] + (the following are aliases of these supported devices: virtio-blk| + virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet| + virtio-gpu|virtio-9p|virtio-net|virtio-serial|virtio-balloon| + virtio-scsi|virtio-rng) + + -dfilter range, ... + -display ... + -drive + + ... (if specified if=[virtio] and format=[qcow2|raw] and + snapshot=off only) + + -echr ... + -enable-fips + -enable-kvm + -fsdev ... + -full-screen + -fw_cfg ... + -gdb ... + -global ... + -h + -help + -incoming ... + -initrd ... + -iscsi ... + -k ... + -kernel ... + -loadvm ... + -m ... + -M + + [help|?|none|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9|s390-ccw-virtio-2.11| + s390-ccw-virtio-3.1|s390-ccw-virtio-4.2|s390-ccw-virtio-5.2] + + -machine + + [help|?|none|s390-ccw-virtio-2.6|s390-ccw-virtio-2.9| + s390-ccw-virtio-2.11|s390-ccw-virtio-3.1|s390-ccw-virtio-4.2| + s390-ccw-virtio-5.2] + + -mem-path ... + -mem-prealloc + -mon ... + -monitor ... + -msg ... + -name ... + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + and virtio are supported) + + -netdev [bridge|tap|user] ... + -nic ... + -nodefaults + -nographic + -no-quit + -no-reboot + -no-shutdown + -no-user-config + -object ... + -only-migratable + -parallel ... + -pidfile ... + -plugin ... + -qmp ... + -qmp-pretty ... + -readconfig ... + -rtc ... + -runas ... + -s + -S + -sandbox ... + -seed ... + -serial ... + -smp ... + -trace ... + -uuid ... + -version + -vga [none|qxl|std] + -virtfs ... + -vnc ... + -watchdog ... + -watchdog-action ... + -writeconfig ... + +- The following monitor commands are supported: + ? + announce_self ... + balloon ... + block_resize ... + boot_set ... + c + change ... + chardev-add ... + chardev-change ... + chardev-remove ... + chardev-send-break ... + client_migrate_info ... + closefd ... + cont + cpu ... + delvm ... + device_add ... + device_del ... + drive_add ... + drive_backup ... + drive_del ... + dump_guest_memory ... + eject ... + gdbserver ... + gpa2hpa ... + gpa2hva ... + gva2gpa ... + help + i ... + info ... + loadvm ... + logfile ... + logitem ... + mce ... + memsave ... + migrate ... + migrate_cancel + migrate_continue ... + migrate_incoming + migrate_pause + migrate_recover ... + migrate_set_capability ... + migrate_set_parameter ... + migrate_start_post_copy + mouse_button ... + mouse_move ... + mouse_set ... + nmi ... + o ... + object_add ... + object_del ... + p ... + pmemsave ... + print ... + q + qemu-io ... + qom-list + qom-set + ringbuf_read ... + ringbuf_write ... + savevm ... + screendump ... + sendkey ... + snapshot_blkdev_internal ... + snapshot_delete_blkdev_internal ... + stop + sum ... + system_powerdown + system_reset + system_wakeup + trace-event ... + watchdog_action ... + x ... + xp ... + +- The following QMP commands are supported: + add_client + add-fd + announce-self + balloon + blockdev-add + blockdev-backup + blockdev-change-medium + blockdev-close-tray + blockdev-create + blockdev-del + blockdev-mirror + blockdev-open-tray + blockdev-snapshot + blockdev-snapshot-delete-internal-sync + blockdev-snapshot-internal-sync + blockdev-snapshot-sync + block-commit + block-dirty-bitmap-add + block-dirty-bitmap-clear + block-dirty-bitmap-disable + block-dirty-bitmap-enable + block-dirty-bitmap-merge + block-dirty-bitmap-remove + block-export-add + block-export-del + block-latency-histogram-set + block_resize + block_set_io_throttle + block-set-write-threshold + block_stream + calc-dirty-rate + change-vnc-password + chardev-add + chardev-change + chardev-remove + chardev-send-break + client_migrate_info + closefd + cont + cpu + device_add + device_del + device-list-properties + display-reload + dump-guest-memory + eject + expire_password + getfd + human-monitor-command + inject-nmi + input-send-event + job-cancel + job-complete + job-dismiss + job-finalize + job-pause + job-resume + memsave + migrate + migrate_cancel + migrate-continue + migrate-incoming + migrate-pause + migrate-resume + migrate-set-capabilities + migrate-set-parameters + migrate-start-postcopy + object-add + object-del + pmemsave + qmp_capabilities + qom-get + qom-list + qom-list-types + qom-set + query-acpi-ospm-status + query-balloon + query-block + query-block-exports + query-block-jobs + query-blockstats + query-chardev + query-chardev-backends + query-command-line-options + query-commands + query-cpu-definitions + query-cpu-model-baseline + query-cpu-model-comparison + query-cpu-model-expansion + query-cpus-fast + query-current-machine + query-dirty-rate + query-display-options + query-dump + query-dump-guest-memory-capability + query-fdsets + query-gic-capabilities + query-hotpluggable-cpus + query-iothreads + query-jobs + query-kvm + query-machines + query-memdev + query-memory-devices + query-memory-size-summary + query-mice + query-migrate + query-migrate-capabilities + query-migrate-parameters + query-name + query-named-block-nodes + query-pci + query-pr-managers + query-qmp-schema + query-rocker + query-rocker-of-dpa-flows + query-rocker-of-dpa-groups + query-rocker-ports + query-rx-filter + query-spice + query-status + query-target + query-uuid + query-version + query-vnc + query-vnc-servers + query-yank + query-xen-replication-status + quit + remove-fd + ringbuf-read + ringbuf-write + screendump + send-key + set-action + set_link + set_password + snapshot-delete + snapshot-load + snapshot-save + stop + system_powerdown + system_reset + system_wakeup + trace-event-get-state + trace-event-set-state + transaction + watchdog-set-action + yank + +- The following command line options are unsupported: + + -acpitable ... + -chroot ... + -cpu ... (all except host) + -curses + -device + + [AC97|adlib|am53c974|amd-iommu|AMDVI-PCI|ccid-card-emulated| + ccid-card-passthrough|cirrus-vga|cs4231a|dc390|diag288|e1000-82544gc| + e1000-82545em|edu|ES1370|floppy|generic-sdhci|gus|hda-duplex| + hda-micro|hda-output|hyperv-testdev|*-i386-cpu|i8042|i82550|i82551| + i82557a|i82557b|i82557c|i82558a|i82558b|i82559a|i82559b|i82559c| + i82562|i82801|i82801b11-bridge|ib700|ich9-intel-hda|ich9-usb-ehci1| + ich9-usb-ehci2|ich9-usb-uhci1|ich9-usb-uhci2|ich9-usb-uhci3| + ich9-usb-uhci4|ich9-usb-uhci5|ich9-usb-uhci6|ide-cd|ide-drive|ide-hd| + igd-passthrough-isa-bridge|intel-hda|intel_iommu|ioh3420| + ipmi-bmc-extern|ipmi-bmc-sim|ipoctal232|isa-applesmc|isa-cirrus-vga| + isa-debugcon|isa-debug-exit|isa-fdc|isa-ide|isa-ipmi-bt|isa-ipmi-kcs| + isa-parallel|isa-serial|isa-vga|lsi53c810|lsi53c810a|max-s390x-cpu| + megasas|mptsas1068|ne2k_isa|ne2k_pci|nec-usb-xhci|nvdimm|nvme|pc-dimm| + pci-testdev|pcnet|pc-testdev|piix3-ide|piix3-ide|piix3-ide-xen| + piix4-usb-uhci|pvscsi|pxb|pxb-host|pxb-pcie|qemu-s390-cpu|rocker| + s390-flic|s390-flic-qemu|s390-ipl|s390-pcihost| + s390-sclp-event-facility|s390-skeys-qemu|sb16|sclp|sclpconsole| + sclp-cpu-hotplug|sclplmconsole|sclp-memory-hotplug-dev|sclpquiesce| + sd-card|sdhci-pci|secondary-vga|sga|smbus-eeprom|tpci200|usb-audio| + usb-bot|usb-ccid|usb-mtp|usb-uas|vfio-ap|vfio-pci-nohotplug| + virtio-9p-device|virtual-css-bridge|vmcoreinfo|vmgenid|vmware-svga| + vmxnet3|vt82c686b-usb-uhci|x3130-upstream|*-x86_64-cpu|xen-backend| + xen-pci-passthrough|xen-platform|xen-pvdevice|xio3130-downstream| + z10BC.2-base-s390x-cpu|z10BC.2-s390x-cpu|z10BC-base-s390x-cpu| + z10BC-s390x-cpu|z10EC.2-base-s390x-cpu|z10EC.2-s390x-cpu| + z10EC.3-base-s390x-cpu|z10EC.3-s390x-cpu|z10EC-base-s390x-cpu| + z10EC-s390x-cpu|z114-base-s390x-cpu|z114-s390x-cpu| + z13.2-base-s390x-cpu|z13.2-s390x-cpu|z13-base-s390x-cpu|z13-s390x-cpu| + z13s-base-s390x-cpu|z13s-s390x-cpu|z196.2-base-s390x-cpu| + z196.2-s390x-cpu|z196-base-s390x-cpu|z196-s390x-cpu| + z800-base-s390x-cpu|z800-s390x-cpu|z890.2-base-s390x-cpu| + z890.2-s390x-cpu|z890.3-base-s390x-cpu|z890.3-s390x-cpu| + z890-base-s390x-cpu|z890-s390x-cpu|z900.2-base-s390x-cpu| + z900.2-s390x-cpu|z900.3-base-s390x-cpu|z900.3-s390x-cpu| + z900-base-s390x-cpu|z900-s390x-cpu|z990.2-base-s390x-cpu| + z990.2-s390x-cpu|z990.3-base-s390x-cpu|z990.3-s390x-cpu| + z990.4-base-s390x-cpu|z990.4-s390x-cpu|z990.5-base-s390x-cpu| + z990.5-s390x-cpu|z990-base-s390x-cpu|z990-s390x-cpu| + z9BC.2-base-s390x-cpu|z9BC.2-s390x-cpu|z9BC-base-s390x-cpu| + z9BC-s390x-cpu|z9EC.2-base-s390x-cpu|z9EC.2-s390x-cpu| + z9EC.3-base-s390x-cpu|z9EC.3-s390x-cpu|z9EC-base-s390x-cpu| + z9EC-s390x-cpu|z14ZR1-base-s390x-cpu|z14ZR1-s390x-cpu| + zBC12-base-s390x-cpu|zBC12-s390x-cpu|zEC12.2-base-s390x-cpu| + zEC12.2-s390x-cpu|zEC12-base-s390x-cpu|zEC12-s390x-cpu|cpu-cluster| + z14.2-base-s390x-cpu|z14.2-s390x-cpu|vhost-user-fs-device| + virtio-iommu-device|virtio-iommu-pci| + virtio-iommu-pci-non-transitional|vhost-user-vsock-device| + vhost-user-vsock-pci|vhost-user-vsock-pci-non-transitional| + vhost-user-fs-ccw|guest-loader] + (the following are aliases of these unsupported devices: lsi| + ahci|e1000-82540em|vfio-ccw) + (note that some of these device names represent supported devices and + are used internally, but are not specifyable via -device even though + they appear in the list of devices) + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + raw] + + -dtb file + -enable-sync-profile + -fda/-fdb ... + -g ... + -hda/-hdb/-hdc/-hdd ... + -icount ... + -L ... + -M + + [s390-ccw-virtio|s390-ccw-virtio-2.4|s390-ccw-virtio-2.5| + s390-ccw-virtio-2.7|s390-ccw-virtio-2.8|s390-ccw-virtio-2.10| + s390-ccw-virtio-2.12|s390-ccw-virtio-3.0|s390-ccw-virtio-4.0| + s390-ccw-virtio-4.1|s390-ccw-virtio-5.0|s390-ccw-virtio-5.1| + s390-ccw-virtio-6.0|s390-ccw-virtio-6.1] + + -machine + + [s390-ccw-virtio|s390-ccw-virtio-2.4|s390-ccw-virtio-2.5| + s390-ccw-virtio-2.7|s390-ccw-virtio-2.8|s390-ccw-virtio-2.10| + s390-ccw-virtio-2.12|s390-ccw-virtio-3.0|s390-ccw-virtio-4.0| + s390-ccw-virtio-4.1|s390-ccw-virtio-5.0|s390-ccw-virtio-5.1| + s390-ccw-virtio-6.0|s390-ccw-virtio-6.1] + + -mtdblock file + -net [socket|vde] ... + -netdev [hubport|l2tpv3|socket|vde] ... + -no-acpi + -no-fd-bootchk + -no-hpet + -no-kvm + -no-kvm-irqchip + -no-kvm-pit + -no-kvm-pit-reinjection + -numa cpu ... + -numa dist ... + -numa node ... + -option-rom ... + -overcommit ... + -pflash file + -portrait + -preconfig + -prom-env ... + -qtest ... + -qtest-log ... + -rotate + -sd file + -sdl + -set ... + -singlestep + -smbios ... + -snapshot + -soundhw ... + -spice + -tdf + -tpmdev emulator ... + -tpmdev passthrough ... + -usb + -usbdevice [braile|disk|host|mouse|net|serial|tablet] + -vga [cg3|tcx|virtio|cirrus|xenfb|vmware] + -win2k-hack + -xen-attach ... + -xen-domid ... + -xen-domid-restrict ... + +- The following monitor commands are unsupported: + block_job_cancel ... + block_job_complete ... + block_job_pause ... + block_job_resume ... + block_job_set_speed ... + commit ... + drive_mirror ... + exit_preconfig + expire_password ... + hostfwd_add ... + hostfwd_remove ... + nbd_server_add ... + nbd server_start ... + nbd_server_stop ... + netdev_add + netdev_del ... + pcie_aer_inject_error ... + replay_break ... + replay_delete_break + replay_seek ... + set_link ... + set_password ... + singlestep ... + snapshot_blkdev ... + stopcapture ... + sync-profile ... + wavcapture ... + x_colo_lost_heartbeat + +- The following QMP commands are unsupported: + block-job-cancel + block-job-complete + block-job-pause + block-job-resume + block-job-set-speed + change-backing-file + drive-backup + drive-mirror + dump-skeys + netdev_add + netdev_del + nbd-server-add + nbd-server-start + nbd-server-stop + query-colo-status + query-tpm + query-tpm-models + query-tpm-types + replay_break + replay_delete_break + replay_seek + x-blockdev-amend + x-blockdev-change + x-blockdev-insert-medium + x-blockdev-remove-medium + x-blockdev-reopen + x-colo-lost-heartbeat + x-debug-block-dirty-bitmap-sha256 + x-debug-query-block-graph + x-exit-preconfig + xen-colo-do-checkpoint + xen-load-devices-state + xen-save-devices-state + xen-set-global-dirty-log + xen-set-replication diff --git a/rpm/supported.x86.txt b/rpm/supported.x86.txt new file mode 100644 index 0000000000..bf47bb04a2 --- /dev/null +++ b/rpm/supported.x86.txt @@ -0,0 +1,963 @@ +[qemu-x86 package document] + +SLES 15 SP4 QEMU/KVM RELATED SUPPORT STATEMENTS +=============================================== + +Overview +-------- + + The QEMU based packages included with SLES 15 SP4 provide a large variety of + features, from the very latest customer requests to features of questionable + quality or value. The linux kernel includes components which contribute KVM + virtualization features as well. This document was created to assist the user + in deciding which features can be relied upon to build enterprise class + virtualization solutions. KVM based virtualization for x86 (Intel 64/AMD64), + for IBM System z (s390x), and for the ARM64 architecture (AArch64) are offered + at the L3 (full support) level. The bulk of this document deals with L3 + supported features and is primarily x86 centric. This document should be + considered a companion to the standard virtualization documentation delivered + with the product. + + KVM is implemented in linux kernel modules which enable the linux kernel to + function as an integral part of the KVM hypervisor. The hypervisor-guest + interaction is managed by QEMU through the /dev/kvm ioctl interface. The linux + host assists in the virtualization of storage, networking and display + resources as well as allowing direct hardware passthrough of PCI and USB + devices. Linux memory and cpu management features are used by QEMU/KVM to + enable guests to share those host resources as efficiently as possible. + + QEMU is a primary component of KVM based virtualization. The legacy qemu-kvm + program is available for continuity with pre SLES 12 usage, including in + libvirt domain xml references. The QEMU emulator binaries qemu-system-x86_64 + and qemu-system-i386 (x86 host) are now the primary programs to use to access + KVM virtualization. When using these programs, the -machine option accel=kvm + (or its alias -enable-kvm), or --accel kvm option must be specified for KVM + acceleration to be used by the guest. Although Xen uses QEMU for + virtualization as well, this document does not identify Xen supported + features. + + Libvirt is the preferred means of accessing QEMU/KVM functionality and is + documented elsewhere. This document focuses on the features and direct usage + of QEMU/KVM as provided by the QEMU based packages. + +Major QEMU/KVM Supported Features +--------------------------------- + +- KVM virtualization is accomplished by using the QEMU program in KVM + acceleration mode. KVM acceleration requires that both guest and host have + the same fundamental architecture. + +- Guest images created under previous QEMU versions are supported by machine + version compatibilities built into more recent QEMU versions. + +- For ease of use, the QEMU program has defaults which represent traditional + usage patterns. + +- Guest virtual machine characteristics are specified by a combination of + internal defaults, options provided on the QEMU program command-line, runtime + configurations set via the monitor interfaces and optional config files. The + runtime control of a VM is effected either through the Human Monitor + "Protocol" (HMP), or the JSON based programmatical QEMU Monitor Protocol (QMP) + interface. For QMP details, see qemu-qmp-ref man page. + Since a KVM guest runs in the context of a normal linux process, some types + of execution controls are managed with linux tools. + +- Various standard vCPU types are available, along with the ability to specify + individual CPU features visible to the guest. + +- QEMU incorporates a SEABIOS based system BIOS and iPXE based PXE ROMs, which + allow boot options common to physical systems, along with other features + tailored to virtualization. Various VGABIOS ROMs, also from the SEABIOS + project, are also included. A UEFI based guest boot environment is also + available by using the firmware provided by the qemu-ovmf-x86_64 package. + +- Some QEMU messages have been localized to various languages. This is provided + by the optional qemu-lang package. Keyboard mappings for various nationalities + is also provided. + +- Virtual machine lifecycle controls include startup through the system BIOS or + kernel boot, ACPI or legacy based shutdown, execution pausing, the saving and + restoring of machine state or disk state, VM migration to another host, and + miscellaneous controls available through the "monitors" mentioned above. + +- Guest execution state may be "moved" in both time (save/restore) and space + (static and live migration). These migrations or save/restore operations can + take place either from certain prior SLES versioned hosts to a SLES 15 SP4 + host or between hosts of the same version. Certain other restrictions also + apply. + +- Security considerations include seccomp2 based sandboxing, vTPM, privileged + helpers and a security model which allows running guests as a non-root user. + +- QEMU/KVM supports a wide range of operating systems within the VMs. See the + online SUSE documentation for supported OS's. Windows guests can optionally be + accelerated with QEMU/KVM provided Hyper-V hypercalls, or with paravirtual + drivers from the SUSE Virtual Machine Driver Pack. Linux includes a number of + paravirtual drivers as well. + +- QEMU provides best effort reuse of existing disk images, including those with + systems installed, through geometry probing. Also disk images produced by + other popular virtualization technologies may be imported into QEMU supported + storage formats. These QEMU formats include features which exploit the + benefits of virtualization. + +- Memory, cpu and disk space overcommit are possible and can be beneficial when + done responsibly. Additional management of these resources comes in the form + of memory ballooning or hotplug, host KSM, vcpu hot-add, online disk resizing, + trim, discard and hole punching. + +- Guest performance is enhanced through the use of virtio devices, various disk + caching modes, network acceleration via the vhost-net kernel module, multi- + queue network transmit capabilities, host transparent huge pages (THP) and + direct hugetlb usage. Physical PCI and USB devices may also be passed through + to the guest, including SR-IOV VF's. + +- The guest UI is accessable via GTK, VNC, Spice, and serial (including curses + TUI) interfaces. + +- Guest timekeeping is supported in a variety of ways, including a paravirtual + clocksource, and options for the various guest clocks for how to handle the + timeslicing of the guest's execution on the host. + +- Guest OS's interact with virtualized hardware including a choice of either + older or more recent x86 system chipsets, system devices and buses, and a + variety of common storage and networking emulated devices. SMBIOS and ACPI + table details can be customized. + +- In addition to the para-virtualized devices already mentioned, other devices + and infrastructure designed to avoid virtualization "problem areas" are + available such as SPICE graphics, vmmouse emulation, tablet style pointer + interfaces and virtio based UI interfaces. + +- A built-in user-mode network (SLIRP) stack is available. + +- Portions of the host file system may be shared with a guest by using virtFS. + +- A guest "agent" is available for SLES 15 SP4 KVM guests via the + qemu-guest-agent package. This allows some introspection and control of the + guest OS environment from the host. + +QEMU/KVM Technology Previews +---------------------------- + +- Nested VMX and SVM virtualization is possible. + +- All features indicated as not being supported in this document fall under the + Technology Preview definition contained in the main product's release notes. + +Noteworthy QEMU/KVM Unsupported Features +---------------------------------------- + +- Note that some features are unsupported simply due to lack of validation. If + an existing feature is desired, but not marked supported, let SUSE know about + your requirements. + +- The TCG "acceleration" mode may be helpful for problem isolation, but + otherwise presents insufficient benefit and stability. + +- Use of -cpu host is not supported in all host/guest configurations. + +- GlusterFS integration is not enabled. + +Deprecated, Superseded, Modified and Dropped Features +----------------------------------------------------- + +- https://qemu-project.gitlab.io/qemu/about/deprecated.html and + https://qemu-project.gitlab.io/qemu/about/removed-features.html + These websites track features deprecation and removal at the upstream + development level. Our qemu package inherits this community direction, but be + aware that we can and will deviate as needed. Those deviations and additional + information can be found in this section. Feature deprecation as well as + removed features are also tracked in the "System Emulation" section of the + documentation installed with the qemu package. + +- qemu-img: Deprecate use of -b without -F. Creating an image that requires + format probing of the backing image is potentially unsafe and is now + deprecated. + +- When no video adapter is specified, the default used is stdvga. This differs + from the default of prior releases which was cirrus. The cirrus adapter was + considered too outdated to continue to use as the default. + +- The deprecated windows drivers (win-virtio-drivers.iso) are no longer provided. + The Virtual Machine Driver Pack is the supported way to get virtio drivers for + Windows guests. + +- The use of ",boot=on" for virtio disks is no longer needed since the bios used + supports the virtio block interface directly. In fact, its usage may cause + problems, and is now considered deprecated. + +- The previously non-persistent backing file with pmem=on is deprecated. Modify + VM configuration to set pmem=off to continue using fake NVDIMM with backing + file or move backing file to NVDIMM storage and keep pmem=on. + +- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M", + "-machine" and "-d" is now considered deprecated. Use "help" + instead. + +- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC + machine types, as it created an obsolete SCSI controller model. + +- Passthrough of a host floppy device is now considered deprecated. + +- Use of aio=native without direct cache mode also being specified (cache=none, + cache=directsync, or cache.direct=on) is no longer allowed. + +- The use of image encryption in qcow and qcow2 formats is now considered + deprecated. + Analysis has shown it to be weak encryption, in addition to suffering from + poor design. Images can easily be converted to a non-encrypted format. + +- Use of acpi, boot-opts, and smp-opts in a -readconfig config file are now + considered deprecated. In the future those names will be standardized to + acpitable, boot, and smp respectively. + +- When only a partial SMP topology is provided (ie only some of sockets, cores, + threads) the derived guest ABI is not guaranteed to be equivalent in future + versions. + +- These previously supported command line options are now considered deprecated: + -display sdl,window_close= (use -display sdl,window-close) + -no-quit (use -display ...,window-close=off) + -M option kernel-irqchip=off + -chardev tty (use serial name instead) + -chardev paraport (use parallel name instead) + -device virtio-blk,scsi= (use virtio-scsi instead) + -device virtio-blk-pci,scsi= (use virtio-scsi instead) + -enable-fips (not really helpful - see https://git.qemu.org/?p=qemu.git;a=commit;h=166310299a1e7824bbff17e1f016659d18b4a559 for details) + -realtime mlock= (use -overcommit mem-lock= instead) + -spice password=string (use password-string option instead) + -writeconfig (no replacement - never really worked right) + -share and noshare must be replaced by share=on/share=off + -nodelay must be replaced by nodelay=on rather than delay=off + -object-add options opened=on and loaded=on (both had no effect) + +- These previously supported command line options are no longer supported: + -device ide-drive (use ide-hd or ide-cd instead) + -device scsi-disk (use scsi-hd or scsi-cd instead) + +- The previously supported machine types pc-0.12, pc-0.14 and pc-0.15 are no + longer recognized. Switch to a newer machine type. + +- These previously supported command line options are no longer recognized: + -balloon (use -device virtio-balloon instead) + -clock + -device ivshmem (use ivshmem-doorbell or ivshmem-plain instead) + -device pc-sysfw (no longer needed) + -device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead) + -display sdl + -no-frame + -nodefconfig (use -no-user-config instead) + -realtime ... + -sdl + -show-cursor + -virtioconsole (use -device virtconsole instead) + +- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off" + will now cause a warning. The current behavior for this combination where + "+feature/-feature" wins over "feature=on/off", will be changed going forward + so that "+feature" and "-feature" will be synonyms for "feature=on" and + "feature=off" respectively. + +- The case of specified sockets, cores, and threads not matching the vcpu count + is no longer silently ignored. QEMU now requires that the topology match the + vcpu count. + +- The previously supported blkdev-add QMP command has been flagged as lacking + and could possibly change syntax in the future. + +- These previously unsupported command line options are now deprecated: + -no-kvm-pit + -soundhw (use -device ... instead) + +- These previously unsupported command line options are no longer recognized: + -bt + -device at24c-eeprom + -device ccid-card-passthru + -device cfi.pflash01 + -device esp + -device exynos4210-ehci-usb + -device fusbh200-ehci-usb + -device icc-bridge + -device q35-pcihost + -device mch + -device mmio_interface + -device smbus-eeprom + -device SUNW,fdtwo + -device sysbus-ahci + -device sysbus-fdc + -device sysbus-ohci + -device tegra2-ehci-usb + -device testdev (use -device pc-testdev instead) + -device vhost-user-vsock-pci-transitional + -device vhost-vsock-pci-transitional + -device virtio-iommu-pci-transitional + -device virtio-mmio + -device xln,ps7-usb + -enable-hax (use -accel hax instead) + -enable-nesting + -kvm-shadow-memory (use -machine kvm_shadow_mem= instead) + -M mac + -machine mac + -no-kvm-irqchip (use -machine kernel_irqchip=off instead) + -no-kvm-pit + -no-kvm-pit-reinjection (use -global kvm-pit.lost_tick_policy=discard instead) + -nvram + -old-param + -osk + -pcidevice (use -device vfio-pci instead) + -qtest + -semihosting + -tb-size + -tdf (note: mistakenly listed previously as supported) + -xen-create + +- The previously unsupported machine types pc-0.10, pc-0.11, pc-0.13, + pc-1.0, pc-1.1, pc-1.2 and pc-1.3 are are no longer recognized. + +- These previously supported QMP commands are now deprecated: + + +- These previously supported QMP commands are no longer recognized: + info cpustats + block_passwd + change (use blockdev-change-medium or change-vnc-password instead) + cpu-add (use device_add instead) + migrate-set-cache-size (use migrate-set-parameters instead) + migrate_set_downtime (use migrate-set-parameters instead) + migrate_set_speed (use migrate-set-parameters instead) + query-cpus (use query-cpus-fast instead) + query-events + query-migrate-cache-size (use query-migrate-parameters instead) + +- These previously supported monitor commands are now deprecated: + change + +- These previously supported monitor commands are no longer recognized: + info cpustats + block_passwd ... + block_passwd + cpu-add + cpu_set + migrate_set_cache_size + migrate_set_downtime + migrate_set_speed + pci_add (use device_add instead) + pci_del (use device_del instead) + usb_add (use device_add instead) + usb_del (use device_del instead) + +- These previously unsupported monitor command are now deprecated: + + +- These previously unsupported monitor commands are no longer recognized: + acl_add ... + acl_policy ... + acl_remove ... + acl_reset ... + acl_show ... + host_net_add + host_net_remove + +- These previously unsupported QMP commands are now supported under a new name: + x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead) + x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead) + x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead) + x-block-latency-histogram-set (use block-latency-histogram-set instead) + x-blockdev-create (use blockdev-create instead) + x-input-send-event (use input-send-event instead) + +- This previously unsupported QMP commands is no longer recognized: + x-nbd-server-add-bitmap + +- Due to the lack of migration support (mainly due to ahci interface issues) + and other unstable interface issues, earlier versions of the q35 machine type + are not supported in this release. The current q35 machine type is however now + fully supported. + +- Due to upstream's decision to no longer fully support the qed storage format + going forward (since it really provides no benefit over qcow2 and is now no + longer actively maintained upstream), creating qed storage images is no longer + supported and it is highly discouraged to continue using existing qed images. + They should instead be converted to another supported format. + +- If KVM Intel nested virtualization is enabled, and the guest is passed the vmx + feature, then live migration or save/restore is prohibited. + +QEMU Command-Line and Monitor Syntax and Support +------------------------------------------------ + +- The QEMU program command-line syntax is as follows: + qemu-system-i386 [options] [disk_image] + qemu-system-x86_64 [options] [disk_image] + + Where 'options' are taken from the options listed below, and 'disk_image' is + the file system reference to the x86 guest's primary IDE based hard disk + image. This image as well as those used with -drive or -cdrom, may be in the + raw (no format) or qcow2 storage formats, and may be located in files within + the host filesystem, logical volumes, host physical disks, or network based + storage. Read only media may also be accessed via URL style protocol + specifiers. + + Note that as a general rule, as new command line options are added which serve + to replace an older option or interface, you are strongly encouraged to adapt + your usage to the new option. The new option is being introduced to provide + better functionality and usability going forward. In some cases existing + problems or even bugs in older interfaces cannot be fixed due to functional + expectations, but are resolved in the newer interface or option. + This advice includes moving to the most recent machine type (eg pc-i440fx-6.1 + instead of pc-i440fx-6.0) if possible. + +- The following command line options are supported: + -accel ... + -action ... + -add-fd ... + -alt-grab + -append ... + -audio-help + -audiodev + -bios ... + -blockdev ... + -boot ... + -cdrom ... + -chardev ... + -compat ... + -cpu ... (all except host) + -ctrl-grab + -d ... + -daemonize + -debugcon ... + -device + + [isa-serial|isa-parallel|isa-fdc|ide-hd|ide-cd|VGA|cirrus-vga|rtl8139| + usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse|usb-kbd| + virtserialport|virtconsole|sga|i82559er|scsi-cd|scsi-hd|scsi-generic| + scsi-block|pci-serial|pci-serial-2x|pci-serial-4x|ich9-ahci| + piix3-usb-uhci|usb-host|usb-serial|usb-wacom-tablet|usb-braille| + usb-net|pci-ohci|piix4-usb-uhci|i6300esb|ib700|qxl|qxl-vga|pvpanic| + vfio-pci|ivshmem-doorbell|ivshmem-plain|pci-bridge|megasas-gen2| + pc-dimm|floppy|e1000e|ccid-card-emulated|ccid-card-passthrough| + xen-backend|loader|e1000-82540em|vmgenid|vmcoreinfo|pcie-pci-bridge| + ich9-usb-ehci1|ich9-usb-ehci2|ich9-usb-uhci1|ich9-usb-uhci2| + ich9-usb-uhci3|ich9-usb-uhci4|ich9-usb-uhci5|ich9-usb-uhci6| + usb-redir|vhost-scsi|vhost-scsi-pci|vhost-user-blk| + vhost-user-blk-pci|vhost-user-blk-pci-non-transitional| + vhost-user-blk-pci-transitional|vhost-user-scsi|vhost-user-scsi-pci| + vhost-user-scsi-pci-non-transitional|vhost-user-pci-transitional| + vhost-vsock-pci|vhost-vsock-pci-non-transitional|virtio-balloon-pci| + virtio-balloon-pci-non-transitional|virtio-balloon-pci-transitional| + virtio-blk-pci|virtio-blk-pci-non-transitional| + virtio-blk-pci-transitional|virtio-net-pci| + virtio-net-pci-non-transitional|virtio-net-pci-transitional| + virtio-9p-pci|virtio-9p-pci-non-transitional| + virtio-9p-pci-transitional|virtio-serial-pci| + virtio-serial-pci-non-transitional|virtio-serial-pci-transitional| + virtio-scsi-pci|virtio-scsi-pci-non-transitional| + virtio-scsi-pci-transitional|virtio-rng-pci| + virtio-rng-pci-non-transitional|virtio-rng-pci-transitional| + virtio-input-host-pci|virtio-input-host-pci-non-transitional| + virtio-input-host-pci-transitional|virtio-keyboard-pci| + virtio-mouse-pci|virtio-tablet-pci|virtio-gpu-pci|virtio-crypto-pci| + virtio-vga|vhost-user-fs-pci|vhost-user-gpu|vhost-user-pci-pci| + vhost-user-input|vhost-user-input-pci|vhost-user-vga|virtio-mmio| + virtio-pmem|virtio-pmem-pci|mc146818rtci|nvme-subsys|guest-loader| + pvpanic-pci] + (the following are aliases of these supported devices: ahci| + e1000|virtio-blk|virtio-net|virtio-serial|virtio-balloon|virtio-9p| + virtio-scsi|virtio-rng|virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|virtio-gpu) + + -dfilter range, ... + -display ... + -drive + + ... (if specified if=[floppy|ide|virtio] and format=[qcow2|raw] and + snapshot=off only) + + -echr ... + -enable-fips + -enable-kvm + -fda/-fdb ... + -fsdev ... + -full-screen + -fw_cfg ... + -gdb ... + -global ... + -h + -hda/-hdb/-hdc/-hdd ... + -help + -incoming ... + -initrd ... + -iscsi ... + -k ... + -kernel ... + -loadvm ... + -m ... + -M + + [help|none|pc-i440fx-1.4|pc-i440fx-1.7|pc-i440fx-2.0|pc-i440fx-2.3| + pc-i440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11|pc-i440fx-3.1|pc-i440fx-4.2| + pc-i440fx-5.2|pc-i440fx-6.0|pc-i440fx-6.1|pc-q35-2.6|pc-q35-2.9| + pc-q35-2.11|pc-q35-3.1|pc-q35-4.2|pc-q35-5.2|pc-q35-6.0|pc-q35-6.1| + xenfv|xenfv-4.2] + + -machine + + [help|none|pc-i440fx-1.4|pc-i440fx-1.7|pc-i440fx-2.0| + pc-i440fx-2.3|pc-440fx-2.6|pc-i440fx-2.9|pc-i440fx-2.11| + pc-i440fx-3.1|pc-i440fx-4.2|pc-i440fx-5.2|pc-i440fx-6.0| + pc-i440fx-6.1|pc-q35-2.6|pc-q35-2.9|pc-q35-2.11|pc-q35-3.1| + pc-q35-4.2|pc-q35-5.2|pc-q35-6.0|pc-q35-6.1|xenfv|xenifv-4.2] + + -mem-path ... + -mem-prealloc + -mon ... + -monitor ... + -msg ... + -name ... + -net + + [bridge|l2tpv3|nic|none|tap|user] ... (for model= only e1000, rtl8139, + and virtio are supported) + + -netdev [bridge|tap|user] ... + -nic ... + -no-acpi + -nodefaults + -no-fd-bootchk + -nographic + -no-hpet + -no-quit + -no-reboot + -no-shutdown + -no-user-config + -numa cpu ... + -numa dist ... + -object ... + -only-migratable + -parallel ... + -pidfile ... + -plugin ... + -qmp ... + -qmp-pretty ... + -readconfig ... + -rtc ... + -runas ... + -s + -S + -sandbox ... + -seed ... + -serial ... + -smbios ... + -smp ... + -spice + -tpmdev passthrough ... + -trace ... + -usb + -usbdevice [braile|disk|host|mouse|net|serial|tablet] + -uuid ... + -version + -vga [cirrus|none|qxl|std|xenfb] + -virtfs ... + -vnc ... + -watchdog ... + -watchdog-action ... + -writeconfig ... + -xen-attach ... + -xen-domid ... + -xen-domid-restrict ... + +- The following monitor commands are supported: + ? + announce_self ... + balloon ... + block_resize ... + boot_set ... + c + change ... + chardev-add ... + chardev-change ... + chardev-remove ... + chardev-send-break ... + client_migrate_info ... + closefd ... + cont + cpu ... + delvm ... + device_add ... + device_del ... + drive_add ... + drive_backup ... + drive_del ... + dump_guest_memory ... + eject ... + gdbserver ... + gpa2hpa ... + gpa2hva ... + gva2gpa ... + help + i ... + info ... + loadvm ... + logfile ... + logitem ... + mce ... + memsave ... + migrate ... + migrate_cancel + migrate_continue ... + migrate_incoming + migrate_pause + migrate_recover ... + migrate_set_capability ... + migrate_set_parameter ... + migrate_start_post_copy + mouse_button ... + mouse_move ... + mouse_set ... + nmi ... + o ... + object_add ... + object_del ... + p ... + pci_add ... + pci_del... + pmemsave ... + print ... + q + qemu-io ... + qom-list + qom-set + ringbuf_read ... + ringbuf_write ... + savevm ... + screendump ... + sendkey ... + snapshot_blkdev_internal ... + snapshot_delete_blkdev_internal ... + stop + sum ... + system_powerdown + system_reset + system_wakeup + trace-event ... + watchdog_action ... + x ... + xp ... + +- The following QMP commands are supported: + add_client + add-fd + announce-self + balloon + blockdev-add + blockdev-backup + blockdev-change-medium + blockdev-close-tray + blockdev-create + blockdev-del + blockdev-mirror + blockdev-open-tray + blockdev-snapshot + blockdev-snapshot-delete-internal-sync + blockdev-snapshot-internal-sync + blockdev-snapshot-sync + block-commit + block-dirty-bitmap-add + block-dirty-bitmap-clear + block-dirty-bitmap-disable + block-dirty-bitmap-enable + block-dirty-bitmap-merge + block-dirty-bitmap-remove + block-export-add + block-export-del + block-latency-histogram-set + block_resize + block_set_io_throttle + block-set-write-threshold + block_stream + calc-dirty-rate + change-vnc-password + chardev-add + chardev-change + chardev-remove + chardev-send-break + client_migrate_info + closefd + cont + cpu + device_add + device_del + device-list-properties + display-reload + dump-guest-memory + eject + expire_password + getfd + human-monitor-command + inject-nmi + input-send-event + job-cancel + job-complete + job-dismiss + job-finalize + job-pause + job-resume + memsave + migrate + migrate_cancel + migrate-continue + migrate-incoming + migrate-pause + migrate-resume + migrate-set-capabilities + migrate-set-parameters + migrate-start-postcopy + object-add + object-del + pmemsave + qmp_capabilities + qom-get + qom-list + qom-list-types + qom-set + query-acpi-ospm-status + query-balloon + query-block + query-block-exports + query-block-jobs + query-blockstats + query-chardev + query-chardev-backends + query-command-line-options + query-commands + query-cpu-definitions + query-cpu-model-expansion + query-cpus-fast + query-current-machine + query-dirty-rate + query-display-options + query-dump + query-dump-guest-memory-capability + query-fdsets + query-gic-capabilities + query-hotpluggable-cpus + query-iothreads + query-jobs + query-kvm + query-machines + query-memdev + query-memory-devices + query-memory-size-summary + query-mice + query-migrate + query-migrate-capabilities + query-migrate-parameters + query-name + query-named-block-nodes + query-pci + query-pr-managers + query-qmp-schema + query-rocker + query-rocker-of-dpa-flows + query-rocker-of-dpa-groups + query-rocker-ports + query-rx-filter + query-sev + query-sev-capabilities + query-sev-launch-measure + query-spice + query-status + query-target + query-tpm + query-tpm-models + query-tpm-types + query-uuid + query-version + query-vnc + query-vnc-servers + query-yank + query-xen-replication-status + quit + remove-fd + ringbuf-read + ringbuf-write + screendump + send-key + set-action + set_link + set_password + set-numa-node + sev-inject-launch-secret + snapshot-delete + snapshot-load + snapshot-save + stop + system_powerdown + system_reset + system_wakeup + trace-event-get-state + trace-event-set-state + transaction + watchdog-set-action + xen-load-devices-state + xen-save-devices-state + xen-set-global-dirty-log + yank + +- The following command line options are unsupported: + + -acpitable ... + -chroot ... + -cpu host + -curses + -device + + [ipoctal232|i82562|nec-usb-xhci|hda-duplex|hda-output|usb-bot| + lsi53c810a|isa-debug-exit|ne2k_pci|usb-uas|ioh3420|isa-ide|usb-ccid| + pcnet|ich9-intel-hda|dc390|hda-micro|x3130-upstream|isa-cirrus-vga| + pc-testdev|ne2k_isa|isa-vga|cs4231a|gus|vmware-svga|i82801b11-bridge| + i82557a|i82557c|i82557b|i82801|AC97|am53c974|intel-hda|i82558a| + i82558b|usb-audio|i82550|isa-debugcon|sb16|megasas|i82551| + xio3130-downstream|vt82c686b-usb-uhci|tpci200|i82559a|i82559b|i82559c| + isa-applesmc|adlib|ES1370|lsi53c810|nvme|pci-testdev|pvscsi| + virtio-9p-device|virtio-balloon-device|virtio-blk-device| + virtio-net-device|virtio-rng-device|virtio-scsi-device| + virtio-serial-device|vmxnet3|xen-pci-passthrough|xen-platform| + xen-pvdevice|piix3-ide|piix3-ide-xen|piix3-ide|i8042|sdhci-pci| + secondary-vga|edu|intel_iommu|usb-mtp|e1000-82544gc|e1000-82545em| + pci-bridge-seat|pxb|pxb-pcie|rocker|virtio-input-host-device| + virtio-keyboard-device|virtio-mouse-device|virtio-tablet-device| + hyperv-testdev|generic-sdhci|igd-passthrough-isa-bridge| + ipmi-bmc-extern|ipmi-bmc-sim|isa-ipmi-bt|isa-ipmi-kcs|mptsas1068| + nvdimm|pxb-host|sd-card|virtio-gpu-device|amd-iommu|AMDVI-PCI| + vhost-vsock-device|virtio-crypto-device|vfio-pci-igd-lpc-bridge| + pcie-root-port|qemu-xhci|*-i386-cpu|*-x86_64-cpu|pvrdma|bochs-display| + ramfb|ccid-card-emulated|ccid-card-passthru|kvaser_pci|tpm-crb| + mioe3680_pci|pcm3680_pci|hyperv-synic|vfio-pci-nohotplug| + vfio-platform|xen-bridge|xen-cdrom|xen-disk|ati-vga|cpu-cluster| + intel-iommu|vhost-user-fs-device|tulip|ati-vga|i2c-ddc|pci-ipmi-bt| + pci-ipmi-kcs|serial|serial-io|serial-mm|virtio-iommu-device| + virtio-iommu-pci|virtio-iommu-pci-nontransitional|xen-sysdev| + imx.usbphy|vmbus-bridge|vhost-user-vsock-device|vhost-user-vsock-pci| + vhost-user-vsock-pci-non-transitional|virtio-mem|virtio-mem-pci| + nvme-ns|ctucan_pci|u2f-passthru] + (the following are aliases of these unsupported devices: lsi) + (note that some of these device names represent supported devices and + are used internally, but are not specifyable via -device even though + they appear in the list of devices) + + -drive + + ,if=[scsi|mtd|pflash], snapshot=on, format=[anything besides qcow2 or + raw] + + -dtb file + -enable-sync-profile + -g ... + -icount ... + -L ... + -M + + [pc|isapc|microvm|x-remote|pc-i440fx-1.5|pc-i440fx-1.6|pc-i440fx-2.1| + pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7|pc-i440fx-2.8| + pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0|pc-i440fx-4.0|pc-i440fx-4.1| + pc-i440fx-5.0|pc-i440fx-5.1|pc-i440fx-6.0|q35|pc-q35-1.4|pc-q35-1.5| + pc-q35-1.6|pc-q35-1.7|pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3| + pc-q35-2.4|pc-q35-2.5|pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12| + pc-q35-3.0|pc-q35-4.0|pc-q35-4.1|pc-q35-5.0|pc-q35-5.1|pc-q35-6.0] + + -machine + + [pc|isapc|microvm|x-remote|pc-i440fx-1.5|pc-i440fx-1.6|pc-i440fx-2.1| + pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7| + pc-i440fx-2.8|pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0| + pc-i440fx-4.0|pc-i440fx-4.1|pc-i440fx-5.0|pc-i440fx-5.1| + pc-i440fx-6.0|q35|pc-q35-1.4|pc-q35-1.5|pc-q35-1.6|pc-q35-1.7| + pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3|pc-q35-2.4|pc-q35-2.5| + pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12|pc-q35-3.0|pc-q35-4.0| + pc-q35-4.1|pc-q35-5.0|pc-q35-5.1|pc-q35-6.0] + + -mtdblock file + -net [socket|vde] ... + -netdev [hubport|l2tpv3|socket|vde] ... + -no-kvm + -numa node ... + -option-rom ... + -overcommit ... + -pflash file + -portrait + -preconfig + -prom-env ... + -qtest ... + -qtest-log ... + -rotate + -sd file + -sdl + -set ... + -singlestep + -snapshot + -soundhw ... + -tpmdev emulator ... + -vga [cg3|tcx|virtio|vmware] + -win2k-hack + +- The following monitor commands are unsupported: + block_job_cancel ... + block_job_complete ... + block_job_pause ... + block_job_resume ... + block_job_set_speed ... + commit ... + drive_mirror ... + exit_preconfig + expire_password ... + hostfwd_add ... + hostfwd_remove ... + nbd_server_add ... + nbd server_start ... + nbd_server_stop ... + netdev_add + netdev_del ... + pcie_aer_inject_error ... + replay_break ... + replay_delete_break + replay_seek ... + set_link ... + set_password ... + singlestep ... + snapshot_blkdev ... + stopcapture ... + sync-profile ... + wavcapture ... + x_colo_lost_heartbeat + +- The following QMP commands are unsupported: + block-job-cancel + block-job-complete + block-job-pause + block-job-resume + block-job-set-speed + change-backing-file + drive-backup + drive-mirror + netdev_add + netdev_del + nbd-server-add + nbd-server-start + nbd-server-stop + query-colo-status + query-replay + replay_break + replay_delete_break + replay_seek + x-blockdev-amend + x-blockdev-change + x-blockdev-insert-medium + x-blockdev-remove-medium + x-blockdev-reopen + x-colo-lost-heartbeat + x-debug-block-dirty-bitmap-sha256 + x-debug-query-block-graph + x-exit-preconfig + xen-colo-do-checkpoint + xen-set-replication -- 2.51.1 From df6a2b9929bd96ba18055e63f75b48208ba90666 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 3 May 2023 09:06:57 +0200 Subject: [PATCH 002/102] [openSUSE][RPM] Provide seabios and skiboot version files In an upstream tarball there are some special files, generated by a script that is run when the archive is prepared. Let's make our repository look a little more like that, so we can build it properly. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 17 ++++++++++++----- rpm/seabios_version | 1 + rpm/skiboot_version | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 rpm/seabios_version create mode 100644 rpm/skiboot_version diff --git a/rpm/qemu.spec b/rpm/qemu.spec index b3b787bc3f..4caca005ff 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1666,11 +1666,18 @@ cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst sed -i '/^\ \ \ about\/index.*/i \ \ \ supported.rst' docs/index.rst %endif -# This is typically done when generating tarballs (see scripts/make-release). -# Since we're building from a git clone, we need to do it ourselves (and -# it's the reason why we need git as a BuildRequires:). -(cd roms/seabios && git describe --tags --long --dirty > .version) -(cd roms/skiboot && ./make_version.sh > .version) +# When generating an upstream release tarball, the following commands +# are run (see scripts/make-release): +# (cd roms/seabios && git describe --tags --long --dirty > .version) +# (cd roms/skiboot && ./make_version.sh > .version) +# This has not happened for the archive we're using, since it's cloned +# from a git branch. We, therefore, assumed that the following commands +# have been run, and the result committed to the repository (with seabios +# and skiboot at the proper commit/tag/...): +# (pushd roms/seabios && git describe --tags --long --dirty > ../../rpm/seabios_version ; popd) +# (pushd roms/skiboot && ./make_version.sh > ../../rpm/skiboot_version ; popd) +cp %{rpmfilesdir}/seabios_version roms/seabios/.version +cp %{rpmfilesdir}/skiboot_version roms/skiboot/.version find . -iname ".git" -exec rm -rf {} + mkdir -p %blddir diff --git a/rpm/seabios_version b/rpm/seabios_version new file mode 100644 index 0000000000..aa3f5b3312 --- /dev/null +++ b/rpm/seabios_version @@ -0,0 +1 @@ +rel-1.16.3-0-ga6ed6b70 diff --git a/rpm/skiboot_version b/rpm/skiboot_version new file mode 100644 index 0000000000..5f205eb160 --- /dev/null +++ b/rpm/skiboot_version @@ -0,0 +1 @@ +v7.0 -- 2.51.1 From c94d5e55aeadfe67d93a767c249e20f3f5d3e7e4 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 3 May 2023 13:46:22 +0200 Subject: [PATCH 003/102] [openSUSE][RPM] Split qemu and qemu-linux-user spec files Signed-off-by: Dario Faggioli --- rpm/common.inc | 37 + rpm/qemu-linux-user.spec | 370 ++++++ rpm/qemu.spec | 2315 +++++++++++++++++--------------------- 3 files changed, 1411 insertions(+), 1311 deletions(-) create mode 100644 rpm/common.inc create mode 100644 rpm/qemu-linux-user.spec diff --git a/rpm/common.inc b/rpm/common.inc new file mode 100644 index 0000000000..c8b43c2d12 --- /dev/null +++ b/rpm/common.inc @@ -0,0 +1,37 @@ +%define _buildshell /bin/bash + +%define sbver 1.16.0_0_gd239552 + +%define srcdir %{_builddir}/%buildsubdir +%define blddir %srcdir/build + +%define build_x86_firmware 0 +%define build_ppc_firmware 0 +%define build_opensbi_firmware 0 +%define kvm_available 0 +%define legacy_qemu_kvm 0 +%define force_fit_virtio_pxe_rom 1 + +%if "%{?distribution}" == "" +%define distro private-build +%else +%define distro %{distribution} +%endif + +%bcond_with system_membarrier +%bcond_with malloc_trim + +%bcond_with chkqtests + +# non-x86 archs still seem to have some issues with Link Time Optimization +%ifnarch %ix86 x86_64 +%define _lto_cflags %{nil} +%endif + +%define generic_qemu_description \ +QEMU provides full machine emulation and cross architecture usage. It closely\ +integrates with KVM and Xen virtualization, allowing for excellent performance.\ +Many options are available for defining the emulated environment, including\ +traditional devices, direct host device access, and interfaces specific to\ +virtualization. + diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec new file mode 100644 index 0000000000..35e0744702 --- /dev/null +++ b/rpm/qemu-linux-user.spec @@ -0,0 +1,370 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +%include %{_sourcedir}/common.inc + +%ifarch %ix86 x86_64 s390x +%define legacy_qemu_kvm 1 +%endif + +Name: qemu-linux-user +URL: https://www.qemu.org/ +Summary: CPU emulator for user space +License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT +Group: System/Emulators/PC +Version: 7.1.0 +Release: 0 +Source0: qemu-%{version}.tar.xz +Source1: common.inc +Source200: qemu-rpmlintrc +Source303: README.PACKAGING +Source1000: qemu-rpmlintrc +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: glib2-devel-static >= 2.56 +BuildRequires: glibc-devel-static +BuildRequires: (pcre-devel-static if glib2-devel-static < 2.73 else pcre2-devel-static) +# passing filelist check for /usr/lib/binfmt.d +BuildRequires: systemd +BuildRequires: zlib-devel-static +# we must not install the qemu-linux-user package when under QEMU build +%if 0%{?qemu_user_space_build:1} +#!BuildIgnore: post-build-checks +%endif +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: git-core +BuildRequires: meson +BuildRequires: ninja >= 1.7 +BuildRequires: perl-Text-Markdown +BuildRequires: python3-base >= 3.6 +BuildRequires: python3-setuptools + +%description +QEMU provides CPU emulation along with other related capabilities. This package +provides programs to run user space binaries and libraries meant for another +architecture. The syscall interface is intercepted and execution below the +syscall layer occurs on the native hardware and operating system. + +%files +%defattr(-, root, root) +%doc README.rst VERSION +%license COPYING COPYING.LIB LICENSE +%_bindir/qemu-aarch64 +%_bindir/qemu-aarch64_be +%_bindir/qemu-alpha +%_bindir/qemu-arm +%_bindir/qemu-armeb +%_bindir/qemu-cris +%_bindir/qemu-hexagon +%_bindir/qemu-hppa +%_bindir/qemu-i386 +%_bindir/qemu-loongarch64 +%_bindir/qemu-m68k +%_bindir/qemu-microblaze +%_bindir/qemu-microblazeel +%_bindir/qemu-mips +%_bindir/qemu-mips64 +%_bindir/qemu-mips64el +%_bindir/qemu-mipsel +%_bindir/qemu-mipsn32 +%_bindir/qemu-mipsn32el +%_bindir/qemu-nios2 +%_bindir/qemu-or1k +%_bindir/qemu-ppc +%_bindir/qemu-ppc64 +%_bindir/qemu-ppc64le +%_bindir/qemu-riscv32 +%_bindir/qemu-riscv64 +%_bindir/qemu-s390x +%_bindir/qemu-sh4 +%_bindir/qemu-sh4eb +%_bindir/qemu-sparc +%_bindir/qemu-sparc32plus +%_bindir/qemu-sparc64 +%_bindir/qemu-x86_64 +%_bindir/qemu-xtensa +%_bindir/qemu-xtensaeb +%_sbindir/qemu-binfmt-conf.sh +%_prefix/lib/binfmt.d/qemu-*.conf + +%prep +%autosetup -n qemu-%{version} + +%build + +%define rpmfilesdir %{_builddir}/qemu-%{version}/rpm + +%if %{legacy_qemu_kvm} +# FIXME: Why are we copying the s390 specific one? +cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst +sed -i '/^\ \ \ about\/index.*/i \ \ \ supported.rst' docs/index.rst +%endif + +# When generating an upstream release tarball, the following commands +# are run (see scripts/make-release): +# (cd roms/seabios && git describe --tags --long --dirty > .version) +# (cd roms/skiboot && ./make_version.sh > .version) +# This has not happened for the archive we're using, since it's cloned +# from a git branch. We, therefore, assumed that the following commands +# have been run, and the result committed to the repository (with seabios +# and skiboot at the proper commit/tag/...): +# (cd roms/seabios && git describe --tags --long --dirty > rpm/seabios_version) +# (cd roms/skiboot && ./make_version.sh > rpm/skiboot_version) +cp %{rpmfilesdir}/seabios_version roms/seabios/.version +cp %{rpmfilesdir}/skiboot_version roms/skiboot/.version +find . -iname ".git" -exec rm -rf {} + + +mkdir -p %blddir +cd %blddir + +# We define a few general and common options and then we disable +# pretty much everything. Afterwards, there is a section for each +# of the flavors where we explicitly enable all the feature we want +# for them. + +# TODO: Check whether we want to enable the followings: +# * avx512f +# * debug-info +# * fuse +# * malloc-trim +# * multiprocess +# * qom-cast-debug +# * trace-backends=dtrace +# +# Fedora has avx2 enabled for ix86, while we can't (I tried). Guess it's +# because, for them, ix86 == i686 (while for us it's i586). + +# Let's try to stick to _FORTIFY_SOURCE=2 for now +EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-error" + +%srcdir/configure \ + --docdir=%_docdir \ + --datadir=%_datadir \ + --extra-cflags="${EXTRA_CFLAGS}" \ + --firmwarepath=%_datadir/%name \ + --libdir=%_libdir \ + --libexecdir=%_libexecdir \ + --localstatedir=%_localstatedir \ + --prefix=%_prefix \ + --python=%_bindir/python3 \ + --sysconfdir=%_sysconfdir \ + --with-git-submodules=ignore \ + --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --disable-alsa \ + --disable-attr \ + --disable-auth-pam \ + --disable-avx2 \ + --disable-avx512f \ + --disable-block-drv-whitelist-in-tools \ + --disable-bochs \ + --disable-bpf \ + --disable-brlapi \ + --disable-bsd-user \ + --disable-bzip2 \ + --disable-cap-ng \ + --disable-capstone \ + --disable-cfi \ + --disable-cfi-debug \ + --disable-cloop \ + --disable-cocoa \ + --disable-coreaudio \ + --disable-coroutine-pool \ + --disable-crypto-afalg \ + --disable-curl \ + --disable-curses \ + --disable-dbus-display \ + --disable-debug-info \ + --disable-debug-mutex \ + --disable-debug-tcg \ + --disable-dmg \ + --disable-docs \ + --disable-dsound \ + --disable-fdt \ + --disable-fuse \ + --disable-fuse-lseek \ + --disable-gcrypt \ + --disable-gettext \ + --disable-gio \ + --disable-glusterfs \ + --disable-gnutls \ + --disable-gtk \ + --disable-guest-agent \ + --disable-guest-agent-msi \ + --disable-hax \ + --disable-hvf \ + --disable-iconv \ + --disable-jack \ + --disable-kvm \ + --disable-l2tpv3 \ + --disable-libdaxctl \ + --disable-libiscsi \ + --disable-libnfs \ + --disable-libpmem \ + --disable-libssh \ + --disable-libudev \ + --disable-libusb \ + --disable-linux-aio \ + --disable-linux-io-uring \ + --disable-linux-user \ + --disable-live-block-migration \ + --disable-lto \ + --disable-lzfse \ + --disable-lzo \ + --disable-malloc-trim \ + --disable-membarrier \ + --disable-module-upgrades \ + --disable-modules \ + --disable-mpath \ + --disable-multiprocess \ + --disable-netmap \ + --disable-nettle \ + --disable-numa \ + --disable-nvmm \ + --disable-opengl \ + --disable-oss \ + --disable-pa \ + --disable-parallels \ + --disable-pie \ + --disable-plugins \ + --disable-png \ + --disable-pvrdma \ + --disable-qcow1 \ + --disable-qed \ + --disable-qom-cast-debug \ + --disable-rbd \ + --disable-rdma \ + --disable-replication \ + --disable-rng-none \ + --disable-safe-stack \ + --disable-sanitizers \ + --disable-sdl \ + --disable-sdl-image \ + --disable-seccomp \ + --disable-selinux \ + --disable-slirp \ + --disable-slirp-smbd \ + --disable-smartcard \ + --disable-snappy \ + --disable-sparse \ + --disable-spice \ + --disable-spice-protocol \ + --disable-strip \ + --disable-system \ + --disable-tcg \ + --disable-tcg-interpreter \ + --disable-tools \ + --disable-tpm \ + --disable-u2f \ + --disable-usb-redir \ + --disable-user \ + --disable-vde \ + --disable-vdi \ + --disable-vhost-crypto \ + --disable-vhost-kernel \ + --disable-vhost-net \ + --disable-vhost-user \ + --disable-vhost-user-blk-server \ + --disable-vhost-vdpa \ + --disable-virglrenderer \ + --disable-virtfs \ + --disable-virtiofsd \ + --disable-vnc \ + --disable-vnc-jpeg \ + --disable-vnc-sasl \ + --disable-vte \ + --disable-vvfat \ + --disable-werror \ + --disable-whpx \ + --disable-xen \ + --disable-xen-pci-passthrough \ + --disable-xkbcommon \ + --disable-zstd \ + --without-default-devices \ +%if %{with system_membarrier} + --enable-membarrier \ +%endif +%if %{with malloc_trim} + --enable-malloc-trim \ +%endif +%if "%{_lto_cflags}" != "%{nil}" + --enable-lto \ +%endif + --disable-install-blobs \ + --enable-attr \ + --enable-coroutine-pool \ + --enable-linux-user \ + --enable-selinux \ + --enable-tcg \ + --static + +echo "=== Content of config-host.mak: ===" +cat config-host.mak +echo "=== ===" + +%make_build + +%install +cd %blddir + +%make_build install DESTDIR=%{buildroot} + +rm -rf %{buildroot}%_datadir/qemu/keymaps +unlink %{buildroot}%_datadir/qemu/trace-events-all +install -d -m 755 %{buildroot}%_sbindir +install -m 755 scripts/qemu-binfmt-conf.sh %{buildroot}%_sbindir +install -d -m 755 %{buildroot}%{_prefix}/lib/binfmt.d/ +scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --exportdir %{buildroot}%{_prefix}/lib/binfmt.d/ + +%fdupes -s %{buildroot} + +%check +cd %blddir + +%ifarch %ix86 +%define qemu_arch i386 +%endif +%ifarch x86_64 +%define qemu_arch x86_64 +%endif +%ifarch %arm +%define qemu_arch arm +%endif +%ifarch aarch64 +%define qemu_arch aarch64 +%endif +%ifarch ppc +%define qemu_arch ppc +%endif +%ifarch ppc64 +%define qemu_arch ppc64 +%endif +%ifarch ppc64le +%define qemu_arch ppc64le +%endif +%ifarch s390x +%define qemu_arch s390x +%endif + +%ifarch %ix86 x86_64 %arm aarch64 ppc ppc64 ppc64le s390x +%ifnarch %arm +%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null +%endif +%endif + +%make_build check-softfloat + +%changelog diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 4caca005ff..d2eadc26be 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -15,35 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # - -%global flavor @BUILD_FLAVOR@%{nil} -%define name_suffix %{nil} - -%if "%{flavor}" == "linux-user" -%define name_suffix -linux-user -%define summary_string CPU emulator for user space -%else -%define summary_string Machine emulator and virtualizer -%endif - -%define _buildshell /bin/bash - -%define srcdir %{_builddir}/%buildsubdir -%define blddir %srcdir/build -%define rpmfilesdir %{_builddir}/%{srcname}-%{qemuver}/rpm - -%define build_x86_firmware 0 -%define build_ppc_firmware 0 -%define build_opensbi_firmware 0 -%define kvm_available 0 -%define legacy_qemu_kvm 0 -%define force_fit_virtio_pxe_rom 1 - -%if "%{?distribution}" == "" -%define distro private-build -%else -%define distro %{distribution} -%endif +%include %{_sourcedir}/common.inc # So, we have openSUSE:Factory, and we have "ports". In openSUSE:Factory, we # have i586 and x86_64. In the :ARM port, we have aarch64, armv6l and armv7l. @@ -96,8 +68,6 @@ %define with_daxctl 1 %endif -%bcond_with chkqtests - # enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward # the following need to be > 64K %define supported_nics_large {e1000 rtl8139} @@ -106,51 +76,19 @@ # Though not required, make unsupported pxe roms migration compatable as well %define unsupported_nics {eepro100 ne2k_pci pcnet} -# non-x86 archs still seem to have some issues with Link Time Optimization -%ifnarch %ix86 x86_64 -%define _lto_cflags %{nil} -%endif - -%define generic_qemu_description \ -QEMU provides full machine emulation and cross architecture usage. It closely\ -integrates with KVM and Xen virtualization, allowing for excellent performance.\ -Many options are available for defining the emulated environment, including\ -traditional devices, direct host device access, and interfaces specific to\ -virtualization. - -%bcond_with system_membarrier -%bcond_with malloc_trim - -%define qemuver 7.1.0 -%define srcver 7.1.0 -%define sbver 1.16.0_0_gd239552 -%define srcname qemu -Name: qemu%{name_suffix} +Name: qemu URL: https://www.qemu.org/ -Summary: %{summary_string} +Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: %qemuver +Version: 7.1.0 Release: 0 -Source: %{srcname}-%{srcver}.tar.xz +Source0: qemu-%{version}.tar.xz +Source1: common.inc Source200: qemu-rpmlintrc Source303: README.PACKAGING +Source1000: qemu-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if "%{name}" == "qemu-linux-user" -# Build dependencies exclusive to qemu-linux-user -BuildRequires: glib2-devel-static >= 2.56 -BuildRequires: glibc-devel-static -BuildRequires: (pcre-devel-static if glib2-devel-static < 2.73 else pcre2-devel-static) -# passing filelist check for /usr/lib/binfmt.d -BuildRequires: systemd -BuildRequires: zlib-devel-static -# we must not install the qemu-linux-user package when under QEMU build -%if 0%{?qemu_user_space_build:1} -#!BuildIgnore: post-build-checks -%endif -# End of build dependencies for qemu-linux-user -%else -# Build dependencies exclusive to qemu %if %{build_x86_firmware} %ifnarch %ix86 x86_64 # We must cross-compile on non-x86* @@ -252,19 +190,13 @@ BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(zlib) %{?systemd_ordering} -# End of build dependencies for qemu -%endif -# Common build dependencies between qemu and qemu-linux-user BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: git-core BuildRequires: meson BuildRequires: ninja >= 1.7 BuildRequires: perl-Text-Markdown BuildRequires: python3-base >= 3.6 BuildRequires: python3-setuptools -%if "%{name}" == "qemu" -# Requires, Recommends, etc exclusive to qemu %if %{kvm_available} %ifarch %ix86 x86_64 Requires: qemu-x86 @@ -306,7 +238,7 @@ Recommends: qemu-hw-s390x-virtio-gpu-ccw %else # Due to change in where some documentation files are, if qemu-guest-agent # is installed, we need to make sure we update it to our version. -Requires: (qemu-guest-agent = %{qemuver} if qemu-guest-agent) +Requires: (qemu-guest-agent = %{version} if qemu-guest-agent) Recommends: qemu-hw-display-qxl Recommends: qemu-hw-display-virtio-gpu Recommends: qemu-hw-display-virtio-gpu-pci @@ -320,7 +252,7 @@ Recommends: qemu-ui-spice-app %endif Recommends: qemu-block-curl Recommends: qemu-block-nfs -Recommends: qemu-ksm = %{qemuver} +Recommends: qemu-ksm = %{version} Recommends: qemu-tools Recommends: qemu-ui-curses %if 0%{?with_rbd} @@ -337,88 +269,9 @@ Suggests: qemu-lang Suggests: qemu-microvm Suggests: qemu-skiboot Suggests: qemu-vhost-user-gpu -Obsoletes: qemu-audio-oss < %{qemuver} -Obsoletes: qemu-audio-sdl < %{qemuver} -Obsoletes: qemu-ui-sdl < %{qemuver} -# End of Requires, Recommends, etc for qemu. -# There isn't any for qemu-linux-user. -%endif - -%package headless -Summary: Minimum set of packages for having a functional QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu -Requires: qemu-tools -%if %{legacy_qemu_kvm} -Requires: qemu-kvm -%endif -Requires: qemu-hw-usb-redirect -# qemu-ui-spice-core will bring in qemu-audio-spice qemu-ui-opengl too -Requires: qemu-ui-spice-core -Requires: qemu-chardev-spice - -%description headless -%{generic_qemu_description} - -This meta-package brings in, as dependencies, the minimum set of packages -currently necessary for having a functional (headless) QEMU/KVM stack. - -%if "%{name}" == "qemu-linux-user" -# Description and files for the qemu-linux-user package - -%description -QEMU provides CPU emulation along with other related capabilities. This package -provides programs to run user space binaries and libraries meant for another -architecture. The syscall interface is intercepted and execution below the -syscall layer occurs on the native hardware and operating system. - -%files -%defattr(-, root, root) -%doc README.rst VERSION -%license COPYING COPYING.LIB LICENSE -%_bindir/qemu-aarch64 -%_bindir/qemu-aarch64_be -%_bindir/qemu-alpha -%_bindir/qemu-arm -%_bindir/qemu-armeb -%_bindir/qemu-cris -%_bindir/qemu-hexagon -%_bindir/qemu-hppa -%_bindir/qemu-i386 -%_bindir/qemu-loongarch64 -%_bindir/qemu-m68k -%_bindir/qemu-microblaze -%_bindir/qemu-microblazeel -%_bindir/qemu-mips -%_bindir/qemu-mips64 -%_bindir/qemu-mips64el -%_bindir/qemu-mipsel -%_bindir/qemu-mipsn32 -%_bindir/qemu-mipsn32el -%_bindir/qemu-nios2 -%_bindir/qemu-or1k -%_bindir/qemu-ppc -%_bindir/qemu-ppc64 -%_bindir/qemu-ppc64le -%_bindir/qemu-riscv32 -%_bindir/qemu-riscv64 -%_bindir/qemu-s390x -%_bindir/qemu-sh4 -%_bindir/qemu-sh4eb -%_bindir/qemu-sparc -%_bindir/qemu-sparc32plus -%_bindir/qemu-sparc64 -%_bindir/qemu-x86_64 -%_bindir/qemu-xtensa -%_bindir/qemu-xtensaeb -%_sbindir/qemu-binfmt-conf.sh -%_prefix/lib/binfmt.d/qemu-*.conf - -# End of description and files for qemu-linux-user -%else -# Description and files for qemu and all its subpackages +Obsoletes: qemu-audio-oss < %{version} +Obsoletes: qemu-audio-sdl < %{version} +Obsoletes: qemu-ui-sdl < %{version} %description %{generic_qemu_description} @@ -497,1091 +350,13 @@ fi # Nor can we have modules require the right version of qemu and qemu-tools # as Xen reuses our qemu-tools but does not want our qemu and qemu-x86. %define qemu_module_conflicts \ -Conflicts: %name < %{qemuver}-%{release} \ -Conflicts: %name > %{qemuver}-%{release} \ -Conflicts: qemu-tools < %{qemuver}-%{release} \ -Conflicts: qemu-tools > %{qemuver}-%{release} - -%package x86 -Summary: Machine emulator and virtualizer for x86 architectures -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: %name = %{qemuver} -Requires: qemu-accel-tcg-x86 -Requires: qemu-ipxe -Requires: qemu-seabios -Requires: qemu-sgabios -Requires: qemu-vgabios -%ifarch x86_64 -Requires: qemu-ovmf-x86_64 -%else -Recommends: qemu-ovmf-ia32 -Recommends: qemu-ovmf-x86_64 -%endif -Recommends: ovmf -Recommends: qemu-microvm - -%description x86 -%{generic_qemu_description} - -This package provides i386 and x86_64 emulation. - -%files x86 -%defattr(-, root, root) -%_bindir/qemu-system-i386 -%_bindir/qemu-system-x86_64 -%_datadir/%name/kvmvapic.bin -%_datadir/%name/linuxboot.bin -%_datadir/%name/linuxboot_dma.bin -%_datadir/%name/multiboot.bin -%_datadir/%name/multiboot_dma.bin -%_datadir/%name/pvh.bin -%doc %_docdir/qemu-x86 - -%package ppc -Summary: Machine emulator and virtualizer for Power architectures -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: %name = %{qemuver} -Requires: qemu-SLOF -Recommends: qemu-ipxe -Recommends: qemu-vgabios - -%description ppc -%{generic_qemu_description} - -This package provides ppc and ppc64 emulation. - -%files ppc -%defattr(-, root, root) -%_bindir/qemu-system-ppc -%_bindir/qemu-system-ppc64 -%_datadir/%name/bamboo.dtb -%_datadir/%name/canyonlands.dtb -%_datadir/%name/openbios-ppc -%_datadir/%name/qemu_vga.ndrv -%_datadir/%name/u-boot.e500 -%_datadir/%name/u-boot-sam460-20100605.bin -%_datadir/%name/vof*.bin -%doc %_docdir/qemu-ppc - -%package s390x -Summary: Machine emulator and virtualizer for S/390 architectures -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: %name = %{qemuver} -Provides: qemu-s390 = %{qemuver} -Obsoletes: qemu-s390 < %{qemuver} - -%description s390x -%{generic_qemu_description} - -This package provides s390x emulation. - -%files s390x -%defattr(-, root, root) -%_bindir/qemu-system-s390x -%_datadir/%name/s390-ccw.img -%_datadir/%name/s390-netboot.img -%doc %_docdir/qemu-s390x - -%package arm -Summary: Machine emulator and virtualizer for ARM architectures -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: %name = %{qemuver} -Recommends: ovmf -Recommends: qemu-ipxe -Recommends: qemu-uefi-aarch64 -Recommends: qemu-vgabios - -%description arm -%{generic_qemu_description} - -This package provides arm emulation. - -%files arm -%defattr(-, root, root) -%_bindir/qemu-system-arm -%_bindir/qemu-system-aarch64 -%_datadir/%name/npcm7xx_bootrom.bin -%doc %_docdir/qemu-arm - -%package extra -Summary: Machine emulator and virtualizer for "extra" architectures -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: %name = %{qemuver} -Recommends: qemu-ipxe -Recommends: qemu-skiboot -Recommends: qemu-vgabios - -%description extra -%{generic_qemu_description} - -This package provides some lesser used emulations, including alpha, m68k, -mips, sparc, and xtensa. (The term "extra" is juxtapositioned against more -popular QEMU packages which are dedicated to a single architecture.) - -%files extra -%defattr(-, root, root) -%_bindir/qemu-system-alpha -%_bindir/qemu-system-avr -%_bindir/qemu-system-cris -%_bindir/qemu-system-hppa -%_bindir/qemu-system-loongarch64 -%_bindir/qemu-system-m68k -%_bindir/qemu-system-microblaze -%_bindir/qemu-system-microblazeel -%_bindir/qemu-system-mips -%_bindir/qemu-system-mipsel -%_bindir/qemu-system-mips64 -%_bindir/qemu-system-mips64el -%_bindir/qemu-system-nios2 -%_bindir/qemu-system-or1k -%_bindir/qemu-system-riscv32 -%_bindir/qemu-system-riscv64 -%_bindir/qemu-system-rx -%_bindir/qemu-system-sh4 -%_bindir/qemu-system-sh4eb -%_bindir/qemu-system-sparc -%_bindir/qemu-system-sparc64 -%_bindir/qemu-system-tricore -%_bindir/qemu-system-xtensa -%_bindir/qemu-system-xtensaeb -%_datadir/%name/hppa-firmware.img -%_datadir/%name/openbios-sparc32 -%_datadir/%name/openbios-sparc64 -%_datadir/%name/opensbi-riscv32-generic-fw_dynamic.bin -%_datadir/%name/opensbi-riscv64-generic-fw_dynamic.bin -%_datadir/%name/palcode-clipper -%_datadir/%name/petalogix-ml605.dtb -%_datadir/%name/petalogix-s3adsp1800.dtb -%_datadir/%name/QEMU,cgthree.bin -%_datadir/%name/QEMU,tcx.bin - -%package lang -Summary: Translations for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 - -%description lang -This package contains a few language translations, particularly for the -graphical user interface components that come with QEMU. The bulk of strings -in QEMU are not localized. - -%files lang -f %blddir/%name.lang -%defattr(-, root, root) - -%package audio-alsa -Summary: ALSA based audio support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description audio-alsa -This package contains a module for ALSA based audio support for QEMU. - -%files audio-alsa -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/audio-alsa.so - -%package audio-dbus -Summary: D-Bus based audio support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description audio-dbus -This package provides a module for D-Bus based audio support for QEMU. - -%files audio-dbus -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/audio-dbus.so - -%package audio-pa -Summary: Pulse Audio based audio support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description audio-pa -This package contains a module for Pulse Audio based audio support for QEMU. - -%files audio-pa -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/audio-pa.so - -%package audio-jack -Summary: JACK based audio support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description audio-jack -This package contains a module for JACK based audio support for QEMU. - -%files audio-jack -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/audio-jack.so - -%package audio-spice -Summary: Spice based audio support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description audio-spice -This package contains a module for Spice based audio support for QEMU. - -%files audio-spice -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/audio-spice.so - -%package audio-oss -Summary: OSS based audio support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description audio-oss -This package contains a module for OSS based audio support for QEMU. - -%files audio-oss -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/audio-oss.so - -%package block-curl -Summary: cURL block support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-curl -This package contains a module for accessing network-based image files over -a network connection from qemu-img tool and QEMU system emulation. - -%files block-curl -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-curl.so - -%package block-dmg -Summary: DMG block support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-dmg -This package contains a module for accessing Mac OS X image files from -qemu-img tool and QEMU system emulation. - -%files block-dmg -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-dmg-bz2.so -%_libdir/%name/block-dmg-lzfse.so - -%package block-gluster -Summary: GlusterFS block support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-gluster -This package contains a module for accessing network-based image files over a -GlusterFS network connection from qemu-img tool and QEMU system emulation. - -%files block-gluster -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-gluster.so - -%package block-iscsi -Summary: iSCSI block support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-iscsi -This package contains a module for accessing network-based image files over an -iSCSI network connection from qemu-img tool and QEMU system emulation. - -%files block-iscsi -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-iscsi.so - -%package block-nfs -Summary: direct Network File System support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-nfs -This package contains a module for directly accessing nfs based image files -for QEMU. - -%files block-nfs -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-nfs.so - -%package block-ssh -Summary: SSH (SFTP) block support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-ssh -This package contains a module for accessing network-based image files over an -SSH network connection from qemu-img tool and QEMU system emulation. - -%files block-ssh -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-ssh.so - -%package chardev-baum -Summary: Baum braille chardev support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description chardev-baum -This package contains a module for baum braille chardev support for QEMU. - -%files chardev-baum -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/chardev-baum.so - -%package chardev-spice -Summary: Spice vmc and port chardev support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description chardev-spice -This package contains a module for Spice chardev support for QEMU. - -%files chardev-spice -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/chardev-spice.so - -%package hw-display-qxl -Summary: QXL display support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description hw-display-qxl -This package contains a module for QXL display support for QEMU. - -%files hw-display-qxl -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-display-qxl.so - -%package hw-display-virtio-gpu -Summary: Virtio GPU display support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description hw-display-virtio-gpu -This package contains a module for Virtio GPU display support for QEMU. - -%files hw-display-virtio-gpu -%defattr(-, root, root) -%dir %_datadir/%name -%_libdir/%name/hw-display-virtio-gpu.so -%_libdir/%name/hw-display-virtio-gpu-gl.so - -%package hw-display-virtio-gpu-pci -Summary: Virtio-gpu pci device for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-hw-display-virtio-gpu -%{qemu_module_conflicts} - -%description hw-display-virtio-gpu-pci -This package contains a module providing the virtio gpu pci device for QEMU. - -%files hw-display-virtio-gpu-pci -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-display-virtio-gpu-pci.so -%_libdir/%name/hw-display-virtio-gpu-pci-gl.so - -%package hw-display-virtio-vga -Summary: Virtio vga device for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description hw-display-virtio-vga -This package contains a module providing the virtio vga device for QEMU. - -%files hw-display-virtio-vga -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-display-virtio-vga.so -%_libdir/%name/hw-display-virtio-vga-gl.so - -%package hw-s390x-virtio-gpu-ccw -Summary: S390x virtio-gpu ccw device for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-hw-display-virtio-gpu -%{qemu_module_conflicts} - -%description hw-s390x-virtio-gpu-ccw -This package contains a module providing the s390x virtio gpu ccw device for -QEMU. - -%files hw-s390x-virtio-gpu-ccw -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-s390x-virtio-gpu-ccw.so - -%package hw-usb-redirect -Summary: USB redirection support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description hw-usb-redirect -This package contains a module for USB redirection support for QEMU. - -%files hw-usb-redirect -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-usb-redirect.so - -%package hw-usb-smartcard -Summary: USB smartcard support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description hw-usb-smartcard -This package contains a modules for USB smartcard support for QEMU. - -%files hw-usb-smartcard -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-usb-smartcard.so - -%package hw-usb-host -Summary: USB passthrough driver support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description hw-usb-host -This package contains a modules for USB passthrough driver for QEMU. - -%files hw-usb-host -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-usb-host.so - -%package ui-dbus -Summary: D-Bus based UI support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description ui-dbus -This package contains a module for doing D-Bus based UI for QEMU. - -%files ui-dbus -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/ui-dbus.so - -%package ui-curses -Summary: Curses based UI support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description ui-curses -This package contains a module for doing curses based UI for QEMU. - -%files ui-curses -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/ui-curses.so - -%package ui-gtk -Summary: GTK based UI support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-ui-opengl -%{qemu_module_conflicts} - -%description ui-gtk -This package contains a module for doing GTK based UI for QEMU. - -%files ui-gtk -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/ui-gtk.so - -%package ui-opengl -Summary: OpenGL based UI support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description ui-opengl -This package contains a module for doing OpenGL based UI for QEMU. - -%files ui-opengl -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/ui-egl-headless.so -%_libdir/%name/ui-opengl.so - -%package ui-spice-app -Summary: Spice UI support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-chardev-spice -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description ui-spice-app -This package contains a module for doing Spice based UI for QEMU. - -%files ui-spice-app -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/ui-spice-app.so - -%package ui-spice-core -Summary: Core Spice support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: qemu-ui-opengl -# This next Requires is only since virt-manager expects audio support -Requires: qemu-audio-spice -%{qemu_module_conflicts} - -%description ui-spice-core -This package contains a module with core Spice support for QEMU. - -%files ui-spice-core -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/ui-spice-core.so - -%package vhost-user-gpu -Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description vhost-user-gpu -This package contains a vhost user mode virtio-gpu 2D/3D rendering backend for -QEMU. - -%files vhost-user-gpu -%defattr(-, root, root) -%dir %_datadir/%name/vhost-user -%_datadir/%name/vhost-user/50-qemu-gpu.json -%_libexecdir/vhost-user-gpu - -%package tools -Summary: Tools for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires(pre): permissions -Requires: group(kvm) -Recommends: multipath-tools -Recommends: qemu-block-curl -%if 0%{?with_rbd} -Recommends: qemu-block-rbd -%endif - -%description tools -This package contains various QEMU related tools, including a bridge helper, -a virtfs helper, ivshmem, disk utilities and scripts for various purposes. - -%files tools -%defattr(-, root, root) -%_bindir/analyze-migration.py -%_bindir/qemu-edid -%_bindir/qemu-img -%_bindir/qemu-io -%_bindir/qemu-keymap -%_bindir/qemu-nbd -%_bindir/qemu-pr-helper -%_bindir/qemu-storage-daemon -%_bindir/vmstate-static-checker.py -%_bindir/vmxcap -%verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper -%_libexecdir/virtfs-proxy-helper -%_libexecdir/virtiofsd -%_mandir/man1/qemu-img.1.gz -%_mandir/man1/virtfs-proxy-helper.1.gz -%_mandir/man8/qemu-nbd.8.gz -%_mandir/man8/qemu-pr-helper.8.gz -%dir %_sysconfdir/%name -%config(noreplace) %_sysconfdir/%name/bridge.conf - -%post tools -%set_permissions %_libexecdir/qemu-bridge-helper - -%verifyscript tools -%verify_permissions %_libexecdir/qemu-bridge-helper - -%package ivshmem-tools -Summary: Inter-VM Shared Memory Tools for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 - -%description ivshmem-tools -This package contains a sample shared memory client and server which utilize -QEMU's Inter-VM shared memory device as specified by the ivshmem client-server -protocol specification documented in docs/specs/ivshmem-spec.txt in QEMU source -code. - -%files ivshmem-tools -%defattr(-, root, root) -%dir %_datadir/%name -%_bindir/ivshmem-client -%_bindir/ivshmem-server - -%package guest-agent -Summary: Guest agent for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires: group(kvm) -Requires(post): udev -Supplements: modalias(acpi*:QEMU0002%3A*) -Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*) -Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*) -%{?systemd_ordering} - -%description guest-agent -This package contains the QEMU guest agent. It is installed in the linux guest -to provide information and control at the guest OS level. - -%files guest-agent -%defattr(-, root, root) -%attr(0755,root,kvm) %_bindir/qemu-ga -%_mandir/man8/qemu-ga.8.gz -%{_unitdir}/qemu-guest-agent.service -/usr/lib/udev/rules.d/80-qemu-ga.rules - -%pre guest-agent -%service_add_pre qemu-guest-agent.service - -%post guest-agent -%service_add_post qemu-guest-agent.service -if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then - /usr/bin/systemctl start qemu-guest-agent.service || : -fi - -%preun guest-agent -if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then - /usr/bin/systemctl stop qemu-guest-agent.service || : -fi - -%postun guest-agent -%service_del_postun_without_restart qemu-guest-agent.service -if [ "$1" = "1" ] ; then - if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then - /usr/bin/systemctl restart qemu-guest-agent.service || : - fi -fi - -%package ksm -Summary: Kernel Samepage Merging services -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -Requires(pre): coreutils -Requires(post): coreutils - -%description ksm -Kernel Samepage Merging (KSM) is a memory-saving de-duplication feature, that -merges anonymous (private) pages (not pagecache ones). - -This package provides a service file for starting and stopping KSM. - -%files ksm -%defattr(-, root, root) -%{_unitdir}/ksm.service - -%pre ksm -%service_add_pre ksm.service - -%post ksm -%service_add_post ksm.service - -%preun ksm -%service_del_preun ksm.service - -%postun ksm -%service_del_postun ksm.service - -%package accel-tcg-x86 -Summary: TCG accelerator for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description accel-tcg-x86 -TCG is the QEMU binary translator, responsible for converting from target to -host instruction set. - -This package provides the TCG accelerator for QEMU. - -%files accel-tcg-x86 -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/accel-tcg-i386.so -%_libdir/%name/accel-tcg-x86_64.so - -%package accel-qtest -Summary: QTest accelerator for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description accel-qtest -QTest is a device emulation testing framework. It is useful to test device -models. - -This package provides QTest accelerator for testing QEMU. - -%files accel-qtest -%defattr(-, root, root) -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/accel-qtest-aarch64.so -%_libdir/%name/accel-qtest-alpha.so -%_libdir/%name/accel-qtest-arm.so -%_libdir/%name/accel-qtest-avr.so -%_libdir/%name/accel-qtest-cris.so -%_libdir/%name/accel-qtest-hppa.so -%_libdir/%name/accel-qtest-i386.so -%_libdir/%name/accel-qtest-loongarch64.so -%_libdir/%name/accel-qtest-m68k.so -%_libdir/%name/accel-qtest-microblaze.so -%_libdir/%name/accel-qtest-microblazeel.so -%_libdir/%name/accel-qtest-mips.so -%_libdir/%name/accel-qtest-mips64.so -%_libdir/%name/accel-qtest-mips64el.so -%_libdir/%name/accel-qtest-mipsel.so -%_libdir/%name/accel-qtest-nios2.so -%_libdir/%name/accel-qtest-or1k.so -%_libdir/%name/accel-qtest-ppc.so -%_libdir/%name/accel-qtest-ppc64.so -%_libdir/%name/accel-qtest-riscv32.so -%_libdir/%name/accel-qtest-riscv64.so -%_libdir/%name/accel-qtest-rx.so -%_libdir/%name/accel-qtest-s390x.so -%_libdir/%name/accel-qtest-sh4.so -%_libdir/%name/accel-qtest-sh4eb.so -%_libdir/%name/accel-qtest-sparc.so -%_libdir/%name/accel-qtest-sparc64.so -%_libdir/%name/accel-qtest-tricore.so -%_libdir/%name/accel-qtest-x86_64.so -%_libdir/%name/accel-qtest-xtensa.so -%_libdir/%name/accel-qtest-xtensaeb.so - -%if 0%{?with_rbd} -%package block-rbd -Summary: Rados Block Device (Ceph) support for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%{qemu_module_conflicts} - -%description block-rbd -This package contains a module for accessing ceph (rbd,rados) image files -for QEMU. - -%files block-rbd -%defattr(-, root, root) -%dir %_libdir/%name -%_libdir/%name/block-rbd.so -# End of "if with_rbd" -%endif - -%if %{legacy_qemu_kvm} -%package kvm -Summary: Wrapper to enable KVM acceleration under QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -%ifarch %ix86 x86_64 -Requires: qemu-x86 = %{qemuver} -%endif -%ifarch s390x -Requires: qemu-s390x = %{qemuver} -%endif -Provides: kvm = %{qemuver} -Obsoletes: kvm < %{qemuver} - -%description kvm -%{generic_qemu_description} - -This package provides a symlink to the main QEMU emulator used for KVM -virtualization. The symlink is named qemu-kvm, which causes the QEMU program -to enable the KVM accelerator, due to the name reference ending with 'kvm'. -This package is an artifact of the early origins of QEMU, and is deprecated. - -%files kvm -%defattr(-,root,root) -%_bindir/qemu-kvm -%doc %_docdir/qemu-kvm -%_mandir/man1/qemu-kvm.1.gz -# End of "if legacy_qemu_kvm" -%endif - -%if %{build_ppc_firmware} -%package SLOF -Summary: Slimline Open Firmware - SLOF -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -BuildArch: noarch - -%description SLOF -Slimline Open Firmware (SLOF) is an implementation of the IEEE 1275 standard. -It can be used as partition firmware for pSeries machines running on QEMU or KVM. - -%files SLOF -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/slof.bin - -%package skiboot -Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -BuildArch: noarch -Requires(post): update-alternatives -Requires(postun):update-alternatives - -%description skiboot -Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as -traditionally packaged with QEMU. - -%files skiboot -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/skiboot.lid -%_datadir/%name/skiboot.lid.qemu -%ghost %_sysconfdir/alternatives/skiboot.lid - -%post skiboot -update-alternatives --install \ - %{_datadir}/%name/skiboot.lid skiboot.lid %{_datadir}/%name/skiboot.lid.qemu 15 - -%preun skiboot -if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then - update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu -fi -# End of "if build_ppc_firmware" -%endif - -%if %{build_x86_firmware} -%package microvm -Summary: x86 MicroVM firmware for QEMU -Group: System/Emulators/PC -Version: %{qemuver} -Release: 0 -BuildArch: noarch - -%description microvm -This package provides minimal x86 firmware for booting certain guests under -QEMU. qboot provides the minimum resources needed to boot PVH and bzImages. -bios-microvm, created from a minimal seabios configuration, provides slightly -wider support than qboot, but still focuses on quick boot up. - -%files microvm -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/bios-microvm.bin -%_datadir/%name/qboot.rom - -%package seabios -Summary: x86 Legacy BIOS for QEMU -Group: System/Emulators/PC -Version: %{sbver} -Release: 0 -BuildArch: noarch -Conflicts: %name < 1.6.0 - -%description seabios -SeaBIOS is an open source implementation of a 16bit x86 BIOS. SeaBIOS -is the default and legacy BIOS for QEMU. - -%files seabios -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/bios.bin -%_datadir/%name/bios-256k.bin -%_datadir/%name/firmware/50-seabios-256k.json -%_datadir/%name/firmware/60-seabios-128k.json -%license roms/seabios/COPYING -%doc %_docdir/qemu-seabios - -%package vgabios -Summary: VGA BIOSes for QEMU -Group: System/Emulators/PC -Version: %{sbver} -Release: 0 -BuildArch: noarch -Conflicts: %name < 1.6.0 - -%description vgabios -VGABIOS provides the video ROM BIOSes for the following variants of VGA -emulated devices: Std VGA, QXL, Cirrus CLGD 5446 and VMware emulated -video card. For use with QEMU. - -%files vgabios -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/vgabios.bin -%_datadir/%name/vgabios-ati.bin -%_datadir/%name/vgabios-bochs-display.bin -%_datadir/%name/vgabios-cirrus.bin -%_datadir/%name/vgabios-qxl.bin -%_datadir/%name/vgabios-ramfb.bin -%_datadir/%name/vgabios-stdvga.bin -%_datadir/%name/vgabios-virtio.bin -%_datadir/%name/vgabios-vmware.bin -%license roms/seabios/COPYING - -%package sgabios -Summary: Serial Graphics Adapter BIOS for QEMU -Group: System/Emulators/PC -Version: 8 -Release: 0 -BuildArch: noarch -Conflicts: %name < 1.6.0 - -%description sgabios -The Google Serial Graphics Adapter BIOS or SGABIOS provides a means for legacy -x86 software to communicate with an attached serial console as if a video card -were attached. For use with QEMU. - -%files sgabios -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/sgabios.bin - -%package ipxe -Summary: PXE ROMs for QEMU NICs -Group: System/Emulators/PC -Version: 1.0.0+ -Release: 0 -BuildArch: noarch -Conflicts: %name < 1.6.0 - -%description ipxe -Provides Preboot Execution Environment (PXE) ROM support for various emulated -network adapters available with QEMU. - -%files ipxe -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/efi-e1000.rom -%_datadir/%name/efi-e1000e.rom -%_datadir/%name/efi-eepro100.rom -%_datadir/%name/efi-ne2k_pci.rom -%_datadir/%name/efi-pcnet.rom -%_datadir/%name/efi-rtl8139.rom -%_datadir/%name/efi-virtio.rom -%_datadir/%name/efi-vmxnet3.rom -%_datadir/%name/pxe-e1000.rom -%_datadir/%name/pxe-eepro100.rom -%_datadir/%name/pxe-ne2k_pci.rom -%_datadir/%name/pxe-pcnet.rom -%_datadir/%name/pxe-rtl8139.rom -%_datadir/%name/pxe-virtio.rom -# End of "if build_x86_firmware" -%endif - -# End of description and files for qemu and all its subpackages -%endif +Conflicts: %name < %{version}-%{release} \ +Conflicts: %name > %{version}-%{release} \ +Conflicts: qemu-tools < %{version}-%{release} \ +Conflicts: qemu-tools > %{version}-%{release} %prep -%autosetup -n %{srcname}-%{srcver} - -%if "%{name}" == "qemu" -# Specific preparation steps for builfding qemu +%autosetup -n qemu-%{version} # for the record, this set of firmware files is installed, but we don't # build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc @@ -1655,11 +430,10 @@ efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom} %{?s390x_default_built_firmware} %{?s390x_extra_built_firmware} \ %{?x86_default_built_firmware} %{?x86_extra_built_firmware} } -# End of source preparation for qemu -%endif - %build +%define rpmfilesdir %{_builddir}/qemu-%{version}/rpm + %if %{legacy_qemu_kvm} # FIXME: Why are we copying the s390 specific one? cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst @@ -1855,15 +629,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %if "%{_lto_cflags}" != "%{nil}" --enable-lto \ %endif -%if "%{name}" == "qemu-linux-user" - --disable-install-blobs \ - --enable-attr \ - --enable-coroutine-pool \ - --enable-linux-user \ - --enable-selinux \ - --enable-tcg \ - --static \ -%else --audio-drv-list=pa,alsa,jack,oss \ --enable-auth-pam \ %ifarch x86_64 @@ -1969,14 +734,11 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-zstd \ --with-coroutine=ucontext \ --with-default-devices -# End of configure option ("name == qemu-linux-user" above) -%endif echo "=== Content of config-host.mak: ===" cat config-host.mak echo "=== ===" -%if "%{name}" == "qemu" # For building QEMU and all the "default" firmwares, for each arch, # for the package qemu, we first need to delete the firmware files that # we intend to build... @@ -1986,14 +748,9 @@ for i in %built_firmware do unlink %srcdir/pc-bios/$i done -# End of unlinking pre-built firmwares for qemu -%endif - -# Common build steps for qemu and qemu-linux-user %make_build -%if "%{name}" == "qemu" # ... Then, we need to reinstate the firmwares that have been built already for i in %{?s390x_default_built_firmware} do @@ -2085,28 +842,11 @@ done # End of "if build_x86_firmware" %endif -# End of the build for qemu -%endif - %install cd %blddir %make_build install DESTDIR=%{buildroot} -%if "%{name}" == "qemu-linux-user" -# Additional installation steps specific to qemu-linux-user - -rm -rf %{buildroot}%_datadir/qemu/keymaps -unlink %{buildroot}%_datadir/qemu/trace-events-all -install -d -m 755 %{buildroot}%_sbindir -install -m 755 scripts/qemu-binfmt-conf.sh %{buildroot}%_sbindir -install -d -m 755 %{buildroot}%{_prefix}/lib/binfmt.d/ -scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --exportdir %{buildroot}%{_prefix}/lib/binfmt.d/ - -# End of additional installation steps for qemu-linux-user -%else -# Additional installation steps specific to qemu - %find_lang %name install -d -m 0755 %{buildroot}%_datadir/%name/firmware install -d -m 0755 %{buildroot}/usr/lib/supportconfig/plugins @@ -2210,18 +950,12 @@ done %suse_update_desktop_file qemu -# End of additional installation steps for qemu -%endif - # Common install steps for qemu and qemu-linux-user %fdupes -s %{buildroot} %check cd %blddir -%if "%{name}" == "qemu" -# Let's try to run 'make check' for the qemu package - # Patch 'increase x86_64 physical bits to 42' requires that the DSDT used for # acpi [q]tests is modified too. But it's binary, and that means we cannot # do that in the patch itself. Instead, we keep a copy of the binary in the @@ -2261,43 +995,1002 @@ make -O V=1 VERBOSE=1 -j1 check-qtest # enable this at a later point #make -O V=1 VERBOSE=1 -j1 check-report.junit.xml -# End of checks for qemu -%else -# Let's run the relevant check for the qemu-linux-user package +%package headless +Summary: Minimum set of packages for having a functional QEMU +Group: System/Emulators/PC +Requires: qemu +Requires: qemu-tools +%if %{legacy_qemu_kvm} +Requires: qemu-kvm +%endif +Requires: qemu-hw-usb-redirect +# qemu-ui-spice-core will bring in qemu-audio-spice qemu-ui-opengl too +Requires: qemu-ui-spice-core +Requires: qemu-chardev-spice -%ifarch %ix86 -%define qemu_arch i386 -%endif +%description headless +%{generic_qemu_description} + +This meta-package brings in, as dependencies, the minimum set of packages +currently necessary for having a functional (headless) QEMU/KVM stack. + +%package x86 +Summary: Machine emulator and virtualizer for x86 architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Requires: qemu-accel-tcg-x86 +Requires: qemu-ipxe +Requires: qemu-seabios +Requires: qemu-sgabios +Requires: qemu-vgabios %ifarch x86_64 -%define qemu_arch x86_64 +Requires: qemu-ovmf-x86_64 +%else +Recommends: qemu-ovmf-ia32 +Recommends: qemu-ovmf-x86_64 %endif -%ifarch %arm -%define qemu_arch arm +Recommends: ovmf +Recommends: qemu-microvm + +%description x86 +%{generic_qemu_description} + +This package provides i386 and x86_64 emulation. + +%files x86 +%defattr(-, root, root) +%_bindir/qemu-system-i386 +%_bindir/qemu-system-x86_64 +%_datadir/%name/kvmvapic.bin +%_datadir/%name/linuxboot.bin +%_datadir/%name/linuxboot_dma.bin +%_datadir/%name/multiboot.bin +%_datadir/%name/multiboot_dma.bin +%_datadir/%name/pvh.bin +%doc %_docdir/qemu-x86 + +%package ppc +Summary: Machine emulator and virtualizer for Power architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Requires: qemu-SLOF +Recommends: qemu-ipxe +Recommends: qemu-vgabios + +%description ppc +%{generic_qemu_description} + +This package provides ppc and ppc64 emulation. + +%files ppc +%defattr(-, root, root) +%_bindir/qemu-system-ppc +%_bindir/qemu-system-ppc64 +%_datadir/%name/bamboo.dtb +%_datadir/%name/canyonlands.dtb +%_datadir/%name/openbios-ppc +%_datadir/%name/qemu_vga.ndrv +%_datadir/%name/u-boot.e500 +%_datadir/%name/u-boot-sam460-20100605.bin +%_datadir/%name/vof*.bin +%doc %_docdir/qemu-ppc + +%package s390x +Summary: Machine emulator and virtualizer for S/390 architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Provides: qemu-s390 = %{version} +Obsoletes: qemu-s390 < %{version} + +%description s390x +%{generic_qemu_description} + +This package provides s390x emulation. + +%files s390x +%defattr(-, root, root) +%_bindir/qemu-system-s390x +%_datadir/%name/s390-ccw.img +%_datadir/%name/s390-netboot.img +%doc %_docdir/qemu-s390x + +%package arm +Summary: Machine emulator and virtualizer for ARM architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Recommends: ovmf +Recommends: qemu-ipxe +Recommends: qemu-uefi-aarch64 +Recommends: qemu-vgabios + +%description arm +%{generic_qemu_description} + +This package provides arm emulation. + +%files arm +%defattr(-, root, root) +%_bindir/qemu-system-arm +%_bindir/qemu-system-aarch64 +%_datadir/%name/npcm7xx_bootrom.bin +%doc %_docdir/qemu-arm + +%package extra +Summary: Machine emulator and virtualizer for "extra" architectures +Group: System/Emulators/PC +Requires: %name = %{version} +Recommends: qemu-ipxe +Recommends: qemu-skiboot +Recommends: qemu-vgabios + +%description extra +%{generic_qemu_description} + +This package provides some lesser used emulations, including alpha, m68k, +mips, sparc, and xtensa. (The term "extra" is juxtapositioned against more +popular QEMU packages which are dedicated to a single architecture.) + +%files extra +%defattr(-, root, root) +%_bindir/qemu-system-alpha +%_bindir/qemu-system-avr +%_bindir/qemu-system-cris +%_bindir/qemu-system-hppa +%_bindir/qemu-system-loongarch64 +%_bindir/qemu-system-m68k +%_bindir/qemu-system-microblaze +%_bindir/qemu-system-microblazeel +%_bindir/qemu-system-mips +%_bindir/qemu-system-mipsel +%_bindir/qemu-system-mips64 +%_bindir/qemu-system-mips64el +%_bindir/qemu-system-nios2 +%_bindir/qemu-system-or1k +%_bindir/qemu-system-riscv32 +%_bindir/qemu-system-riscv64 +%_bindir/qemu-system-rx +%_bindir/qemu-system-sh4 +%_bindir/qemu-system-sh4eb +%_bindir/qemu-system-sparc +%_bindir/qemu-system-sparc64 +%_bindir/qemu-system-tricore +%_bindir/qemu-system-xtensa +%_bindir/qemu-system-xtensaeb +%_datadir/%name/hppa-firmware.img +%_datadir/%name/openbios-sparc32 +%_datadir/%name/openbios-sparc64 +%_datadir/%name/opensbi-riscv32-generic-fw_dynamic.bin +%_datadir/%name/opensbi-riscv64-generic-fw_dynamic.bin +%_datadir/%name/palcode-clipper +%_datadir/%name/petalogix-ml605.dtb +%_datadir/%name/petalogix-s3adsp1800.dtb +%_datadir/%name/QEMU,cgthree.bin +%_datadir/%name/QEMU,tcx.bin + +%package lang +Summary: Translations for QEMU +Group: System/Emulators/PC + +%description lang +This package contains a few language translations, particularly for the +graphical user interface components that come with QEMU. The bulk of strings +in QEMU are not localized. + +%files lang -f %blddir/%name.lang +%defattr(-, root, root) + +%package audio-alsa +Summary: ALSA based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-alsa +This package contains a module for ALSA based audio support for QEMU. + +%files audio-alsa +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-alsa.so + +%package audio-dbus +Summary: D-Bus based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-dbus +This package provides a module for D-Bus based audio support for QEMU. + +%files audio-dbus +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-dbus.so + +%package audio-pa +Summary: Pulse Audio based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-pa +This package contains a module for Pulse Audio based audio support for QEMU. + +%files audio-pa +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-pa.so + +%package audio-jack +Summary: JACK based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-jack +This package contains a module for JACK based audio support for QEMU. + +%files audio-jack +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-jack.so + +%package audio-spice +Summary: Spice based audio support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description audio-spice +This package contains a module for Spice based audio support for QEMU. + +%files audio-spice +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-spice.so + +%package audio-oss +Summary: OSS based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-oss +This package contains a module for OSS based audio support for QEMU. + +%files audio-oss +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/audio-oss.so + +%package block-curl +Summary: cURL block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-curl +This package contains a module for accessing network-based image files over +a network connection from qemu-img tool and QEMU system emulation. + +%files block-curl +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-curl.so + +%package block-dmg +Summary: DMG block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-dmg +This package contains a module for accessing Mac OS X image files from +qemu-img tool and QEMU system emulation. + +%files block-dmg +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-dmg-bz2.so +%_libdir/%name/block-dmg-lzfse.so + +%package block-gluster +Summary: GlusterFS block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-gluster +This package contains a module for accessing network-based image files over a +GlusterFS network connection from qemu-img tool and QEMU system emulation. + +%files block-gluster +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-gluster.so + +%package block-iscsi +Summary: iSCSI block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-iscsi +This package contains a module for accessing network-based image files over an +iSCSI network connection from qemu-img tool and QEMU system emulation. + +%files block-iscsi +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-iscsi.so + +%package block-nfs +Summary: direct Network File System support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-nfs +This package contains a module for directly accessing nfs based image files +for QEMU. + +%files block-nfs +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-nfs.so + +%package block-ssh +Summary: SSH (SFTP) block support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-ssh +This package contains a module for accessing network-based image files over an +SSH network connection from qemu-img tool and QEMU system emulation. + +%files block-ssh +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-ssh.so + +%package chardev-baum +Summary: Baum braille chardev support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description chardev-baum +This package contains a module for baum braille chardev support for QEMU. + +%files chardev-baum +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-baum.so + +%package chardev-spice +Summary: Spice vmc and port chardev support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description chardev-spice +This package contains a module for Spice chardev support for QEMU. + +%files chardev-spice +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-spice.so + +%package hw-display-qxl +Summary: QXL display support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description hw-display-qxl +This package contains a module for QXL display support for QEMU. + +%files hw-display-qxl +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-qxl.so + +%package hw-display-virtio-gpu +Summary: Virtio GPU display support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-display-virtio-gpu +This package contains a module for Virtio GPU display support for QEMU. + +%files hw-display-virtio-gpu +%defattr(-, root, root) +%dir %_datadir/%name +%_libdir/%name/hw-display-virtio-gpu.so +%_libdir/%name/hw-display-virtio-gpu-gl.so + +%package hw-display-virtio-gpu-pci +Summary: Virtio-gpu pci device for QEMU +Group: System/Emulators/PC +Requires: qemu-hw-display-virtio-gpu +%{qemu_module_conflicts} + +%description hw-display-virtio-gpu-pci +This package contains a module providing the virtio gpu pci device for QEMU. + +%files hw-display-virtio-gpu-pci +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-virtio-gpu-pci.so +%_libdir/%name/hw-display-virtio-gpu-pci-gl.so + +%package hw-display-virtio-vga +Summary: Virtio vga device for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-display-virtio-vga +This package contains a module providing the virtio vga device for QEMU. + +%files hw-display-virtio-vga +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-virtio-vga.so +%_libdir/%name/hw-display-virtio-vga-gl.so + +%package hw-s390x-virtio-gpu-ccw +Summary: S390x virtio-gpu ccw device for QEMU +Group: System/Emulators/PC +Requires: qemu-hw-display-virtio-gpu +%{qemu_module_conflicts} + +%description hw-s390x-virtio-gpu-ccw +This package contains a module providing the s390x virtio gpu ccw device for +QEMU. + +%files hw-s390x-virtio-gpu-ccw +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-s390x-virtio-gpu-ccw.so + +%package hw-usb-redirect +Summary: USB redirection support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-usb-redirect +This package contains a module for USB redirection support for QEMU. + +%files hw-usb-redirect +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-redirect.so + +%package hw-usb-smartcard +Summary: USB smartcard support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-usb-smartcard +This package contains a modules for USB smartcard support for QEMU. + +%files hw-usb-smartcard +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-smartcard.so + +%package hw-usb-host +Summary: USB passthrough driver support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description hw-usb-host +This package contains a modules for USB passthrough driver for QEMU. + +%files hw-usb-host +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-usb-host.so + +%package ui-dbus +Summary: D-Bus based UI support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description ui-dbus +This package contains a module for doing D-Bus based UI for QEMU. + +%files ui-dbus +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-dbus.so + +%package ui-curses +Summary: Curses based UI support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description ui-curses +This package contains a module for doing curses based UI for QEMU. + +%files ui-curses +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-curses.so + +%package ui-gtk +Summary: GTK based UI support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-opengl +%{qemu_module_conflicts} + +%description ui-gtk +This package contains a module for doing GTK based UI for QEMU. + +%files ui-gtk +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-gtk.so + +%package ui-opengl +Summary: OpenGL based UI support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description ui-opengl +This package contains a module for doing OpenGL based UI for QEMU. + +%files ui-opengl +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-egl-headless.so +%_libdir/%name/ui-opengl.so + +%package ui-spice-app +Summary: Spice UI support for QEMU +Group: System/Emulators/PC +Requires: qemu-chardev-spice +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. + +%files ui-spice-app +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/ui-spice-app.so + +%package ui-spice-core +Summary: Core Spice support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-opengl +# This next Requires is only since virt-manager expects audio support +Requires: qemu-audio-spice +%{qemu_module_conflicts} + +%description ui-spice-core +This package contains a module with core Spice support for QEMU. + +%files ui-spice-core +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-spice-core.so + +%package vhost-user-gpu +Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description vhost-user-gpu +This package contains a vhost user mode virtio-gpu 2D/3D rendering backend for +QEMU. + +%files vhost-user-gpu +%defattr(-, root, root) +%dir %_datadir/%name/vhost-user +%_datadir/%name/vhost-user/50-qemu-gpu.json +%_libexecdir/vhost-user-gpu + +%package tools +Summary: Tools for QEMU +Group: System/Emulators/PC +Requires(pre): permissions +Requires: group(kvm) +Recommends: multipath-tools +Recommends: qemu-block-curl +%if 0%{?with_rbd} +Recommends: qemu-block-rbd %endif -%ifarch aarch64 -%define qemu_arch aarch64 + +%description tools +This package contains various QEMU related tools, including a bridge helper, +a virtfs helper, ivshmem, disk utilities and scripts for various purposes. + +%files tools +%defattr(-, root, root) +%_bindir/analyze-migration.py +%_bindir/qemu-edid +%_bindir/qemu-img +%_bindir/qemu-io +%_bindir/qemu-keymap +%_bindir/qemu-nbd +%_bindir/qemu-pr-helper +%_bindir/qemu-storage-daemon +%_bindir/vmstate-static-checker.py +%_bindir/vmxcap +%verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper +%_libexecdir/virtfs-proxy-helper +%_libexecdir/virtiofsd +%_mandir/man1/qemu-img.1.gz +%_mandir/man1/virtfs-proxy-helper.1.gz +%_mandir/man8/qemu-nbd.8.gz +%_mandir/man8/qemu-pr-helper.8.gz +%dir %_sysconfdir/%name +%config(noreplace) %_sysconfdir/%name/bridge.conf + +%post tools +%set_permissions %_libexecdir/qemu-bridge-helper + +%verifyscript tools +%verify_permissions %_libexecdir/qemu-bridge-helper + +%package ivshmem-tools +Summary: Inter-VM Shared Memory Tools for QEMU +Group: System/Emulators/PC + +%description ivshmem-tools +This package contains a sample shared memory client and server which utilize +QEMU's Inter-VM shared memory device as specified by the ivshmem client-server +protocol specification documented in docs/specs/ivshmem-spec.txt in QEMU source +code. + +%files ivshmem-tools +%defattr(-, root, root) +%dir %_datadir/%name +%_bindir/ivshmem-client +%_bindir/ivshmem-server + +%package guest-agent +Summary: Guest agent for QEMU +Group: System/Emulators/PC +Requires: group(kvm) +Requires(post): udev +Supplements: modalias(acpi*:QEMU0002%3A*) +Supplements: modalias(pci:v00005853d00000001sv*sd*bc*sc*i*) +Supplements: modalias(pci:v0000FFFDd00000101sv*sd*bc*sc*i*) +%{?systemd_ordering} + +%description guest-agent +This package contains the QEMU guest agent. It is installed in the linux guest +to provide information and control at the guest OS level. + +%files guest-agent +%defattr(-, root, root) +%attr(0755,root,kvm) %_bindir/qemu-ga +%_mandir/man8/qemu-ga.8.gz +%{_unitdir}/qemu-guest-agent.service +/usr/lib/udev/rules.d/80-qemu-ga.rules + +%pre guest-agent +%service_add_pre qemu-guest-agent.service + +%post guest-agent +%service_add_post qemu-guest-agent.service +if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl start qemu-guest-agent.service || : +fi + +%preun guest-agent +if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl stop qemu-guest-agent.service || : +fi + +%postun guest-agent +%service_del_postun_without_restart qemu-guest-agent.service +if [ "$1" = "1" ] ; then + if [ -e /dev/virtio-ports/org.qemu.guest_agent.0 ]; then + /usr/bin/systemctl restart qemu-guest-agent.service || : + fi +fi + +%package ksm +Summary: Kernel Samepage Merging services +Group: System/Emulators/PC +Requires(pre): coreutils +Requires(post): coreutils + +%description ksm +Kernel Samepage Merging (KSM) is a memory-saving de-duplication feature, that +merges anonymous (private) pages (not pagecache ones). + +This package provides a service file for starting and stopping KSM. + +%files ksm +%defattr(-, root, root) +%{_unitdir}/ksm.service + +%pre ksm +%service_add_pre ksm.service + +%post ksm +%service_add_post ksm.service + +%preun ksm +%service_del_preun ksm.service + +%postun ksm +%service_del_postun ksm.service + +%package accel-tcg-x86 +Summary: TCG accelerator for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description accel-tcg-x86 +TCG is the QEMU binary translator, responsible for converting from target to +host instruction set. + +This package provides the TCG accelerator for QEMU. + +%files accel-tcg-x86 +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/accel-tcg-i386.so +%_libdir/%name/accel-tcg-x86_64.so + +%package accel-qtest +Summary: QTest accelerator for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description accel-qtest +QTest is a device emulation testing framework. It is useful to test device +models. + +This package provides QTest accelerator for testing QEMU. + +%files accel-qtest +%defattr(-, root, root) +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/accel-qtest-aarch64.so +%_libdir/%name/accel-qtest-alpha.so +%_libdir/%name/accel-qtest-arm.so +%_libdir/%name/accel-qtest-avr.so +%_libdir/%name/accel-qtest-cris.so +%_libdir/%name/accel-qtest-hppa.so +%_libdir/%name/accel-qtest-i386.so +%_libdir/%name/accel-qtest-loongarch64.so +%_libdir/%name/accel-qtest-m68k.so +%_libdir/%name/accel-qtest-microblaze.so +%_libdir/%name/accel-qtest-microblazeel.so +%_libdir/%name/accel-qtest-mips.so +%_libdir/%name/accel-qtest-mips64.so +%_libdir/%name/accel-qtest-mips64el.so +%_libdir/%name/accel-qtest-mipsel.so +%_libdir/%name/accel-qtest-nios2.so +%_libdir/%name/accel-qtest-or1k.so +%_libdir/%name/accel-qtest-ppc.so +%_libdir/%name/accel-qtest-ppc64.so +%_libdir/%name/accel-qtest-riscv32.so +%_libdir/%name/accel-qtest-riscv64.so +%_libdir/%name/accel-qtest-rx.so +%_libdir/%name/accel-qtest-s390x.so +%_libdir/%name/accel-qtest-sh4.so +%_libdir/%name/accel-qtest-sh4eb.so +%_libdir/%name/accel-qtest-sparc.so +%_libdir/%name/accel-qtest-sparc64.so +%_libdir/%name/accel-qtest-tricore.so +%_libdir/%name/accel-qtest-x86_64.so +%_libdir/%name/accel-qtest-xtensa.so +%_libdir/%name/accel-qtest-xtensaeb.so + +%if 0%{?with_rbd} +%package block-rbd +Summary: Rados Block Device (Ceph) support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description block-rbd +This package contains a module for accessing ceph (rbd,rados) image files +for QEMU. + +%files block-rbd +%defattr(-, root, root) +%dir %_libdir/%name +%_libdir/%name/block-rbd.so +# End of "if with_rbd" %endif -%ifarch ppc -%define qemu_arch ppc -%endif -%ifarch ppc64 -%define qemu_arch ppc64 -%endif -%ifarch ppc64le -%define qemu_arch ppc64le + +%if %{legacy_qemu_kvm} +%package kvm +Summary: Wrapper to enable KVM acceleration under QEMU +Group: System/Emulators/PC +%ifarch %ix86 x86_64 +Requires: qemu-x86 = %{version} %endif %ifarch s390x -%define qemu_arch s390x +Requires: qemu-s390x = %{version} +%endif +Provides: kvm = %{version} +Obsoletes: kvm < %{version} + +%description kvm +%{generic_qemu_description} + +This package provides a symlink to the main QEMU emulator used for KVM +virtualization. The symlink is named qemu-kvm, which causes the QEMU program +to enable the KVM accelerator, due to the name reference ending with 'kvm'. +This package is an artifact of the early origins of QEMU, and is deprecated. + +%files kvm +%defattr(-,root,root) +%_bindir/qemu-kvm +%doc %_docdir/qemu-kvm +%_mandir/man1/qemu-kvm.1.gz +# End of "if legacy_qemu_kvm" %endif -%ifarch %ix86 x86_64 %arm aarch64 ppc ppc64 ppc64le s390x -%ifnarch %arm -%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null -%endif +%if %{build_ppc_firmware} +%package SLOF +Summary: Slimline Open Firmware - SLOF +Group: System/Emulators/PC +BuildArch: noarch + +%description SLOF +Slimline Open Firmware (SLOF) is an implementation of the IEEE 1275 standard. +It can be used as partition firmware for pSeries machines running on QEMU or KVM. + +%files SLOF +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/slof.bin + +%package skiboot +Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems +Group: System/Emulators/PC +BuildArch: noarch +Requires(post): update-alternatives +Requires(postun):update-alternatives + +%description skiboot +Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as +traditionally packaged with QEMU. + +%files skiboot +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/skiboot.lid +%_datadir/%name/skiboot.lid.qemu +%ghost %_sysconfdir/alternatives/skiboot.lid + +%post skiboot +update-alternatives --install \ + %{_datadir}/%name/skiboot.lid skiboot.lid %{_datadir}/%name/skiboot.lid.qemu 15 + +%preun skiboot +if [ ! -f %{_datadir}/%name/skiboot.lid.qemu ] ; then + update-alternatives --remove skiboot.lid %{_datadir}/%name/skiboot.lid.qemu +fi +# End of "if build_ppc_firmware" %endif -%make_build check-softfloat -# End of the checks for qemu-linux-user +%if %{build_x86_firmware} +%package microvm +Summary: x86 MicroVM firmware for QEMU +Group: System/Emulators/PC +BuildArch: noarch + +%description microvm +This package provides minimal x86 firmware for booting certain guests under +QEMU. qboot provides the minimum resources needed to boot PVH and bzImages. +bios-microvm, created from a minimal seabios configuration, provides slightly +wider support than qboot, but still focuses on quick boot up. + +%files microvm +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/bios-microvm.bin +%_datadir/%name/qboot.rom +%package seabios +Summary: x86 Legacy BIOS for QEMU +Group: System/Emulators/PC +Version: %{sbver} +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description seabios +SeaBIOS is an open source implementation of a 16bit x86 BIOS. SeaBIOS +is the default and legacy BIOS for QEMU. + +%files seabios +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/bios.bin +%_datadir/%name/bios-256k.bin +%_datadir/%name/firmware/50-seabios-256k.json +%_datadir/%name/firmware/60-seabios-128k.json +%license roms/seabios/COPYING +%doc %_docdir/qemu-seabios + +%package vgabios +Summary: VGA BIOSes for QEMU +Group: System/Emulators/PC +Version: %{sbver} +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description vgabios +VGABIOS provides the video ROM BIOSes for the following variants of VGA +emulated devices: Std VGA, QXL, Cirrus CLGD 5446 and VMware emulated +video card. For use with QEMU. + +%files vgabios +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/vgabios.bin +%_datadir/%name/vgabios-ati.bin +%_datadir/%name/vgabios-bochs-display.bin +%_datadir/%name/vgabios-cirrus.bin +%_datadir/%name/vgabios-qxl.bin +%_datadir/%name/vgabios-ramfb.bin +%_datadir/%name/vgabios-stdvga.bin +%_datadir/%name/vgabios-virtio.bin +%_datadir/%name/vgabios-vmware.bin +%license roms/seabios/COPYING + +%package sgabios +Summary: Serial Graphics Adapter BIOS for QEMU +Group: System/Emulators/PC +Version: 8 +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description sgabios +The Google Serial Graphics Adapter BIOS or SGABIOS provides a means for legacy +x86 software to communicate with an attached serial console as if a video card +were attached. For use with QEMU. + +%files sgabios +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/sgabios.bin + +%package ipxe +Summary: PXE ROMs for QEMU NICs +Group: System/Emulators/PC +Version: 1.0.0+ +Release: 0 +BuildArch: noarch +Conflicts: %name < 1.6.0 + +%description ipxe +Provides Preboot Execution Environment (PXE) ROM support for various emulated +network adapters available with QEMU. + +%files ipxe +%defattr(-, root, root) +%dir %_datadir/%name +%_datadir/%name/efi-e1000.rom +%_datadir/%name/efi-e1000e.rom +%_datadir/%name/efi-eepro100.rom +%_datadir/%name/efi-ne2k_pci.rom +%_datadir/%name/efi-pcnet.rom +%_datadir/%name/efi-rtl8139.rom +%_datadir/%name/efi-virtio.rom +%_datadir/%name/efi-vmxnet3.rom +%_datadir/%name/pxe-e1000.rom +%_datadir/%name/pxe-eepro100.rom +%_datadir/%name/pxe-ne2k_pci.rom +%_datadir/%name/pxe-pcnet.rom +%_datadir/%name/pxe-rtl8139.rom +%_datadir/%name/pxe-virtio.rom +# End of "if build_x86_firmware" %endif %changelog -- 2.51.1 From 78c0f9d285d2c3621654836474c021d27c2badc5 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 26 Apr 2023 14:44:59 +0200 Subject: [PATCH 004/102] [openSUSE][OBS] Add OBS workflow Create a rebuild (for pushes) and a pull request workflow. Signed-off-by: Dario Faggioli --- .obs/workflows.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .obs/workflows.yml diff --git a/.obs/workflows.yml b/.obs/workflows.yml new file mode 100644 index 0000000000..839da02d8a --- /dev/null +++ b/.obs/workflows.yml @@ -0,0 +1,16 @@ +pr_workflow: + steps: + - branch_package: + source_project: Virtualization:Staging + source_package: qemu + target_project: Virtualization:Staging:PRs + filters: + event: pull_request +rebuild_workflow: + steps: + # Will automatically rebuild the package + - trigger_services: + project: Virtualization:Staging + package: qemu + filters: + event: push -- 2.51.1 From 1d1fd9d45ac4f3f08e828005c31e84da1205b6f3 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 12 May 2023 13:33:33 +0200 Subject: [PATCH 005/102] [openSUSE][RPM] Spec file adjustments for 8.0.0 (and later) The sgabios submodule is no longer there, so let's get rid of any reference to it from our spec files. Remove no longer supported './configure' options. We're also not set yet for using the set_version service, so we need to update the following manually: - the Version: tags in the spec files - the rpm/seabios_version and rpm/skiboot_version files (see qemu.spec for instructions on how to do that) - the %{sbver} variable in rpm/common.inc A better solution for handling this aspect is being worked on. Signed-off-by: Dario Faggioli --- rpm/common.inc | 2 +- rpm/qemu-linux-user.spec | 23 +++++--------------- rpm/qemu.spec | 47 +++++++--------------------------------- 3 files changed, 15 insertions(+), 57 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index c8b43c2d12..7cfb44518a 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -1,6 +1,6 @@ %define _buildshell /bin/bash -%define sbver 1.16.0_0_gd239552 +%define sbver 1.16.2_3_gd478f380 %define srcdir %{_builddir}/%buildsubdir %define blddir %srcdir/build diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 35e0744702..81edbd101c 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for package qemu-linux-user # # Copyright (c) 2023 SUSE LLC # @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %include %{_sourcedir}/common.inc %ifarch %ix86 x86_64 s390x @@ -26,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 7.1.0 +Version: 8.0.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -34,6 +35,7 @@ Source200: qemu-rpmlintrc Source303: README.PACKAGING Source1000: qemu-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: bison BuildRequires: glib2-devel-static >= 2.56 BuildRequires: glibc-devel-static BuildRequires: (pcre-devel-static if glib2-devel-static < 2.73 else pcre2-devel-static) @@ -45,8 +47,8 @@ BuildRequires: zlib-devel-static #!BuildIgnore: post-build-checks %endif BuildRequires: fdupes +BuildRequires: flex BuildRequires: gcc-c++ -BuildRequires: git-core BuildRequires: meson BuildRequires: ninja >= 1.7 BuildRequires: perl-Text-Markdown @@ -114,18 +116,6 @@ cp %{rpmfilesdir}/supported.s390.txt docs/supported.rst sed -i '/^\ \ \ about\/index.*/i \ \ \ supported.rst' docs/index.rst %endif -# When generating an upstream release tarball, the following commands -# are run (see scripts/make-release): -# (cd roms/seabios && git describe --tags --long --dirty > .version) -# (cd roms/skiboot && ./make_version.sh > .version) -# This has not happened for the archive we're using, since it's cloned -# from a git branch. We, therefore, assumed that the following commands -# have been run, and the result committed to the repository (with seabios -# and skiboot at the proper commit/tag/...): -# (cd roms/seabios && git describe --tags --long --dirty > rpm/seabios_version) -# (cd roms/skiboot && ./make_version.sh > rpm/skiboot_version) -cp %{rpmfilesdir}/seabios_version roms/seabios/.version -cp %{rpmfilesdir}/skiboot_version roms/skiboot/.version find . -iname ".git" -exec rm -rf {} + mkdir -p %blddir @@ -160,7 +150,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --libexecdir=%_libexecdir \ --localstatedir=%_localstatedir \ --prefix=%_prefix \ - --python=%_bindir/python3 \ + --python=%_bindir/python3 \ --sysconfdir=%_sysconfdir \ --with-git-submodules=ignore \ --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ @@ -281,7 +271,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-vhost-vdpa \ --disable-virglrenderer \ --disable-virtfs \ - --disable-virtiofsd \ --disable-vnc \ --disable-vnc-jpeg \ --disable-vnc-sasl \ diff --git a/rpm/qemu.spec b/rpm/qemu.spec index d2eadc26be..ba5ef75407 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1,5 +1,5 @@ # -# spec file +# spec file for package qemu # # Copyright (c) 2023 SUSE LLC # @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %include %{_sourcedir}/common.inc # So, we have openSUSE:Factory, and we have "ports". In openSUSE:Factory, we @@ -81,11 +82,10 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 7.1.0 +Version: 8.0.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -Source200: qemu-rpmlintrc Source303: README.PACKAGING Source1000: qemu-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -269,6 +269,7 @@ Suggests: qemu-lang Suggests: qemu-microvm Suggests: qemu-skiboot Suggests: qemu-vhost-user-gpu +Obsoletes: qemu-sgabios <= 8 Obsoletes: qemu-audio-oss < %{version} Obsoletes: qemu-audio-sdl < %{version} Obsoletes: qemu-ui-sdl < %{version} @@ -312,10 +313,8 @@ This package acts as an umbrella package to the other QEMU sub-packages. %_datadir/%name/qemu-ifup %_datadir/%name/qemu-nsis.bmp %_datadir/%name/trace-events-all -%_datadir/%name/vhost-user/50-qemu-virtiofsd.json %_mandir/man1/%name.1.gz %_mandir/man1/qemu-storage-daemon.1.gz -%_mandir/man1/virtiofsd.1.gz %_mandir/man7/qemu-block-drivers.7.gz %_mandir/man7/qemu-cpu-models.7.gz %_mandir/man7/qemu-qmp-ref.7.gz @@ -382,7 +381,7 @@ Conflicts: qemu-tools > %{version}-%{release} multiboot_dma.bin kvmvapic.bin pvh.bin} %define x86_extra_firmware {bios.bin bios-256k.bin bios-microvm.bin qboot.rom \ pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom \ -pxe-virtio.rom sgabios.bin vgabios-ati.bin vgabios-bochs-display.bin \ +pxe-virtio.rom vgabios-ati.bin vgabios-bochs-display.bin \ vgabios.bin vgabios-cirrus.bin vgabios-qxl.bin vgabios-ramfb.bin \ vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin \ efi-e1000.rom efi-e1000e.rom efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom \ @@ -607,7 +606,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-vhost-vdpa \ --disable-virglrenderer \ --disable-virtfs \ - --disable-virtiofsd \ --disable-vnc \ --disable-vnc-jpeg \ --disable-vnc-sasl \ @@ -702,8 +700,8 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-replication \ --enable-seccomp \ --enable-selinux \ + --enable-slirp \ --enable-slirp-smbd \ - --enable-slirp=system \ --enable-smartcard \ --enable-snappy \ --enable-spice \ @@ -723,7 +721,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-vhost-vdpa \ --enable-virglrenderer \ --enable-virtfs \ - --enable-virtiofsd \ --enable-vnc \ --enable-vnc-jpeg \ --enable-vnc-sasl \ @@ -803,16 +800,8 @@ popd %make_build -C %srcdir/roms pxerom -%make_build -C %srcdir/roms efirom \ - EDK2_BASETOOLS_OPTFLAGS='-fPIE' - -# We're currently not building firmware on ix86, but let's make sure this works -# fine if one enables it, e.g., locally (for debugging or something). -# FIXME: check if we can get rid or upstream: roms-sgabios-Fix-csum8-to-be-built-by-ho.patch -make -C %srcdir/roms sgabios HOSTCC=cc \ -%ifnarch %ix86 x86_64 - CC=x86_64-suse-linux-gcc LD=x86_64-suse-linux-ld \ -%endif +%make_build -C %srcdir/roms edk2-basetools EXTRA_OPTFLAGS='-fPIE' +%make_build -C %srcdir/roms efirom %if %{force_fit_virtio_pxe_rom} pushd %srcdir @@ -1021,7 +1010,6 @@ Requires: %name = %{version} Requires: qemu-accel-tcg-x86 Requires: qemu-ipxe Requires: qemu-seabios -Requires: qemu-sgabios Requires: qemu-vgabios %ifarch x86_64 Requires: qemu-ovmf-x86_64 @@ -1621,7 +1609,6 @@ a virtfs helper, ivshmem, disk utilities and scripts for various purposes. %_bindir/vmxcap %verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper %_libexecdir/virtfs-proxy-helper -%_libexecdir/virtiofsd %_mandir/man1/qemu-img.1.gz %_mandir/man1/virtfs-proxy-helper.1.gz %_mandir/man8/qemu-nbd.8.gz @@ -1943,24 +1930,6 @@ video card. For use with QEMU. %_datadir/%name/vgabios-vmware.bin %license roms/seabios/COPYING -%package sgabios -Summary: Serial Graphics Adapter BIOS for QEMU -Group: System/Emulators/PC -Version: 8 -Release: 0 -BuildArch: noarch -Conflicts: %name < 1.6.0 - -%description sgabios -The Google Serial Graphics Adapter BIOS or SGABIOS provides a means for legacy -x86 software to communicate with an attached serial console as if a video card -were attached. For use with QEMU. - -%files sgabios -%defattr(-, root, root) -%dir %_datadir/%name -%_datadir/%name/sgabios.bin - %package ipxe Summary: PXE ROMs for QEMU NICs Group: System/Emulators/PC -- 2.51.1 From 10ac03fde80381345aa1481ad2b3a76afe904494 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Sat, 19 Nov 2016 08:06:30 -0700 Subject: [PATCH 006/102] [openSUSE] roms/Makefile: pass a packaging timestamp to subpackages with date info (bsc#1011213) Certain rom subpackages build from qemu git-submodules call the date program to include date information in the packaged binaries. This causes repeated builds of the package to be different, wkere the only real difference is due to the fact that time build timestamp has changed. To promote reproducible builds and avoid customers being prompted to update packages needlessly, we'll use the timestamp of the VERSION file as the packaging timestamp for all packages that build in a timestamp for whatever reason. References: bsc#1011213 Signed-off-by: Bruce Rogers --- roms/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/roms/Makefile b/roms/Makefile index dfed2b216a..d502164831 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -54,6 +54,12 @@ EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom -include edk2-version +# NB: Certain SUSE qemu subpackages use date information, but we want +# reproducible builds, so we use a pre-determined timestamp, rather +# than the current timestamp to acheive consistent results build to +# build. +PACKAGING_TIMESTAMP = $(shell date -r ../VERSION +%s) + default help: @echo "nothing is build by default" @echo "available build targets:" @@ -121,16 +127,20 @@ efi-rom-%: build-pxe-roms build-efi-roms edk2-basetools build-pxe-roms: $(MAKE) -C ipxe/src CONFIG=qemu \ + PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \ CROSS_COMPILE=$(x86_64_cross_prefix) \ $(patsubst %,bin/%.rom,$(pxerom_targets)) build-efi-roms: build-pxe-roms $(MAKE) -C ipxe/src CONFIG=qemu \ + PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \ CROSS_COMPILE=$(x86_64_cross_prefix) \ $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets)) slof: - $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu + $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) \ + PACKAGING_TIMESTAMP=$(PACKAGING_TIMESTAMP) \ + qemu cp SLOF/boot_rom.bin ../pc-bios/slof.bin u-boot.e500: -- 2.51.1 From 2148d37a96147b5f0274ef8c37010e526d01dff2 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Mon, 23 Nov 2020 07:13:23 -0700 Subject: [PATCH 007/102] [openSUSE] roms/Makefile: add --cross-file to qboot meson setup for aarch64 We add a --cross-file reference so that we can do cross compilation of qboot from an aarch64 build. Signed-off-by: Bruce Rogers Signed-off-by: Dario Faggioli --- roms/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/Makefile b/roms/Makefile index d502164831..eebb430be9 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -191,7 +191,7 @@ MESON = meson NINJA = ninja qboot: mkdir -p qboot/build - $(MESON) setup $(if $(wildcard qboot/build/meson-private),--wipe,) qboot qboot/build + $(MESON) setup $(if $(x86_64_cross_prefix),--cross-file qboot/cross.ini,) $(if $(wildcard qboot/build/meson-private),--wipe,) qboot qboot/build $(NINJA) -C qboot/build cp qboot/build/bios.bin ../pc-bios/qboot.rom -- 2.51.1 From 8d21f521420eee3ce0906a5278ded1757c0aaabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 10 Aug 2016 19:00:24 +0200 Subject: [PATCH 008/102] [openSUSE] qemu-binfmt-conf: Modify default path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change QEMU_PATH from /usr/local/bin to /usr/bin prefix. Signed-off-by: Andreas Färber --- scripts/qemu-binfmt-conf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 6ef9f118d9..4115eaa121 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -341,7 +341,7 @@ BINFMT_SET=qemu_register_interpreter SYSTEMDDIR="/etc/binfmt.d" DEBIANDIR="/usr/share/binfmts" -QEMU_PATH=/usr/local/bin +QEMU_PATH=/usr/bin CREDENTIAL=no PERSISTENT=no PRESERVE_ARG0=no -- 2.51.1 From 4a1954dd1fac86b2d9308aac1bd7f0bc4912c027 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Tue, 9 Oct 2012 09:06:49 +0200 Subject: [PATCH 009/102] [openSUSE] linux-user: use target_ulong Linux syscalls pass pointers or data length or other information of that sort to the kernel. This is all stuff you don't want to have sign extended. Otherwise a host 64bit variable parameter with a size parameter will extend it to a negative number, breaking lseek for example. Pass syscall arguments as ulong always. Signed-off-by: Alexander Graf [JRZ: changes from linux-user/qemu.h wass moved to linux-user/user-internals.h] Signed-off-by: Jose R Ziviani [DF: Forward port, i.e., use ulong for do_prctl too] Signed-off-by: Dario Faggioli --- linux-user/syscall.c | 20 ++++++++++---------- linux-user/user-internals.h | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9d5415674d..3b82e48b2a 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6341,8 +6341,8 @@ static abi_long do_prctl_inval1(CPUArchState *env, abi_long arg2) #define do_prctl_sme_set_vl do_prctl_inval1 #endif -static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2, - abi_long arg3, abi_long arg4, abi_long arg5) +static abi_long do_prctl(CPUArchState *env, abi_ulong option, abi_ulong arg2, + abi_ulong arg3, abi_ulong arg4, abi_ulong arg5) { abi_long ret; @@ -9082,10 +9082,10 @@ _syscall5(int, sys_move_mount, int, __from_dfd, const char *, __from_pathname, * of syscall results, can be performed. * All errnos that do_syscall() returns must be -TARGET_. */ -static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, - abi_long arg2, abi_long arg3, abi_long arg4, - abi_long arg5, abi_long arg6, abi_long arg7, - abi_long arg8) +static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_ulong arg1, + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8) { CPUState *cpu = env_cpu(cpu_env); abi_long ret; @@ -13755,10 +13755,10 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, return ret; } -abi_long do_syscall(CPUArchState *cpu_env, int num, abi_long arg1, - abi_long arg2, abi_long arg3, abi_long arg4, - abi_long arg5, abi_long arg6, abi_long arg7, - abi_long arg8) +abi_long do_syscall(CPUArchState *cpu_env, int num, abi_ulong arg1, + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8) { CPUState *cpu = env_cpu(cpu_env); abi_long ret; diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index 5c7f173ceb..af3aa7ab6e 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -60,10 +60,10 @@ int info_is_fdpic(struct image_info *info); void target_set_brk(abi_ulong new_brk); void syscall_init(void); -abi_long do_syscall(CPUArchState *cpu_env, int num, abi_long arg1, - abi_long arg2, abi_long arg3, abi_long arg4, - abi_long arg5, abi_long arg6, abi_long arg7, - abi_long arg8); +abi_long do_syscall(CPUArchState *cpu_env, int num, abi_ulong arg1, + abi_ulong arg2, abi_ulong arg3, abi_ulong arg4, + abi_ulong arg5, abi_ulong arg6, abi_ulong arg7, + abi_ulong arg8); extern __thread CPUState *thread_cpu; G_NORETURN void cpu_loop(CPUArchState *env); abi_long get_errno(abi_long ret); -- 2.51.1 From 13d1662b4399dbbc4b823e19fe62807c9ce89ae5 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 13 Dec 2012 14:29:22 +0100 Subject: [PATCH 010/102] [openSUSE] linux-user: lseek: explicitly cast non-set offsets to signed When doing lseek, SEEK_SET indicates that the offset is an unsigned variable. Other seek types have parameters that can be negative. When converting from 32bit to 64bit parameters, we need to take this into account and enable SEEK_END and SEEK_CUR to be negative, while SEEK_SET stays absolute positioned which we need to maintain as unsigned. Signed-off-by: Alexander Graf --- linux-user/syscall.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3b82e48b2a..c9999747bb 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9399,8 +9399,13 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_ulong arg1, return ret; #endif #ifdef TARGET_NR_lseek - case TARGET_NR_lseek: - return get_errno(lseek(arg1, arg2, arg3)); + case TARGET_NR_lseek: { + off_t off = arg2; + if (arg3 != SEEK_SET) { + off = (abi_long)arg2; + } + return get_errno(lseek(arg1, off, arg3)); + } #endif #if defined(TARGET_NR_getxpid) && defined(TARGET_ALPHA) /* Alpha specific */ -- 2.51.1 From 3c8f379da82cfc46eb396976fa8ce7b4c2a65040 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 6 Jan 2012 01:05:55 +0100 Subject: [PATCH 011/102] [openSUSE] PPC: KVM: Disable mmu notifier check When using hugetlbfs (which is required for HV mode KVM on 970), we check for MMU notifiers that on 970 can not be implemented properly. So disable the check for mmu notifiers on PowerPC guests, making KVM guests work there, even if possibly racy in some odd circumstances. Signed-off-by: Bruce Rogers --- system/physmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/physmem.c b/system/physmem.c index 94600a33ec..d39f9250eb 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -1977,11 +1977,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, return NULL; } +#ifndef TARGET_PPC if (kvm_enabled() && !kvm_has_sync_mmu()) { error_setg(errp, "host lacks kvm mmu notifiers, -mem-path unsupported"); return NULL; } +#endif size = TARGET_PAGE_ALIGN(size); size = REAL_HOST_PAGE_ALIGN(size); -- 2.51.1 From 5e7588a559ba4f638a8392d0c83130c93576c475 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Thu, 1 Apr 2010 17:36:23 +0200 Subject: [PATCH 012/102] [openSUSE] Make char muxer more robust wrt small FIFOs Virtio-Console can only process one character at a time. Using it on S390 gave me strange "lags" where I got the character I pressed before when pressing one. So I typed in "abc" and only received "a", then pressed "d" but the guest received "b" and so on. While the stdio driver calls a poll function that just processes on its queue in case virtio-console can't take multiple characters at once, the muxer does not have such callbacks, so it can't empty its queue. To work around that limitation, I introduced a new timer that only gets active when the guest can not receive any more characters. In that case it polls again after a while to check if the guest is now receiving input. This patch fixes input when using -nographic on s390 for me. [AF: Rebased for v2.7.0-rc2] [BR: minor edits to pass qemu's checkpatch script] Signed-off-by: Bruce Rogers --- chardev/char-fe.c | 1 + chardev/char-mux.c | 16 ++++++++++++++++ chardev/char.c | 1 + chardev/chardev-internal.h | 3 +++ tests/unit/test-char.c | 1 + 5 files changed, 22 insertions(+) diff --git a/chardev/char-fe.c b/chardev/char-fe.c index b214ba3802..d36435bea4 100644 --- a/chardev/char-fe.c +++ b/chardev/char-fe.c @@ -21,6 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" diff --git a/chardev/char-mux.c b/chardev/char-mux.c index ee2d47b20d..5a7c66e746 100644 --- a/chardev/char-mux.c +++ b/chardev/char-mux.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" @@ -198,6 +199,17 @@ static void mux_chr_accept_input(Chardev *chr) be->chr_read(be->opaque, &d->buffer[m][d->cons[m]++ & MUX_BUFFER_MASK], 1); } + +#if defined(TARGET_S390X) + /* + * We're still not able to sync producer and consumer, so let's wait a bit + * and try again by then. + */ + if (d->prod[m] != d->cons[m]) { + qemu_mod_timer(d->accept_timer, qemu_get_clock_ns(vm_clock) + + (int64_t)100000); + } +#endif } static int mux_chr_can_read(void *opaque) @@ -332,6 +344,10 @@ static void qemu_chr_open_mux(Chardev *chr, } d->focus = -1; +#if defined(TARGET_S390X) + d->accept_timer = qemu_new_timer_ns(vm_clock, + (QEMUTimerCB *)mux_chr_accept_input, chr); +#endif /* only default to opened state if we've realized the initial * set of muxes */ diff --git a/chardev/char.c b/chardev/char.c index ba847b6e9e..163c767f72 100644 --- a/chardev/char.c +++ b/chardev/char.c @@ -22,6 +22,7 @@ * THE SOFTWARE. */ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include "qemu/cutils.h" #include "monitor/monitor.h" diff --git a/chardev/chardev-internal.h b/chardev/chardev-internal.h index 4e03af3147..ae5738ae4e 100644 --- a/chardev/chardev-internal.h +++ b/chardev/chardev-internal.h @@ -37,6 +37,9 @@ struct MuxChardev { Chardev parent; CharBackend *backends[MAX_MUX]; CharBackend chr; +#if defined(TARGET_S390X) + QEMUTimer *accept_timer; +#endif int focus; int mux_cnt; int term_got_escape; diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c index f273ce5226..771dc46a7a 100644 --- a/tests/unit/test-char.c +++ b/tests/unit/test-char.c @@ -1,3 +1,4 @@ +#define HW_POISON_H /* avoid poison since we patch against rules it "enforces" */ #include "qemu/osdep.h" #include -- 2.51.1 From 8e75e84e751726dd4c5acedf6ee9629f22cf1b9d Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 2 Aug 2016 11:36:02 -0600 Subject: [PATCH 013/102] [openSUSE] qemu-bridge-helper: reduce security profile (boo#988279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change from using glib alloc and free routines to those from libc. Also perform safety measure of dropping privs to user if configured no-caps. References: boo#988279 Signed-off-by: Bruce Rogers [AF: Rebased for v2.7.0-rc2] Signed-off-by: Andreas Färber --- qemu-bridge-helper.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index a26e1663f0..f3483b0a34 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -124,7 +124,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) } if (strcmp(cmd, "deny") == 0) { - acl_rule = g_malloc(sizeof(*acl_rule)); + acl_rule = calloc(1, sizeof(*acl_rule)); + if (!acl_rule) { + fclose(f); + errno = ENOMEM; + return -1; + } if (strcmp(arg, "all") == 0) { acl_rule->type = ACL_DENY_ALL; } else { @@ -133,7 +138,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list) } QSIMPLEQ_INSERT_TAIL(acl_list, acl_rule, entry); } else if (strcmp(cmd, "allow") == 0) { - acl_rule = g_malloc(sizeof(*acl_rule)); + acl_rule = calloc(1, sizeof(*acl_rule)); + if (!acl_rule) { + fclose(f); + errno = ENOMEM; + return -1; + } if (strcmp(arg, "all") == 0) { acl_rule->type = ACL_ALLOW_ALL; } else { @@ -438,6 +448,18 @@ int main(int argc, char **argv) goto cleanup; } +#ifndef CONFIG_LIBCAP + /* + * avoid sending the fd as root user if running suid to not fool + * peer credentials to daemons that dont expect that + */ + if (setuid(getuid()) < 0) { + fprintf(stderr, "Failed to drop privileges.\n"); + ret = EXIT_FAILURE; + goto cleanup; + } +#endif + /* write fd to the domain socket */ if (send_fd(unixfd, fd) == -1) { fprintf(stderr, "failed to write fd to unix socket: %s\n", @@ -459,7 +481,7 @@ cleanup: } while ((acl_rule = QSIMPLEQ_FIRST(&acl_list)) != NULL) { QSIMPLEQ_REMOVE_HEAD(&acl_list, entry); - g_free(acl_rule); + free(acl_rule); } return ret; -- 2.51.1 From 2bd05dd1c261203d79d251dc41073fdf4a0098a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 15 Jan 2012 19:53:49 +0100 Subject: [PATCH 014/102] [openSUSE] Raise soft address space limit to hard limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For SLES we want users to be able to use large memory configurations with KVM without fiddling with ulimit -Sv. Signed-off-by: Andreas Färber [BR: add include for sys/resource.h] Signed-off-by: Bruce Rogers --- system/vl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/system/vl.c b/system/vl.c index 01b8b8e77a..7b0a45bbaa 100644 --- a/system/vl.c +++ b/system/vl.c @@ -42,6 +42,7 @@ #include "sysemu/reset.h" #include "sysemu/runstate.h" #include "sysemu/runstate-action.h" +#include #include "sysemu/seccomp.h" #include "sysemu/tcg.h" #include "sysemu/xen.h" @@ -2757,6 +2758,17 @@ void qemu_init(int argc, char **argv) MachineClass *machine_class; bool userconfig = true; FILE *vmstate_dump_file = NULL; + struct rlimit rlimit_as; + + /* + * Try to raise the soft address space limit. + * Default on SLES 11 SP2 is 80% of physical+swap memory. + */ + getrlimit(RLIMIT_AS, &rlimit_as); + if (rlimit_as.rlim_cur < rlimit_as.rlim_max) { + rlimit_as.rlim_cur = rlimit_as.rlim_max; + setrlimit(RLIMIT_AS, &rlimit_as); + } qemu_add_opts(&qemu_drive_opts); qemu_add_drive_opts(&qemu_legacy_drive_opts); -- 2.51.1 From dc213a284de8fc60b306dfe7eb5378f6755bf520 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 9 Mar 2016 15:18:11 -0700 Subject: [PATCH 015/102] [openSUSE] xen_disk: Add suse specific flush disable handling and map to QEMU equiv (bsc#879425) Add code to read the suse specific suse-diskcache-disable-flush flag out of xenstore, and set the equivalent flag within QEMU. Patch taken from Xen's patch queue, Olaf Hering being the original author. [bsc#879425] [BR: minor edits to pass qemu's checkpatch script] [BR: With qdevification of xen-block, code has changed significantly] Signed-off-by: Bruce Rogers Signed-off-by: Olaf Hering --- hw/block/xen-block.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index aed1d5c330..2f12253ba5 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -874,6 +874,8 @@ static XenBlockDrive *xen_block_drive_create(const char *id, const char *mode = qdict_get_try_str(opts, "mode"); const char *direct_io_safe = qdict_get_try_str(opts, "direct-io-safe"); const char *discard_enable = qdict_get_try_str(opts, "discard-enable"); + const char *suse_diskcache_disable_flush = qdict_get_try_str(opts, + "suse-diskcache-disable-flush"); char *driver = NULL; char *filename = NULL; XenBlockDrive *drive = NULL; @@ -954,6 +956,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id, } } + if (suse_diskcache_disable_flush) { + unsigned long value; + if (!qemu_strtoul(suse_diskcache_disable_flush, NULL, 2, &value) && !!value) { + QDict *cache_qdict = qdict_new(); + + qdict_put_bool(cache_qdict, "no-flush", true); + qdict_put_obj(file_layer, "cache", QOBJECT(cache_qdict)); + } + } + /* * It is necessary to turn file locking off as an emulated device * may have already opened the same image file. -- 2.51.1 From 1efaf88a112f73db8d6fbc8a8920fb400089f7e1 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Wed, 16 Jan 2019 16:29:36 -0700 Subject: [PATCH 016/102] [openSUSE] xen: add block resize support for xen disks Provide monitor naming of xen disks, and plumb guest driver notification through xenstore of resizing instigated via the monitor. [BR: minor edits to pass qemu's checkpatch script] [BR: significant rework needed due to upstream xen disk qdevification] [BR: At this point, monitor_add_blk call is all we need to add!] Signed-off-by: Bruce Rogers --- hw/block/xen-block.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c index 2f12253ba5..f0fb3d305d 100644 --- a/hw/block/xen-block.c +++ b/hw/block/xen-block.c @@ -418,6 +418,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp) xen_block_set_size(blockdev); + if (!monitor_add_blk(conf->blk, blockdev->drive->id, errp)) { + return; + } blockdev->dataplane = xen_block_dataplane_create(xendev, blk, conf->logical_block_size, blockdev->props.iothread); -- 2.51.1 From 97ce11ff766ba3423ace30d219deba21a2d32994 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 8 Jan 2019 14:20:08 +0100 Subject: [PATCH 017/102] [openSUSE] xen: ignore live parameter from xen-save-devices-state (bsc#1079730, bsc#1101982, bsc#106399) The final step of xl migrate|save for an HVM domU is saving the state of qemu. This also involves releasing all block devices. While releasing backends ought to be a separate step, such functionality is not implemented. Unfortunately, releasing the block devices depends on the optional 'live' option. This breaks offline migration with 'virsh migrate domU dom0' because the sending side does not release the disks, as a result the receiving side can not properly claim write access to the disks. As a minimal fix, remove the dependency on the 'live' option. Upstream may fix this in a different way, like removing the newly added 'live' parameter entirely. Fixes: 5d6c599fe1 ("migration, xen: Fix block image lock issue on live migration") Signed-off-by: Olaf Hering References: bsc#1079730, bsc#1101982, bsc#1063993 Signed-off-by: Bruce Rogers --- migration/savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration/savevm.c index 6bb404b9c8..840d5ed7bf 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -3212,7 +3212,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live, * So call bdrv_inactivate_all (release locks) here to let the other * side of the migration take control of the images. */ - if (live && !saved_vm_running) { + if (!saved_vm_running) { ret = bdrv_inactivate_all(); if (ret) { error_setg(errp, "%s: bdrv_inactivate_all() failed (%d)", -- 2.51.1 From 8dc30b9322523c7c9f6ca422607c101812cfc26b Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Sat, 20 Nov 2021 18:05:57 +0800 Subject: [PATCH 018/102] [openSUSE] scsi-generic: replace logical block count of response of READ CAPACITY (SLE-20965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While using SCSI passthrough, Following scenario makes qemu doesn't realized the capacity change of remote scsi target: 1. online resize the scsi target. 2. issue 'rescan-scsi-bus.sh -s ...' in host. 3. issue 'rescan-scsi-bus.sh -s ...' in vm. In above scenario I used to experienced errors while accessing the additional disk space in vm. I think the reasonable operations should be: 1. online resize the scsi target. 2. issue 'rescan-scsi-bus.sh -s ...' in host. 3. issue 'block_resize' via qmp to notify qemu. 4. issue 'rescan-scsi-bus.sh -s ...' in vm. The errors disappear once I notify qemu by block_resize via qmp. So this patch replaces the number of logical blocks of READ CAPACITY response from scsi target by qemu's bs->total_sectors. If the user in vm wants to access the additional disk space, The administrator of host must notify qemu once resizeing the scsi target. Bonus is that domblkinfo of libvirt can reflect the consistent capacity information between host and vm in case of missing block_resize in qemu. E.g: ...

... Before: 1. online resize the scsi target. 2. host:~ # rescan-scsi-bus.sh -s /dev/sdc 3. guest:~ # rescan-scsi-bus.sh -s /dev/sda 4 host:~ # virsh domblkinfo --domain $DOMAIN --human --device sda Capacity: 4.000 GiB Allocation: 0.000 B Physical: 8.000 GiB 5. guest:~ # lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 8G 0 disk └─sda1 8:1 0 2G 0 part After: 1. online resize the scsi target. 2. host:~ # rescan-scsi-bus.sh -s /dev/sdc 3. guest:~ # rescan-scsi-bus.sh -s /dev/sda 4 host:~ # virsh domblkinfo --domain $DOMAIN --human --device sda Capacity: 4.000 GiB Allocation: 0.000 B Physical: 8.000 GiB 5. guest:~ # lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 4G 0 disk └─sda1 8:1 0 2G 0 part References: [SUSE-JIRA] (SLE-20965) Signed-off-by: Lin Ma --- hw/scsi/scsi-generic.c | 10 ++++++++-- include/block/throttle-groups.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index ee945f87e3..e686f835b9 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -321,11 +321,17 @@ static void scsi_read_complete(void * opaque, int ret) if (r->req.cmd.buf[0] == READ_CAPACITY_10 && (ldl_be_p(&r->buf[0]) != 0xffffffffU || s->max_lba == 0)) { s->blocksize = ldl_be_p(&r->buf[4]); - s->max_lba = ldl_be_p(&r->buf[0]) & 0xffffffffULL; + BlockBackend *blk = s->conf.blk; + BlockDriverState *bs = blk_bs(blk); + s->max_lba = bs->total_sectors - 1; + stl_be_p(&r->buf[0], s->max_lba); } else if (r->req.cmd.buf[0] == SERVICE_ACTION_IN_16 && (r->req.cmd.buf[1] & 31) == SAI_READ_CAPACITY_16) { s->blocksize = ldl_be_p(&r->buf[8]); - s->max_lba = ldq_be_p(&r->buf[0]); + BlockBackend *blk = s->conf.blk; + BlockDriverState *bs = blk_bs(blk); + s->max_lba = bs->total_sectors - 1; + stq_be_p(&r->buf[0], s->max_lba); } /* diff --git a/include/block/throttle-groups.h b/include/block/throttle-groups.h index 2355e8d9de..e98f71c4db 100644 --- a/include/block/throttle-groups.h +++ b/include/block/throttle-groups.h @@ -27,6 +27,7 @@ #include "qemu/coroutine.h" #include "qemu/throttle.h" +#include "block/block_int.h" #include "qom/object.h" /* The ThrottleGroupMember structure indicates membership in a ThrottleGroup -- 2.51.1 From bcc140fbbbc0dc90cbc61fe6bdb82ab81e3c3399 Mon Sep 17 00:00:00 2001 From: Mauro Matteo Cascella Date: Mon, 7 Mar 2022 16:22:01 +0100 Subject: [PATCH 019/102] [openSUSE] hw/scsi/megasas: check for NULL frame in megasas_command_cancelled() (bsc#1180432, CVE-2020-35503) Ensure that 'cmd->frame' is not NULL before accessing the 'header' field. This check prevents a potential NULL pointer dereference issue. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1910346 Signed-off-by: Mauro Matteo Cascella Reported-by: Cheolwoo Myung References: bsc#1180432, CVE-2020-35503 Signed-off-by: Dario Faggioli --- hw/scsi/megasas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 2d0c607177..a45c02947a 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -1928,7 +1928,7 @@ static void megasas_command_cancelled(SCSIRequest *req) { MegasasCmd *cmd = req->hba_private; - if (!cmd) { + if (!cmd || !cmd->frame) { return; } cmd->frame->header.cmd_status = MFI_STAT_SCSI_IO_FAILED; -- 2.51.1 From 2f35aaa0e836c12c0270c1b54da4f3ad5e642aef Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 25 Mar 2022 18:41:52 +0100 Subject: [PATCH 020/102] [openSUSE] scsi-generic: check for additional SG_IO status on completion (bsc#1178049) SG_IO may return additional status in the 'status', 'driver_status', and 'host_status' fields. When either of these fields are set the command has not been executed normally, so we should not continue processing this command but rather return an error. scsi_read_complete() already checks for these errors, scsi_write_complete() does not. References: bsc#1178049 Signed-off-by: Hannes Reinecke Signed-off-by: Lin Ma Signed-off-by: Dario Faggioli --- hw/scsi/scsi-generic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index e686f835b9..1581d949ea 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -391,7 +391,10 @@ static void scsi_write_complete(void * opaque, int ret) assert(r->req.aiocb != NULL); r->req.aiocb = NULL; - if (ret || r->req.io_canceled) { + if (ret || r->req.io_canceled || + r->io_header.status != SCSI_HOST_OK || + (r->io_header.driver_status & SG_ERR_DRIVER_TIMEOUT) || + r->io_header.status != GOOD) { scsi_command_complete_noio(r, ret); return; } -- 2.51.1 From 52c60e9cc5c70b7ead008e2ca5db43eff5d61fc7 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 24 May 2022 20:52:17 +0200 Subject: [PATCH 021/102] [openSUSE] Revert "tests/qtest: enable more vhost-user tests by default" Revert commit "tests/qtest: enable more vhost-user tests by default" (8dcb404bff6d9), as it causes prooblem when building with GCC 12 and LTO enabled. This should be considered temporary, until the actual reason why the code of the tests that are added in that commit breaks. It has been reported upstream, and will be (hopefully) solved there: https://lore.kernel.org/qemu-devel/1d3bbff9e92e7c8a24db9e140dcf3f428c2df103.camel@suse.com/ Signed-off-by: Dario Faggioli --- tests/qtest/vhost-user-test.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index d6075001e7..5a8b160625 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -1118,17 +1118,20 @@ static void register_vhost_user_test(void) "virtio-net", test_migrate, &opts); - opts.before = vhost_user_test_setup_reconnect; - qos_add_test("vhost-user/reconnect", "virtio-net", - test_reconnect, &opts); + /* keeps failing on build-system since Aug 15 2017 */ + if (getenv("QTEST_VHOST_USER_FIXME")) { + opts.before = vhost_user_test_setup_reconnect; + qos_add_test("vhost-user/reconnect", "virtio-net", + test_reconnect, &opts); - opts.before = vhost_user_test_setup_connect_fail; - qos_add_test("vhost-user/connect-fail", "virtio-net", - test_vhost_user_started, &opts); + opts.before = vhost_user_test_setup_connect_fail; + qos_add_test("vhost-user/connect-fail", "virtio-net", + test_vhost_user_started, &opts); - opts.before = vhost_user_test_setup_flags_mismatch; - qos_add_test("vhost-user/flags-mismatch", "virtio-net", - test_vhost_user_started, &opts); + opts.before = vhost_user_test_setup_flags_mismatch; + qos_add_test("vhost-user/flags-mismatch", "virtio-net", + test_vhost_user_started, &opts); + } opts.before = vhost_user_test_setup_multiqueue; opts.edge.extra_device_opts = "mq=on"; -- 2.51.1 From 37d8a73dcef1c0c12f48a5dbe24661d61d57f254 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Mon, 11 Mar 2019 22:02:37 -0600 Subject: [PATCH 022/102] [openSUSE] tests: change error message in test 162 Since we have a quite restricted execution environment, as far as networking is concerned, we need to change the error message we expect in test 162. There is actually no routing set up so the error we get is "Network is unreachable". Change the expected output accordingly. Signed-off-by: Bruce Rogers --- tests/qemu-iotests/162.out | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/162.out b/tests/qemu-iotests/162.out index f8714cb0d2..2793aed277 100644 --- a/tests/qemu-iotests/162.out +++ b/tests/qemu-iotests/162.out @@ -1,7 +1,7 @@ QA output created by 162 === NBD === -qemu-img: Could not open 'json:{"driver": "nbd", "host": -1}': address resolution failed for -1:10809: Name or service not known +qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to connect socket: Network is unreachable image: nbd://localhost:PORT image: nbd+unix://?socket=42 -- 2.51.1 From 968e7fdafcc8e2c49165af1602ad010912f78b57 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Tue, 20 Nov 2018 15:46:41 -0700 Subject: [PATCH 023/102] [openSUSE] tests/qemu-iotests: Triple timeout of i/o tests due to obs environment Executing tests in obs is very fickle, since you aren't guaranteed reliable cpu time. Triple the timeout for each test to help ensure we don't fail a test because the stars align against us. Signed-off-by: Bruce Rogers [DF: Small tweaks necessary for rebasing on top of 6.2.0] Signed-off-by: Dario Faggioli --- tests/qemu-iotests/common.qemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu index 0f1fecc68e..b23c4798aa 100644 --- a/tests/qemu-iotests/common.qemu +++ b/tests/qemu-iotests/common.qemu @@ -85,7 +85,7 @@ _timed_wait_for() timeout=yes QEMU_STATUS[$h]=0 - read_timeout="-t ${QEMU_COMM_TIMEOUT}" + read_timeout="-t $((${QEMU_COMM_TIMEOUT}*3))" if [ -n "${GDB_OPTIONS}" ]; then read_timeout= fi -- 2.51.1 From e2ebc35c2ecb5b9f8f3676d6667b751e532596c6 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 21 Jul 2022 04:06:21 +0200 Subject: [PATCH 024/102] [openSUSE] Disable some tests that have problems in OBS We are disabling the following tests: qemu-system-ppc64 / display-vga-test They are failing due to some memory corruption errors. We believe that this might be due to the combination of the compiler version and of LTO, and will take up the investigation within the upstream community. Signed-off-by: Dario Faggioli --- tests/qtest/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 2f0d3ef080..420275f12b 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -36,6 +36,10 @@ qtests_pci = \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) + \ (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) +# FIXME [openSUSE]: display-vga-test currently fails in OBS (and only in OBS!?!), for ppc64 +qtests_pci_novga = \ + (config_all_devices.has_key('CONFIG_IVSHMEM_DEVICE') ? ['ivshmem-test'] : []) + qtests_cxl = \ (config_all_devices.has_key('CONFIG_CXL') ? ['cxl-test'] : []) @@ -177,7 +181,7 @@ qtests_ppc64 = \ (slirp.found() ? ['pxe-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ - qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] + qtests_pci_novga + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) -- 2.51.1 From 0ae8147a675564704a05396fb7d8a253ff1ae696 Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Thu, 25 Jan 2018 14:16:10 -0700 Subject: [PATCH 025/102] [openSUSE] Make installed scripts explicitly python3 (bsc#1077564) We want to explicitly reference python3 in the scripts we install. References: bsc#1077564 Signed-off-by: Bruce Rogers --- scripts/analyze-migration.py | 2 +- scripts/vmstate-static-checker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py index 8a254a5b6a..93929041cd 100755 --- a/scripts/analyze-migration.py +++ b/scripts/analyze-migration.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # # Migration Stream Analyzer # diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py index 9c0e6b81f2..3d5d55b975 100755 --- a/scripts/vmstate-static-checker.py +++ b/scripts/vmstate-static-checker.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # # Compares vmstate information stored in JSON format, obtained from # the -dump-vmstate QEMU command. -- 2.51.1 From 0f721bbdac98992887121394173503cb40c71ced Mon Sep 17 00:00:00 2001 From: Bruce Rogers Date: Fri, 28 Aug 2020 13:50:40 -0600 Subject: [PATCH 026/102] [openSUSE] meson: install ivshmem-client and ivshmem-server Turn on the meson install flag for these executables Signed-off-by: Bruce Rogers --- contrib/ivshmem-client/meson.build | 2 +- contrib/ivshmem-server/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ivshmem-client/meson.build b/contrib/ivshmem-client/meson.build index 3c8b09af4b..3e17f01205 100644 --- a/contrib/ivshmem-client/meson.build +++ b/contrib/ivshmem-client/meson.build @@ -1,4 +1,4 @@ executable('ivshmem-client', files('ivshmem-client.c', 'main.c'), genh, dependencies: glib, build_by_default: host_os == 'linux', - install: false) + install: true) diff --git a/contrib/ivshmem-server/meson.build b/contrib/ivshmem-server/meson.build index 1c8fea6594..73533a3c54 100644 --- a/contrib/ivshmem-server/meson.build +++ b/contrib/ivshmem-server/meson.build @@ -1,4 +1,4 @@ executable('ivshmem-server', files('ivshmem-server.c', 'main.c'), genh, dependencies: [qemuutil, rt], build_by_default: host_os == 'linux', - install: false) + install: true) -- 2.51.1 From 508f2b15df6594b0d523c2b426fce62282341726 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 20 Sep 2022 09:10:59 +0200 Subject: [PATCH 027/102] [openSUSE] meson: remove $pkgversion from CONFIG_STAMP input to broaden compatibility As part of the effort to close the gap with Leap I think we are fine removing the $pkgversion component to creating a unique CONFIG_STAMP. This stamp is only used in creating a unique symbol used in ensuring the dynamically loaded modules correspond correctly to the loading qemu. The default inputs to producing this unique symbol are somewhat reasonable as a generic mechanism, but specific packaging and maintenance practices might require the default to be modified for best use. This is an example of that. Signed-off-by: Bruce Rogers Signed-off-by: Dario Faggioli --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index fbda17c987..ff1ffced6e 100644 --- a/meson.build +++ b/meson.build @@ -2260,7 +2260,7 @@ config_host_data.set_quoted('CONFIG_SYSCONFDIR', get_option('prefix') / get_opti if enable_modules config_host_data.set('CONFIG_STAMP', run_command( meson.current_source_dir() / 'scripts/qemu-stamp.py', - meson.project_version(), get_option('pkgversion'), '--', + meson.project_version(), '--', meson.current_source_dir() / 'configure', capture: true, check: true).stdout().strip()) endif -- 2.51.1 From 46a296691c1199fa9e6d0b3aa0d6e02669912d30 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 16 Nov 2022 13:24:36 +0100 Subject: [PATCH 028/102] [openSUSE] pc: q35: Allow 1024 cpus for old machine types (bsc#1202282, jsc#PED-2592) In SUSE/openSUSE, we bumped up the number of maximum vcpus since machine type q35-7.1. Make sure that this continue to be true, for backward compatibility. Signed-off-by: Dario Faggioli References: https://lore.kernel.org/qemu-devel/166876173513.24238.8968021290016401421.stgit@tumbleweed.Wayrath/ References: bsc#1202282, jsc#PED-2592 Signed-off-by: Dario Faggioli --- hw/i386/pc_q35.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index f2d8edfa84..87288f3193 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -408,10 +408,6 @@ static void pc_q35_machine_8_0_options(MachineClass *m) pc_q35_machine_8_1_options(m); compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); - - /* For pc-q35-8.0 and older, use SMBIOS 2.8 by default */ - pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; - m->max_cpus = 288; } DEFINE_Q35_MACHINE(8, 0); @@ -441,6 +437,10 @@ static void pc_q35_machine_7_0_options(MachineClass *m) pcmc->enforce_amd_1tb_hole = false; compat_props_add(m->compat_props, hw_compat_7_0, hw_compat_7_0_len); compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); + + /* For pc-q35-7.0 and older, use SMBIOS 2.8 by default */ + pcmc->default_smbios_ep_type = SMBIOS_ENTRY_POINT_TYPE_32; + m->max_cpus = 288; } DEFINE_Q35_MACHINE(7, 0); -- 2.51.1 From f97fbed167caa7245d8f16227c109ada46835741 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 16 May 2023 10:45:36 +0200 Subject: [PATCH 029/102] [openSUSE][OBS] Limit the workflow runs to the factory branch (#25) Signed-off-by: Dario Faggioli --- .obs/workflows.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.obs/workflows.yml b/.obs/workflows.yml index 839da02d8a..d183bac809 100644 --- a/.obs/workflows.yml +++ b/.obs/workflows.yml @@ -6,6 +6,9 @@ pr_workflow: target_project: Virtualization:Staging:PRs filters: event: pull_request + branches: + only: + - factory rebuild_workflow: steps: # Will automatically rebuild the package @@ -14,3 +17,6 @@ rebuild_workflow: package: qemu filters: event: push + branches: + only: + - factory -- 2.51.1 From 047d02d4d3099f6f030b8420f6e1fbb43e05abe4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 11 Apr 2023 12:17:09 +0200 Subject: [PATCH 030/102] [openSUSE] roms: add back edk2-basetools target The efi nic boot rom builds depend on this, they need the EfiRom utility from edk2 BaseTools. Fixes: 22e11539e167 ("edk2: replace build scripts") Reported-by: Olaf Hering Signed-off-by: Gerd Hoffmann References: https://lore.kernel.org/qemu-devel/20230411101709.445259-1-kraxel@redhat.com/ Signed-off-by: Dario Faggioli --- roms/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roms/Makefile b/roms/Makefile index eebb430be9..8a7da8dcc4 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -175,6 +175,9 @@ efi: edk2-version rm -f ../pc-bios/edk2-*.fd.bz2 bzip2 --verbose ../pc-bios/edk2-*.fd +edk2-basetools: + python3 edk2-build.py --config edk2-build.config -m none + opensbi32-generic: $(MAKE) -C opensbi \ CROSS_COMPILE=$(riscv32_cross_prefix) \ -- 2.51.1 From 644056059a92503fe63d3422f4b37b379916d9c8 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Sat, 13 May 2023 04:00:43 +0200 Subject: [PATCH 031/102] [openSUSE][RPM] Move documentation to a subpackage and fix qemu-headless (bsc#1209629) - The qemu-headless subpackage was defined but never build, because it had no files. Fix that by putting there just a simple README. - Move the docs in a dedicated subpackage Resolves: bsc#1209629 Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index ba5ef75407..95c01a68a7 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -269,6 +269,7 @@ Suggests: qemu-lang Suggests: qemu-microvm Suggests: qemu-skiboot Suggests: qemu-vhost-user-gpu +Suggests: qemu-doc Obsoletes: qemu-sgabios <= 8 Obsoletes: qemu-audio-oss < %{version} Obsoletes: qemu-audio-sdl < %{version} @@ -291,7 +292,6 @@ This package acts as an umbrella package to the other QEMU sub-packages. %dir %_sysconfdir/%name/firmware %dir /usr/lib/supportconfig %dir /usr/lib/supportconfig/plugins -%doc %_docdir/%name %if %{kvm_available} %ifarch s390x %{_prefix}/lib/modules-load.d/kvm.conf @@ -1003,6 +1003,8 @@ Requires: qemu-chardev-spice This meta-package brings in, as dependencies, the minimum set of packages currently necessary for having a functional (headless) QEMU/KVM stack. +%files headless + %package x86 Summary: Machine emulator and virtualizer for x86 architectures Group: System/Emulators/PC @@ -1962,4 +1964,19 @@ network adapters available with QEMU. # End of "if build_x86_firmware" %endif +%package doc +Summary: Documentation for QEMU +Group: System/Emulators/PC +BuildArch: noarch +Suggests: qemu + +%files doc +%defattr(-, root, root) +%doc %_docdir/%name + +%description doc +%{generic_qemu_description} + +This package contains user and developer documentation for QEMU. + %changelog -- 2.51.1 From 02d91d84cbad4de4735308276e54b5207f777a72 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Sat, 13 May 2023 05:58:20 +0200 Subject: [PATCH 032/102] [openSUSE][RPM] Try to avoid recommending too many packages (bsc#1205680) For example, let's try to avoid recommending GUI UI stuff, unless GTK is already installed. This way we avoid things like bringing in an entire graphic stack on servers. References: bsc#1205680 Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 95c01a68a7..240a2a7c1c 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -246,7 +246,6 @@ Recommends: qemu-hw-display-virtio-vga Recommends: qemu-hw-usb-host Recommends: qemu-hw-usb-redirect Recommends: qemu-hw-usb-smartcard -Recommends: qemu-ui-gtk Recommends: qemu-ui-spice-app # End of "ifarch s390x" %endif @@ -269,6 +268,7 @@ Suggests: qemu-lang Suggests: qemu-microvm Suggests: qemu-skiboot Suggests: qemu-vhost-user-gpu +Suggests: qemu-ui-gtk Suggests: qemu-doc Obsoletes: qemu-sgabios <= 8 Obsoletes: qemu-audio-oss < %{version} @@ -1510,6 +1510,7 @@ This package contains a module for doing curses based UI for QEMU. Summary: GTK based UI support for QEMU Group: System/Emulators/PC Requires: qemu-ui-opengl +Supplements: (qemu and libgtk-3-0) %{qemu_module_conflicts} %description ui-gtk -- 2.51.1 From b2e39b63b810ced8e031e2522c1482493d718c2d Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 22 May 2023 18:07:22 +0200 Subject: [PATCH 033/102] [openSUSE][RPM] spec: require virtiofsd, now that it is a sep package (#27) Since version 8.0.0, virtiofsd is not part of QEMU sources any longer. We therefore have also moved it to a separate package. To retain compatibility and consistency of behavior, require such a package as an hard dependency. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 240a2a7c1c..8745424b64 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1588,6 +1588,7 @@ Summary: Tools for QEMU Group: System/Emulators/PC Requires(pre): permissions Requires: group(kvm) +Requires: virtiofsd Recommends: multipath-tools Recommends: qemu-block-curl %if 0%{?with_rbd} -- 2.51.1 From 46c78c6bf5834ab3e1be63f59e712c3e4fdfc35a Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 29 May 2023 16:13:18 +0200 Subject: [PATCH 034/102] [openSUSE][RPM] Fix deps for virtiofsd and improve spec files Address the comments from Factory Submission https://build.opensuse.org/request/show/1088674?notification_id=40890530: - remove the various '%defattr()' - make sure that we depend on virtiofsd only on arch-es where it can actually be built Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 1 - rpm/qemu.spec | 54 +++------------------------------------- 2 files changed, 3 insertions(+), 52 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 81edbd101c..f262ba80a7 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -62,7 +62,6 @@ architecture. The syscall interface is intercepted and execution below the syscall layer occurs on the native hardware and operating system. %files -%defattr(-, root, root) %doc README.rst VERSION %license COPYING COPYING.LIB LICENSE %_bindir/qemu-aarch64 diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 8745424b64..b6e77386a5 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -281,7 +281,6 @@ Obsoletes: qemu-ui-sdl < %{version} This package acts as an umbrella package to the other QEMU sub-packages. %files -%defattr(-, root, root) %dir %_datadir/icons/hicolor %dir %_datadir/icons/hicolor/*/ %dir %_datadir/icons/hicolor/*/apps @@ -1028,7 +1027,6 @@ Recommends: qemu-microvm This package provides i386 and x86_64 emulation. %files x86 -%defattr(-, root, root) %_bindir/qemu-system-i386 %_bindir/qemu-system-x86_64 %_datadir/%name/kvmvapic.bin @@ -1053,7 +1051,6 @@ Recommends: qemu-vgabios This package provides ppc and ppc64 emulation. %files ppc -%defattr(-, root, root) %_bindir/qemu-system-ppc %_bindir/qemu-system-ppc64 %_datadir/%name/bamboo.dtb @@ -1078,7 +1075,6 @@ Obsoletes: qemu-s390 < %{version} This package provides s390x emulation. %files s390x -%defattr(-, root, root) %_bindir/qemu-system-s390x %_datadir/%name/s390-ccw.img %_datadir/%name/s390-netboot.img @@ -1099,7 +1095,6 @@ Recommends: qemu-vgabios This package provides arm emulation. %files arm -%defattr(-, root, root) %_bindir/qemu-system-arm %_bindir/qemu-system-aarch64 %_datadir/%name/npcm7xx_bootrom.bin @@ -1121,7 +1116,6 @@ mips, sparc, and xtensa. (The term "extra" is juxtapositioned against more popular QEMU packages which are dedicated to a single architecture.) %files extra -%defattr(-, root, root) %_bindir/qemu-system-alpha %_bindir/qemu-system-avr %_bindir/qemu-system-cris @@ -1167,7 +1161,6 @@ graphical user interface components that come with QEMU. The bulk of strings in QEMU are not localized. %files lang -f %blddir/%name.lang -%defattr(-, root, root) %package audio-alsa Summary: ALSA based audio support for QEMU @@ -1178,7 +1171,6 @@ Group: System/Emulators/PC This package contains a module for ALSA based audio support for QEMU. %files audio-alsa -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/audio-alsa.so @@ -1191,7 +1183,6 @@ Group: System/Emulators/PC This package provides a module for D-Bus based audio support for QEMU. %files audio-dbus -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/audio-dbus.so @@ -1204,7 +1195,6 @@ Group: System/Emulators/PC This package contains a module for Pulse Audio based audio support for QEMU. %files audio-pa -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/audio-pa.so @@ -1217,7 +1207,6 @@ Group: System/Emulators/PC This package contains a module for JACK based audio support for QEMU. %files audio-jack -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/audio-jack.so @@ -1231,7 +1220,6 @@ Requires: qemu-ui-spice-core This package contains a module for Spice based audio support for QEMU. %files audio-spice -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/audio-spice.so @@ -1244,7 +1232,6 @@ Group: System/Emulators/PC This package contains a module for OSS based audio support for QEMU. %files audio-oss -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/audio-oss.so @@ -1258,7 +1245,6 @@ This package contains a module for accessing network-based image files over a network connection from qemu-img tool and QEMU system emulation. %files block-curl -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-curl.so @@ -1272,7 +1258,6 @@ This package contains a module for accessing Mac OS X image files from qemu-img tool and QEMU system emulation. %files block-dmg -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-dmg-bz2.so %_libdir/%name/block-dmg-lzfse.so @@ -1287,7 +1272,6 @@ This package contains a module for accessing network-based image files over a GlusterFS network connection from qemu-img tool and QEMU system emulation. %files block-gluster -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-gluster.so @@ -1301,7 +1285,6 @@ This package contains a module for accessing network-based image files over an iSCSI network connection from qemu-img tool and QEMU system emulation. %files block-iscsi -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-iscsi.so @@ -1315,7 +1298,6 @@ This package contains a module for directly accessing nfs based image files for QEMU. %files block-nfs -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-nfs.so @@ -1329,7 +1311,6 @@ This package contains a module for accessing network-based image files over an SSH network connection from qemu-img tool and QEMU system emulation. %files block-ssh -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-ssh.so @@ -1342,7 +1323,6 @@ Group: System/Emulators/PC This package contains a module for baum braille chardev support for QEMU. %files chardev-baum -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/chardev-baum.so @@ -1357,7 +1337,6 @@ Requires: qemu-ui-spice-core This package contains a module for Spice chardev support for QEMU. %files chardev-spice -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/chardev-spice.so @@ -1372,7 +1351,6 @@ Requires: qemu-ui-spice-core This package contains a module for QXL display support for QEMU. %files hw-display-qxl -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-display-qxl.so @@ -1386,7 +1364,6 @@ Group: System/Emulators/PC This package contains a module for Virtio GPU display support for QEMU. %files hw-display-virtio-gpu -%defattr(-, root, root) %dir %_datadir/%name %_libdir/%name/hw-display-virtio-gpu.so %_libdir/%name/hw-display-virtio-gpu-gl.so @@ -1401,7 +1378,6 @@ Requires: qemu-hw-display-virtio-gpu This package contains a module providing the virtio gpu pci device for QEMU. %files hw-display-virtio-gpu-pci -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-display-virtio-gpu-pci.so @@ -1416,7 +1392,6 @@ Group: System/Emulators/PC This package contains a module providing the virtio vga device for QEMU. %files hw-display-virtio-vga -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-display-virtio-vga.so @@ -1433,7 +1408,6 @@ This package contains a module providing the s390x virtio gpu ccw device for QEMU. %files hw-s390x-virtio-gpu-ccw -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-s390x-virtio-gpu-ccw.so @@ -1447,7 +1421,6 @@ Group: System/Emulators/PC This package contains a module for USB redirection support for QEMU. %files hw-usb-redirect -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-usb-redirect.so @@ -1461,7 +1434,6 @@ Group: System/Emulators/PC This package contains a modules for USB smartcard support for QEMU. %files hw-usb-smartcard -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-usb-smartcard.so @@ -1475,7 +1447,6 @@ Group: System/Emulators/PC This package contains a modules for USB passthrough driver for QEMU. %files hw-usb-host -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/hw-usb-host.so @@ -1489,7 +1460,6 @@ Group: System/Emulators/PC This package contains a module for doing D-Bus based UI for QEMU. %files ui-dbus -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/ui-dbus.so @@ -1502,7 +1472,6 @@ Group: System/Emulators/PC This package contains a module for doing curses based UI for QEMU. %files ui-curses -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/ui-curses.so @@ -1517,7 +1486,6 @@ Supplements: (qemu and libgtk-3-0) This package contains a module for doing GTK based UI for QEMU. %files ui-gtk -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/ui-gtk.so @@ -1530,7 +1498,6 @@ Group: System/Emulators/PC This package contains a module for doing OpenGL based UI for QEMU. %files ui-opengl -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/ui-egl-headless.so @@ -1547,7 +1514,6 @@ Requires: qemu-ui-spice-core This package contains a module for doing Spice based UI for QEMU. %files ui-spice-app -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/ui-spice-app.so @@ -1563,7 +1529,6 @@ Requires: qemu-audio-spice This package contains a module with core Spice support for QEMU. %files ui-spice-core -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/ui-spice-core.so @@ -1578,7 +1543,6 @@ This package contains a vhost user mode virtio-gpu 2D/3D rendering backend for QEMU. %files vhost-user-gpu -%defattr(-, root, root) %dir %_datadir/%name/vhost-user %_datadir/%name/vhost-user/50-qemu-gpu.json %_libexecdir/vhost-user-gpu @@ -1588,7 +1552,10 @@ Summary: Tools for QEMU Group: System/Emulators/PC Requires(pre): permissions Requires: group(kvm) +# Upstream virtiofsd does not even build on 32 bit systems... +%ifnarch %ix86 %arm Requires: virtiofsd +%endif Recommends: multipath-tools Recommends: qemu-block-curl %if 0%{?with_rbd} @@ -1600,7 +1567,6 @@ This package contains various QEMU related tools, including a bridge helper, a virtfs helper, ivshmem, disk utilities and scripts for various purposes. %files tools -%defattr(-, root, root) %_bindir/analyze-migration.py %_bindir/qemu-edid %_bindir/qemu-img @@ -1637,7 +1603,6 @@ protocol specification documented in docs/specs/ivshmem-spec.txt in QEMU source code. %files ivshmem-tools -%defattr(-, root, root) %dir %_datadir/%name %_bindir/ivshmem-client %_bindir/ivshmem-server @@ -1657,7 +1622,6 @@ This package contains the QEMU guest agent. It is installed in the linux guest to provide information and control at the guest OS level. %files guest-agent -%defattr(-, root, root) %attr(0755,root,kvm) %_bindir/qemu-ga %_mandir/man8/qemu-ga.8.gz %{_unitdir}/qemu-guest-agent.service @@ -1698,7 +1662,6 @@ merges anonymous (private) pages (not pagecache ones). This package provides a service file for starting and stopping KSM. %files ksm -%defattr(-, root, root) %{_unitdir}/ksm.service %pre ksm @@ -1725,7 +1688,6 @@ host instruction set. This package provides the TCG accelerator for QEMU. %files accel-tcg-x86 -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/accel-tcg-i386.so @@ -1743,7 +1705,6 @@ models. This package provides QTest accelerator for testing QEMU. %files accel-qtest -%defattr(-, root, root) %dir %_datadir/%name %dir %_libdir/%name %_libdir/%name/accel-qtest-aarch64.so @@ -1789,7 +1750,6 @@ This package contains a module for accessing ceph (rbd,rados) image files for QEMU. %files block-rbd -%defattr(-, root, root) %dir %_libdir/%name %_libdir/%name/block-rbd.so # End of "if with_rbd" @@ -1817,7 +1777,6 @@ to enable the KVM accelerator, due to the name reference ending with 'kvm'. This package is an artifact of the early origins of QEMU, and is deprecated. %files kvm -%defattr(-,root,root) %_bindir/qemu-kvm %doc %_docdir/qemu-kvm %_mandir/man1/qemu-kvm.1.gz @@ -1835,7 +1794,6 @@ Slimline Open Firmware (SLOF) is an implementation of the IEEE 1275 standard. It can be used as partition firmware for pSeries machines running on QEMU or KVM. %files SLOF -%defattr(-, root, root) %dir %_datadir/%name %_datadir/%name/slof.bin @@ -1851,7 +1809,6 @@ Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as traditionally packaged with QEMU. %files skiboot -%defattr(-, root, root) %dir %_datadir/%name %_datadir/%name/skiboot.lid %_datadir/%name/skiboot.lid.qemu @@ -1881,7 +1838,6 @@ bios-microvm, created from a minimal seabios configuration, provides slightly wider support than qboot, but still focuses on quick boot up. %files microvm -%defattr(-, root, root) %dir %_datadir/%name %_datadir/%name/bios-microvm.bin %_datadir/%name/qboot.rom @@ -1898,7 +1854,6 @@ SeaBIOS is an open source implementation of a 16bit x86 BIOS. SeaBIOS is the default and legacy BIOS for QEMU. %files seabios -%defattr(-, root, root) %dir %_datadir/%name %_datadir/%name/bios.bin %_datadir/%name/bios-256k.bin @@ -1921,7 +1876,6 @@ emulated devices: Std VGA, QXL, Cirrus CLGD 5446 and VMware emulated video card. For use with QEMU. %files vgabios -%defattr(-, root, root) %dir %_datadir/%name %_datadir/%name/vgabios.bin %_datadir/%name/vgabios-ati.bin @@ -1947,7 +1901,6 @@ Provides Preboot Execution Environment (PXE) ROM support for various emulated network adapters available with QEMU. %files ipxe -%defattr(-, root, root) %dir %_datadir/%name %_datadir/%name/efi-e1000.rom %_datadir/%name/efi-e1000e.rom @@ -1973,7 +1926,6 @@ BuildArch: noarch Suggests: qemu %files doc -%defattr(-, root, root) %doc %_docdir/%name %description doc -- 2.51.1 From addcb323f79a72a299e60fcb909233eaad0d18b1 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 30 Jun 2023 16:47:56 +0200 Subject: [PATCH 035/102] [openSUSE][RPM] Split qemu-tools package (#31) Create separate packages for qemu-img and qemu-pr-helper. Signed-off-by: Vasiliy Ulyanov Co-authored-by: Vasiliy Ulyanov --- rpm/qemu.spec | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index b6e77386a5..5559a2f9e5 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -313,12 +313,10 @@ This package acts as an umbrella package to the other QEMU sub-packages. %_datadir/%name/qemu-nsis.bmp %_datadir/%name/trace-events-all %_mandir/man1/%name.1.gz -%_mandir/man1/qemu-storage-daemon.1.gz %_mandir/man7/qemu-block-drivers.7.gz %_mandir/man7/qemu-cpu-models.7.gz %_mandir/man7/qemu-qmp-ref.7.gz %_mandir/man7/qemu-ga-ref.7.gz -%_mandir/man7/qemu-storage-daemon-qmp-ref.7.gz /usr/lib/supportconfig/plugins/%name %license COPYING COPYING.LIB LICENSE @@ -987,7 +985,7 @@ make -O V=1 VERBOSE=1 -j1 check-qtest Summary: Minimum set of packages for having a functional QEMU Group: System/Emulators/PC Requires: qemu -Requires: qemu-tools +Requires: qemu-img %if %{legacy_qemu_kvm} Requires: qemu-kvm %endif @@ -1547,10 +1545,40 @@ QEMU. %_datadir/%name/vhost-user/50-qemu-gpu.json %_libexecdir/vhost-user-gpu +%package img +Summary: QEMU disk image utility +Group: System/Emulators/PC + +%description img +This package provides command line tools for manipulating disk images. + +%files img +%_bindir/qemu-img +%_bindir/qemu-io +%_bindir/qemu-nbd +%_bindir/qemu-storage-daemon +%_mandir/man1/qemu-img.1.gz +%_mandir/man8/qemu-nbd.8.gz +%_mandir/man1/qemu-storage-daemon.1.gz +%_mandir/man7/qemu-storage-daemon-qmp-ref.7.gz + +%package pr-helper +Summary: QEMU persistent reservation helper +Group: System/Emulators/PC + +%description pr-helper +This package provides a helper utility for SCSI persistent reservations. + +%files pr-helper +%_bindir/qemu-pr-helper +%_mandir/man8/qemu-pr-helper.8.gz + %package tools Summary: Tools for QEMU Group: System/Emulators/PC Requires(pre): permissions +Requires: qemu-img +Requires: qemu-pr-helper Requires: group(kvm) # Upstream virtiofsd does not even build on 32 bit systems... %ifnarch %ix86 %arm @@ -1569,20 +1597,12 @@ a virtfs helper, ivshmem, disk utilities and scripts for various purposes. %files tools %_bindir/analyze-migration.py %_bindir/qemu-edid -%_bindir/qemu-img -%_bindir/qemu-io %_bindir/qemu-keymap -%_bindir/qemu-nbd -%_bindir/qemu-pr-helper -%_bindir/qemu-storage-daemon %_bindir/vmstate-static-checker.py %_bindir/vmxcap %verify(not mode) %attr(4750,root,kvm) %_libexecdir/qemu-bridge-helper %_libexecdir/virtfs-proxy-helper -%_mandir/man1/qemu-img.1.gz %_mandir/man1/virtfs-proxy-helper.1.gz -%_mandir/man8/qemu-nbd.8.gz -%_mandir/man8/qemu-pr-helper.8.gz %dir %_sysconfdir/%name %config(noreplace) %_sysconfdir/%name/bridge.conf @@ -1841,6 +1861,7 @@ wider support than qboot, but still focuses on quick boot up. %dir %_datadir/%name %_datadir/%name/bios-microvm.bin %_datadir/%name/qboot.rom + %package seabios Summary: x86 Legacy BIOS for QEMU Group: System/Emulators/PC -- 2.51.1 From 5a787013fea282bbd3d8ac32575945152b21cc3c Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Fri, 30 Jun 2023 16:48:35 +0200 Subject: [PATCH 036/102] [openSUSE][RPM] Use --preserve-argv0 in qemu-linux-user (boo#1197298, bsc#1212768) By default try to preserve argv[0]. Original report is boo#1197298, which also became relevant recently again in bsc#1212768. Signed-off-by: Fabian Vogt References: boo#1197298 References: bsc#1212768 Signed-off-by: Fabian Vogt --- rpm/qemu-linux-user.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index f262ba80a7..334cef9b84 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -315,7 +315,7 @@ unlink %{buildroot}%_datadir/qemu/trace-events-all install -d -m 755 %{buildroot}%_sbindir install -m 755 scripts/qemu-binfmt-conf.sh %{buildroot}%_sbindir install -d -m 755 %{buildroot}%{_prefix}/lib/binfmt.d/ -scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --exportdir %{buildroot}%{_prefix}/lib/binfmt.d/ +scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --preserve-argv0 yes --exportdir %{buildroot}%{_prefix}/lib/binfmt.d/ %fdupes -s %{buildroot} -- 2.51.1 From 0648675cdfa07db3af48825dd160c8a553b5b1b1 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 7 Sep 2023 10:55:03 +0200 Subject: [PATCH 037/102] [openSUSE][RPM] Update to version 8.1.0 Full list of changes are available at: https://wiki.qemu.org/ChangeLog/8.1 Highlights: * VFIO: improved live migration support, no longer an experimental feature * GTK GUI now supports multi-touch events * ARM, PowerPC, and RISC-V can now use AES acceleration on host processor * PCIe: new QMP commands to inject CXL General Media events, DRAM events and Memory Module events * ARM: KVM VMs on a host which supports MTE (the Memory Tagging Extension) can now use MTE in the guest * ARM: emulation support for bpim2u (Banana Pi BPI-M2 Ultra) board and neoverse-v1 (Cortex Neoverse-V1) CPU * ARM: new architectural feature support for: FEAT_PAN3 (SCTLR_ELx.EPAN), FEAT_LSE2 (Large System Extensions v2), and experimental support for FEAT_RME (Realm Management Extensions) * Hexagon: new instruction support for v68/v73 scalar, and v68/v69 HVX * Hexagon: gdbstub support for HVX * MIPS: emulation support for Ingenic XBurstR1/XBurstR2 CPUs, and MXU instructions * PowerPC: TCG SMT support, allowing pseries and powernv to run with up to 8 threads per core * PowerPC: emulation support for Power9 DD2.2 CPU model, and perf sampling support for POWER CPUs * RISC-V: ISA extension support for BF16/Zfa, and disassembly support for Zcm*/Z*inx/XVentanaCondOps/Xthead * RISC-V: CPU emulation support for Veyron V1 * RISC-V: numerous KVM/emulation fixes and enhancements * s390: instruction emulation fixes for LDER, LCBB, LOCFHR, MXDB, MXDBR, EPSW, MDEB, MDEBR, MVCRL, LRA, CKSM, CLM, ICM, MC, STIDP, EXECUTE, and CLGEBR(A) * SPARC: updated target/sparc to use tcg_gen_lookup_and_goto_ptr() for improved performance * Tricore: emulation support for TC37x CPU that supports ISA v1.6.2 instructions * Tricore: instruction emulation of POPCNT.W, LHA, CRC32L.W, CRC32.B, SHUFFLE, SYSCALL, and DISABLE * x86: CPU model support for GraniteRapids * and lots more... This also (automatically) fixes: - bsc#1212850 (CVE-2023-3354) - bsc#1213001 (CVE-2023-3255) - bsc#1213925 (CVE-2023-3180) - bsc#1213414 (CVE-2023-3301) - bsc#1207205 (CVE-2023-0330) - bsc#1212968 (CVE-2023-2861) - bsc#1179993, bsc#1181740, bsc#1211697 Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 4 ++-- rpm/qemu.spec | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 334cef9b84..0b31b98192 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.0.0 +Version: 8.1.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -151,7 +151,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --prefix=%_prefix \ --python=%_bindir/python3 \ --sysconfdir=%_sysconfdir \ - --with-git-submodules=ignore \ --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ --disable-alsa \ --disable-attr \ @@ -181,6 +180,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-debug-tcg \ --disable-dmg \ --disable-docs \ + --disable-download \ --disable-dsound \ --disable-fdt \ --disable-fuse \ diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 5559a2f9e5..80753ae10e 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.0.0 +Version: 8.1.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -484,7 +484,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --prefix=%_prefix \ --python=%_bindir/python3 \ --sysconfdir=%_sysconfdir \ - --with-git-submodules=ignore \ --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ --disable-alsa \ --disable-attr \ @@ -514,6 +513,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-debug-tcg \ --disable-dmg \ --disable-docs \ + --disable-download \ --disable-dsound \ --disable-fdt \ --disable-fuse \ -- 2.51.1 From 2bb4d9c4405dbe0cd35ef8e0aa52d4d2cf68f5e8 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 8 Sep 2023 13:45:55 +0200 Subject: [PATCH 038/102] [openSUSE][RPM] Transform meson subproject in git submodules OBS SCM bridge can handle git submodule, while it can't handle (yet?) meson subprojects. The (ugly, I know!) solution, for now, is to turn the latter into the former, with commands like the followings: git submodule add -f https://gitlab.com/qemu-project/berkeley-testfloat-3 subprojects/berkeley-testfloat-3 git -C subprojects/berkeley-testfloat-3 reset --hard 40619cbb3bf32872df8c53cc457039229428a263 (the hash used comes from the subprojects/berkeley-testfloat-3.wrap file) It's also necessary to manually apply the layering of the packagefiles, and that is done in the specfile. Longer term and better solutions could be: - Make SCM support meson subprojects - Create standalone packages for the subprojects (and instruct QEMU to pick stuff from there) Signed-off-by: Dario Faggioli --- .gitmodules | 15 +++++++++++++++ rpm/qemu-linux-user.spec | 6 ++++++ rpm/qemu.spec | 6 ++++++ subprojects/berkeley-softfloat-3 | 1 + subprojects/berkeley-testfloat-3 | 1 + subprojects/dtc | 1 + subprojects/keycodemapdb | 1 + subprojects/libvfio-user | 1 + 8 files changed, 32 insertions(+) create mode 160000 subprojects/berkeley-softfloat-3 create mode 160000 subprojects/berkeley-testfloat-3 create mode 160000 subprojects/dtc create mode 160000 subprojects/keycodemapdb create mode 160000 subprojects/libvfio-user diff --git a/.gitmodules b/.gitmodules index 73cae4cd4d..541d7f6571 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,18 @@ [submodule "tests/lcitool/libvirt-ci"] path = tests/lcitool/libvirt-ci url = https://gitlab.com/libvirt/libvirt-ci.git +[submodule "subprojects/berkeley-softfloat-3"] + path = subprojects/berkeley-softfloat-3 + url = https://gitlab.com/qemu-project/berkeley-softfloat-3 +[submodule "subprojects/berkeley-testfloat-3"] + path = subprojects/berkeley-testfloat-3 + url = https://gitlab.com/qemu-project/berkeley-testfloat-3 +[submodule "subprojects/dtc"] + path = subprojects/dtc + url = https://gitlab.com/qemu-project/dtc.git +[submodule "subprojects/libvfio-user"] + path = subprojects/libvfio-user + url = https://gitlab.com/qemu-project/libvfio-user.git +[submodule "subprojects/keycodemapdb"] + path = subprojects/keycodemapdb + url = https://gitlab.com/qemu-project/keycodemapdb.git diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 0b31b98192..fd82198f33 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -105,6 +105,12 @@ syscall layer occurs on the native hardware and operating system. %prep %autosetup -n qemu-%{version} +# We have the meson subprojects there, but as submodules (because OBS +# SCM bridge can handle the latter, but not the former) so we need to +# apply the layering of the packagefiles manually +meson subprojects packagefiles --apply berkeley-testfloat-3 +meson subprojects packagefiles --apply berkeley-softfloat-3 + %build %define rpmfilesdir %{_builddir}/qemu-%{version}/rpm diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 80753ae10e..f8cf99da9f 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -354,6 +354,12 @@ Conflicts: qemu-tools > %{version}-%{release} %prep %autosetup -n qemu-%{version} +# We have the meson subprojects there, but as submodules (because OBS +# SCM bridge can handle the latter, but not the former) so we need to +# apply the layering of the packagefiles manually +meson subprojects packagefiles --apply berkeley-testfloat-3 +meson subprojects packagefiles --apply berkeley-softfloat-3 + # for the record, this set of firmware files is installed, but we don't # build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc # openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb diff --git a/subprojects/berkeley-softfloat-3 b/subprojects/berkeley-softfloat-3 new file mode 160000 index 0000000000..b64af41c32 --- /dev/null +++ b/subprojects/berkeley-softfloat-3 @@ -0,0 +1 @@ +Subproject commit b64af41c3276f97f0e181920400ee056b9c88037 diff --git a/subprojects/berkeley-testfloat-3 b/subprojects/berkeley-testfloat-3 new file mode 160000 index 0000000000..e7af9751d9 --- /dev/null +++ b/subprojects/berkeley-testfloat-3 @@ -0,0 +1 @@ +Subproject commit e7af9751d9f9fd3b47911f51a5cfd08af256a9ab diff --git a/subprojects/dtc b/subprojects/dtc new file mode 160000 index 0000000000..b6910bec11 --- /dev/null +++ b/subprojects/dtc @@ -0,0 +1 @@ +Subproject commit b6910bec11614980a21e46fbccc35934b671bd81 diff --git a/subprojects/keycodemapdb b/subprojects/keycodemapdb new file mode 160000 index 0000000000..f5772a62ec --- /dev/null +++ b/subprojects/keycodemapdb @@ -0,0 +1 @@ +Subproject commit f5772a62ec52591ff6870b7e8ef32482371f22c6 diff --git a/subprojects/libvfio-user b/subprojects/libvfio-user new file mode 160000 index 0000000000..0b28d20557 --- /dev/null +++ b/subprojects/libvfio-user @@ -0,0 +1 @@ +Subproject commit 0b28d205572c80b568a1003db2c8f37ca333e4d7 -- 2.51.1 From 1a767efe0604eb1a8b6a653fff50b2533ec5d2c2 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 7 Aug 2023 19:36:34 +0200 Subject: [PATCH 039/102] [openSUSE][RPM] Use discount instead of perl-Text-Markdown perl-Text-Markdown is not always available (e.g., in SLE/Leap). Use discount instead, as the provider of the 'markdown' binary. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index f8cf99da9f..83fa7dec22 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -194,7 +194,7 @@ BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: meson BuildRequires: ninja >= 1.7 -BuildRequires: perl-Text-Markdown +BuildRequires: discount BuildRequires: python3-base >= 3.6 BuildRequires: python3-setuptools %if %{kvm_available} @@ -787,7 +787,7 @@ for f in *.md do b="${f%.md}" # Ensure the correct media type - Markdown.pl "${f}" >"${b}.html" + markdown "${f}" >"${b}.html" # Links to b.md will be rendered as to b ln -Ts "${b}.html" "${b}" done -- 2.51.1 From 5e79a5d411c0c644e693492c6f334e9af4cb3787 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 6 Oct 2023 11:02:40 +0200 Subject: [PATCH 040/102] [openSUSE][RPM] spec: enable the Pipewire audio backend (bsc#1215486) Enable the Pipewire audio backend (available since 8.1), in the appropriate subpackage. References: bsc#1215486 Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 1 + rpm/qemu.spec | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index fd82198f33..8fa536699d 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -234,6 +234,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-pa \ --disable-parallels \ --disable-pie \ + --disable-pipewire \ --disable-plugins \ --disable-png \ --disable-pvrdma \ diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 83fa7dec22..c716635fe5 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -170,6 +170,7 @@ BuildRequires: pkgconfig(libiscsi) >= 1.9.0 BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libnfs) >= 1.9.3 BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libpipewire-0.3) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libsasl2) BuildRequires: pkgconfig(libseccomp) >= 2.3.0 @@ -567,6 +568,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-pa \ --disable-parallels \ --disable-pie \ + --disable-pipewire \ --disable-plugins \ --disable-png \ --disable-pvrdma \ @@ -630,7 +632,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %if "%{_lto_cflags}" != "%{nil}" --enable-lto \ %endif - --audio-drv-list=pa,alsa,jack,oss \ + --audio-drv-list=pipewire,pa,alsa,jack,oss \ --enable-auth-pam \ %ifarch x86_64 --enable-avx2 \ @@ -695,6 +697,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-pa \ --enable-parallels \ --enable-pie \ + --enable-pipewire \ --enable-png \ --enable-pvrdma \ --enable-qcow1 \ @@ -1239,6 +1242,18 @@ This package contains a module for OSS based audio support for QEMU. %dir %_libdir/%name %_libdir/%name/audio-oss.so +%package audio-pipewire +Summary: Pipewire based audio support for QEMU +Group: System/Emulators/PC +%{qemu_module_conflicts} + +%description audio-pipewire +This package contains a module for Pipewire based audio support for QEMU. + +%files audio-pipewire +%dir %_libdir/%name +%_libdir/%name/audio-pipewire.so + %package block-curl Summary: cURL block support for QEMU Group: System/Emulators/PC -- 2.51.1 From f761a5c8cf0cc633eef0df2965a20dc28e4a4243 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 11 Oct 2023 15:25:15 +0200 Subject: [PATCH 041/102] [openSUSE] Update to version 8.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This includes the following commits: * tpm: fix crash when FD >= 1024 and unnecessary errors due to EINTR (Marc-André Lureau) * meson: Fix targetos match for illumos and Solaris. (Jonathan Perkin) * s390x/ap: fix missing subsystem reset registration (Janosch Frank) * ui: fix crash when there are no active_console (Marc-André Lureau) * virtio-gpu/win32: set the destroy function on load (Marc-André Lureau) * target/riscv: Allocate itrigger timers only once (Akihiko Odaki) * target/riscv/pmp.c: respect mseccfg.RLB for pmpaddrX changes (Leon Schuermann) * target/riscv: fix satp_mode_finalize() when satp_mode.supported = 0 (Daniel Henrique Barboza) * hw/riscv: virt: Fix riscv,pmu DT node path (Conor Dooley) * linux-user/riscv: Use abi type for target_ucontext (LIU Zhiwei) * hw/intc: Make rtc variable names consistent (Jason Chien) * hw/intc: Fix upper/lower mtime write calculation (Jason Chien) * target/riscv: Fix zfa fleq.d and fltq.d (LIU Zhiwei) * target/riscv: Fix page_check_range use in fault-only-first (LIU Zhiwei) * target/riscv/cpu.c: add zmmul isa string (Daniel Henrique Barboza) * hw/char/riscv_htif: Fix the console syscall on big endian hosts (Thomas Huth) * hw/char/riscv_htif: Fix printing of console characters on big endian hosts (Thomas Huth) * arm64: Restore trapless ptimer access (Colton Lewis) * virtio: Drop out of coroutine context in virtio_load() (Kevin Wolf) * qxl: don't assert() if device isn't yet initialized (Marc-André Lureau) * hw/net/vmxnet3: Fix guest-triggerable assert() (Thomas Huth) * docs tests: Fix use of migrate_set_parameter (Markus Armbruster) * qemu-options.hx: Rephrase the descriptions of the -hd* and -cdrom options (Thomas Huth) * hw/i2c/aspeed: Fix TXBUF transmission start position error (Hang Yu) * hw/i2c/aspeed: Fix Tx count and Rx size error in buffer pool mode (Hang Yu) * hw/ide/ahci: fix broken SError handling (Niklas Cassel) * hw/ide/ahci: fix ahci_write_fis_sdb() (Niklas Cassel) * hw/ide/ahci: PxCI should not get cleared when ERR_STAT is set (Niklas Cassel) * hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared (Niklas Cassel) * hw/ide/ahci: simplify and document PxCI handling (Niklas Cassel) * hw/ide/ahci: write D2H FIS when processing NCQ command (Niklas Cassel) * hw/ide/core: set ERR_STAT in unsupported command completion (Niklas Cassel) * target/ppc: Fix LQ, STQ register-pair order for big-endian (Nicholas Piggin) * target/ppc: Flush inputs to zero with NJ in ppc_store_vscr (Richard Henderson) * hw/ppc/e500: fix broken snapshot replay (Maksim Kostin) * ppc/vof: Fix missed fields in VOF cleanup (Nicholas Piggin) * ui/dbus: Properly dispose touch/mouse dbus objects (Bilal Elmoussaoui) * target/i386: raise FERR interrupt with iothread locked (Paolo Bonzini) * linux-user: Adjust brk for load_bias (Richard Henderson) * target/arm: properly document FEAT_CRC32 (Alex Bennée) * block-migration: Ensure we don't crash during migration cleanup (Fabiano Rosas) * softmmu: Assert data in bounds in iotlb_to_section (Richard Henderson) * docs/about/license: Update LICENSE URL (Philippe Mathieu-Daudé) * target/arm: Fix 64-bit SSRA (Richard Henderson) * target/arm: Fix SME ST1Q (Richard Henderson) * accel/kvm: Specify default IPA size for arm64 (Akihiko Odaki) * kvm: Introduce kvm_arch_get_default_type hook (Akihiko Odaki) * include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts (Thomas Huth) * target/s390x: Check reserved bits of VFMIN/VFMAX's M5 (Ilya Leoshkevich) * target/s390x: Fix VSTL with a large length (Ilya Leoshkevich) * target/s390x: Use a 16-bit immediate in VREP (Ilya Leoshkevich) * target/s390x: Fix the "ignored match" case in VSTRS (Ilya Leoshkevich) Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 8fa536699d..aaeaab6f97 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.0 +Version: 8.1.1 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index c716635fe5..40ea05c246 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.0 +Version: 8.1.1 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From 49dbef0e3c790b4d77165a7babe206922c5f9183 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 18 Oct 2023 15:34:33 +0200 Subject: [PATCH 042/102] [openSUSE] Update version to 8.1.2 This fixes the following upstream issues: * https://gitlab.com/qemu-project/qemu/-/issues/1826 * https://gitlab.com/qemu-project/qemu/-/issues/1834 * https://gitlab.com/qemu-project/qemu/-/issues/1846 It also contains a fix for: * CVE-2023-42467 (bsc#1215192) As well as several upstream backports: * target/riscv: Fix vfwmaccbf16.vf * disas/riscv: Fix the typo of inverted order of pmpaddr13 and pmpaddr14 * roms: use PYTHON to invoke python * hw/audio/es1370: reset current sample counter * migration/qmp: Fix crash on setting tls-authz with null * util/log: re-allow switching away from stderr log file * vfio/display: Fix missing update to set backing fields * amd_iommu: Fix APIC address check * vdpa net: follow VirtIO initialization properly at cvq isolation probing * vdpa net: stop probing if cannot set features * vdpa net: fix error message setting virtio status * vdpa net: zero vhost_vdpa iova_tree pointer at cleanup * linux-user/hppa: Fix struct target_sigcontext layout * chardev/char-pty: Avoid losing bytes when the other side just (re-)connected * hw/display/ramfb: plug slight guest-triggerable leak on mode setting * win32: avoid discarding the exception handler * target/i386: fix memory operand size for CVTPS2PD * target/i386: generalize operand size "ph" for use in CVTPS2PD * subprojects/berkeley-testfloat-3: Update to fix a problem with compiler warnings * scsi-disk: ensure that FORMAT UNIT commands are terminated * esp: restrict non-DMA transfer length to that of available data * esp: use correct type for esp_dma_enable() in sysbus_esp_gpio_demux() * optionrom: Remove build-id section * target/tricore: Fix RCPW/RRPW_INSERT insns for width = 0 * accel/tcg: Always require can_do_io * accel/tcg: Always set CF_LAST_IO with CF_NOIRQ * accel/tcg: Improve setting of can_do_io at start of TB * accel/tcg: Track current value of can_do_io in the TB * accel/tcg: Hoist CF_MEMI_ONLY check outside translation loop * accel/tcg: Avoid load of icount_decr if unused * softmmu: Use async_run_on_cpu in tcg_commit * migration: Move return path cleanup to main migration thread * migration: Replace the return path retry logic * migration: Consolidate return path closing code * migration: Remove redundant cleanup of postcopy_qemufile_src * migration: Fix possible race when shutting down to_dst_file * migration: Fix possible races when shutting down the return path * migration: Fix possible race when setting rp_state.error * migration: Fix race that dest preempt thread close too early * ui/vnc: fix handling of VNC_FEATURE_XVP * ui/vnc: fix debug output for invalid audio message * hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467] * accel/tcg: mttcg remove false-negative halted assertion * meson.build: Make keyutils independent from keyring * target/arm: Don't skip MTE checks for LDRT/STRT at EL0 * hw/arm/boot: Set SCR_EL3.FGTEn when booting kernel * include/exec: Widen tlb_hit/tlb_hit_page() * tests/file-io-error: New test * file-posix: Simplify raw_co_prw's 'out' zone code * file-posix: Fix zone update in I/O error path * file-posix: Check bs->bl.zoned for zone info * file-posix: Clear bs->bl.zoned on error * hw/cxl: Fix out of bound array access * hw/cxl: Fix CFMW config memory leak * linux-user/hppa: lock both words of function descriptor * linux-user/hppa: clear the PSW 'N' bit when delivering signals * hw/ppc: Read time only once to perform decrementer write * hw/ppc: Reset timebase facilities on machine reset * hw/ppc: Always store the decrementer value * target/ppc: Sign-extend large decrementer to 64-bits * hw/ppc: Avoid decrementer rounding errors * hw/ppc: Round up the decrementer interval when converting to ns * host-utils: Add muldiv64_round_up Signed-of-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index aaeaab6f97..0e6dc0d2bb 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.1 +Version: 8.1.2 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 40ea05c246..f8e8c78c22 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.1 +Version: 8.1.2 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From b8f7e0937fb5f1d42b594e13553f7a318e9e06cb Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 18 Oct 2023 15:44:06 +0200 Subject: [PATCH 043/102] [openSUSE] Add -p1 to autosetup in spec files Our workflow does not include patches in the spec files. Still, it could be useful to add some there, during development and/or debugging issues. Make sure that they are applied properly, by adding -p1 to the %autosetup directive (it's a nop if there are no patches, so both cases are ok). Suggested-by: Olaf Hering Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 0e6dc0d2bb..faf1344c78 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -103,7 +103,7 @@ syscall layer occurs on the native hardware and operating system. %_prefix/lib/binfmt.d/qemu-*.conf %prep -%autosetup -n qemu-%{version} +%autosetup -n qemu-%{version} -p1 # We have the meson subprojects there, but as submodules (because OBS # SCM bridge can handle the latter, but not the former) so we need to diff --git a/rpm/qemu.spec b/rpm/qemu.spec index f8e8c78c22..203c1ffdb5 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -353,7 +353,7 @@ Conflicts: qemu-tools < %{version}-%{release} \ Conflicts: qemu-tools > %{version}-%{release} %prep -%autosetup -n qemu-%{version} +%autosetup -n qemu-%{version} -p1 # We have the meson subprojects there, but as submodules (because OBS # SCM bridge can handle the latter, but not the former) so we need to -- 2.51.1 From 600e557c7aaa64f3df6ff0f2b8e3c41444d43179 Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Thu, 19 Oct 2023 09:37:56 -0600 Subject: [PATCH 044/102] [openSUSE] supportconfig: Adapt plugin to modern supportconfig The supportconfig 'scplugin.rc' file is deprecated in favor of supportconfig.rc'. Adapt the qemu plugin to the new scheme. Signed-off-by: Jim Fehlig Signed-off-by: Dario Faggioli --- rpm/qemu-supportconfig | 72 +++++++++++++----------------------------- 1 file changed, 22 insertions(+), 50 deletions(-) diff --git a/rpm/qemu-supportconfig b/rpm/qemu-supportconfig index 9cd1e67981..832a0c9e87 100644 --- a/rpm/qemu-supportconfig +++ b/rpm/qemu-supportconfig @@ -3,79 +3,51 @@ # Name: Supportconfig Plugin for QEMU/KVM # Description: Gathers important troubleshooting information # about QEMU -# Author: Jim Fehlig ############################################################# -RCFILE="/usr/lib/supportconfig/resources/scplugin.rc" +RCFILE="/usr/lib/supportconfig/resources/supportconfig.rc" +OF="output-qemu.txt" if [ -s $RCFILE ]; then if ! source $RCFILE; then - echo "ERROR: Initializing resource file: $RCFILE" >&2 + log_write $OF "ERROR: Initializing resource file: $RCFILE" exit 1 fi fi -rpm_verify() { - thisrpm="$1" - local ret=0 - - echo - echo "#==[ Validating RPM ]=================================#" - if rpm -q "$thisrpm" >/dev/null 2>&1; then - echo "# rpm -V $thisrpm" - - if rpm -V "$thisrpm"; then - echo "Status: Passed" - else - echo "Status: WARNING" - fi - else - echo "package $thisrpm is not installed" - ret=1 - fi - echo - return $ret -} - -if ! rpm_verify qemu; then - echo "Skipped" - exit 0 -fi +rpm_verify $OF qemu || exit 111 # skip if the host is xen -echo "#==[ Checking if booted Xen ]=================================#" +log_write $OF "#==[ Checking if booted Xen ]=================================#" if [ -d /proc/xen ] && [ -e /proc/xen/capabilities ] && [ `cat /proc/xen/capabilities` = "control_d" ]; then - echo "Yes" - echo "Skipped" + log_write $OF "Yes" + log_write $OF "Skipped" exit 0 else - echo "No" - echo + log_write $OF "No" fi # basic system information -plugin_command "uname -r" -plugin_command "lscpu" -plugin_command "lspci -v" -plugin_command "lsscsi" -plugin_command "kvm_stat -1" -plugin_command "lsmod | grep ^kvm" +log_cmd $OF "uname -r" +log_cmd $OF "lscpu" +log_cmd $OF "lspci -v" +log_cmd $OF "lsscsi" +log_cmd $OF "kvm_stat -1" +log_cmd $OF "lsmod | grep ^kvm" for MODULE in `lsmod | grep ^kvm | cut -d ' ' -f 1`; do - plugin_command "modinfo $MODULE" + log_cmd $OF "modinfo $MODULE" done -plugin_command "ps -ef | grep qemu" +log_cmd $OF "ps -ef | grep qemu" # list contents of common config and image directories -plugin_command "ls -alR /var/lib/libvirt/images/" +log_cmd $OF "ls -alR /var/lib/libvirt/images/" # network-related info often useful for debugging nm_enabled=$(systemctl is-enabled NetworkManager.service > /dev/null 2>&1; echo $?) if [ $nm_enabled -eq 0 ]; then - echo "NOTE: NetworkManager should not be enabled on a KVM host" + log_write $OF "NOTE: NetworkManager should not be enabled on a KVM host" fi -plugin_command "ip route list" -plugin_command "ip neigh list" -plugin_command "ip link show type bridge" -plugin_command "bridge link show" - -echo "Done" +log_cmd $OF "ip route list" +log_cmd $OF "ip neigh list" +log_cmd $OF "ip link show type bridge" +log_cmd $OF "bridge link show" -- 2.51.1 From 1eeb244c3505aba22e306ce9bf8bf66011266d9c Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 21 Nov 2023 09:43:39 +0100 Subject: [PATCH 045/102] [openSUSE] Make Sphinx build reproducible (boo#1102408) Avoid parallel processing in sphinx because that causes variations in generated files This is addressed here, with a downstream patch, until a proper solution is found upstream. Signed-off-by: Bernhard Wiedemann References: boo#1102408 Signed-off-by: Dario Faggioli --- docs/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index 322452c877..53c15998a0 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -13,12 +13,12 @@ if sphinx_build.found() sphinx_version = run_command(SPHINX_ARGS + ['--version'], check: true).stdout().split()[1] if sphinx_version.version_compare('>=1.7.0') - SPHINX_ARGS += ['-j', 'auto'] + SPHINX_ARGS += ['-j', '1'] else nproc = find_program('nproc') if nproc.found() jobs = run_command(nproc, check: true).stdout() - SPHINX_ARGS += ['-j', jobs] + SPHINX_ARGS += ['-j', '1'] endif endif -- 2.51.1 From 44bce916d8d8fa350b64f34009201c13d5c20923 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 28 Nov 2023 16:55:35 +0100 Subject: [PATCH 046/102] [openSUSE] Update version to 8.1.3 Align to upstream stable release. It includes many of the patches we had backported ourself, to fix bugs and issues, plus more. See here for details: - https://lore.kernel.org/qemu-devel/1700589639.257680.3420728.nullmailer@tls.msk.ru/ - https://gitlab.com/qemu-project/qemu/-/commits/stable-8.1?ref_type=heads An (incomplete!) list of such backports is: * Update version for 8.1.3 release * hw/mips: LOONGSON3V depends on UNIMP device * target/arm: HVC at EL3 should go to EL3, not EL2 * s390x/pci: only limit DMA aperture if vfio DMA limit reported * target/riscv/kvm: support KVM_GET_REG_LIST * target/riscv/kvm: improve 'init_multiext_cfg' error msg * tracetool: avoid invalid escape in Python string * tests/tcg/s390x: Test LAALG with negative cc_src * target/s390x: Fix LAALG not updating cc_src * tests/tcg/s390x: Test CLC with inaccessible second operand * target/s390x: Fix CLC corrupting cc_src * tests/qtest: ahci-test: add test exposing reset issue with pending callback * hw/ide: reset: cancel async DMA operation before resetting state * target/mips: Fix TX79 LQ/SQ opcodes * target/mips: Fix MSA BZ/BNZ opcodes displacement * ui/gtk-egl: apply scale factor when calculating window's dimension * ui/gtk: force realization of drawing area * ati-vga: Implement fallback for pixman routines * ... Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index faf1344c78..af70d46678 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.2 +Version: 8.1.3 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 203c1ffdb5..325ff22695 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.2 +Version: 8.1.3 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From a566e25d1da161fbdc9ff95ee896a2fcfa12eea4 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 11 Dec 2023 17:43:41 +0100 Subject: [PATCH 047/102] [openSUSE][RPM] New subpackage, for SPICE Define a new sub-(meta-)package that can be installed for having all the other modules and packages necessary for SPICE to work. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 325ff22695..88f5a935b6 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -990,6 +990,24 @@ make -O V=1 VERBOSE=1 -j1 check-qtest # enable this at a later point #make -O V=1 VERBOSE=1 -j1 check-report.junit.xml +%package spice +Summary: Modules and packages for SPICE +Group: System/Emulators/PC +Requires: qemu-headless +Requires: qemu-audio-spice +Requires: qemu-chardev-spice +Requires: qemu-hw-display-qxl +Requires: qemu-hw-usb-redirect +Requires: qemu-ui-spice-core + +%description spice +%{generic_qemu_description} + +This meta-package brings in, as dependencies, the modules and packages +necessary for having SPICE working for your VMs. + +%files spice + %package headless Summary: Minimum set of packages for having a functional QEMU Group: System/Emulators/PC @@ -998,10 +1016,7 @@ Requires: qemu-img %if %{legacy_qemu_kvm} Requires: qemu-kvm %endif -Requires: qemu-hw-usb-redirect -# qemu-ui-spice-core will bring in qemu-audio-spice qemu-ui-opengl too -Requires: qemu-ui-spice-core -Requires: qemu-chardev-spice +Recommends: qemu-tools %description headless %{generic_qemu_description} -- 2.51.1 From 2dc21564902793fcb2283c34024832b42f2a26d9 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 10 Jan 2024 18:41:03 +0100 Subject: [PATCH 048/102] [openSUSE][RPM] Normalize hostname, for reproducible builds Use a fixed USER value (in case someone builds outside of OBS/osc). References: boo#1084909 Signed-off-by: Bernhard M. Wiedemann Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 88f5a935b6..d66367f460 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -839,6 +839,8 @@ done %install cd %blddir +export USER=abuild +export HOSTNAME=OBS # is used in roms/SLOF/Makefile.gen (boo#1084909) %make_build install DESTDIR=%{buildroot} -- 2.51.1 From ced0ae8b87eed7eda05d7f92902997b51cb8987d Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 15 Dec 2023 13:27:03 +0100 Subject: [PATCH 049/102] [openSUSE][RPM] Some more refinements of inter-subpackage dependencies Add some block drivers and virtiofsd as hard dependencies of the qemu-headless package, to make sure it's really useful for headless server environments (even when recommended packages are not installed). Singed-off-by: Dario Faggioli --- rpm/qemu.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index d66367f460..210b944c9b 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1014,7 +1014,10 @@ necessary for having SPICE working for your VMs. Summary: Minimum set of packages for having a functional QEMU Group: System/Emulators/PC Requires: qemu +Requires: qemu-block-curl +Requires: qemu-block-nfs Requires: qemu-img +Requires: virtiofsd %if %{legacy_qemu_kvm} Requires: qemu-kvm %endif -- 2.51.1 From 4f6d0eb69c622371f43d6c34eb9eb4d0b1eced44 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 15 Dec 2023 13:36:43 +0100 Subject: [PATCH 050/102] [openSUSE][RPM] Disable Xen support in ALP-based distros Signed-off-by: Dario Faggioli --- rpm/common.inc | 7 +++++++ rpm/qemu.spec | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/rpm/common.inc b/rpm/common.inc index 7cfb44518a..6a4caa77b5 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -12,12 +12,19 @@ %define legacy_qemu_kvm 0 %define force_fit_virtio_pxe_rom 1 +%define with_xen 0%{!?_without_xen:1} + %if "%{?distribution}" == "" %define distro private-build %else %define distro %{distribution} %endif +# Items to exclude in ALP-based products +%if 0%{?suse_version} == 1600 +%define with_xen 0 +%endif + %bcond_with system_membarrier %bcond_with malloc_trim diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 210b944c9b..a30839aa16 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -115,7 +115,9 @@ BuildRequires: cross-ppc64-gcc%gcc_version %endif %ifarch x86_64 BuildRequires: gcc-32bit +%if %{with_xen} BuildRequires: xen-devel >= 4.2 +%endif BuildRequires: pkgconfig(libpmem) %endif %ifnarch %arm s390x @@ -637,9 +639,11 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %ifarch x86_64 --enable-avx2 \ --enable-libpmem \ +%if %{with_xen} --enable-xen \ --enable-xen-pci-passthrough \ %endif +%endif %ifnarch %arm s390x --enable-numa \ %endif -- 2.51.1 From f109e8acf529b190913a4b341bf2b14464b97711 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 21 Dec 2023 14:43:28 +0100 Subject: [PATCH 051/102] [openSUSE][RPM] Add support for canokeys (boo#1217520) --- rpm/common.inc | 6 ++++++ rpm/qemu.spec | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/rpm/common.inc b/rpm/common.inc index 6a4caa77b5..233e6786f1 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -30,6 +30,12 @@ %bcond_with chkqtests +%ifarch x86_64 +%bcond_without canokey +%else +%bcond_with canokey +%endif + # non-x86 archs still seem to have some issues with Link Time Optimization %ifnarch %ix86 x86_64 %define _lto_cflags %{nil} diff --git a/rpm/qemu.spec b/rpm/qemu.spec index a30839aa16..39e5d9ef1b 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -129,6 +129,9 @@ BuildRequires: pkgconfig(libndctl) %if 0%{?with_rbd} BuildRequires: librbd-devel %endif +%if 0%{with canokey} +BuildRequires: canokey-qemu-devel +%endif %if 0%{?with_uring} BuildRequires: pkgconfig(liburing) >= %liburing_min_version %endif @@ -658,6 +661,9 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %endif %if 0%{?with_rbd} --enable-rbd \ +%endif +%if 0%{with canokey} + --enable-canokey \ %endif --enable-alsa \ --enable-attr \ -- 2.51.1 From 1e08e90f971607dede00bd514a6789264feaab57 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 9 Jan 2024 15:11:00 +0100 Subject: [PATCH 052/102] [openSUSE][RPM] Fix virtiofsd dependency on 32 bit systems And make the switch more general, as we now have multiple instances of it. Signed-off-by: Dario Faggioli --- rpm/common.inc | 6 ++++++ rpm/qemu.spec | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index 233e6786f1..6eba8c7055 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -36,6 +36,12 @@ %bcond_with canokey %endif +%define has_virtiofsd 1 +# Upstream virtiofsd does not even build on 32 bit systems +%ifarch %ix86 %arm +%define has_virtiofsd 0 +%endif + # non-x86 archs still seem to have some issues with Link Time Optimization %ifnarch %ix86 x86_64 %define _lto_cflags %{nil} diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 39e5d9ef1b..0fec2119db 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1027,7 +1027,9 @@ Requires: qemu Requires: qemu-block-curl Requires: qemu-block-nfs Requires: qemu-img +%if %{has_virtiofsd} Requires: virtiofsd +%endif %if %{legacy_qemu_kvm} Requires: qemu-kvm %endif @@ -1631,8 +1633,7 @@ Requires(pre): permissions Requires: qemu-img Requires: qemu-pr-helper Requires: group(kvm) -# Upstream virtiofsd does not even build on 32 bit systems... -%ifnarch %ix86 %arm +%if %{has_virtiofsd} Requires: virtiofsd %endif Recommends: multipath-tools -- 2.51.1 From 92d28435bbef90f6c075ef28780447feb203848e Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 10 Jan 2024 11:40:18 +0100 Subject: [PATCH 053/102] [openSUSE][RPM] Restrict canokey to openSUSE only Signed-off-by: Dario Faggioli --- rpm/common.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpm/common.inc b/rpm/common.inc index 6eba8c7055..e2f63aa787 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -30,11 +30,14 @@ %bcond_with chkqtests +%if 0%{?suse_version} > 1600 +# canokey is an openSUSE thing, not a SLE one %ifarch x86_64 %bcond_without canokey %else %bcond_with canokey %endif +%endif %define has_virtiofsd 1 # Upstream virtiofsd does not even build on 32 bit systems -- 2.51.1 From 20fb4abfb4a2cf762a7438c7595919fed3e4ad70 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 11 Jan 2024 11:50:18 +0100 Subject: [PATCH 054/102] [openSUSE][RPM] Update version to 8.2 Update to latest upstream release. The full list of changes are available at: https://wiki.qemu.org/ChangeLog/8.2 Highlights include: * New virtio-sound device emulation * New virtio-gpu rutabaga device emulation used by Android emulator * New hv-balloon for dynamic memory protocol device for Hyper-V guests * New Universal Flash Storage device emulation * Network Block Device (NBD) 64-bit offsets for improved performance * dump-guest-memory now supports the standard kdump format * ARM: Xilinx Versal board now models the CFU/CFI, and the TRNG device * ARM: CPU emulation support for cortex-a710 and neoverse-n2 * ARM: architectural feature support for PACQARMA3, EPAC, Pauth2, FPAC, FPACCOMBINE, TIDCP1, MOPS, HBC, and HPMN0 * HPPA: CPU emulation support for 64-bit PA-RISC 2.0 * HPPA: machine emulation support for C3700, including Astro memory controller and four Elroy PCI bridges * LoongArch: ISA support for LASX extension and PRELDX instruction * LoongArch: CPU emulation support for la132 * RISC-V: ISA/extension support for AIA virtualization support via KVM, and vector cryptographic instructions * RISC-V: Numerous extension/instruction cleanups, fixes, and reworks * s390x: support for vfio-ap passthrough of crypto adapter for protected virtualization guests * Tricore: support for TC37x CPU which implements ISA v1.6.2 * Tricore: support for CRCN, FTOU, FTOHP, and HPTOF instructions * x86: Zen support for PV console and network devices Signed-off-by: Dario Faggioli --- rpm/common.inc | 14 ++++++- rpm/qemu-linux-user.spec | 26 +++++++++--- rpm/qemu.spec | 91 ++++++++++++++++++++++++++-------------- 3 files changed, 92 insertions(+), 39 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index e2f63aa787..35b67362c2 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -1,6 +1,6 @@ %define _buildshell /bin/bash -%define sbver 1.16.2_3_gd478f380 +%define sbver 1.16.3_3_ga6ed6b70 %define srcdir %{_builddir}/%buildsubdir %define blddir %srcdir/build @@ -39,6 +39,18 @@ %endif %endif +%if 0%{?suse_version} > 1600 +# XDP seems not to be there in SLE... +%bcond_without xdp +%else +%bcond_with xdp +%endif + +# We do not have the stuff needed to compile rutabaga support. +# If/when we want to do it, we can check how it's done here: +# https://src.fedoraproject.org/rpms/qemu/c/deeb9357cb751df21c566fd8408936cfb034d43b?branch=rawhide +%define has_rutabaga_gfx 0 + %define has_virtiofsd 1 # Upstream virtiofsd does not even build on 32 bit systems %ifarch %ix86 %arm diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index af70d46678..d5c863b892 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.3 +Version: 8.2.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -51,9 +51,14 @@ BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: meson BuildRequires: ninja >= 1.7 -BuildRequires: perl-Text-Markdown -BuildRequires: python3-base >= 3.6 -BuildRequires: python3-setuptools +BuildRequires: discount +%if 0%{?suse_version} >= 1600 +BuildRequires: python3-base >= 3.8 +BuildRequires: python3-Sphinx +%else +BuildRequires: python311-base +BuildRequires: python311-Sphinx +%endif %description QEMU provides CPU emulation along with other related capabilities. This package @@ -147,6 +152,11 @@ cd %blddir EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-error" %srcdir/configure \ +%if 0%{?suse_version} >= 1600 + --python=%_bindir/python3 \ +%else + --python=%_bindir/python3.11 \ +%endif --docdir=%_docdir \ --datadir=%_datadir \ --extra-cflags="${EXTRA_CFLAGS}" \ @@ -155,9 +165,9 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --libexecdir=%_libexecdir \ --localstatedir=%_localstatedir \ --prefix=%_prefix \ - --python=%_bindir/python3 \ --sysconfdir=%_sysconfdir \ --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --disable-af-xdp \ --disable-alsa \ --disable-attr \ --disable-auth-pam \ @@ -199,7 +209,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-gtk \ --disable-guest-agent \ --disable-guest-agent-msi \ - --disable-hax \ + --disable-hv-balloon \ --disable-hvf \ --disable-iconv \ --disable-jack \ @@ -207,6 +217,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-l2tpv3 \ --disable-libdaxctl \ --disable-libiscsi \ + --disable-libkeyutils \ --disable-libnfs \ --disable-libpmem \ --disable-libssh \ @@ -235,6 +246,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-parallels \ --disable-pie \ --disable-pipewire \ + --disable-pixman \ --disable-plugins \ --disable-png \ --disable-pvrdma \ @@ -243,8 +255,10 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-qom-cast-debug \ --disable-rbd \ --disable-rdma \ + --disable-relocatable \ --disable-replication \ --disable-rng-none \ + --disable-rutabaga-gfx \ --disable-safe-stack \ --disable-sanitizers \ --disable-sdl \ diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 0fec2119db..5bad1b2452 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.1.3 +Version: 8.2.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -129,6 +129,9 @@ BuildRequires: pkgconfig(libndctl) %if 0%{?with_rbd} BuildRequires: librbd-devel %endif +%if 0%{with xdp} +BuildRequires: libxdp-devel +%endif %if 0%{with canokey} BuildRequires: canokey-qemu-devel %endif @@ -141,7 +144,11 @@ BuildRequires: pkgconfig(udev) BuildRequires: Mesa-devel BuildRequires: bison BuildRequires: brlapi-devel +BuildRequires: discount +BuildRequires: fdupes BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: keyutils-devel BuildRequires: libaio-devel BuildRequires: libattr-devel BuildRequires: libbpf-devel @@ -150,15 +157,11 @@ BuildRequires: libcapstone-devel BuildRequires: libfdt-devel >= 1.4.2 BuildRequires: libgcrypt-devel >= 1.8.0 BuildRequires: lzfse-devel +BuildRequires: meson BuildRequires: multipath-tools-devel +BuildRequires: ninja >= 1.7 BuildRequires: pam-devel BuildRequires: pkgconfig -BuildRequires: python3-Sphinx -BuildRequires: rdma-core-devel -BuildRequires: snappy-devel -BuildRequires: update-desktop-files -BuildRequires: usbredir-devel >= 0.6 -BuildRequires: xfsprogs-devel BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(epoxy) BuildRequires: pkgconfig(gbm) @@ -174,8 +177,8 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libiscsi) >= 1.9.0 BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libnfs) >= 1.9.3 -BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpipewire-0.3) +BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libsasl2) BuildRequires: pkgconfig(libseccomp) >= 2.3.0 @@ -195,14 +198,19 @@ BuildRequires: pkgconfig(virglrenderer) >= 0.4.1 BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(zlib) +%if 0%{?suse_version} >= 1600 +BuildRequires: python3-base >= 3.8 +BuildRequires: python3-Sphinx +%else +BuildRequires: python311-base +BuildRequires: python311-Sphinx +%endif +BuildRequires: rdma-core-devel +BuildRequires: snappy-devel +BuildRequires: update-desktop-files +BuildRequires: usbredir-devel >= 0.6 +BuildRequires: xfsprogs-devel %{?systemd_ordering} -BuildRequires: fdupes -BuildRequires: gcc-c++ -BuildRequires: meson -BuildRequires: ninja >= 1.7 -BuildRequires: discount -BuildRequires: python3-base >= 3.6 -BuildRequires: python3-setuptools %if %{kvm_available} %ifarch %ix86 x86_64 Requires: qemu-x86 @@ -486,6 +494,11 @@ cd %blddir EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g') -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-error" %srcdir/configure \ +%if 0%{?suse_version} >= 1600 + --python=%_bindir/python3 \ +%else + --python=%_bindir/python3.11 \ +%endif --docdir=%_docdir \ --datadir=%_datadir \ --extra-cflags="${EXTRA_CFLAGS}" \ @@ -494,9 +507,9 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --libexecdir=%_libexecdir \ --localstatedir=%_localstatedir \ --prefix=%_prefix \ - --python=%_bindir/python3 \ --sysconfdir=%_sysconfdir \ --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --disable-af-xdp \ --disable-alsa \ --disable-attr \ --disable-auth-pam \ @@ -538,7 +551,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-gtk \ --disable-guest-agent \ --disable-guest-agent-msi \ - --disable-hax \ + --disable-hv-balloon \ --disable-hvf \ --disable-iconv \ --disable-jack \ @@ -546,6 +559,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-l2tpv3 \ --disable-libdaxctl \ --disable-libiscsi \ + --disable-libkeyutils \ --disable-libnfs \ --disable-libpmem \ --disable-libssh \ @@ -574,6 +588,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-parallels \ --disable-pie \ --disable-pipewire \ + --disable-pixman \ --disable-plugins \ --disable-png \ --disable-pvrdma \ @@ -582,8 +597,10 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-qom-cast-debug \ --disable-rbd \ --disable-rdma \ + --disable-relocatable \ --disable-replication \ --disable-rng-none \ + --disable-rutabaga-gfx \ --disable-safe-stack \ --disable-sanitizers \ --disable-sdl \ @@ -628,17 +645,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-xkbcommon \ --disable-zstd \ --without-default-devices \ -%if %{with system_membarrier} - --enable-membarrier \ -%endif -%if %{with malloc_trim} - --enable-malloc-trim \ -%endif -%if "%{_lto_cflags}" != "%{nil}" - --enable-lto \ -%endif --audio-drv-list=pipewire,pa,alsa,jack,oss \ - --enable-auth-pam \ %ifarch x86_64 --enable-avx2 \ --enable-libpmem \ @@ -646,9 +653,11 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-xen \ --enable-xen-pci-passthrough \ %endif +%if 0%{with xdp} + --enable-af-xdp \ %endif -%ifnarch %arm s390x - --enable-numa \ +%if 0%{with canokey} + --enable-canokey \ %endif %if %{kvm_available} --enable-kvm \ @@ -659,17 +668,31 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %if 0%{?with_uring} --enable-linux-io-uring \ %endif +%if "%{_lto_cflags}" != "%{nil}" + --enable-lto \ +%endif +%if %{with malloc_trim} + --enable-malloc-trim \ +%endif +%if %{with system_membarrier} + --enable-membarrier \ +%endif +%ifnarch %arm s390x + --enable-numa \ +%endif +%endif %if 0%{?with_rbd} --enable-rbd \ %endif -%if 0%{with canokey} - --enable-canokey \ +%if %{has_rutabaga_gfx} + --enable-rutabaga-gfx \ %endif --enable-alsa \ --enable-attr \ + --enable-auth-pam \ --enable-bochs \ - --enable-brlapi \ --enable-bpf \ + --enable-brlapi \ --enable-bzip2 \ --enable-cap-ng \ --enable-capstone \ @@ -688,10 +711,12 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-gnutls \ --enable-gtk \ --enable-guest-agent \ + --enable-hv-balloon \ --enable-iconv \ --enable-jack \ --enable-l2tpv3 \ --enable-libiscsi \ + --enable-libkeyutils \ --enable-libnfs \ --enable-libssh \ --enable-libudev \ @@ -708,11 +733,13 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-parallels \ --enable-pie \ --enable-pipewire \ + --enable-pixman \ --enable-png \ --enable-pvrdma \ --enable-qcow1 \ --enable-qed \ --enable-rdma \ + --enable-relocatable \ --enable-replication \ --enable-seccomp \ --enable-selinux \ -- 2.51.1 From 757eb2384276fdd85ede82934318e5d0884c9875 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 11 Jan 2024 12:14:22 +0100 Subject: [PATCH 055/102] [openSUSE] Update submodule references for 8.2.0 Point the submodules to the repositories that host our downstream patches: * roms/seabios - [openSUSE] switch to python3 as needed - [openSUSE] build: enable cross compilation on ARM - [openSUSE] build: be explicit about -mx86-used-note=no * roms/SLOF - Allow to override build date with SOURCE_DATE_EPOCH * roms/ipxe - [ath5k] Add missing AR5K_EEPROM_READ in ath5k_eeprom_read_turbo_modes - [openSUSE] [build] Makefile: fix issues of build reproducibility - [openSUSE] [test] help compiler out by initializing array[openSUSE] - [openSUSE] [build] Silence GCC 12 spurious warnings - [librm] Use explicit operand size when pushing a label address * roms/skiboot - [openSUSE] Makefile: define endianess for cross-building on aarch64 - [openSUSE] Make Sphinx build reproducible (boo#1102408) * roms/qboot - [openSUSE] add cross.ini file to handle aarch64 based build Signed-off-by: Dario Faggioli --- .gitmodules | 10 +++++----- roms/SLOF | 2 +- roms/ipxe | 2 +- roms/qboot | 2 +- roms/seabios | 2 +- roms/skiboot | 2 +- rpm/common.inc | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitmodules b/.gitmodules index 541d7f6571..76d26f77c3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,12 @@ [submodule "roms/seabios"] path = roms/seabios - url = https://gitlab.com/qemu-project/seabios.git/ + url = https://github.com/openSUSE/qemu-seabios.git [submodule "roms/SLOF"] path = roms/SLOF - url = https://gitlab.com/qemu-project/SLOF.git + url = https://github.com/openSUSE/qemu-SLOF.git [submodule "roms/ipxe"] path = roms/ipxe - url = https://gitlab.com/qemu-project/ipxe.git + url = https://github.com/openSUSE/qemu-ipxe.git [submodule "roms/openbios"] path = roms/openbios url = https://gitlab.com/qemu-project/openbios.git @@ -18,7 +18,7 @@ url = https://gitlab.com/qemu-project/u-boot.git [submodule "roms/skiboot"] path = roms/skiboot - url = https://gitlab.com/qemu-project/skiboot.git + url = https://github.com/openSUSE/qemu-skiboot.git [submodule "roms/QemuMacDrivers"] path = roms/QemuMacDrivers url = https://gitlab.com/qemu-project/QemuMacDrivers.git @@ -36,7 +36,7 @@ url = https://gitlab.com/qemu-project/opensbi.git [submodule "roms/qboot"] path = roms/qboot - url = https://gitlab.com/qemu-project/qboot.git + url = https://github.com/openSUSE/qemu-qboot.git [submodule "roms/vbootrom"] path = roms/vbootrom url = https://gitlab.com/qemu-project/vbootrom.git diff --git a/roms/SLOF b/roms/SLOF index 3a259df244..f818481284 160000 --- a/roms/SLOF +++ b/roms/SLOF @@ -1 +1 @@ -Subproject commit 3a259df2449fc4a4e43ab5f33f0b2c66484b4bc3 +Subproject commit f8184812847bde0e76b6062b32dc0551f6b3700b diff --git a/roms/ipxe b/roms/ipxe index 4bd064de23..3a529460f0 160000 --- a/roms/ipxe +++ b/roms/ipxe @@ -1 +1 @@ -Subproject commit 4bd064de239dab2426b31c9789a1f4d78087dc63 +Subproject commit 3a529460f02ee0347cb7f6553e68a2317fd6b24d diff --git a/roms/qboot b/roms/qboot index 8ca302e86d..a923c8e623 160000 --- a/roms/qboot +++ b/roms/qboot @@ -1 +1 @@ -Subproject commit 8ca302e86d685fa05b16e2b208888243da319941 +Subproject commit a923c8e623e0e8bb7db50cbd2358bb76a5f04a15 diff --git a/roms/seabios b/roms/seabios index a6ed6b701f..a95067ebbb 160000 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit a6ed6b701f0a57db0569ab98b0661c12a6ec3ff8 +Subproject commit a95067ebbbfdee9b6ebde20ee702272103553455 diff --git a/roms/skiboot b/roms/skiboot index 24a7eb3596..cfe312b915 160000 --- a/roms/skiboot +++ b/roms/skiboot @@ -1 +1 @@ -Subproject commit 24a7eb35966d93455520bc2debdd7954314b638b +Subproject commit cfe312b915637ca379b9e3b578250cce4e933ffa diff --git a/rpm/common.inc b/rpm/common.inc index 35b67362c2..b303c9cd42 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -1,6 +1,6 @@ %define _buildshell /bin/bash -%define sbver 1.16.3_3_ga6ed6b70 +%define sbver 1.16.3_3_ga95067eb %define srcdir %{_builddir}/%buildsubdir %define blddir %srcdir/build -- 2.51.1 From 90a0ef30244efcdd73fdd7829d127327c7d88a89 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Fri, 9 Feb 2024 10:10:46 +0100 Subject: [PATCH 056/102] [openSUSE][RPM] Fix enabling features on non-x86_64 The %endif was in the wrong place, so on non-x86_64, most features were disabled. --- rpm/qemu.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 5bad1b2452..c079cc0cf9 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -653,6 +653,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-xen \ --enable-xen-pci-passthrough \ %endif +%endif %if 0%{with xdp} --enable-af-xdp \ %endif @@ -680,7 +681,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %ifnarch %arm s390x --enable-numa \ %endif -%endif %if 0%{?with_rbd} --enable-rbd \ %endif -- 2.51.1 From 62d1aa07f2094504f1420960bf62693bb3716bd8 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 12 Feb 2024 10:48:06 +0100 Subject: [PATCH 057/102] [openSUSE][RPM] Disable test-crypto-secret in linux-user build --- rpm/qemu.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index c079cc0cf9..80dfbda84a 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1004,6 +1004,8 @@ cp %{rpmfilesdir}/APIC.core-count2 %{rpmfilesdir}/DSDT.core-count2 %{rpmfilesdir %if 0%{?qemu_user_space_build} # Seccomp is not supported by linux-user emulation echo 'int main (void) { return 0; }' > %{srcdir}/tests/unit/test-seccomp.c +# keyctl is not yet supported by linux-user emulation +echo 'int main (void) { return 0; }' > %{srcdir}/tests/unit/test-crypto-secret.c %endif # Compile the QOM test binary first, so that ... -- 2.51.1 From fca072d144e66bd175dcebbd54e2d55b6beb994c Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 14 Feb 2024 10:53:18 +0100 Subject: [PATCH 058/102] [openSUSE] Update ipxe submodule reference (bsc#1219733, bsc#1219722) Add to the ipxe submodule the commit (and all its dependencies) for fixing building with binutils 2.42 References: bsc#1219733 References: bsc#1219722 Signed-off-by: Dario Faggioli --- roms/ipxe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roms/ipxe b/roms/ipxe index 3a529460f0..f07b8debea 160000 --- a/roms/ipxe +++ b/roms/ipxe @@ -1 +1 @@ -Subproject commit 3a529460f02ee0347cb7f6553e68a2317fd6b24d +Subproject commit f07b8debea3310ceb288fb19abcfc4f4f66f3cec -- 2.51.1 From 90c13764b399fe5f3990553b541036dd2f6e5278 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 13 Feb 2024 17:24:35 +0100 Subject: [PATCH 059/102] [openSUSE][RPM] spec: allow building without spice Signed-off-by: Dario Faggioli --- rpm/common.inc | 3 + rpm/qemu.spec | 291 ++++++++++++++++++++++++++----------------------- 2 files changed, 159 insertions(+), 135 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index b303c9cd42..3207c4291b 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -46,6 +46,9 @@ %bcond_with xdp %endif +# Make it possible to build without spice (for SLE/Leap Micro) +%bcond_without spice + # We do not have the stuff needed to compile rutabaga support. # If/when we want to do it, we can check how it's done here: # https://src.fedoraproject.org/rpms/qemu/c/deeb9357cb751df21c566fd8408936cfb034d43b?branch=rawhide diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 80dfbda84a..51c9e7b944 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -89,6 +89,7 @@ Source1: common.inc Source303: README.PACKAGING Source1000: qemu-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build +## Packages we REQUIRE during build %if %{build_x86_firmware} %ifnarch %ix86 x86_64 # We must cross-compile on non-x86* @@ -123,23 +124,34 @@ BuildRequires: pkgconfig(libpmem) %ifnarch %arm s390x BuildRequires: libnuma-devel %endif +%if 0%{with canokey} +BuildRequires: canokey-qemu-devel +%endif %if 0%{?with_daxctl} BuildRequires: pkgconfig(libndctl) %endif +%if %{kvm_available} +BuildRequires: pkgconfig(udev) +%endif %if 0%{?with_rbd} BuildRequires: librbd-devel %endif -%if 0%{with xdp} -BuildRequires: libxdp-devel -%endif -%if 0%{with canokey} -BuildRequires: canokey-qemu-devel +%if 0%{with spice} +BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 +BuildRequires: pkgconfig(spice-server) >= 0.12.5 %endif %if 0%{?with_uring} BuildRequires: pkgconfig(liburing) >= %liburing_min_version %endif -%if %{kvm_available} -BuildRequires: pkgconfig(udev) +%if 0%{with xdp} +BuildRequires: libxdp-devel +%endif +%if 0%{?suse_version} >= 1600 +BuildRequires: python3-base >= 3.8 +BuildRequires: python3-Sphinx +%else +BuildRequires: python311-base +BuildRequires: python311-Sphinx %endif BuildRequires: Mesa-devel BuildRequires: bison @@ -188,29 +200,80 @@ BuildRequires: pkgconfig(libusb-1.0) >= 1.0.13 BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(lzo2) BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(openssl) >= 1.0.0 BuildRequires: pkgconfig(pixman-1) >= 0.21.8 BuildRequires: pkgconfig(slirp) >= 4.2.0 -BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 -BuildRequires: pkgconfig(spice-server) >= 0.12.5 BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(vdeplug) BuildRequires: pkgconfig(virglrenderer) >= 0.4.1 BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(zlib) -%if 0%{?suse_version} >= 1600 -BuildRequires: python3-base >= 3.8 -BuildRequires: python3-Sphinx -%else -BuildRequires: python311-base -BuildRequires: python311-Sphinx -%endif BuildRequires: rdma-core-devel BuildRequires: snappy-devel BuildRequires: update-desktop-files BuildRequires: usbredir-devel >= 0.6 BuildRequires: xfsprogs-devel %{?systemd_ordering} +## Packages we will REQUIRE +%if %{kvm_available} +Requires(post): acl +Requires(post): udev +%endif +Requires(post): coreutils +Requires: group(kvm) +Requires: group(qemu) +Requires: user(qemu) +# Due to change in where some documentation files are, if qemu-guest-agent +# is installed, we need to make sure we update it to our version. +Requires: (qemu-guest-agent = %{version} if qemu-guest-agent) +## Packages we will RECOMMEND +%ifarch s390x +Recommends: qemu-hw-s390x-virtio-gpu-ccw +%else +Recommends: qemu-hw-display-qxl +Recommends: qemu-hw-display-virtio-gpu +Recommends: qemu-hw-display-virtio-gpu-pci +Recommends: qemu-hw-display-virtio-vga +Recommends: qemu-hw-usb-host +Recommends: qemu-hw-usb-redirect +Recommends: qemu-hw-usb-smartcard +%if 0%{with spice} +Recommends: qemu-ui-spice-app +%endif +# End of "ifarch s390x" +%endif +%if %{kvm_available} +Recommends: kvm_stat +%endif +Recommends: qemu-block-curl +Recommends: qemu-block-nfs +Recommends: qemu-ksm = %{version} +Recommends: qemu-tools +Recommends: qemu-ui-curses +## Packages we will SUGGEST +%if 0%{?with_rbd} +Suggests: qemu-block-rbd +%endif +Suggests: qemu-accel-qtest +Suggests: qemu-block-dmg +Suggests: qemu-block-gluster +Suggests: qemu-block-iscsi +Suggests: qemu-block-ssh +Suggests: qemu-chardev-baum +Suggests: qemu-extra +Suggests: qemu-lang +Suggests: qemu-microvm +Suggests: qemu-skiboot +Suggests: qemu-vhost-user-gpu +Suggests: qemu-ui-gtk +Suggests: qemu-doc +## Pacakges we OBSOLETE +Obsoletes: qemu-sgabios <= 8 +Obsoletes: qemu-audio-oss < %{version} +Obsoletes: qemu-audio-sdl < %{version} +Obsoletes: qemu-ui-sdl < %{version} +## What we do with the main emulator depends on the architecture we're on %if %{kvm_available} %ifarch %ix86 x86_64 Requires: qemu-x86 @@ -238,56 +301,8 @@ Requires: qemu-extra %else Suggests: qemu-extra %endif -Requires(post): acl -Requires(post): udev -Recommends: kvm_stat # End of "if kvm_available" %endif -Requires: group(kvm) -Requires: group(qemu) -Requires: user(qemu) -Requires(post): coreutils -%ifarch s390x -Recommends: qemu-hw-s390x-virtio-gpu-ccw -%else -# Due to change in where some documentation files are, if qemu-guest-agent -# is installed, we need to make sure we update it to our version. -Requires: (qemu-guest-agent = %{version} if qemu-guest-agent) -Recommends: qemu-hw-display-qxl -Recommends: qemu-hw-display-virtio-gpu -Recommends: qemu-hw-display-virtio-gpu-pci -Recommends: qemu-hw-display-virtio-vga -Recommends: qemu-hw-usb-host -Recommends: qemu-hw-usb-redirect -Recommends: qemu-hw-usb-smartcard -Recommends: qemu-ui-spice-app -# End of "ifarch s390x" -%endif -Recommends: qemu-block-curl -Recommends: qemu-block-nfs -Recommends: qemu-ksm = %{version} -Recommends: qemu-tools -Recommends: qemu-ui-curses -%if 0%{?with_rbd} -Suggests: qemu-block-rbd -%endif -Suggests: qemu-accel-qtest -Suggests: qemu-block-dmg -Suggests: qemu-block-gluster -Suggests: qemu-block-iscsi -Suggests: qemu-block-ssh -Suggests: qemu-chardev-baum -Suggests: qemu-extra -Suggests: qemu-lang -Suggests: qemu-microvm -Suggests: qemu-skiboot -Suggests: qemu-vhost-user-gpu -Suggests: qemu-ui-gtk -Suggests: qemu-doc -Obsoletes: qemu-sgabios <= 8 -Obsoletes: qemu-audio-oss < %{version} -Obsoletes: qemu-audio-sdl < %{version} -Obsoletes: qemu-ui-sdl < %{version} %description %{generic_qemu_description} @@ -747,8 +762,10 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-slirp-smbd \ --enable-smartcard \ --enable-snappy \ +%if 0%{with spice} --enable-spice \ --enable-spice-protocol \ +%endif --enable-system \ --enable-tcg \ --enable-tools \ @@ -1031,6 +1048,7 @@ make -O V=1 VERBOSE=1 -j1 check-qtest # enable this at a later point #make -O V=1 VERBOSE=1 -j1 check-report.junit.xml +%if 0%{with spice} %package spice Summary: Modules and packages for SPICE Group: System/Emulators/PC @@ -1049,6 +1067,80 @@ necessary for having SPICE working for your VMs. %files spice +%package audio-spice +Summary: Spice based audio support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description audio-spice +This package contains a module for Spice based audio support for QEMU. + +%files audio-spice +%dir %_libdir/%name +%_libdir/%name/audio-spice.so + +%package chardev-spice +Summary: Spice vmc and port chardev support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description chardev-spice +This package contains a module for Spice chardev support for QEMU. + +%files chardev-spice +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/chardev-spice.so + +%package ui-spice-app +Summary: Spice UI support for QEMU +Group: System/Emulators/PC +Requires: qemu-chardev-spice +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description ui-spice-app +This package contains a module for doing Spice based UI for QEMU. + +%files ui-spice-app +%dir %_libdir/%name +%_libdir/%name/ui-spice-app.so + +%package ui-spice-core +Summary: Core Spice support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-opengl +# This next Requires is only since virt-manager expects audio support +Requires: qemu-audio-spice +%{qemu_module_conflicts} + +%description ui-spice-core +This package contains a module with core Spice support for QEMU. + +%files ui-spice-core +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/ui-spice-core.so + +%package hw-display-qxl +Summary: QXL display support for QEMU +Group: System/Emulators/PC +Requires: qemu-ui-spice-core +%{qemu_module_conflicts} + +%description hw-display-qxl +This package contains a module for QXL display support for QEMU. + +%files hw-display-qxl +%dir %_datadir/%name +%dir %_libdir/%name +%_libdir/%name/hw-display-qxl.so + +# End of "with spice" +%endif + %package headless Summary: Minimum set of packages for having a functional QEMU Group: System/Emulators/PC @@ -1278,19 +1370,6 @@ This package contains a module for JACK based audio support for QEMU. %dir %_libdir/%name %_libdir/%name/audio-jack.so -%package audio-spice -Summary: Spice based audio support for QEMU -Group: System/Emulators/PC -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description audio-spice -This package contains a module for Spice based audio support for QEMU. - -%files audio-spice -%dir %_libdir/%name -%_libdir/%name/audio-spice.so - %package audio-oss Summary: OSS based audio support for QEMU Group: System/Emulators/PC @@ -1407,34 +1486,6 @@ This package contains a module for baum braille chardev support for QEMU. %dir %_libdir/%name %_libdir/%name/chardev-baum.so -%package chardev-spice -Summary: Spice vmc and port chardev support for QEMU -Group: System/Emulators/PC -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description chardev-spice -This package contains a module for Spice chardev support for QEMU. - -%files chardev-spice -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/chardev-spice.so - -%package hw-display-qxl -Summary: QXL display support for QEMU -Group: System/Emulators/PC -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description hw-display-qxl -This package contains a module for QXL display support for QEMU. - -%files hw-display-qxl -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/hw-display-qxl.so - %package hw-display-virtio-gpu Summary: Virtio GPU display support for QEMU Group: System/Emulators/PC @@ -1583,36 +1634,6 @@ This package contains a module for doing OpenGL based UI for QEMU. %_libdir/%name/ui-egl-headless.so %_libdir/%name/ui-opengl.so -%package ui-spice-app -Summary: Spice UI support for QEMU -Group: System/Emulators/PC -Requires: qemu-chardev-spice -Requires: qemu-ui-spice-core -%{qemu_module_conflicts} - -%description ui-spice-app -This package contains a module for doing Spice based UI for QEMU. - -%files ui-spice-app -%dir %_libdir/%name -%_libdir/%name/ui-spice-app.so - -%package ui-spice-core -Summary: Core Spice support for QEMU -Group: System/Emulators/PC -Requires: qemu-ui-opengl -# This next Requires is only since virt-manager expects audio support -Requires: qemu-audio-spice -%{qemu_module_conflicts} - -%description ui-spice-core -This package contains a module with core Spice support for QEMU. - -%files ui-spice-core -%dir %_datadir/%name -%dir %_libdir/%name -%_libdir/%name/ui-spice-core.so - %package vhost-user-gpu Summary: Vhost user mode virtio-gpu 2D/3D rendering backend for QEMU Group: System/Emulators/PC -- 2.51.1 From 854d583321073b6a368d6da8190c1311f5095ab3 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 16 Feb 2024 16:58:28 +0100 Subject: [PATCH 060/102] [openSUSE][RPM] Create the legacy qemu-kvm symlink for all arches Historically, KVM was available only for x86 and s390, and was invoked via a binary called 'kvm' or 'qemu-kvm'. For a while, we've shipped a package that was making it possible to invoke QEMU like that, but only for these two arches. This, however, created a lot of confusion and dependencies issues. Fix them by creating a symlink from 'qemu-kvm' to the proper binary on all arches and by making the main QEMU package Providing and Obsoleting (also on all arches) the old qemu-kvm one. Note that, for RISCV, the qemu-system-riscv64 binary, to which the symlink should point, is in the qemu-extra package. However, if we are on RISCV, qemu-extra is an hard dependency of qemu. Therefore, it's fine to ship the link and also set the Provides: and Obsoletes: tag in the qemu package itself. It'd be more correct to do that in the qemu-extra package, of course, but this would complicate the spec file and it's not worth it, considering this is all legacy and should very well go away soon. References: bsc#1218684 Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 84 ++++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 51c9e7b944..18352d19cc 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -268,10 +268,15 @@ Suggests: qemu-skiboot Suggests: qemu-vhost-user-gpu Suggests: qemu-ui-gtk Suggests: qemu-doc -## Pacakges we OBSOLETE -Obsoletes: qemu-sgabios <= 8 +## Packages we PROVIDE +Provides: kvm = %{version} +Provides: qemu-kvm = %{version} +## Pacakges we OBSOLETE (and CONFLICT) +Obsoletes: kvm <= %{version} Obsoletes: qemu-audio-oss < %{version} Obsoletes: qemu-audio-sdl < %{version} +Obsoletes: qemu-kvm <= %{version} +Obsoletes: qemu-sgabios <= 8 Obsoletes: qemu-ui-sdl < %{version} ## What we do with the main emulator depends on the architecture we're on %if %{kvm_available} @@ -310,6 +315,18 @@ Suggests: qemu-extra This package acts as an umbrella package to the other QEMU sub-packages. %files +%if %{kvm_available} +%ifarch s390x +%{_prefix}/lib/modules-load.d/kvm.conf +%endif +/usr/lib/udev/rules.d/80-kvm.rules +# End of "if kvm_available" +%endif +%if %{legacy_qemu_kvm} +%doc %_docdir/qemu-kvm +%_mandir/man1/qemu-kvm.1.gz +%endif +%_bindir/qemu-kvm %dir %_datadir/icons/hicolor %dir %_datadir/icons/hicolor/*/ %dir %_datadir/icons/hicolor/*/apps @@ -320,12 +337,6 @@ This package acts as an umbrella package to the other QEMU sub-packages. %dir %_sysconfdir/%name/firmware %dir /usr/lib/supportconfig %dir /usr/lib/supportconfig/plugins -%if %{kvm_available} -%ifarch s390x -%{_prefix}/lib/modules-load.d/kvm.conf -%endif -/usr/lib/udev/rules.d/80-kvm.rules -%endif %_datadir/applications/qemu.desktop %_datadir/icons/hicolor/16x16/apps/qemu.png %_datadir/icons/hicolor/24x24/apps/qemu.png @@ -919,17 +930,39 @@ install -D -m 0644 %{rpmfilesdir}/qemu-kvm.1.gz %{buildroot}%_mandir/man1/qemu-k install -d %{buildroot}%_docdir/qemu-kvm # FIXME: Why do we onlly generate the HTML for the legacy package documentation? %ifarch s390x -ln -s qemu-system-s390x %{buildroot}%_bindir/qemu-kvm ln -s ../qemu-s390x/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt rst2html --exit-status=2 %{buildroot}%_docdir/qemu-s390x/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html %else -ln -s qemu-system-x86_64 %{buildroot}%_bindir/qemu-kvm ln -s ../qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.txt rst2html --exit-status=2 %{buildroot}%_docdir/qemu-x86/supported.txt %{buildroot}%_docdir/qemu-kvm/kvm-supported.html # End of "ifarch s390x" %endif # End of "if legacy_qemu_kvm" %endif +%ifarch %ix86 +ln -s qemu-system-i386 %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch x86_64 +ln -s qemu-system-x86_64 %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch %arm +ln -s qemu-system-arm %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch aarch64 +ln -s qemu-system-aarch64 %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch ppc +ln -s qemu-system-ppc %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch ppc64 ppc64le +ln -s qemu-system-ppc64/ %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch s390x +ln -s qemu-system-s390x/ %{buildroot}%_bindir/qemu-kvm +%endif +%ifarch riscv64 +ln -s qemu-system-riscv64 %{buildroot}%_bindir/qemu-kvm +%endif %if %{kvm_available} install -D -m 0644 %{rpmfilesdir}/80-kvm.rules %{buildroot}/usr/lib/udev/rules.d/80-kvm.rules @@ -1151,9 +1184,6 @@ Requires: qemu-img %if %{has_virtiofsd} Requires: virtiofsd %endif -%if %{legacy_qemu_kvm} -Requires: qemu-kvm -%endif Recommends: qemu-tools %description headless @@ -1877,34 +1907,6 @@ for QEMU. # End of "if with_rbd" %endif -%if %{legacy_qemu_kvm} -%package kvm -Summary: Wrapper to enable KVM acceleration under QEMU -Group: System/Emulators/PC -%ifarch %ix86 x86_64 -Requires: qemu-x86 = %{version} -%endif -%ifarch s390x -Requires: qemu-s390x = %{version} -%endif -Provides: kvm = %{version} -Obsoletes: kvm < %{version} - -%description kvm -%{generic_qemu_description} - -This package provides a symlink to the main QEMU emulator used for KVM -virtualization. The symlink is named qemu-kvm, which causes the QEMU program -to enable the KVM accelerator, due to the name reference ending with 'kvm'. -This package is an artifact of the early origins of QEMU, and is deprecated. - -%files kvm -%_bindir/qemu-kvm -%doc %_docdir/qemu-kvm -%_mandir/man1/qemu-kvm.1.gz -# End of "if legacy_qemu_kvm" -%endif - %if %{build_ppc_firmware} %package SLOF Summary: Slimline Open Firmware - SLOF -- 2.51.1 From 21727d8b31b5d3bdd22ba18a21505ef7fec9fc6c Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Sat, 17 Feb 2024 10:04:37 +0100 Subject: [PATCH 061/102] [openSUSE][RPM] Install the VGA module "more often" (bsc#1219164) Depending on the VM configuration (both at the VM definition level and on the guest itself) a VGA console might be necessary, or weird lockup will occur. Since the VGA module package is smalle enough, add a dependency for it, from other display modules, to act as a workaround. While there, make more explicit and precise the dependencies between all the various modules, by specifying that they should all have the same version and release. References: bsc#1219164 Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 18352d19cc..dcac590f6a 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1103,7 +1103,7 @@ necessary for having SPICE working for your VMs. %package audio-spice Summary: Spice based audio support for QEMU Group: System/Emulators/PC -Requires: qemu-ui-spice-core +Requires: qemu-ui-spice-core = %{version}-%{release} %{qemu_module_conflicts} %description audio-spice @@ -1116,7 +1116,7 @@ This package contains a module for Spice based audio support for QEMU. %package chardev-spice Summary: Spice vmc and port chardev support for QEMU Group: System/Emulators/PC -Requires: qemu-ui-spice-core +Requires: qemu-ui-spice-core = %{version}-%{release} %{qemu_module_conflicts} %description chardev-spice @@ -1130,8 +1130,8 @@ This package contains a module for Spice chardev support for QEMU. %package ui-spice-app Summary: Spice UI support for QEMU Group: System/Emulators/PC -Requires: qemu-chardev-spice -Requires: qemu-ui-spice-core +Requires: qemu-chardev-spice = %{version}-%{release} +Requires: qemu-ui-spice-core = %{version}-%{release} %{qemu_module_conflicts} %description ui-spice-app @@ -1146,7 +1146,7 @@ Summary: Core Spice support for QEMU Group: System/Emulators/PC Requires: qemu-ui-opengl # This next Requires is only since virt-manager expects audio support -Requires: qemu-audio-spice +Requires: qemu-audio-spice = %{version}-%{release} %{qemu_module_conflicts} %description ui-spice-core @@ -1160,7 +1160,7 @@ This package contains a module with core Spice support for QEMU. %package hw-display-qxl Summary: QXL display support for QEMU Group: System/Emulators/PC -Requires: qemu-ui-spice-core +Requires: qemu-ui-spice-core = %{version}-%{release} %{qemu_module_conflicts} %description hw-display-qxl @@ -1519,6 +1519,12 @@ This package contains a module for baum braille chardev support for QEMU. %package hw-display-virtio-gpu Summary: Virtio GPU display support for QEMU Group: System/Emulators/PC +# Make sure that VGA is pretty much always there. Technically, this isn't +# really necessary (and/or, should be dealt with in other places) but it +# makes it easier to deal with strange situation where, e.g., GRUB is +# configured to work only with a graphical terminal (see bsc#1219164), +# and the hw-display-virtio-vga package is small enough, anyway. +Requires: qemu-hw-display-virtio-vga = %{version}-%{release} %{qemu_module_conflicts} %description hw-display-virtio-gpu @@ -1532,7 +1538,7 @@ This package contains a module for Virtio GPU display support for QEMU. %package hw-display-virtio-gpu-pci Summary: Virtio-gpu pci device for QEMU Group: System/Emulators/PC -Requires: qemu-hw-display-virtio-gpu +Requires: qemu-hw-display-virtio-gpu = %{version}-%{release} %{qemu_module_conflicts} %description hw-display-virtio-gpu-pci @@ -1561,7 +1567,7 @@ This package contains a module providing the virtio vga device for QEMU. %package hw-s390x-virtio-gpu-ccw Summary: S390x virtio-gpu ccw device for QEMU Group: System/Emulators/PC -Requires: qemu-hw-display-virtio-gpu +Requires: qemu-hw-display-virtio-gpu = %{version}-%{release} %{qemu_module_conflicts} %description hw-s390x-virtio-gpu-ccw -- 2.51.1 From ce16c498d7db297e225cf433d52a92a9fee01ec5 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 19 Feb 2024 12:16:44 +0100 Subject: [PATCH 062/102] [openSUSE][RPM] factor common definitions between qemu and qemu-linux-user spec files Simplify both the spec files, by factoring common definitions. Signed-off-by: Dario Faggioli --- rpm/common.inc | 28 ++++++++++++++++++++++++++++ rpm/qemu-linux-user.spec | 29 +---------------------------- rpm/qemu.spec | 27 +++++---------------------- 3 files changed, 34 insertions(+), 50 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index 3207c4291b..c5a3d466ee 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -65,6 +65,34 @@ %define _lto_cflags %{nil} %endif +%ifarch aarch64 +%define qemu_arch aarch64 +%endif +%ifarch %arm +%define qemu_arch arm +%endif +%ifarch %ix86 +%define qemu_arch i386 +%endif +%ifarch ppc64 +%define qemu_arch ppc64 +%endif +%ifarch ppc +%define qemu_arch ppc +%endif +%ifarch ppc64le +%define qemu_arch ppc64le +%endif +%ifarch riscv64 +%define qemu_arch riscv64 +%endif +%ifarch s390x +%define qemu_arch s390x +%endif +%ifarch x86_64 +%define qemu_arch x86_64 +%endif + %define generic_qemu_description \ QEMU provides full machine emulation and cross architecture usage. It closely\ integrates with KVM and Xen virtualization, allowing for excellent performance.\ diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index d5c863b892..268756737f 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -343,36 +343,9 @@ scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --preserve-argv0 yes %check cd %blddir -%ifarch %ix86 -%define qemu_arch i386 -%endif -%ifarch x86_64 -%define qemu_arch x86_64 -%endif -%ifarch %arm -%define qemu_arch arm -%endif -%ifarch aarch64 -%define qemu_arch aarch64 -%endif -%ifarch ppc -%define qemu_arch ppc -%endif -%ifarch ppc64 -%define qemu_arch ppc64 -%endif -%ifarch ppc64le -%define qemu_arch ppc64le -%endif -%ifarch s390x -%define qemu_arch s390x -%endif - -%ifarch %ix86 x86_64 %arm aarch64 ppc ppc64 ppc64le s390x -%ifnarch %arm +%ifarch aarch64 %ix86 ppc ppc64 ppc64le riscv64 s390x x86_64 %{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null %endif -%endif %make_build check-softfloat diff --git a/rpm/qemu.spec b/rpm/qemu.spec index dcac590f6a..a4d9094bd7 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -939,29 +939,12 @@ rst2html --exit-status=2 %{buildroot}%_docdir/qemu-x86/supported.txt %{buildroot %endif # End of "if legacy_qemu_kvm" %endif -%ifarch %ix86 -ln -s qemu-system-i386 %{buildroot}%_bindir/qemu-kvm + +%ifarch aarch64 %arm %ix86 ppc ppc64 ppc64le riscv64 s390x x86_64 +%ifarch ppc64le +%define qemu_arch ppc64 %endif -%ifarch x86_64 -ln -s qemu-system-x86_64 %{buildroot}%_bindir/qemu-kvm -%endif -%ifarch %arm -ln -s qemu-system-arm %{buildroot}%_bindir/qemu-kvm -%endif -%ifarch aarch64 -ln -s qemu-system-aarch64 %{buildroot}%_bindir/qemu-kvm -%endif -%ifarch ppc -ln -s qemu-system-ppc %{buildroot}%_bindir/qemu-kvm -%endif -%ifarch ppc64 ppc64le -ln -s qemu-system-ppc64/ %{buildroot}%_bindir/qemu-kvm -%endif -%ifarch s390x -ln -s qemu-system-s390x/ %{buildroot}%_bindir/qemu-kvm -%endif -%ifarch riscv64 -ln -s qemu-system-riscv64 %{buildroot}%_bindir/qemu-kvm +ln -s qemu-system-%{qemu_arch} %{buildroot}%_bindir/qemu-kvm %endif %if %{kvm_available} -- 2.51.1 From db66bf08b80749214342b1ebf33ea32e2bbf07a5 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 19 Feb 2024 17:44:39 +0100 Subject: [PATCH 063/102] [openSUSE][RPM] Update to latest stable versio (8.2.1) Backported commits: * Update version for 8.2.1 release * target/arm: Fix incorrect aa64_tidcp1 feature check * target/arm: Fix A64 scalar SQSHRN and SQRSHRN * target/xtensa: fix OOB TLB entry access * qtest: bump aspeed_smc-test timeout to 6 minutes * monitor: only run coroutine commands in qemu_aio_context * iotests: port 141 to Python for reliable QMP testing * iotests: add filter_qmp_generated_node_ids() * block/blklogwrites: Fix a bug when logging "write zeroes" operations. * virtio-net: correctly copy vnet header when flushing TX (bsc#1218484, CVE-2023-6693) * tcg/arm: Fix SIGILL in tcg_out_qemu_st_direct * linux-user/riscv: Adjust vdso signal frame cfa offsets * linux-user: Fixed cpu restore with pc 0 on SIGBUS * block/io: clear BDRV_BLOCK_RECURSE flag after recursing in bdrv_co_block_status * coroutine-ucontext: Save fake stack for pooled coroutine * tcg/s390x: Fix encoding of VRIc, VRSa, VRSc insns * accel/tcg: Revert mapping of PCREL translation block to multiple virtual addresses * acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM * s390x/pci: drive ISM reset from subsystem reset * s390x/pci: refresh fh before disabling aif * s390x/pci: avoid double enable/disable of aif * hw/scsi/esp-pci: set DMA_STAT_BCMBLT when BLAST command issued * hw/scsi/esp-pci: synchronise setting of DMA_STAT_DONE with ESP completion interrupt * hw/scsi/esp-pci: generate PCI interrupt from separate ESP and PCI sources * hw/scsi/esp-pci: use correct address register for PCI DMA transfers * migration/rdma: define htonll/ntohll only if not predefined * hw/pflash: implement update buffer for block writes * hw/pflash: use ldn_{be,le}_p and stn_{be,le}_p * hw/pflash: refactor pflash_data_write() * backends/cryptodev: Do not ignore throttle/backends Errors * target/i386: pcrel: store low bits of physical address in data[0] * target/i386: fix incorrect EIP in PC-relative translation blocks * target/i386: Do not re-compute new pc with CF_PCREL * load_elf: fix iterator's type for elf file processing * target/hppa: Update SeaBIOS-hppa to version 15 * target/hppa: Fix IOR and ISR on error in probe * target/hppa: Fix IOR and ISR on unaligned access trap * target/hppa: Export function hppa_set_ior_and_isr() * target/hppa: Avoid accessing %gr0 when raising exception * hw/hppa: Move software power button address back into PDC * target/hppa: Fix PDC address translation on PA2.0 with PSW.W=0 * hw/pci-host/astro: Add missing astro & elroy registers for NetBSD * hw/hppa/machine: Disable default devices with --nodefaults option * hw/hppa/machine: Allow up to 3840 MB total memory * readthodocs: fully specify a build environment * .gitlab-ci.d/buildtest.yml: Work around htags bug when environment is large * target/s390x: Fix LAE setting a wrong access register * tests/qtest/virtio-ccw: Fix device presence checking * tests/acpi: disallow tests/data/acpi/virt/SSDT.memhp changes * tests/acpi: update expected data files * edk2: update binaries to git snapshot * edk2: update build config, set PcdUninstallMemAttrProtocol = TRUE. * edk2: update to git snapshot * tests/acpi: allow tests/data/acpi/virt/SSDT.memhp changes * util: fix build with musl libc on ppc64le * tcg/ppc: Use new registers for LQ destination * hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers * hw/vfio: fix iteration over global VFIODevice list * vfio/container: Replace basename with g_path_get_basename * edu: fix DMA range upper bound check * hw/net: cadence_gem: Fix MDIO_OP_xxx values * audio/audio.c: remove trailing newline in error_setg * chardev/char.c: fix "abstract device type" error message * target/riscv: Fix mcycle/minstret increment behavior * hw/net/can/sja1000: fix bug for single acceptance filter and standard frame * target/i386: the sgx_epc_get_section stub is reachable * configure: use a native non-cross compiler for linux-user * include/ui/rect.h: fix qemu_rect_init() mis-assignment * target/riscv/kvm: do not use non-portable strerrorname_np() * iotests: Basic tests for internal snapshots * vl: Improve error message for conflicting -incoming and -loadvm * block: Fix crash when loading snapshot on inactive node References: bsc#1218484 (CVE-2023-6693) Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 268756737f..01e2b613c0 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.0 +Version: 8.2.1 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index a4d9094bd7..b677bbf363 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.0 +Version: 8.2.1 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From c3c99245d9a903e9830827d23f1b95242eeae193 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 20 Feb 2024 12:48:07 +0100 Subject: [PATCH 064/102] [openSUSE] roms/seabios: Drop an old (and no longer necessary) downstream patch Drop the patch "[openSUSE] build: be explicit about -mx86-used-note=no" from SeaBIOS. Signed-off-by: Dario Faggioli --- roms/seabios | 2 +- rpm/seabios_version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roms/seabios b/roms/seabios index a95067ebbb..c13ff2cd58 160000 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit a95067ebbbfdee9b6ebde20ee702272103553455 +Subproject commit c13ff2cd58e48ec239c1250a15947ea91bdf117a diff --git a/rpm/seabios_version b/rpm/seabios_version index aa3f5b3312..d8cbd2ec2b 100644 --- a/rpm/seabios_version +++ b/rpm/seabios_version @@ -1 +1 @@ -rel-1.16.3-0-ga6ed6b70 +rel-1.16.3-2-gc13ff2cd -- 2.51.1 From 8e8bfebf5932720eeb7e976716b84f7e9a13b743 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 21 Feb 2024 16:16:35 +0100 Subject: [PATCH 065/102] [openSUSE][RPM] Cosmetic fixes to spec files (copyright, sorting, etc) Update the copyright year to 2024, sort dependencies etc. This way, 'osc' does not have to do these changes all the times (they're automatic, so no big deal, but it's annoying to see them in the diffs of all the requests). Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 8 ++++---- rpm/qemu.spec | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 01e2b613c0..7978314de0 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -1,7 +1,7 @@ # # spec file for package qemu-linux-user # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -46,18 +46,18 @@ BuildRequires: zlib-devel-static %if 0%{?qemu_user_space_build:1} #!BuildIgnore: post-build-checks %endif +BuildRequires: discount BuildRequires: fdupes BuildRequires: flex BuildRequires: gcc-c++ BuildRequires: meson BuildRequires: ninja >= 1.7 -BuildRequires: discount %if 0%{?suse_version} >= 1600 -BuildRequires: python3-base >= 3.8 BuildRequires: python3-Sphinx +BuildRequires: python3-base >= 3.8 %else -BuildRequires: python311-base BuildRequires: python311-Sphinx +BuildRequires: python311-base %endif %description diff --git a/rpm/qemu.spec b/rpm/qemu.spec index b677bbf363..b729fef3dd 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1,7 +1,7 @@ # # spec file for package qemu # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -147,11 +147,11 @@ BuildRequires: pkgconfig(liburing) >= %liburing_min_version BuildRequires: libxdp-devel %endif %if 0%{?suse_version} >= 1600 -BuildRequires: python3-base >= 3.8 BuildRequires: python3-Sphinx +BuildRequires: python3-base >= 3.8 %else -BuildRequires: python311-base BuildRequires: python311-Sphinx +BuildRequires: python311-base %endif BuildRequires: Mesa-devel BuildRequires: bison @@ -1068,9 +1068,9 @@ make -O V=1 VERBOSE=1 -j1 check-qtest %package spice Summary: Modules and packages for SPICE Group: System/Emulators/PC -Requires: qemu-headless Requires: qemu-audio-spice Requires: qemu-chardev-spice +Requires: qemu-headless Requires: qemu-hw-display-qxl Requires: qemu-hw-usb-redirect Requires: qemu-ui-spice-core @@ -1915,7 +1915,7 @@ Summary: OPAL firmware (aka skiboot), used in booting OpenPOWER systems Group: System/Emulators/PC BuildArch: noarch Requires(post): update-alternatives -Requires(postun):update-alternatives +Requires(postun): update-alternatives %description skiboot Provides OPAL (OpenPower Abstraction Layer) firmware, aka skiboot, as -- 2.51.1 From 4e8698a1b5a25e8bed6a16a3423fecb7c71ff179 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 29 Feb 2024 16:29:41 +0100 Subject: [PATCH 066/102] [openSUSE] Increase default phys bits to 42, if host supports that We wanted QEMU to support larger VMs (in therm of RAM size) by default and we therefore introduced patch "[openSUSE] increase x86_64 physical bits to 42". This, however, means that we create VMs with 42 bits of physical address space even on hosts that only has, say, 40. And that can't work. In fact, it has been a problem since a long time (e.g., bsc#1205978) and it's also the actual root cause of bsc#1219977. Get rid of that old patch, in favor of a new one that still raise the default number of address bits to 42, but only on hosts that supports that. This means that we can also use the proper SeaBIOS version, without reverting commits that were only a problem due to our broken downstream patch. We probably aslo don't need to ship some of the custom ACPI tables (for passing tests), but we'll actually remove them later, after double checking properly that all the tests do work. References: bsc#1205978 References: bsc#1219977 References: bsc#1220799 Signed-off-by: Dario Faggioli --- target/i386/cpu.c | 10 +++++++++- target/i386/cpu.h | 35 +++++++++++++++++++++++++++++++++++ target/i386/host-cpu.c | 28 ---------------------------- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 85ef7452c0..e0352c6a8b 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -7756,7 +7756,15 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp) * In this case, the default is the value used by TCG (40). */ if (cpu->phys_bits == 0) { - cpu->phys_bits = TCG_PHYS_ADDR_BITS; + /* SUSE Downstream patch: TCG_PHYS_ADDR_BITS is 40. We, instead + * need the phys_bits to be 42 (only if the host supports that, of + * course), because we did set it to 42 (unconditionally!) a while + * ago, and now we need to stay compatible with that. However, + * instead of messing with the macro, just use the value here, + * to avoid messing with other places where the macro is used + * (namely, for TCG). + */ + cpu->phys_bits = (MIN(42, host_cpu_phys_bits())); } if (cpu->guest_phys_bits && (cpu->guest_phys_bits > cpu->phys_bits || diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 14edd57a37..5d5b15a803 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2374,6 +2374,41 @@ void host_cpuid(uint32_t function, uint32_t count, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); bool cpu_has_x2apic_feature(CPUX86State *env); +/* Note: Only safe for use on x86(-64) hosts */ +#ifdef __x86_64__ +static inline uint32_t host_cpu_phys_bits(void) +{ + uint32_t eax; + uint32_t host_phys_bits; + + host_cpuid(0x80000000, 0, &eax, NULL, NULL, NULL); + if (eax >= 0x80000008) { + host_cpuid(0x80000008, 0, &eax, NULL, NULL, NULL); + /* + * Note: According to AMD doc 25481 rev 2.34 they have a field + * at 23:16 that can specify a maximum physical address bits for + * the guest that can override this value; but I've not seen + * anything with that set. + */ + host_phys_bits = eax & 0xff; + } else { + /* + * It's an odd 64 bit machine that doesn't have the leaf for + * physical address bits; fall back to 36 that's most older + * Intel. + */ + host_phys_bits = 36; + } + + return host_phys_bits; +} +#else +static inline uint32_t host_cpu_phys_bits(void) +{ + return 40; // TCG_PHYS_ADDR_BITS +} +#endif + /* helper.c */ void x86_cpu_set_a20(X86CPU *cpu, int a20_state); void cpu_sync_avx_hflag(CPUX86State *env); diff --git a/target/i386/host-cpu.c b/target/i386/host-cpu.c index 8b8bf5afec..010e0959f7 100644 --- a/target/i386/host-cpu.c +++ b/target/i386/host-cpu.c @@ -14,34 +14,6 @@ #include "qemu/error-report.h" #include "sysemu/sysemu.h" -/* Note: Only safe for use on x86(-64) hosts */ -static uint32_t host_cpu_phys_bits(void) -{ - uint32_t eax; - uint32_t host_phys_bits; - - host_cpuid(0x80000000, 0, &eax, NULL, NULL, NULL); - if (eax >= 0x80000008) { - host_cpuid(0x80000008, 0, &eax, NULL, NULL, NULL); - /* - * Note: According to AMD doc 25481 rev 2.34 they have a field - * at 23:16 that can specify a maximum physical address bits for - * the guest that can override this value; but I've not seen - * anything with that set. - */ - host_phys_bits = eax & 0xff; - } else { - /* - * It's an odd 64 bit machine that doesn't have the leaf for - * physical address bits; fall back to 36 that's most older - * Intel. - */ - host_phys_bits = 36; - } - - return host_phys_bits; -} - static uint32_t host_cpu_adjust_phys_bits(X86CPU *cpu) { uint32_t host_phys_bits = host_cpu_phys_bits(); -- 2.51.1 From 78cdd9bddc5a7e239a4cfb8e3ed46ef418d2e0db Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 14 Mar 2024 20:57:46 +0100 Subject: [PATCH 067/102] [openSUSE] Update version to 8.2.2 Update to latest stable release (8.2.2). Full changelog here: https://lore.kernel.org/qemu-devel/1709577077.783602.1474596.nullmailer@tls.msk.ru/ Upstream backports: chardev/char-socket: Fix TLS io channels sending too much data to the backend tests/unit/test-util-sockets: Remove temporary file after test hw/usb/bus.c: PCAP adding 0xA in Windows version hw/intc/Kconfig: Fix GIC settings when using "--without-default-devices" gitlab: force allow use of pip in Cirrus jobs tests/vm: avoid re-building the VM images all the time tests/vm: update openbsd image to 7.4 target/i386: leave the A20 bit set in the final NPT walk target/i386: remove unnecessary/wrong application of the A20 mask target/i386: Fix physical address truncation target/i386: check validity of VMCB addresses target/i386: mask high bits of CR3 in 32-bit mode pl031: Update last RTCLR value on write in case it's read back hw/nvme: fix invalid endian conversion update edk2 binaries to edk2-stable202402 update edk2 submodule to edk2-stable202402 target/ppc: Fix crash on machine check caused by ifetch target/ppc: Fix lxv/stxv MSR facility check .gitlab-ci.d/windows.yml: Drop msys2-32bit job system/vl: Update description for input grab key docs/system: Update description for input grab key hw/hppa/Kconfig: Fix building with "configure --without-default-devices" tests/qtest: Depend on dbus_display1_dep meson: Explicitly specify dbus-display1.h dependency audio: Depend on dbus_display1_dep ui/console: Fix console resize with placeholder surface ui/clipboard: add asserts for update and request ui/clipboard: mark type as not available when there is no data ui: reject extended clipboard message if not activated target/i386: Generate an illegal opcode exception on cmp instructions with lock prefix i386/cpuid: Move leaf 7 to correct group i386/cpuid: Decrease cpuid_i when skipping CPUID leaf 1F i386/cpu: Mask with XCR0/XSS mask for FEAT_XSAVE_XCR0_HI and FEAT_XSAVE_XSS_HI leafs i386/cpu: Clear FEAT_XSAVE_XSS_LO/HI leafs when CPUID_EXT_XSAVE is not available .gitlab-ci/windows.yml: Don't install libusb or spice packages on 32-bit iotests: Make 144 deterministic again target/arm: Don't get MDCR_EL2 in pmu_counter_enabled() before checking ARM_FEATURE_PMU target/arm: Fix SVE/SME gross MTE suppression checks target/arm: Handle mte in do_ldrq, do_ldro target/arm: Split out make_svemte_desc target/arm: Adjust and validate mtedesc sizem1 target/arm: Fix nregs computation in do_{ld,st}_zpa linux-user/aarch64: Choose SYNC as the preferred MTE mode tests/acpi: Update DSDT.cxl to reflect change _STA return value. hw/i386: Fix _STA return value for ACPI0017 tests/acpi: Allow update of DSDT.cxl smmu: Clear SMMUPciBus pointer cache when system reset virtio_iommu: Clear IOMMUPciBus pointer cache when system reset virtio-gpu: Correct virgl_renderer_resource_get_info() error check hw/cxl: Pass CXLComponentState to cache_mem_ops hw/cxl/device: read from register values in mdev_reg_read() cxl/cdat: Fix header sum value in CDAT checksum cxl/cdat: Handle cdat table build errors vhost-user.rst: Fix vring address description tcg/arm: Fix goto_tb for large translation blocks tcg: Increase width of temp_subindex hw/net/tulip: add chip status register values hw/smbios: Fix port connector option validation hw/smbios: Fix OEM strings table option validation configure: run plugin TCG tests again tests/docker: Add sqlite3 module to openSUSE Leap container hw/riscv/virt-acpi-build.c: fix leak in build_rhct() migration: Fix logic of channels and transport compatibility check virtio-blk: avoid using ioeventfd state in irqfd conditional virtio: Re-enable notifications after drain virtio-scsi: Attach event vq notifier with no_poll iotests: give tempdir an identifying name iotests: fix leak of tmpdir in dry-run mode hw/scsi/lsi53c895a: add missing decrement of reentrancy counter linux-user/aarch64: Add padding before __kernel_rt_sigreturn tcg/loongarch64: Set vector registers call clobbered pci-host: designware: Limit value range of iATU viewport register target/arm: Reinstate "vfp" property on AArch32 CPUs qemu-options.hx: Improve -serial option documentation system/vl.c: Fix handling of '-serial none -serial something' target/arm: fix exception syndrome for AArch32 bkpt insn block/blkio: Make s->mem_region_alignment be 64 bits qemu-docs: Update options for graphical frontends Make 'uri' optional for migrate QAPI vfio/pci: Clear MSI-X IRQ index always migration: Fix use-after-free of migration state object migration: Plug memory leak on HMP migrate error path Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 7978314de0..b5b289240d 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.1 +Version: 8.2.2 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index b729fef3dd..0eb5071ac5 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.1 +Version: 8.2.2 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From b5859d75de6f775dd7d295c62a0613fb1931d879 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Mon, 29 Apr 2024 13:01:57 +0200 Subject: [PATCH 068/102] [openSUSE] Update to version 8.2.3 (bsc#1224179) Update to latest stable release (8.2.3). Full changelog/backports here: https://lore.kernel.org/qemu-devel/1713980341.971368.1218343.nullmailer@tls.msk.ru/ Some of the upstream backports are: Update version for 8.2.3 release ppc/spapr: Initialize max_cpus limit to SPAPR_IRQ_NR_IPIS. ppc/spapr: Introduce SPAPR_IRQ_NR_IPIS to refer IRQ range for CPU IPIs. hw/pci-host/ppc440_pcix: Do not expose a bridge device on PCI bus hw/isa/vt82c686: Keep track of PIRQ/PINT pins separately virtio-pci: fix use of a released vector linux-user/x86_64: Handle the vsyscall page in open_self_maps_{2,4} hw/audio/virtio-snd: Remove unused assignment hw/net/net_tx_pkt: Fix overrun in update_sctp_checksum() hw/sd/sdhci: Do not update TRNMOD when Command Inhibit (DAT) is set hw/net/lan9118: Fix overflow in MIL TX FIFO hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition backends/cryptodev: Do not abort for invalid session ID hw/misc/applesmc: Fix memory leak in reset() handler hw/block/nand: Fix out-of-bound access in NAND block buffer hw/block/nand: Have blk_load() take unsigned offset and return boolean hw/block/nand: Factor nand_load_iolen() method out qemu-options: Fix CXL Fixed Memory Window interleave-granularity typo hw/virtio/virtio-crypto: Protect from DMA re-entrancy bugs hw/char/virtio-serial-bus: Protect from DMA re-entrancy bugs hw/display/virtio-gpu: Protect from DMA re-entrancy bugs mirror: Don't call job_pause_point() under graph lock (bsc#1224179) ...and many more... Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index b5b289240d..004c45bda4 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.2 +Version: 8.2.3 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 0eb5071ac5..01b18ca2ad 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.2 +Version: 8.2.3 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From 9a8e0ff65dcf13ec1cab41c20c2de0fa61743c7e Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 30 Apr 2024 09:30:28 +0200 Subject: [PATCH 069/102] [openSUSE][RPM] Update to version 9.0.0 Update to latest upstream release 9.0.0. Full changelog at: https://wiki.qemu.org/ChangeLog/9.0 Highlights include: * block: virtio-blk now supports multiqueue where different queues of a single disk can be processed by different I/O threads * gdbstub: various improvements such as catching syscalls in user-mode, support for fork-follow modes, and support for siginfo:read * memory: preallocation of memory backends can now be handled concurrently using multiple threads in some cases * migration: support for "mapped-ram" capability allowing for more efficient VM snapshots, improved support for zero-page detection, and checkpoint-restart support for VFIO * ARM: architectural feature support for ECV (Enhanced Counter Virtualization), NV (Nested Virtualization), and NV2 (Enhanced Nested Virtualization) * ARM: board support for B-L475E-IOT01A IoT node, mp3-an536 (MPS3 dev board + AN536 firmware), and raspi4b (Raspberry Pi 4 Model B) * ARM: additional IO/disk/USB/SPI/ethernet controller and timer support for Freescale i.MX6, Allwinner R40, Banana Pi, npcm7xxx, and virt boards * HPPA: numerous bug fixes and SeaBIOS-hppa firmware updated to version 16 * LoongArch: KVM acceleration support, including LSX/LASX vector extensions * RISC-V: ISA/extension support for Zacas, amocas, RVA22 profiles, Zaamo, Zalrsc, Ztso, and more * RISC-V: SMBIOS support for RISC-V virt machine, ACPI support for SRAT, SLIT, AIA, PLIC and updated RHCT table support, and numerous fixes * s390x: Emulation support for CVDG, CVB, CVBY and CVBG instructions, and fixes for LAE (Load Address Extended) emulation * and lots more... Signed-off-by: Dario Faggioli --- rpm/common.inc | 2 +- rpm/qemu-linux-user.spec | 4 ++-- rpm/qemu.spec | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index c5a3d466ee..e49b0dcb2b 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -1,6 +1,6 @@ %define _buildshell /bin/bash -%define sbver 1.16.3_3_ga95067eb +%define sbver 1.16.3_3_gc13ff2cd %define srcdir %{_builddir}/%buildsubdir %define blddir %srcdir/build diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 004c45bda4..719fe3493b 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.3 +Version: 9.0.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -344,7 +344,7 @@ scripts/qemu-binfmt-conf.sh --systemd ALL --persistent yes --preserve-argv0 yes cd %blddir %ifarch aarch64 %ix86 ppc ppc64 ppc64le riscv64 s390x x86_64 -%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null +./qemu-%{qemu_arch} %_bindir/ls > /dev/null %endif %make_build check-softfloat diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 01b18ca2ad..66c3556e11 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 8.2.3 +Version: 9.0.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc @@ -401,8 +401,8 @@ meson subprojects packagefiles --apply berkeley-testfloat-3 meson subprojects packagefiles --apply berkeley-softfloat-3 # for the record, this set of firmware files is installed, but we don't -# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc -# openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb +# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img hppa-firmware.img 64 +# openbios-ppc openbios-sparc32 openbios-sparc64 palcode-clipper petalogix-ml605.dtb # petalogix-s3adsp1800.dtb QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv # u-boot.e500 u-boot-sam460-20100605.bin opensbi-riscv32-generic-fw_dynamic.bin # opensbi-riscv32-generic-fw_dynamic.elfnpcm7xx_bootrom.bin vof.bin @@ -1314,6 +1314,7 @@ popular QEMU packages which are dedicated to a single architecture.) %_bindir/qemu-system-xtensa %_bindir/qemu-system-xtensaeb %_datadir/%name/hppa-firmware.img +%_datadir/%name/hppa-firmware64.img %_datadir/%name/openbios-sparc32 %_datadir/%name/openbios-sparc64 %_datadir/%name/opensbi-riscv32-generic-fw_dynamic.bin -- 2.51.1 From 8e01eb0c23161b125679b2b12af3c8d29578c6b2 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 8 May 2024 15:07:58 +0200 Subject: [PATCH 070/102] [openSUSE][RPM] Hostname normalization (for repr. build ) done properly (boo#1084909) In commit "[openSUSE][RPM] Normalize hostname, for reproducible builds" (dec5f6c8a7acd23222a14c6600d6967219fda65c) the USER and HOSTNAME variables were defined in the different RPM section. Fix that. Fixes: dec5f6c8a7acd23222a14c6600d6967219fda65c References: boo#1084909 Suggested-by: Bernhard M. Wiedemann Signed-offf-by: Dario Faggioli --- rpm/qemu.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 66c3556e11..8960130f57 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -498,6 +498,8 @@ find . -iname ".git" -exec rm -rf {} + mkdir -p %blddir cd %blddir +export USER=abuild +export HOSTNAME=OBS # is used in roms/SLOF/Makefile.gen (boo#1084909) # We define a few general and common options and then we disable # pretty much everything. Afterwards, there is a section for each @@ -904,8 +906,6 @@ done %install cd %blddir -export USER=abuild -export HOSTNAME=OBS # is used in roms/SLOF/Makefile.gen (boo#1084909) %make_build install DESTDIR=%{buildroot} -- 2.51.1 From 8f9799c37dc845861806ff009f1d418f2115f661 Mon Sep 17 00:00:00 2001 From: Antonio Larrosa Date: Wed, 8 May 2024 15:12:17 +0200 Subject: [PATCH 071/102] [openSUSE][RPM] Prioritize PA over PipeWire in SLE (bsc#1222218) Change the order of audio driver list in SLE to prefer pulseaudio over pipewire (related to bsc#1222218). Signed-off-by: Antonio Larrosa References: bsc#1222218 Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 8960130f57..d15eecaf54 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -673,7 +673,11 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-xkbcommon \ --disable-zstd \ --without-default-devices \ +%if 0%{?suse_version} >= 1600 --audio-drv-list=pipewire,pa,alsa,jack,oss \ +%else + --audio-drv-list=pa,pipewire,alsa,jack,oss \ +%endif %ifarch x86_64 --enable-avx2 \ --enable-libpmem \ -- 2.51.1 From 7070c0b952267e52be626195c276de6e2a8cbd68 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Fri, 28 Jun 2024 14:21:04 +0200 Subject: [PATCH 072/102] [openSUSE] Update to version 9.0.1 Update to latest stable release (9.0.1). Full list of backports here: https://lore.kernel.org/qemu-devel/1718081053.366429.1238758.nullmailer@tls.msk.ru/ A selection of them is reported here too: Update version for 9.0.1 release target/loongarch: fix a wrong print in cpu dump ui/sdl2: Allow host to power down screen virtio-gpu: fix v2 migration target/i386: fix SSE and SSE2 feature check target/i386: fix xsave.flat from kvm-unit-tests disas/riscv: Decode all of the pmpcfg and pmpaddr CSRs riscv, gdbstub.c: fix reg_width in ricsv_gen_dynamic_vector_feature() target/riscv/kvm.c: Fix the hart bit setting of AIA target/riscv: rvzicbo: Fixup CBO extension register calculation target/riscv: do not set mtval2 for non guest-page faults target/riscv: prioritize pmp errors in raise_mmu_exception() target/riscv: rvv: Remove redudant SEW checking for vector fp narrow/widen instructions target/riscv: rvv: Check single width operator for vfncvt.rod.f.f.w target/riscv: rvv: Check single width operator for vector fp widen instructions target/riscv: rvv: Fix Zvfhmin checking for vfwcvt.f.f.v and vfncvt.f.f.w instructions target/riscv/cpu.c: fix Zvkb extension config target/riscv: Fix the element agnostic function problem target/riscv/kvm: tolerate KVM disable ext errors target/riscv/kvm: Fix exposure of Zkr hw/intc/riscv_aplic: APLICs should add child earlier than realize iotests: test NBD+TLS+iothread qio: Inherit follow_coroutine_ctx across TLS target/arm: Disable SVE extensions when SVE is disabled hw/intc/arm_gic: Fix handling of NS view of GICC_APR hvf: arm: Fix encodings for ID_AA64PFR1_EL1 and debug System registers gitlab: use 'setarch -R' to workaround tsan bug gitlab: use $MAKE instead of 'make' dockerfiles: add 'MAKE' env variable to remaining containers gitlab: Update msys2-64bit runner tags target/i386: no single-step exception after MOV or POP SS target/i386: disable jmp_opt if EFLAGS.RF is 1 hw/loongarch/virt: Fix FDT memory node address width hw/loongarch: Fix fdt memory node wrong 'reg' target/loongarch/kvm: fpu save the vreg registers high 192bit hw/core/machine: move compatibility flags for VirtIO-net USO to machine 8.1 target-i386: hyper-v: Correct kvm_hv_handle_exit return value hw/pflash: fix block write start tcg/loongarch64: Fill out tcg_out_{ld,st} for vector regs ui/gtk: Check if fence_fd is equal to or greater than 0 ui/gtk: Fix mouse/motion event scaling issue with GTK display backend configure: Fix error message when C compiler is not working configure: quote -D options that are passed through to meson target/i386: fix feature dependency for WAITPKG target/i386: rdpkru/wrpkru are no-prefix instructions target/i386: fix operand size for DATA16 REX.W POPCNT hw/remote/vfio-user: Fix config space access byte order hw/loongarch/virt: Fix memory leak target/sh4: Update DisasContextBase.insn_start target/sparc: Fix FPMERGE target/sparc: Fix FMULD8*X16 target/sparc: Fix FMUL8x16A{U,L} target/sparc: Fix FMUL8x16 target/sparc: Fix FEXPAND target/i386: Give IRQs a chance when resetting HF_INHIBIT_IRQ_MASK plugins: Update stale comment target/sh4: Fix SUBV opcode target/sh4: Fix ADDV opcode hw/arm/npcm7xx: Store derivative OTP fuse key in little endian hw/dmax/xlnx_dpdma: fix handling of address_extension descriptor fields hw/ufs: Fix buffer overflow bug .gitlab-ci.d/cirrus.yml: Shorten the runtime of the macOS and FreeBSD jobs tests/avocado: update sunxi kernel from armbian to 6.6.16 target/arm: Restrict translation disabled alignment check to VMSA target/riscv/kvm: remove sneaky strerrorname_np() instance target/loongarch/cpu.c: typo fix: expection backends/cryptodev-builtin: Fix local_error leaks nbd/server: Mark negotiation functions as coroutine_fn nbd/server: do not poll within a coroutine context docs: i386: pc: Update maximum CPU numbers for PC Q35 linux-user: do_setsockopt: fix SOL_ALG.ALG_SET_KEY migration/colo: Fix bdrv_graph_rdlock_main_loop: Assertion `!qemu_in_coroutine()' failed. Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 719fe3493b..1404463d88 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 9.0.0 +Version: 9.0.1 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index d15eecaf54..9a0069f94f 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 9.0.0 +Version: 9.0.1 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From 94a4cb274a28452a0cd75764f3aeee6aa6c0daf3 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 23 Jul 2024 10:13:45 +0200 Subject: [PATCH 073/102] [openSUSE] Update to version 9.0.2 Update to latest stable release (9.0.2). Full list of backports here: https://lore.kernel.org/qemu-devel/1721203819.679622.831479.nullmailer@tls.msk.ru/ A selection of them is listed here too: hw/nvme: fix number of PIDs for FDP RUH update sphinx/qapidoc: Fix to generate doc for explicit, unboxed arguments char-stdio: Restore blocking mode of stdout on exit virtio: remove virtio_tswap16s() call in vring_packed_event_read() virtio-pci: Fix the failure process in kvm_virtio_pci_vector_use_one() tcg/optimize: Fix TCG_COND_TST* simplification of setcond2 block: Parse filenames only when explicitly requested iotests/270: Don't store data-file with json: prefix in image iotests/244: Don't store data-file with protocol in image qcow2: Don't open data_file with BDRV_O_NO_IO tests: add testing of parameter=3D1 for SMP topology (bsc#1228169) hw/core: allow parameter=3D1 for SMP topology on any machine target/arm: Fix FJCVTZS vs flush-to-zero target/arm: Fix VCMLA Dd, Dn, Dm[idx] i386/cpu: fixup number of addressable IDs for processor cores in the physical package tests: Update our CI to use CentOS Stream 9 instead of 8 migration: Fix file migration with fdset tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers target/sparc: use signed denominator in sdiv helper linux-user: Make TARGET_NR_setgroups affect only the current thread accel/tcg: Fix typo causing tb->page_addr[1] to not be recorded stdvga: fix screen blanking hw/audio/virtio-snd: Always use little endian audio format Revert "monitor: use aio_co_reschedule_self()" ui/gtk: Draw guest frame at refresh cycle virtio-net: drop too short packets early target/i386: fix size of EBP writeback in gen_enter() References: bsc#1228169 Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 1404463d88..9f98de60ec 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 9.0.1 +Version: 9.0.2 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 9a0069f94f..a6ec2faab9 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 9.0.1 +Version: 9.0.2 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From 212a893089294be5207ecaf4d0d79d63bb514569 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Tue, 23 Jul 2024 12:33:43 +0200 Subject: [PATCH 074/102] [openSUSE] roms: Build ipxe with NO_WERROR=1 (bsc#1227960) This should allow qemu to be built with GCC14. [1] I believe that the package actually intends to use -Wno-error already (which makes sense for package building) because it puts it to EXTRA_CFLAGS, but at least the ipxe slap -Werror after EXTRA_CFLAGS, unless NO_WERROR is defined to one. [1] https://github.com/ipxe/ipxe/issues/1219 References: bsc#1227960 Signed-off-by: Martin Jambor [set NO_WERROR=1 only for ipxe] Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index a6ec2faab9..a05b2b16eb 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -875,16 +875,17 @@ popd %make_build -C %srcdir/roms seavgabios-ati \ -%make_build -C %srcdir/roms pxerom +%make_build -C %srcdir/roms pxerom NO_WERROR=1 %make_build -C %srcdir/roms edk2-basetools EXTRA_OPTFLAGS='-fPIE' -%make_build -C %srcdir/roms efirom + +%make_build -C %srcdir/roms efirom NO_WERROR=1 %if %{force_fit_virtio_pxe_rom} pushd %srcdir patch -p1 < %{rpmfilesdir}/openSUSE-pcbios-stub-out-the-SAN-req-s-i.patch popd -%make_build -C %srcdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom +%make_build -C %srcdir/roms NO_WERROR=1 pxerom_variants=virtio pxerom_targets=1af41000 pxerom %endif for i in %supported_nics_large %unsupported_nics -- 2.51.1 From 8c4efdaa5e7034e364358586934aa71f379a33b7 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 25 Jul 2024 13:44:21 +0200 Subject: [PATCH 075/102] [openSUSE] Workflows for Virtualization:Staging:TDX Define the workflows for the TDX staging branch. Signed-off-by: Dario Faggioli --- .obs/workflows.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.obs/workflows.yml b/.obs/workflows.yml index d183bac809..e6d0d71462 100644 --- a/.obs/workflows.yml +++ b/.obs/workflows.yml @@ -1,4 +1,4 @@ -pr_workflow: +pr_factory: steps: - branch_package: source_project: Virtualization:Staging @@ -9,7 +9,8 @@ pr_workflow: branches: only: - factory -rebuild_workflow: + +rebuild_factory: steps: # Will automatically rebuild the package - trigger_services: @@ -20,3 +21,27 @@ rebuild_workflow: branches: only: - factory + +pr_staging_tdx: + steps: + - branch_package: + source_project: Virtualization:Staging:TDX + source_package: qemu + target_project: Virtualization:Staging:TDX:PRs + filters: + event: pull_request + branches: + only: + - v8.2.6-tdx + +rebuild_staging_tdx: + steps: + # Will automatically rebuild the package + - trigger_services: + project: Virtualization:Staging:TDX + package: qemu + filters: + event: push + branches: + only: + - v8.2.6-tdx -- 2.51.1 From 91ed45f1accdb03d87448474becd9ff67cdea74a Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 16 Aug 2024 10:25:10 -0300 Subject: [PATCH 076/102] [openSUSE] fixup patch "pc: q35: Allow 1024 cpus for old machine types" Remove spurious initialization with PC_MACHINE_CLASS(). Signed-off-by: Fabiano Rosas [DF: added some context in the changelog] Signed-off-by: Dario Faggioli --- hw/i386/pc_q35.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 87288f3193..dbb2153819 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -403,8 +403,6 @@ DEFINE_Q35_MACHINE(8, 1); static void pc_q35_machine_8_0_options(MachineClass *m) { - PCMachineClass *pcmc = PC_MACHINE_CLASS(m); - pc_q35_machine_8_1_options(m); compat_props_add(m->compat_props, hw_compat_8_0, hw_compat_8_0_len); compat_props_add(m->compat_props, pc_compat_8_0, pc_compat_8_0_len); -- 2.51.1 From a996150c8536a5680e55e0c6504a32684b1f02f2 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 4 Sep 2024 16:00:29 +0200 Subject: [PATCH 077/102] [openSUSE] Update version to 9.1.0 Update to latest upstream major release, 9.1.0: https://lore.kernel.org/qemu-devel/172549088090.3334224.10887376086844748499@amd.com/ Full changelog available here: https://wiki.qemu.org/ChangeLog/9.1 Some of the most notable features/fixes: * migration: compression offload support via Intel In-Memory Analytics Accelerator (IAA) or User Space Accelerator Development Kit (UADK), along with enhanced support for postcopy failure recovery * virtio: support for VIRTIO_F_NOTIFICATION_DATA, allowing guest drivers to provide additional data as part of sending device notifications for performance/debug purposes * guest-agent: support for guest-network-get-route command on linux, guest-ssh-* commands on Windows, and enhanced CLI support for configuring allowed/blocked commands * block: security fixes for QEMU NBD server and NBD TLS encryption * ARM: emulation support for FEAT_NMI, FEAT_CSV2_3, FEAT_ETS2, FEAT_Spec_FPACC, FEAT_WFxT, FEAT_Debugv8p8 architecture features * ARM: nested/two-stage page table support for emulated SMMUv3 * ARM: xilinx_zynq board support for cache controller and multiple CPUs, and B-L475E-IOT01A board support for a DM163 display * LoongArch: support for directly booting an ELF kernel and for running up to 256 vCPUs via extioi virt extension * LoongArch: enhanced debug/GDB support * RISC-V: support for version 1.13 of privileged architecture specification * RISC-V: support for Zve32x, Zve64x, Zimop, Zcmop, Zama16b, Zabha, Zawrs, and Smcntrpmf extensions * RISC-V: enhanced debug/GDB support and general fixes * SPARC: emulation support for FMAF, IMA, VIS3, and VIS4 architecture features * x86: KVM support for running AMD SEV-SNP guests * x86: CPU emulation support for Icelake-Server-v7, SapphireRapids-v3, and SierraForest The following bugs/CVEs were solved (in 9.0.x) with backports that are now included in 9.1 upstream: - CVE-2024-4467 (bsc#1227322) - CVE-2024-7409 (bsc#1229007) Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 2 +- rpm/qemu.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 9f98de60ec..ba6cc7d3c6 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -27,7 +27,7 @@ URL: https://www.qemu.org/ Summary: CPU emulator for user space License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 9.0.2 +Version: 9.1.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc diff --git a/rpm/qemu.spec b/rpm/qemu.spec index a05b2b16eb..ac9efc986f 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -82,7 +82,7 @@ URL: https://www.qemu.org/ Summary: Machine emulator and virtualizer License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT Group: System/Emulators/PC -Version: 9.0.2 +Version: 9.1.0 Release: 0 Source0: qemu-%{version}.tar.xz Source1: common.inc -- 2.51.1 From 509096e16b80542c0537a4be9d8d819869b5c069 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 12 Jul 2024 16:12:03 -0300 Subject: [PATCH 078/102] [openSUSE][RPM] configure: remove options for removed features The avx512f, live-block-migration and pvrdma options no longer exist in upstream configure because those features were removed. Make the corresponding changes in the spec files. Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 4 ---- rpm/qemu.spec | 6 ------ 2 files changed, 10 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index ba6cc7d3c6..1c10425cf9 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -137,7 +137,6 @@ cd %blddir # for them. # TODO: Check whether we want to enable the followings: -# * avx512f # * debug-info # * fuse # * malloc-trim @@ -172,7 +171,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-attr \ --disable-auth-pam \ --disable-avx2 \ - --disable-avx512f \ --disable-block-drv-whitelist-in-tools \ --disable-bochs \ --disable-bpf \ @@ -226,7 +224,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-linux-aio \ --disable-linux-io-uring \ --disable-linux-user \ - --disable-live-block-migration \ --disable-lto \ --disable-lzfse \ --disable-lzo \ @@ -249,7 +246,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-pixman \ --disable-plugins \ --disable-png \ - --disable-pvrdma \ --disable-qcow1 \ --disable-qed \ --disable-qom-cast-debug \ diff --git a/rpm/qemu.spec b/rpm/qemu.spec index ac9efc986f..d2fefc4559 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -507,7 +507,6 @@ export HOSTNAME=OBS # is used in roms/SLOF/Makefile.gen (boo#1084909) # for them. # TODO: Check whether we want to enable the followings: -# * avx512f # * debug-info # * fuse # * malloc-trim @@ -542,7 +541,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-attr \ --disable-auth-pam \ --disable-avx2 \ - --disable-avx512f \ --disable-block-drv-whitelist-in-tools \ --disable-bochs \ --disable-bpf \ @@ -596,7 +594,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-linux-aio \ --disable-linux-io-uring \ --disable-linux-user \ - --disable-live-block-migration \ --disable-lto \ --disable-lzfse \ --disable-lzo \ @@ -619,7 +616,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --disable-pixman \ --disable-plugins \ --disable-png \ - --disable-pvrdma \ --disable-qcow1 \ --disable-qed \ --disable-qom-cast-debug \ @@ -754,7 +750,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-libudev \ --enable-libusb \ --enable-linux-aio \ - --enable-live-block-migration \ --enable-lzfse \ --enable-lzo \ --enable-modules \ @@ -767,7 +762,6 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-pipewire \ --enable-pixman \ --enable-png \ - --enable-pvrdma \ --enable-qcow1 \ --enable-qed \ --enable-rdma \ -- 2.51.1 From 50dcef061162e9f2b69bd35ea368ea6444b60c60 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 12 Jul 2024 17:25:41 -0300 Subject: [PATCH 079/102] [openSUSE][RPM] Update tests acpi path Upstream commit 7c08eefcaf (tests/data/acpi: Move x86 ACPI tables under x86/${machine} path, 2024-06-25) has moved some files under tests/data. Update the spec file to match. Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index d2fefc4559..a4b9fbde6a 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1027,11 +1027,11 @@ cd %blddir # do that in the patch itself. Instead, we keep a copy of the binary in the # package sources, and put it in place now, before the tests themselves. # If that patch is removed, the following line needs to go as well. -cp %{rpmfilesdir}/DSDT.pcie %{srcdir}/tests/data/acpi/microvm/ +cp %{rpmfilesdir}/DSDT.pcie %{srcdir}/tests/data/acpi/x86/microvm/ # Patch 'tests/acpi: update tables for new core count test' requires some new # binaries to be introcuded too. Let's copy them in place as well -cp %{rpmfilesdir}/APIC.core-count2 %{rpmfilesdir}/DSDT.core-count2 %{rpmfilesdir}/FACP.core-count2 %{srcdir}/tests/data/acpi/q35/ +cp %{rpmfilesdir}/APIC.core-count2 %{rpmfilesdir}/DSDT.core-count2 %{rpmfilesdir}/FACP.core-count2 %{srcdir}/tests/data/acpi/x86/q35/ %if 0%{?qemu_user_space_build} # Seccomp is not supported by linux-user emulation -- 2.51.1 From e5bb11121d8ff20f03c0b2d45331b1d11a64e1f6 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 12 Jul 2024 17:28:21 -0300 Subject: [PATCH 080/102] [openSUSE][RPM] Remove nios2 The nios2 emulation target has been removed upstream by commit 6c3014858c (target/nios2: Remove the deprecated Nios II target, 2024-03-27). Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- rpm/qemu-linux-user.spec | 1 - rpm/qemu.spec | 2 -- 2 files changed, 3 deletions(-) diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index 1c10425cf9..b82cf5df11 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -88,7 +88,6 @@ syscall layer occurs on the native hardware and operating system. %_bindir/qemu-mipsel %_bindir/qemu-mipsn32 %_bindir/qemu-mipsn32el -%_bindir/qemu-nios2 %_bindir/qemu-or1k %_bindir/qemu-ppc %_bindir/qemu-ppc64 diff --git a/rpm/qemu.spec b/rpm/qemu.spec index a4b9fbde6a..460ab1ff42 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1300,7 +1300,6 @@ popular QEMU packages which are dedicated to a single architecture.) %_bindir/qemu-system-mipsel %_bindir/qemu-system-mips64 %_bindir/qemu-system-mips64el -%_bindir/qemu-system-nios2 %_bindir/qemu-system-or1k %_bindir/qemu-system-riscv32 %_bindir/qemu-system-riscv64 @@ -1863,7 +1862,6 @@ This package provides QTest accelerator for testing QEMU. %_libdir/%name/accel-qtest-mips64.so %_libdir/%name/accel-qtest-mips64el.so %_libdir/%name/accel-qtest-mipsel.so -%_libdir/%name/accel-qtest-nios2.so %_libdir/%name/accel-qtest-or1k.so %_libdir/%name/accel-qtest-ppc.so %_libdir/%name/accel-qtest-ppc64.so -- 2.51.1 From 81b9f0b40df9a041651fe39d35e5a5a0fd0fe62f Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 12 Jul 2024 19:37:35 -0300 Subject: [PATCH 081/102] [openSUSE][RPM] Exclude riscv edk2 files These files are not provided by the QEMU packages. Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 460ab1ff42..8fcdd9fcd6 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -972,6 +972,8 @@ unlink %{buildroot}%_datadir/%name/edk2-i386-secure-code.fd unlink %{buildroot}%_datadir/%name/edk2-i386-vars.fd unlink %{buildroot}%_datadir/%name/edk2-x86_64-code.fd unlink %{buildroot}%_datadir/%name/edk2-x86_64-secure-code.fd +unlink %{buildroot}%_datadir/%name/edk2-riscv-code.fd +unlink %{buildroot}%_datadir/%name/edk2-riscv-vars.fd # this was never meant for customer consumption - delete even though installed unlink %{buildroot}%_bindir/elf2dmp -- 2.51.1 From e69b44026ce8f367420761265e3ff9932567c225 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 12 Jul 2024 19:40:41 -0300 Subject: [PATCH 082/102] [openSUSE][RPM] configure: Fix with-pkgversion option There was a typo on the subshell invocation: s/%/$ Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 8fcdd9fcd6..2c23eb33d9 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -535,7 +535,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --localstatedir=%_localstatedir \ --prefix=%_prefix \ --sysconfdir=%_sysconfdir \ - --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ + --with-pkgversion="$(echo '%{distro}' | sed 's/ (.*)//')" \ --disable-af-xdp \ --disable-alsa \ --disable-attr \ -- 2.51.1 From d353f6c3245e04764fb05278f9fc4142325927b2 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Fri, 26 May 2023 17:50:54 -0300 Subject: [PATCH 083/102] [openSUSE] block: Allow the wrapper script to see functions declared in qapi.h (bsc#1211000) The following patches will add co_wrapper annotations to functions declared in qapi.h. Add that header to the set of files used by block-coroutine-wrapper.py. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de Reviewed-by: Hanna Czenczek References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/meson.build | 1 + scripts/block-coroutine-wrapper.py | 1 + 2 files changed, 2 insertions(+) diff --git a/block/meson.build b/block/meson.build index f1262ec2ba..c7fe1c4867 100644 --- a/block/meson.build +++ b/block/meson.build @@ -154,6 +154,7 @@ block_gen_c = custom_target('block-gen.c', '../include/block/dirty-bitmap.h', '../include/block/block_int-io.h', '../include/block/block-global-state.h', + '../include/block/qapi.h', '../include/sysemu/block-backend-global-state.h', '../include/sysemu/block-backend-io.h', 'coroutines.h' diff --git a/scripts/block-coroutine-wrapper.py b/scripts/block-coroutine-wrapper.py index dbbde99e39..067b203801 100644 --- a/scripts/block-coroutine-wrapper.py +++ b/scripts/block-coroutine-wrapper.py @@ -44,6 +44,7 @@ def gen_header(): #include "block/block-gen.h" #include "block/block_int.h" #include "block/dirty-bitmap.h" +#include "block/qapi.h" """ -- 2.51.1 From 74c5aa7aa894644c7ac7524549a493de3d5f62c4 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 17 May 2023 12:59:27 -0300 Subject: [PATCH 084/102] [openSUSE] block: Temporarily mark bdrv_co_get_allocated_file_size as mixed (bsc#1211000) Some callers of this function are about to be converted to run in coroutines, so allow it to be executed both inside and outside a coroutine while we convert all the callers. This will be reverted once all callers of bdrv_do_query_node_info run in a coroutine. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de Reviewed-by: Eric Blake Reviewed-by: Hanna Czenczek References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- include/block/block-io.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block-io.h b/include/block/block-io.h index b49e0537dd..349d7760a1 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -86,7 +86,7 @@ int64_t co_wrapper_mixed_bdrv_rdlock bdrv_getlength(BlockDriverState *bs); int64_t coroutine_fn GRAPH_RDLOCK bdrv_co_get_allocated_file_size(BlockDriverState *bs); -int64_t co_wrapper_bdrv_rdlock +int64_t co_wrapper_mixed_bdrv_rdlock bdrv_get_allocated_file_size(BlockDriverState *bs); BlockMeasureInfo *bdrv_measure(BlockDriver *drv, QemuOpts *opts, -- 2.51.1 From cdcca751bf276677b33de66dddb0bb8c44ca4a56 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 27 Mar 2024 16:23:16 -0300 Subject: [PATCH 085/102] [openSUSE] block: Take the graph lock in bdrv_snapshot_list (bsc#1211000) This function has up until now always ran in the main loop, outside of a coroutine. We're about to make it run inside a coroutine so start actually taking the graph lock. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/snapshot.c b/block/snapshot.c index 8fd1756777..9740319e27 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -389,7 +389,7 @@ int bdrv_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_info) { GLOBAL_STATE_CODE(); - GRAPH_RDLOCK_GUARD_MAINLOOP(); + GRAPH_RDLOCK_GUARD(); BlockDriver *drv = bs->drv; BlockDriverState *fallback_bs = bdrv_snapshot_fallback(bs); -- 2.51.1 From 15f01cc8fe3a431502359bd05ac455f016bd3021 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Tue, 2 Apr 2024 17:23:18 -0300 Subject: [PATCH 086/102] [openSUSE] block: Reschedule query-block during qcow2 invalidation (bsc#1221812) There is a small window at the end of block device migration when devices are being re-activated. This includes a resetting of some fields of BDRVQcow2State at qcow2_co_invalidate_cache(). A concurrent QMP query-block command can call qcow2_get_specific_info() during this window and see the cleared values, which leads to an assert: qcow2_get_specific_info: Assertion `false' failed This is the same issue as Gitlab #1933, which has already been resolved[1], but there the fix applied only to non-coroutine commands. Once we move query-block to a coroutine the problem will manifest again. Add an operation blocker to the invalidation function to block the query info path during this window. Instead of failing query-block, which would be disruptive to users, use the blocker to know when to reschedule the coroutine back into the iohandler so it doesn't run while the BDRVQcow2State is inconsistent. To avoid failing query-block when all block operations are blocked, unblock the INFO operation at various places. This preserves the prior situations where query-block used to work. 1 - https://gitlab.com/qemu-project/qemu/-/issues/1933 Link: https://lore.kernel.org/all/87bk6trl9i.fsf@suse.de/ Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de References: bsc#1221812 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block.c | 1 + block/mirror.c | 1 + block/qcow2.c | 20 ++++++++++++++++++++ block/replication.c | 1 + blockjob.c | 1 + include/block/block-common.h | 1 + 6 files changed, 25 insertions(+) diff --git a/block.c b/block.c index c317de9eaa..82e59d3b08 100644 --- a/block.c +++ b/block.c @@ -1296,6 +1296,7 @@ static void GRAPH_WRLOCK bdrv_backing_attach(BdrvChild *c) parent->backing_blocker); bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_BACKUP_TARGET, parent->backing_blocker); + bdrv_op_unblock(backing_hd, BLOCK_OP_TYPE_INFO, parent->backing_blocker); } static void bdrv_backing_detach(BdrvChild *c) diff --git a/block/mirror.c b/block/mirror.c index 61f0a717b7..7a2dc105c0 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1196,6 +1196,7 @@ static void mirror_complete(Job *job, Error **errp) error_setg(&s->replace_blocker, "block device is in use by block-job-complete"); bdrv_op_block_all(s->to_replace, s->replace_blocker); + bdrv_op_unblock(s->to_replace, BLOCK_OP_TYPE_INFO, s->replace_blocker); bdrv_ref(s->to_replace); } diff --git a/block/qcow2.c b/block/qcow2.c index 70b19730a3..b73a1a6c86 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2848,6 +2848,7 @@ qcow2_co_invalidate_cache(BlockDriverState *bs, Error **errp) BdrvChild *data_file; int flags = s->flags; QCryptoBlock *crypto = NULL; + Error *blocker = NULL; QDict *options; int ret; @@ -2859,6 +2860,17 @@ qcow2_co_invalidate_cache(BlockDriverState *bs, Error **errp) crypto = s->crypto; s->crypto = NULL; + /* + * When qcow2_do_open() below reads the qcow header, it yields to + * wait for the I/O which allows a concurrent QMP query-block + * command to be dispatched on the same context before + * BDRVQcow2State has been completely repopulated. Block the + * query-info operation during this window to avoid having + * qcow2_get_specific_info() access bogus values. + */ + error_setg(&blocker, "invalidating cached metadata"); + bdrv_op_block(bs, BLOCK_OP_TYPE_INFO, blocker); + /* * Do not reopen s->data_file (i.e., have qcow2_do_close() not close it, * and then prevent qcow2_do_open() from opening it), because this function @@ -2878,6 +2890,8 @@ qcow2_co_invalidate_cache(BlockDriverState *bs, Error **errp) qemu_co_mutex_lock(&s->lock); ret = qcow2_do_open(bs, options, flags, false, errp); qemu_co_mutex_unlock(&s->lock); + bdrv_op_unblock(bs, BLOCK_OP_TYPE_INFO, blocker); + g_free(blocker); qobject_unref(options); if (ret < 0) { error_prepend(errp, "Could not reopen qcow2 layer: "); @@ -5254,6 +5268,12 @@ qcow2_get_specific_info(BlockDriverState *bs, Error **errp) ImageInfoSpecific *spec_info; QCryptoBlockInfo *encrypt_info = NULL; + if (qemu_in_coroutine() && + bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_INFO, errp)) { + *errp = NULL; + aio_co_reschedule_self(iohandler_get_aio_context()); + } + if (s->crypto != NULL) { encrypt_info = qcrypto_block_get_info(s->crypto, errp); if (!encrypt_info) { diff --git a/block/replication.c b/block/replication.c index 0415a5e8b7..5489dbeb61 100644 --- a/block/replication.c +++ b/block/replication.c @@ -577,6 +577,7 @@ static void replication_start(ReplicationState *rs, ReplicationMode mode, } bdrv_op_block_all(top_bs, s->blocker); bdrv_op_unblock(top_bs, BLOCK_OP_TYPE_DATAPLANE, s->blocker); + bdrv_op_unblock(top_bs, BLOCK_OP_TYPE_INFO, s->blocker); bdrv_graph_wrunlock(); diff --git a/blockjob.c b/blockjob.c index d5f29e14af..f0df345982 100644 --- a/blockjob.c +++ b/blockjob.c @@ -244,6 +244,7 @@ int block_job_add_bdrv(BlockJob *job, const char *name, BlockDriverState *bs, job->nodes = g_slist_prepend(job->nodes, c); bdrv_op_block_all(bs, job->blocker); + bdrv_op_unblock(bs, BLOCK_OP_TYPE_INFO, job->blocker); return 0; } diff --git a/include/block/block-common.h b/include/block/block-common.h index 338fe5ff7a..c03ff8c9b0 100644 --- a/include/block/block-common.h +++ b/include/block/block-common.h @@ -366,6 +366,7 @@ typedef enum BlockOpType { BLOCK_OP_TYPE_RESIZE, BLOCK_OP_TYPE_STREAM, BLOCK_OP_TYPE_REPLACE, + BLOCK_OP_TYPE_INFO, BLOCK_OP_TYPE_MAX, } BlockOpType; -- 2.51.1 From 13b7ecbda319335708e5754f41bd5ddedaea97e9 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 27 Mar 2024 16:11:06 -0300 Subject: [PATCH 087/102] [openSUSE] block: Run bdrv_do_query_node_info in a coroutine (bsc#1211000) Move this function into a coroutine so we can convert the whole qmp_query_block command into a coroutine in the next patches. Placing the entire command in a coroutine allow us to yield all the way back to the main loop, releasing the BQL and unblocking the main loop. When the whole conversion is completed, we'll be able to avoid a priority inversion that happens when a QMP command calls a slow (buggy) system call and blocks the vcpu thread from doing mmio due to contention on the BQL. About coroutine safety: Most callees have coroutine versions themselves and thus are safe to call in a coroutine. The remaining ones: - bdrv_refresh_filename, bdrv_get_full_backing_filename: String manipulation, nothing that would be unsafe for use in coroutines; - bdrv_get_format_name: Just accesses a field; - bdrv_get_specific_info, bdrv_query_snapshot_info_list: No locks or anything that would poll or block. (using a mixed wrapper for now, but after all callers are converted, this can become a coroutine exclusively) Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/qapi.c | 11 ++++++----- include/block/qapi.h | 8 ++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 2b5793f1d9..26a9510345 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -225,8 +225,9 @@ int bdrv_query_snapshot_info_list(BlockDriverState *bs, * Helper function for other query info functions. Store information about @bs * in @info, setting @errp on error. */ -static void GRAPH_RDLOCK -bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp) +void coroutine_fn +bdrv_co_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, + Error **errp) { int64_t size; const char *backing_filename; @@ -234,7 +235,7 @@ bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp) int ret; Error *err = NULL; - size = bdrv_getlength(bs); + size = bdrv_co_getlength(bs); if (size < 0) { error_setg_errno(errp, -size, "Can't get image size '%s'", bs->exact_filename); @@ -246,13 +247,13 @@ bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp) info->filename = g_strdup(bs->filename); info->format = g_strdup(bdrv_get_format_name(bs)); info->virtual_size = size; - info->actual_size = bdrv_get_allocated_file_size(bs); + info->actual_size = bdrv_co_get_allocated_file_size(bs); info->has_actual_size = info->actual_size >= 0; if (bs->encrypted) { info->encrypted = true; info->has_encrypted = true; } - if (bdrv_get_info(bs, &bdi) >= 0) { + if (bdrv_co_get_info(bs, &bdi) >= 0) { if (bdi.cluster_size != 0) { info->cluster_size = bdi.cluster_size; info->has_cluster_size = true; diff --git a/include/block/qapi.h b/include/block/qapi.h index 54c48de26a..234730b3de 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -25,6 +25,7 @@ #ifndef BLOCK_QAPI_H #define BLOCK_QAPI_H +#include "block/block-common.h" #include "block/graph-lock.h" #include "block/snapshot.h" #include "qapi/qapi-types-block-core.h" @@ -49,4 +50,11 @@ void bdrv_image_info_specific_dump(ImageInfoSpecific *info_spec, const char *prefix, int indentation); void bdrv_node_info_dump(BlockNodeInfo *info, int indentation, bool protocol); + +void coroutine_fn GRAPH_RDLOCK +bdrv_co_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, + Error **errp); +void co_wrapper_bdrv_rdlock +bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, + Error **errp); #endif -- 2.51.1 From dcfd6dc9480c123ae95307e6844231ceaf5cef38 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 27 Mar 2024 18:47:12 -0300 Subject: [PATCH 088/102] [openSUSE] block: Convert bdrv_query_block_graph_info to coroutine (bsc#1211000) We're converting callers of bdrv_co_get_allocated_file_size() to run in coroutines because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This function is a candidate because it calls bdrv_do_query_node_info(), which in turn calls bdrv_co_get_allocated_file_size(). All the functions called from bdrv_do_query_node_info() onwards are coroutine-safe, either have a coroutine version themselves[1] or are mostly simple code/string manipulation[2]. 1) bdrv_co_getlength(), bdrv_co_get_allocated_file_size(), bdrv_co_get_info(); 2) bdrv_refresh_filename(), bdrv_get_format_name(), bdrv_get_full_backing_filename(), bdrv_query_snapshot_info_list(), bdrv_get_specific_info(); Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de Reviewed-by: Hanna Czenczek References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/qapi.c | 14 ++++++++------ include/block/qapi.h | 6 +++++- qemu-img.c | 3 --- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 26a9510345..7b1cf48246 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -370,7 +370,7 @@ fail: } /** - * bdrv_query_block_graph_info: + * bdrv_co_query_block_graph_info: * @bs: root node to start from * @p_info: location to store image information * @errp: location to store error information @@ -379,17 +379,19 @@ fail: * * @p_info will be set only on success. On error, store error in @errp. */ -void bdrv_query_block_graph_info(BlockDriverState *bs, - BlockGraphInfo **p_info, - Error **errp) +void coroutine_fn +bdrv_co_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info, + Error **errp) { ERRP_GUARD(); BlockGraphInfo *info; BlockChildInfoList **children_list_tail; BdrvChild *c; + assert_bdrv_graph_readable(); + info = g_new0(BlockGraphInfo, 1); - bdrv_do_query_node_info(bs, qapi_BlockGraphInfo_base(info), errp); + bdrv_co_do_query_node_info(bs, qapi_BlockGraphInfo_base(info), errp); if (*errp) { goto fail; } @@ -403,7 +405,7 @@ void bdrv_query_block_graph_info(BlockDriverState *bs, QAPI_LIST_APPEND(children_list_tail, c_info); c_info->name = g_strdup(c->name); - bdrv_query_block_graph_info(c->bs, &c_info->info, errp); + bdrv_co_query_block_graph_info(c->bs, &c_info->info, errp); if (*errp) { goto fail; } diff --git a/include/block/qapi.h b/include/block/qapi.h index 234730b3de..76be9cc3e5 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -41,7 +41,11 @@ bdrv_query_snapshot_info_list(BlockDriverState *bs, void GRAPH_RDLOCK bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, bool skip_implicit_filters, Error **errp); -void GRAPH_RDLOCK + +void coroutine_fn GRAPH_RDLOCK +bdrv_co_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info, + Error **errp); +void co_wrapper_bdrv_rdlock bdrv_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info, Error **errp); diff --git a/qemu-img.c b/qemu-img.c index 7668f86769..19db8f18fc 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2958,10 +2958,7 @@ static BlockGraphInfoList *collect_image_info_list(bool image_opts, * duplicate the backing chain information that we obtain by walking * the chain manually here. */ - bdrv_graph_rdlock_main_loop(); bdrv_query_block_graph_info(bs, &info, &err); - bdrv_graph_rdunlock_main_loop(); - if (err) { error_report_err(err); blk_unref(blk); -- 2.51.1 From 1a91c7d96f1ec2e32e15dfad98cf26dab1936a2c Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 27 Mar 2024 18:53:04 -0300 Subject: [PATCH 089/102] [openSUSE] block: Convert bdrv_query_image_info to coroutine (bsc#1211000) This function is a caller of bdrv_do_query_node_info(), which have been converted to a coroutine. Convert this function as well so we're closer from having the whole qmp_query_block as a single coroutine. Also remove the wrapper for bdrv_co_do_query_node_info() now that all its callers are converted. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/qapi.c | 16 +++++++--------- include/block/qapi.h | 8 ++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 7b1cf48246..5e263960a9 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -304,7 +304,7 @@ bdrv_co_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, } /** - * bdrv_query_image_info: + * bdrv_co_query_image_info: * @bs: block node to examine * @p_info: location to store image information * @flat: skip backing node information @@ -325,17 +325,15 @@ bdrv_co_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, * * @p_info will be set only on success. On error, store error in @errp. */ -void bdrv_query_image_info(BlockDriverState *bs, - ImageInfo **p_info, - bool flat, - bool skip_implicit_filters, - Error **errp) +void coroutine_fn +bdrv_co_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, + bool skip_implicit_filters, Error **errp) { ERRP_GUARD(); ImageInfo *info; info = g_new0(ImageInfo, 1); - bdrv_do_query_node_info(bs, qapi_ImageInfo_base(info), errp); + bdrv_co_do_query_node_info(bs, qapi_ImageInfo_base(info), errp); if (*errp) { goto fail; } @@ -353,8 +351,8 @@ void bdrv_query_image_info(BlockDriverState *bs, } if (backing) { - bdrv_query_image_info(backing, &info->backing_image, false, - skip_implicit_filters, errp); + bdrv_co_query_image_info(backing, &info->backing_image, false, + skip_implicit_filters, errp); if (*errp) { goto fail; } diff --git a/include/block/qapi.h b/include/block/qapi.h index 76be9cc3e5..5f7e3a690e 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -38,7 +38,10 @@ int GRAPH_RDLOCK bdrv_query_snapshot_info_list(BlockDriverState *bs, SnapshotInfoList **p_list, Error **errp); -void GRAPH_RDLOCK +void coroutine_fn GRAPH_RDLOCK +bdrv_co_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, + bool skip_implicit_filters, Error **errp); +void co_wrapper_bdrv_rdlock bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, bool skip_implicit_filters, Error **errp); @@ -58,7 +61,4 @@ void bdrv_node_info_dump(BlockNodeInfo *info, int indentation, bool protocol); void coroutine_fn GRAPH_RDLOCK bdrv_co_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, Error **errp); -void co_wrapper_bdrv_rdlock -bdrv_do_query_node_info(BlockDriverState *bs, BlockNodeInfo *info, - Error **errp); #endif -- 2.51.1 From d1608cdb70a142b75d7664f59fb39a1c63eb2d8f Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 7 Jun 2023 18:13:47 -0300 Subject: [PATCH 090/102] [openSUSE] block: Convert bdrv_block_device_info into co_wrapper (bsc#1211000) We're converting callers of bdrv_co_get_allocated_file_size() to run in coroutines because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This function is a candidate because it calls bdrv_query_image_info() -> bdrv_co_do_query_node_info() -> bdrv_co_get_allocated_file_size(). It is safe to turn this is a coroutine because the code it calls is made up of either simple accessors and string manipulation functions [1] or it has already been determined to be safe [2]. 1) bdrv_refresh_filename(), bdrv_is_read_only(), blk_enable_write_cache(), bdrv_cow_bs(), blk_get_public(), throttle_group_get_name(), bdrv_write_threshold_get(), bdrv_query_dirty_bitmaps(), throttle_group_get_config(), bdrv_filter_or_cow_bs(), bdrv_skip_implicit_filters() 2) bdrv_co_do_query_node_info() (see previous commits); This was the only caller of bdrv_query_image_info(), so we can remove the wrapper for that function now. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/qapi.c | 10 +++++----- include/block/qapi.h | 13 ++++++------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 5e263960a9..9a59e5606f 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -41,10 +41,10 @@ #include "qemu/qemu-print.h" #include "sysemu/block-backend.h" -BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, - BlockDriverState *bs, - bool flat, - Error **errp) +BlockDeviceInfo *coroutine_fn bdrv_co_block_device_info(BlockBackend *blk, + BlockDriverState *bs, + bool flat, + Error **errp) { ERRP_GUARD(); ImageInfo **p_image_info; @@ -152,7 +152,7 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk, * Skip automatically inserted nodes that the user isn't aware of for * query-block (blk != NULL), but not for query-named-block-nodes */ - bdrv_query_image_info(bs, p_image_info, flat, blk != NULL, errp); + bdrv_co_query_image_info(bs, p_image_info, flat, blk != NULL, errp); if (*errp) { qapi_free_BlockDeviceInfo(info); return NULL; diff --git a/include/block/qapi.h b/include/block/qapi.h index 5f7e3a690e..9f0e957963 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -30,10 +30,12 @@ #include "block/snapshot.h" #include "qapi/qapi-types-block-core.h" -BlockDeviceInfo * GRAPH_RDLOCK -bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs, - bool flat, Error **errp); - +BlockDeviceInfo *coroutine_fn GRAPH_RDLOCK +bdrv_co_block_device_info(BlockBackend *blk, BlockDriverState *bs, bool flat, + Error **errp); +BlockDeviceInfo *co_wrapper_bdrv_rdlock +bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs, bool flat, + Error **errp); int GRAPH_RDLOCK bdrv_query_snapshot_info_list(BlockDriverState *bs, SnapshotInfoList **p_list, @@ -41,9 +43,6 @@ bdrv_query_snapshot_info_list(BlockDriverState *bs, void coroutine_fn GRAPH_RDLOCK bdrv_co_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, bool skip_implicit_filters, Error **errp); -void co_wrapper_bdrv_rdlock -bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, bool flat, - bool skip_implicit_filters, Error **errp); void coroutine_fn GRAPH_RDLOCK bdrv_co_query_block_graph_info(BlockDriverState *bs, BlockGraphInfo **p_info, -- 2.51.1 From 3f1b73e6137a1284d1d180b695c39b1f77297fd2 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Thu, 8 Jun 2023 14:38:20 -0300 Subject: [PATCH 091/102] [openSUSE] block: Don't query all block devices at hmp_nbd_server_start (bsc#1211000) We're currently doing a full query-block just to enumerate the devices for qmp_nbd_server_add and then discarding the BlockInfoList afterwards. Alter hmp_nbd_server_start to instead iterate explicitly over the block_backends list. This allows the removal of the dependency on qmp_query_block from hmp_nbd_server_start. This is desirable because we're about to move qmp_query_block into a coroutine and don't need to change the NBD code at the same time. Add the GRAPH_RDLOCK_GUARD_MAINLOOP macro because bdrv_skip_implicit_filters() needs the graph lock. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/monitor/block-hmp-cmds.c | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c index bdf2eb50b6..c01ed6874c 100644 --- a/block/monitor/block-hmp-cmds.c +++ b/block/monitor/block-hmp-cmds.c @@ -387,10 +387,12 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) bool writable = qdict_get_try_bool(qdict, "writable", false); bool all = qdict_get_try_bool(qdict, "all", false); Error *local_err = NULL; - BlockInfoList *block_list, *info; + BlockBackend *blk; SocketAddress *addr; NbdServerAddOptions export; + GRAPH_RDLOCK_GUARD_MAINLOOP(); + if (writable && !all) { error_setg(&local_err, "-w only valid together with -a"); goto exit; @@ -416,29 +418,43 @@ void hmp_nbd_server_start(Monitor *mon, const QDict *qdict) /* Then try adding all block devices. If one fails, close all and * exit. */ - block_list = qmp_query_block(NULL); + for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) { + BlockDriverState *bs = blk_bs(blk); - for (info = block_list; info; info = info->next) { - if (!info->value->inserted) { + if (!*blk_name(blk)) { + continue; + } + + /* + * Note: historically we used to call qmp_query_block() to get + * the list of block devices. The two 'continue' cases below + * are the same as used by that function and are here to + * preserve behavior. + */ + + if (!blk_get_attached_dev(blk)) { + continue; + } + + bs = bdrv_skip_implicit_filters(bs); + if (!bs || !bs->drv) { continue; } export = (NbdServerAddOptions) { - .device = info->value->device, + .device = g_strdup(blk_name(blk)), .has_writable = true, .writable = writable, }; qmp_nbd_server_add(&export, &local_err); - + g_free(export.device); if (local_err != NULL) { qmp_nbd_server_stop(NULL); break; } } - qapi_free_BlockInfoList(block_list); - exit: hmp_handle_error(mon, local_err); } -- 2.51.1 From 315239b6681f1cd7b635e8f1486a03d128709607 Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Sun, 14 May 2023 17:17:08 +0800 Subject: [PATCH 092/102] [openSUSE] block: Convert qmp_query_block and qmp_query_named_block_nodes to coroutine (bsc#1211000) Convert the remaining functions to make the QMP commands query-block and query-named-block-nodes run in their entirety in a coroutine. With this, any yield from those commands will return all the way back to the main loop. This releases the BQL and the main loop and avoids having the QMP command block another more important task from running. Both commands need to be converted at once because hmp_info_block calls both and it needs to be moved to a coroutine as well. Now the wrapper for bdrv_co_get_allocated_file_size() can be made not mixed and the wrapper for bdrv_co_block_device_info() can be removed. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de Signed-off-by: Lin Ma References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block.c | 8 ++++---- block/monitor/block-hmp-cmds.c | 2 +- block/qapi.c | 12 ++++++------ blockdev.c | 8 ++++---- hmp-commands-info.hx | 1 + include/block/block-global-state.h | 3 ++- include/block/block-hmp-cmds.h | 2 +- include/block/block-io.h | 2 +- include/block/qapi.h | 3 --- qapi/block-core.json | 5 +++-- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/block.c b/block.c index 82e59d3b08..4242ff0900 100644 --- a/block.c +++ b/block.c @@ -6228,18 +6228,18 @@ BlockDriverState *bdrv_find_node(const char *node_name) } /* Put this QMP function here so it can access the static graph_bdrv_states. */ -BlockDeviceInfoList *bdrv_named_nodes_list(bool flat, - Error **errp) +BlockDeviceInfoList *coroutine_fn bdrv_co_named_nodes_list(bool flat, + Error **errp) { BlockDeviceInfoList *list; BlockDriverState *bs; GLOBAL_STATE_CODE(); - GRAPH_RDLOCK_GUARD_MAINLOOP(); + GRAPH_RDLOCK_GUARD(); list = NULL; QTAILQ_FOREACH(bs, &graph_bdrv_states, node_list) { - BlockDeviceInfo *info = bdrv_block_device_info(NULL, bs, flat, errp); + BlockDeviceInfo *info = bdrv_co_block_device_info(NULL, bs, flat, errp); if (!info) { qapi_free_BlockDeviceInfoList(list); return NULL; diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c index c01ed6874c..57fab398b0 100644 --- a/block/monitor/block-hmp-cmds.c +++ b/block/monitor/block-hmp-cmds.c @@ -739,7 +739,7 @@ static void print_block_info(Monitor *mon, BlockInfo *info, } } -void hmp_info_block(Monitor *mon, const QDict *qdict) +void coroutine_fn hmp_info_block(Monitor *mon, const QDict *qdict) { BlockInfoList *block_list, *info; BlockDeviceInfoList *blockdev_list, *blockdev; diff --git a/block/qapi.c b/block/qapi.c index 9a59e5606f..c4514295ec 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -418,8 +418,8 @@ fail: } /* @p_info will be set only on success. */ -static void GRAPH_RDLOCK -bdrv_query_info(BlockBackend *blk, BlockInfo **p_info, Error **errp) +static void GRAPH_RDLOCK coroutine_fn +bdrv_co_query_info(BlockBackend *blk, BlockInfo **p_info, Error **errp) { BlockInfo *info = g_malloc0(sizeof(*info)); BlockDriverState *bs = blk_bs(blk); @@ -451,7 +451,7 @@ bdrv_query_info(BlockBackend *blk, BlockInfo **p_info, Error **errp) } if (bs && bs->drv) { - info->inserted = bdrv_block_device_info(blk, bs, false, errp); + info->inserted = bdrv_co_block_device_info(blk, bs, false, errp); if (info->inserted == NULL) { goto err; } @@ -661,13 +661,13 @@ bdrv_query_bds_stats(BlockDriverState *bs, bool blk_level) return s; } -BlockInfoList *qmp_query_block(Error **errp) +BlockInfoList *coroutine_fn qmp_query_block(Error **errp) { BlockInfoList *head = NULL, **p_next = &head; BlockBackend *blk; Error *local_err = NULL; - GRAPH_RDLOCK_GUARD_MAINLOOP(); + GRAPH_RDLOCK_GUARD(); for (blk = blk_all_next(NULL); blk; blk = blk_all_next(blk)) { BlockInfoList *info; @@ -677,7 +677,7 @@ BlockInfoList *qmp_query_block(Error **errp) } info = g_malloc0(sizeof(*info)); - bdrv_query_info(blk, &info->value, &local_err); + bdrv_co_query_info(blk, &info->value, &local_err); if (local_err) { error_propagate(errp, local_err); g_free(info); diff --git a/blockdev.c b/blockdev.c index 835064ed03..84e51f7bf0 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2746,13 +2746,13 @@ void qmp_drive_backup(DriveBackup *backup, Error **errp) blockdev_do_action(&action, errp); } -BlockDeviceInfoList *qmp_query_named_block_nodes(bool has_flat, - bool flat, - Error **errp) +BlockDeviceInfoList *coroutine_fn qmp_query_named_block_nodes(bool has_flat, + bool flat, + Error **errp) { bool return_flat = has_flat && flat; - return bdrv_named_nodes_list(return_flat, errp); + return bdrv_co_named_nodes_list(return_flat, errp); } XDbgBlockGraph *qmp_x_debug_query_block_graph(Error **errp) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index c59cd6637b..4f3f24296c 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -65,6 +65,7 @@ ERST .help = "show info of one block device or all block devices " "(-n: show named nodes; -v: show details)", .cmd = hmp_info_block, + .coroutine = true, }, SRST diff --git a/include/block/block-global-state.h b/include/block/block-global-state.h index bd7cecd1cf..ee87a0c7d9 100644 --- a/include/block/block-global-state.h +++ b/include/block/block-global-state.h @@ -196,7 +196,8 @@ void bdrv_aio_cancel(BlockAIOCB *acb); int bdrv_has_zero_init_1(BlockDriverState *bs); int coroutine_mixed_fn GRAPH_RDLOCK bdrv_has_zero_init(BlockDriverState *bs); BlockDriverState *bdrv_find_node(const char *node_name); -BlockDeviceInfoList *bdrv_named_nodes_list(bool flat, Error **errp); +BlockDeviceInfoList *coroutine_fn bdrv_co_named_nodes_list(bool flat, + Error **errp); XDbgBlockGraph * GRAPH_RDLOCK bdrv_get_xdbg_block_graph(Error **errp); BlockDriverState *bdrv_lookup_bs(const char *device, const char *node_name, diff --git a/include/block/block-hmp-cmds.h b/include/block/block-hmp-cmds.h index 71113cd7ef..6d9152318f 100644 --- a/include/block/block-hmp-cmds.h +++ b/include/block/block-hmp-cmds.h @@ -48,7 +48,7 @@ void hmp_eject(Monitor *mon, const QDict *qdict); void hmp_qemu_io(Monitor *mon, const QDict *qdict); -void hmp_info_block(Monitor *mon, const QDict *qdict); +void coroutine_fn hmp_info_block(Monitor *mon, const QDict *qdict); void hmp_info_blockstats(Monitor *mon, const QDict *qdict); void hmp_info_block_jobs(Monitor *mon, const QDict *qdict); void hmp_info_snapshots(Monitor *mon, const QDict *qdict); diff --git a/include/block/block-io.h b/include/block/block-io.h index 349d7760a1..b49e0537dd 100644 --- a/include/block/block-io.h +++ b/include/block/block-io.h @@ -86,7 +86,7 @@ int64_t co_wrapper_mixed_bdrv_rdlock bdrv_getlength(BlockDriverState *bs); int64_t coroutine_fn GRAPH_RDLOCK bdrv_co_get_allocated_file_size(BlockDriverState *bs); -int64_t co_wrapper_mixed_bdrv_rdlock +int64_t co_wrapper_bdrv_rdlock bdrv_get_allocated_file_size(BlockDriverState *bs); BlockMeasureInfo *bdrv_measure(BlockDriver *drv, QemuOpts *opts, diff --git a/include/block/qapi.h b/include/block/qapi.h index 9f0e957963..9274b76814 100644 --- a/include/block/qapi.h +++ b/include/block/qapi.h @@ -33,9 +33,6 @@ BlockDeviceInfo *coroutine_fn GRAPH_RDLOCK bdrv_co_block_device_info(BlockBackend *blk, BlockDriverState *bs, bool flat, Error **errp); -BlockDeviceInfo *co_wrapper_bdrv_rdlock -bdrv_block_device_info(BlockBackend *blk, BlockDriverState *bs, bool flat, - Error **errp); int GRAPH_RDLOCK bdrv_query_snapshot_info_list(BlockDriverState *bs, SnapshotInfoList **p_list, diff --git a/qapi/block-core.json b/qapi/block-core.json index aa40d44f1d..b96786087d 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -849,7 +849,7 @@ # } ## { 'command': 'query-block', 'returns': ['BlockInfo'], - 'allow-preconfig': true } + 'allow-preconfig': true, 'coroutine': true } ## # @BlockDeviceTimedStats: @@ -1997,7 +1997,8 @@ { 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ], 'data': { '*flat': 'bool' }, - 'allow-preconfig': true } + 'allow-preconfig': true, + 'coroutine': true} ## # @XDbgBlockGraphNodeType: -- 2.51.1 From d8948024e477c423e2581d102a210700a54bb06b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Silva?= Date: Thu, 18 May 2023 04:11:49 -0300 Subject: [PATCH 093/102] [openSUSE] block: Add a thread-pool version of fstat (bsc#1211000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fstat call can take a long time to finish when running over NFS. Add a version of it that runs in the thread pool. Adapt one of its users, raw_co_get_allocated_file size to use the new version. That function is called via QMP under the qemu_global_mutex so it has a large chance of blocking VCPU threads in case it takes too long to finish. Link: https://lore.kernel.org/r/20240409145917.6780-1-farosas@suse.de Reviewed-by: Claudio Fontana Reviewed-by: Hanna Czenczek Signed-off-by: João Silva References: bsc#1211000 Signed-off-by: Fabiano Rosas Signed-off-by: Dario Faggioli --- block/file-posix.c | 40 +++++++++++++++++++++++++++++++++++++--- include/block/raw-aio.h | 4 +++- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index ff928b5e85..3a34e0833a 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -227,6 +227,9 @@ typedef struct RawPosixAIOData { struct { unsigned long op; } zone_mgmt; + struct { + struct stat *st; + } fstat; }; } RawPosixAIOData; @@ -2624,6 +2627,34 @@ static void raw_close(BlockDriverState *bs) } } +static int handle_aiocb_fstat(void *opaque) +{ + RawPosixAIOData *aiocb = opaque; + + if (fstat(aiocb->aio_fildes, aiocb->fstat.st) < 0) { + return -errno; + } + + return 0; +} + +static int coroutine_fn raw_co_fstat(BlockDriverState *bs, struct stat *st) +{ + BDRVRawState *s = bs->opaque; + RawPosixAIOData acb; + + acb = (RawPosixAIOData) { + .bs = bs, + .aio_fildes = s->fd, + .aio_type = QEMU_AIO_FSTAT, + .fstat = { + .st = st, + }, + }; + + return raw_thread_pool_submit(handle_aiocb_fstat, &acb); +} + /** * Truncates the given regular file @fd to @offset and, when growing, fills the * new space according to @prealloc. @@ -2868,11 +2899,14 @@ static int64_t coroutine_fn raw_co_getlength(BlockDriverState *bs) static int64_t coroutine_fn raw_co_get_allocated_file_size(BlockDriverState *bs) { struct stat st; - BDRVRawState *s = bs->opaque; + int ret; - if (fstat(s->fd, &st) < 0) { - return -errno; + ret = raw_co_fstat(bs, &st); + + if (ret) { + return ret; } + return (int64_t)st.st_blocks * 512; } diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h index 626706827f..82b624d69f 100644 --- a/include/block/raw-aio.h +++ b/include/block/raw-aio.h @@ -31,6 +31,7 @@ #define QEMU_AIO_ZONE_REPORT 0x0100 #define QEMU_AIO_ZONE_MGMT 0x0200 #define QEMU_AIO_ZONE_APPEND 0x0400 +#define QEMU_AIO_FSTAT 0x0800 #define QEMU_AIO_TYPE_MASK \ (QEMU_AIO_READ | \ QEMU_AIO_WRITE | \ @@ -42,7 +43,8 @@ QEMU_AIO_TRUNCATE | \ QEMU_AIO_ZONE_REPORT | \ QEMU_AIO_ZONE_MGMT | \ - QEMU_AIO_ZONE_APPEND) + QEMU_AIO_ZONE_APPEND | \ + QEMU_AIO_FSTAT) /* AIO flags */ #define QEMU_AIO_MISALIGNED 0x1000 -- 2.51.1 From 3ead0a3106f8c31aa675ecc1c1166f7fc7f63177 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 4 Sep 2024 18:22:29 +0200 Subject: [PATCH 094/102] [openSUSE][RPM] package qemu-vmsr-helper Package qemu-vmsr-helper for letting VMs access the RAPL MSR. I'll live in its own package and only makes sense on x86_64. Signed-off-by: Dario Faggioli --- rpm/common.inc | 6 ++++++ rpm/qemu.spec | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/rpm/common.inc b/rpm/common.inc index e49b0dcb2b..b2b4e40ccd 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -46,6 +46,12 @@ %bcond_with xdp %endif +%ifarch %ix86 x86_64 +%bcond_without vmsr_helper +%else +%define vmsr_helper 0 +%endif + # Make it possible to build without spice (for SLE/Leap Micro) %bcond_without spice diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 2c23eb33d9..c55daada95 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1016,6 +1016,15 @@ done # End of "if build_x86_firmware" %endif +%if 0%{with vmsr_helper} +echo "" +# Upstream provides services for qemu-vmsr-helper. So far, we've not needed +# them, so let's continue not to ship them for now. If that changes, just +# uncomment these lines (and the ones in the %file vmsr-helper section) +#install -m 0644 contrib/systemd/qemu-vmsr-helper.service %{buildroot}%{_unitdir} +#install -m 0644 contrib/systemd/qemu-vmsr-helper.socket %{buildroot}%{_unitdir} +%endif + %suse_update_desktop_file qemu # Common install steps for qemu and qemu-linux-user @@ -1696,6 +1705,20 @@ This package provides a helper utility for SCSI persistent reservations. %_bindir/qemu-pr-helper %_mandir/man8/qemu-pr-helper.8.gz +%if 0%{with vmsr_helper} +%package vmsr-helper +Summary: QEMU virtual RAPL MSR helper +Group: System/Emulators/PC + +%description vmsr-helper +This package provides a helper utility for letting VMs access the RAPL (Running Average Power Limit) MSR. + +%files vmsr-helper +%_bindir/qemu-vmsr-helper +#%{_unitdir}/qemu-vmsr-helper.service +#%{_unitdir}/qemu-vmsr-helper.socket +%endif + %package tools Summary: Tools for QEMU Group: System/Emulators/PC @@ -1703,6 +1726,9 @@ Requires(pre): permissions Requires: qemu-img Requires: qemu-pr-helper Requires: group(kvm) +%if 0%{with vmsr_helper} +Requires: qemu-vmsr-helper +%endif %if %{has_virtiofsd} Requires: virtiofsd %endif -- 2.51.1 From 30a014fbc50d09f1dcc5db90f10d6a70607035d0 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 4 Sep 2024 18:27:10 +0200 Subject: [PATCH 095/102] [openSUSE][RPM] (commented out) services for qemu-pr-helper Upstream provides services for qemu-pr-helper. So far, we've not needed them, so let's continue not to ship them for now. However, in case at some point we want to start offering them, stash the commented out runes for that in the spec file. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index c55daada95..4f3eb10f75 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -1016,6 +1016,12 @@ done # End of "if build_x86_firmware" %endif +# Upstream provides services for qemu-pr-helper. So far, we've not needed +# them, so let's continue not to ship them for now. If that changes, just +# uncomment these lines (and the ones in the %file pr-helper section) +#install -m 0644 contrib/systemd/qemu-pr-helper.service %{buildroot}%{_unitdir} +#install -m 0644 contrib/systemd/qemu-pr-helper.socket %{buildroot}%{_unitdir} + %if 0%{with vmsr_helper} echo "" # Upstream provides services for qemu-vmsr-helper. So far, we've not needed @@ -1703,6 +1709,8 @@ This package provides a helper utility for SCSI persistent reservations. %files pr-helper %_bindir/qemu-pr-helper +#%{_unitdir}/qemu-pr-helper.service +#%{_unitdir}/qemu-pr-helper.socket %_mandir/man8/qemu-pr-helper.8.gz %if 0%{with vmsr_helper} -- 2.51.1 From 947eaefe383de40695506b5f91d4c46f31241c6b Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 5 Sep 2024 15:10:45 +0200 Subject: [PATCH 096/102] [openSUSE][RPM] Consolidate handling of conditional features Convert conditional build of features to the %bcond_without, so they can actually be disabled, e.g., at the project level. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 4f3eb10f75..f9636c661e 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -53,7 +53,7 @@ %ifarch %ix86 x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64 riscv64 %define kvm_available 1 -%define with_uring 1 +%bcond_without uring %define liburing_min_version 1.0 %endif @@ -62,11 +62,11 @@ %endif %ifarch x86_64 aarch64 ppc64le s390x -%define with_rbd 1 +%bcond_without rbd %endif %ifarch x86_64 ppc64le -%define with_daxctl 1 +%bcond_without daxctl %endif # enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward @@ -127,20 +127,20 @@ BuildRequires: libnuma-devel %if 0%{with canokey} BuildRequires: canokey-qemu-devel %endif -%if 0%{?with_daxctl} +%if 0%{with daxctl} BuildRequires: pkgconfig(libndctl) %endif %if %{kvm_available} BuildRequires: pkgconfig(udev) %endif -%if 0%{?with_rbd} +%if 0%{with rbd} BuildRequires: librbd-devel %endif %if 0%{with spice} BuildRequires: pkgconfig(spice-protocol) >= 0.12.3 BuildRequires: pkgconfig(spice-server) >= 0.12.5 %endif -%if 0%{?with_uring} +%if 0%{with uring} BuildRequires: pkgconfig(liburing) >= %liburing_min_version %endif %if 0%{with xdp} @@ -252,7 +252,7 @@ Recommends: qemu-ksm = %{version} Recommends: qemu-tools Recommends: qemu-ui-curses ## Packages we will SUGGEST -%if 0%{?with_rbd} +%if 0%{with rbd} Suggests: qemu-block-rbd %endif Suggests: qemu-accel-qtest @@ -688,31 +688,31 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g %if 0%{with canokey} --enable-canokey \ %endif -%if %{kvm_available} +%if 0%{kvm_available} --enable-kvm \ %endif -%if 0%{?with_daxctl} +%if 0%{with daxctl} --enable-libdaxctl \ %endif -%if 0%{?with_uring} +%if 0%{with uring} --enable-linux-io-uring \ %endif %if "%{_lto_cflags}" != "%{nil}" --enable-lto \ %endif -%if %{with malloc_trim} +%if 0%{with malloc_trim} --enable-malloc-trim \ %endif -%if %{with system_membarrier} +%if 0%{with system_membarrier} --enable-membarrier \ %endif %ifnarch %arm s390x --enable-numa \ %endif -%if 0%{?with_rbd} +%if 0%{with rbd} --enable-rbd \ %endif -%if %{has_rutabaga_gfx} +%if 0%{has_rutabaga_gfx} --enable-rutabaga-gfx \ %endif --enable-alsa \ @@ -1742,7 +1742,7 @@ Requires: virtiofsd %endif Recommends: multipath-tools Recommends: qemu-block-curl -%if 0%{?with_rbd} +%if 0%{with rbd} Recommends: qemu-block-rbd %endif @@ -1914,7 +1914,7 @@ This package provides QTest accelerator for testing QEMU. %_libdir/%name/accel-qtest-xtensa.so %_libdir/%name/accel-qtest-xtensaeb.so -%if 0%{?with_rbd} +%if 0%{with rbd} %package block-rbd Summary: Rados Block Device (Ceph) support for QEMU Group: System/Emulators/PC -- 2.51.1 From 131e1916a5779d2910d69d8a44d1286b10fd5007 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Thu, 5 Sep 2024 15:51:54 +0200 Subject: [PATCH 097/102] [openSUSE][RPM] Consolidate disabling all features during 'configure' in a macro When running configure, first of all we disable everything, and then we enable only the feature that we know we want (and, of course, system and user emulation use different sets of such features). Consolidate the first part in a macro, that can be share between the two spec files, making everything simpler and prettier. Signed-off-by: Dario Faggioli --- rpm/common.inc | 149 +++++++++++++++++++++++++++++++++++++++ rpm/qemu-linux-user.spec | 134 +---------------------------------- rpm/qemu.spec | 134 +---------------------------------- 3 files changed, 151 insertions(+), 266 deletions(-) diff --git a/rpm/common.inc b/rpm/common.inc index b2b4e40ccd..985bb836ea 100644 --- a/rpm/common.inc +++ b/rpm/common.inc @@ -106,3 +106,152 @@ Many options are available for defining the emulated environment, including\ traditional devices, direct host device access, and interfaces specific to\ virtualization. +%define disable_everything \\\ + --audio-drv-list= \\\ + --disable-af-xdp \\\ + --disable-alsa \\\ + --disable-attr \\\ + --disable-auth-pam \\\ + --disable-avx2 \\\ + --disable-avx512bw \\\ + --disable-blkio \\\ + --disable-block-drv-whitelist-in-tools \\\ + --disable-bochs \\\ + --disable-bpf \\\ + --disable-brlapi \\\ + --disable-bsd-user \\\ + --disable-bzip2 \\\ + --disable-cap-ng \\\ + --disable-capstone \\\ + --disable-cfi \\\ + --disable-cfi-debug \\\ + --disable-cloop \\\ + --disable-cocoa \\\ + --disable-colo-proxy \\\ + --disable-coreaudio \\\ + --disable-coroutine-pool \\\ + --disable-crypto-afalg \\\ + --disable-curl \\\ + --disable-curses \\\ + --disable-dbus-display \\\ + --disable-debug-graph-lock \\\ + --disable-debug-info \\\ + --disable-debug-mutex \\\ + --disable-debug-remap \\\ + --disable-debug-tcg \\\ + --disable-dmg \\\ + --disable-docs \\\ + --disable-download \\\ + --disable-dsound \\\ + --disable-fdt \\\ + --disable-fuse \\\ + --disable-fuse-lseek \\\ + --disable-gcrypt \\\ + --disable-gettext \\\ + --disable-gio \\\ + --disable-glusterfs \\\ + --disable-gnutls \\\ + --disable-gtk \\\ + --disable-gtk-clipboard \\\ + --disable-guest-agent \\\ + --disable-guest-agent-msi \\\ + --disable-hv-balloon \\\ + --disable-hvf \\\ + --disable-iconv \\\ + --disable-jack \\\ + --disable-kvm \\\ + --disable-l2tpv3 \\\ + --disable-libdaxctl \\\ + --disable-libdw \\\ + --disable-libiscsi \\\ + --disable-libkeyutils \\\ + --disable-libkeyutils \\\ + --disable-libnfs \\\ + --disable-libpmem \\\ + --disable-libssh \\\ + --disable-libudev \\\ + --disable-libusb \\\ + --disable-linux-aio \\\ + --disable-linux-io-uring \\\ + --disable-linux-user \\\ + --disable-lto \\\ + --disable-lzfse \\\ + --disable-lzo \\\ + --disable-malloc-trim \\\ + --disable-membarrier \\\ + --disable-module-upgrades \\\ + --disable-modules \\\ + --disable-mpath \\\ + --disable-multiprocess \\\ + --disable-netmap \\\ + --disable-nettle \\\ + --disable-numa \\\ + --disable-nvmm \\\ + --disable-opengl \\\ + --disable-oss \\\ + --disable-pa \\\ + --disable-parallels \\\ + --disable-pie \\\ + --disable-pipewire \\\ + --disable-pixman \\\ + --disable-plugins \\\ + --disable-png \\\ + --disable-qcow1 \\\ + --disable-qed \\\ + --disable-qom-cast-debug \\\ + --disable-qpl \\\ + --disable-rbd \\\ + --disable-rdma \\\ + --disable-relocatable \\\ + --disable-replication \\\ + --disable-rng-none \\\ + --disable-rutabaga-gfx \\\ + --disable-safe-stack \\\ + --disable-sanitizers \\\ + --disable-sdl \\\ + --disable-sdl-image \\\ + --disable-seccomp \\\ + --disable-selinux \\\ + --disable-slirp \\\ + --disable-slirp-smbd \\\ + --disable-smartcard \\\ + --disable-snappy \\\ + --disable-sndio \\\ + --disable-sparse \\\ + --disable-spice \\\ + --disable-spice-protocol \\\ + --disable-strip \\\ + --disable-system \\\ + --disable-tcg \\\ + --disable-tcg-interpreter \\\ + --disable-tools \\\ + --disable-tpm \\\ + --disable-tsan \\\ + --disable-u2f \\\ + --disable-uadk \\\ + --disable-usb-redir \\\ + --disable-user \\\ + --disable-vde \\\ + --disable-vdi \\\ + --disable-vhdx \\\ + --disable-vhost-crypto \\\ + --disable-vhost-kernel \\\ + --disable-vhost-net \\\ + --disable-vhost-user \\\ + --disable-vhost-user-blk-server \\\ + --disable-vhost-vdpa \\\ + --disable-virglrenderer \\\ + --disable-virtfs \\\ + --disable-vnc \\\ + --disable-vnc-jpeg \\\ + --disable-vnc-sasl \\\ + --disable-vpc \\\ + --disable-vte \\\ + --disable-vvfat \\\ + --disable-werror \\\ + --disable-whpx \\\ + --disable-xen \\\ + --disable-xen-pci-passthrough \\\ + --disable-xkbcommon \\\ + --disable-zstd \\\ + --without-default-devices diff --git a/rpm/qemu-linux-user.spec b/rpm/qemu-linux-user.spec index b82cf5df11..e7075a05d1 100644 --- a/rpm/qemu-linux-user.spec +++ b/rpm/qemu-linux-user.spec @@ -165,139 +165,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --prefix=%_prefix \ --sysconfdir=%_sysconfdir \ --with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \ - --disable-af-xdp \ - --disable-alsa \ - --disable-attr \ - --disable-auth-pam \ - --disable-avx2 \ - --disable-block-drv-whitelist-in-tools \ - --disable-bochs \ - --disable-bpf \ - --disable-brlapi \ - --disable-bsd-user \ - --disable-bzip2 \ - --disable-cap-ng \ - --disable-capstone \ - --disable-cfi \ - --disable-cfi-debug \ - --disable-cloop \ - --disable-cocoa \ - --disable-coreaudio \ - --disable-coroutine-pool \ - --disable-crypto-afalg \ - --disable-curl \ - --disable-curses \ - --disable-dbus-display \ - --disable-debug-info \ - --disable-debug-mutex \ - --disable-debug-tcg \ - --disable-dmg \ - --disable-docs \ - --disable-download \ - --disable-dsound \ - --disable-fdt \ - --disable-fuse \ - --disable-fuse-lseek \ - --disable-gcrypt \ - --disable-gettext \ - --disable-gio \ - --disable-glusterfs \ - --disable-gnutls \ - --disable-gtk \ - --disable-guest-agent \ - --disable-guest-agent-msi \ - --disable-hv-balloon \ - --disable-hvf \ - --disable-iconv \ - --disable-jack \ - --disable-kvm \ - --disable-l2tpv3 \ - --disable-libdaxctl \ - --disable-libiscsi \ - --disable-libkeyutils \ - --disable-libnfs \ - --disable-libpmem \ - --disable-libssh \ - --disable-libudev \ - --disable-libusb \ - --disable-linux-aio \ - --disable-linux-io-uring \ - --disable-linux-user \ - --disable-lto \ - --disable-lzfse \ - --disable-lzo \ - --disable-malloc-trim \ - --disable-membarrier \ - --disable-module-upgrades \ - --disable-modules \ - --disable-mpath \ - --disable-multiprocess \ - --disable-netmap \ - --disable-nettle \ - --disable-numa \ - --disable-nvmm \ - --disable-opengl \ - --disable-oss \ - --disable-pa \ - --disable-parallels \ - --disable-pie \ - --disable-pipewire \ - --disable-pixman \ - --disable-plugins \ - --disable-png \ - --disable-qcow1 \ - --disable-qed \ - --disable-qom-cast-debug \ - --disable-rbd \ - --disable-rdma \ - --disable-relocatable \ - --disable-replication \ - --disable-rng-none \ - --disable-rutabaga-gfx \ - --disable-safe-stack \ - --disable-sanitizers \ - --disable-sdl \ - --disable-sdl-image \ - --disable-seccomp \ - --disable-selinux \ - --disable-slirp \ - --disable-slirp-smbd \ - --disable-smartcard \ - --disable-snappy \ - --disable-sparse \ - --disable-spice \ - --disable-spice-protocol \ - --disable-strip \ - --disable-system \ - --disable-tcg \ - --disable-tcg-interpreter \ - --disable-tools \ - --disable-tpm \ - --disable-u2f \ - --disable-usb-redir \ - --disable-user \ - --disable-vde \ - --disable-vdi \ - --disable-vhost-crypto \ - --disable-vhost-kernel \ - --disable-vhost-net \ - --disable-vhost-user \ - --disable-vhost-user-blk-server \ - --disable-vhost-vdpa \ - --disable-virglrenderer \ - --disable-virtfs \ - --disable-vnc \ - --disable-vnc-jpeg \ - --disable-vnc-sasl \ - --disable-vte \ - --disable-vvfat \ - --disable-werror \ - --disable-whpx \ - --disable-xen \ - --disable-xen-pci-passthrough \ - --disable-xkbcommon \ - --disable-zstd \ - --without-default-devices \ + %{disable_everything} \ %if %{with system_membarrier} --enable-membarrier \ %endif diff --git a/rpm/qemu.spec b/rpm/qemu.spec index f9636c661e..1d9319e0fc 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -536,139 +536,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --prefix=%_prefix \ --sysconfdir=%_sysconfdir \ --with-pkgversion="$(echo '%{distro}' | sed 's/ (.*)//')" \ - --disable-af-xdp \ - --disable-alsa \ - --disable-attr \ - --disable-auth-pam \ - --disable-avx2 \ - --disable-block-drv-whitelist-in-tools \ - --disable-bochs \ - --disable-bpf \ - --disable-brlapi \ - --disable-bsd-user \ - --disable-bzip2 \ - --disable-cap-ng \ - --disable-capstone \ - --disable-cfi \ - --disable-cfi-debug \ - --disable-cloop \ - --disable-cocoa \ - --disable-coreaudio \ - --disable-coroutine-pool \ - --disable-crypto-afalg \ - --disable-curl \ - --disable-curses \ - --disable-dbus-display \ - --disable-debug-info \ - --disable-debug-mutex \ - --disable-debug-tcg \ - --disable-dmg \ - --disable-docs \ - --disable-download \ - --disable-dsound \ - --disable-fdt \ - --disable-fuse \ - --disable-fuse-lseek \ - --disable-gcrypt \ - --disable-gettext \ - --disable-gio \ - --disable-glusterfs \ - --disable-gnutls \ - --disable-gtk \ - --disable-guest-agent \ - --disable-guest-agent-msi \ - --disable-hv-balloon \ - --disable-hvf \ - --disable-iconv \ - --disable-jack \ - --disable-kvm \ - --disable-l2tpv3 \ - --disable-libdaxctl \ - --disable-libiscsi \ - --disable-libkeyutils \ - --disable-libnfs \ - --disable-libpmem \ - --disable-libssh \ - --disable-libudev \ - --disable-libusb \ - --disable-linux-aio \ - --disable-linux-io-uring \ - --disable-linux-user \ - --disable-lto \ - --disable-lzfse \ - --disable-lzo \ - --disable-malloc-trim \ - --disable-membarrier \ - --disable-module-upgrades \ - --disable-modules \ - --disable-mpath \ - --disable-multiprocess \ - --disable-netmap \ - --disable-nettle \ - --disable-numa \ - --disable-nvmm \ - --disable-opengl \ - --disable-oss \ - --disable-pa \ - --disable-parallels \ - --disable-pie \ - --disable-pipewire \ - --disable-pixman \ - --disable-plugins \ - --disable-png \ - --disable-qcow1 \ - --disable-qed \ - --disable-qom-cast-debug \ - --disable-rbd \ - --disable-rdma \ - --disable-relocatable \ - --disable-replication \ - --disable-rng-none \ - --disable-rutabaga-gfx \ - --disable-safe-stack \ - --disable-sanitizers \ - --disable-sdl \ - --disable-sdl-image \ - --disable-seccomp \ - --disable-selinux \ - --disable-slirp \ - --disable-slirp-smbd \ - --disable-smartcard \ - --disable-snappy \ - --disable-sparse \ - --disable-spice \ - --disable-spice-protocol \ - --disable-strip \ - --disable-system \ - --disable-tcg \ - --disable-tcg-interpreter \ - --disable-tools \ - --disable-tpm \ - --disable-u2f \ - --disable-usb-redir \ - --disable-user \ - --disable-vde \ - --disable-vdi \ - --disable-vhost-crypto \ - --disable-vhost-kernel \ - --disable-vhost-net \ - --disable-vhost-user \ - --disable-vhost-user-blk-server \ - --disable-vhost-vdpa \ - --disable-virglrenderer \ - --disable-virtfs \ - --disable-vnc \ - --disable-vnc-jpeg \ - --disable-vnc-sasl \ - --disable-vte \ - --disable-vvfat \ - --disable-werror \ - --disable-whpx \ - --disable-xen \ - --disable-xen-pci-passthrough \ - --disable-xkbcommon \ - --disable-zstd \ - --without-default-devices \ + %{disable_everything} \ %if 0%{?suse_version} >= 1600 --audio-drv-list=pipewire,pa,alsa,jack,oss \ %else -- 2.51.1 From 756d8ca7c19190fee4ed7d2ef24ec23873e6b1b8 Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Wed, 11 Sep 2024 18:47:55 +0200 Subject: [PATCH 098/102] [openSUSE][RPM] explicitly enable qemu-img support for vhdx and vpc Was disabled by mistake, when updating the QEMU version. Reinstate it. Signed-off-by: Dario Faggioli --- rpm/qemu.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpm/qemu.spec b/rpm/qemu.spec index 1d9319e0fc..b47ca7ce29 100644 --- a/rpm/qemu.spec +++ b/rpm/qemu.spec @@ -652,6 +652,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-usb-redir \ --enable-vde \ --enable-vdi \ + --enable-vhdx \ --enable-vhost-crypto \ --enable-vhost-kernel \ --enable-vhost-net \ @@ -663,6 +664,7 @@ EXTRA_CFLAGS="$(echo %{optflags} | sed -E 's/-[A-Z]?_FORTIFY_SOURCE[=]?[0-9]*//g --enable-vnc \ --enable-vnc-jpeg \ --enable-vnc-sasl \ + --enable-vpc \ --enable-vte \ --enable-vvfat \ --enable-werror \ -- 2.51.1 From 363f7220cf293a43c37afc9344722bfc9730fdf2 Mon Sep 17 00:00:00 2001 From: Fabiano Rosas Date: Wed, 11 Sep 2024 11:16:51 -0300 Subject: [PATCH 099/102] target/ppc: Fix lxvx/stxvx facility check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The XT check for the lxvx/stxvx instructions is currently inverted. This was introduced during the move to decodetree. >From the ISA: Chapter 7. Vector-Scalar Extension Facility Load VSX Vector Indexed X-form lxvx XT,RA,RB if TX=0 & MSR.VSX=0 then VSX_Unavailable() if TX=1 & MSR.VEC=0 then Vector_Unavailable() ... Let XT be the value 32×TX + T. The code currently does the opposite: if (paired || a->rt >= 32) { REQUIRE_VSX(ctx); } else { REQUIRE_VECTOR(ctx); } This was already fixed for lxv/stxv at commit "2cc0e449d1 (target/ppc: Fix lxv/stxv MSR facility check)", but the indexed forms were missed. Cc: qemu-stable@nongnu.org Fixes: 70426b5bb7 ("target/ppc: moved stxvx and lxvx from legacy to decodtree") Signed-off-by: Fabiano Rosas Reviewed-by: Claudio Fontana Acked-by: Ilya Leoshkevich Reviewed-by: Fabiano Rosas Message-ID: <20240911141651.6914-1-farosas@suse.de> Signed-off-by: Richard Henderson (cherry picked from commit 8bded2e73e80823a67f730140788a3c5e60bf4b5) References: bsc#1230140 Signed-off-by: Dario Faggioli --- target/ppc/translate/vsx-impl.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/translate/vsx-impl.c.inc b/target/ppc/translate/vsx-impl.c.inc index 40a87ddc4a..a869f30e86 100644 --- a/target/ppc/translate/vsx-impl.c.inc +++ b/target/ppc/translate/vsx-impl.c.inc @@ -2244,7 +2244,7 @@ static bool do_lstxv_PLS_D(DisasContext *ctx, arg_PLS_D *a, static bool do_lstxv_X(DisasContext *ctx, arg_X *a, bool store, bool paired) { - if (paired || a->rt >= 32) { + if (paired || a->rt < 32) { REQUIRE_VSX(ctx); } else { REQUIRE_VECTOR(ctx); -- 2.51.1 From 080ae7a165ee74dd6ee01bc97a4084b1495bdaa2 Mon Sep 17 00:00:00 2001 From: Tom Dohrmann Date: Fri, 11 Oct 2024 10:50:44 +0200 Subject: [PATCH 100/102] accel/kvm: check for KVM_CAP_READONLY_MEM on VM KVM_CAP_READONLY_MEM used to be a global capability, but with the introduction of AMD SEV-SNP confidential VMs, this extension is not always available on all VM types [1,2]. Query the extension on the VM level instead of on the KVM level. [1] https://patchwork.kernel.org/project/kvm/patch/20240809190319.1710470-2-seanjc@google.com/ [2] https://patchwork.kernel.org/project/kvm/patch/20240902144219.3716974-1-erbse.13@gmx.de/ Cc: Paolo Bonzini Signed-off-by: Tom Dohrmann Link: https://lore.kernel.org/r/20240903062953.3926498-1-erbse.13@gmx.de Signed-off-by: Paolo Bonzini Reviewed-by: Pankaj Gupta References: bsc#1231519 (mailing list: https://lore.kernel.org/r/20241011085044.19004-1-pbonzini@redhat.com) Signed-off-by: Dario Faggioli --- accel/kvm/kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 75d11a07b2..acc23092e7 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2603,7 +2603,7 @@ static int kvm_init(MachineState *ms) } kvm_readonly_mem_allowed = - (kvm_check_extension(s, KVM_CAP_READONLY_MEM) > 0); + (kvm_vm_check_extension(s, KVM_CAP_READONLY_MEM) > 0); kvm_resamplefds_allowed = (kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0); -- 2.51.1 From d5ac1dacadf561268b6a9256a911a0507142a898 Mon Sep 17 00:00:00 2001 From: Mattias Nissler Date: Mon, 19 Aug 2024 06:54:54 -0700 Subject: [PATCH 101/102] softmmu: Support concurrent bounce buffers (bsc#1230915, CVE-2024-8612) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When DMA memory can't be directly accessed, as is the case when running the device model in a separate process without shareable DMA file descriptors, bounce buffering is used. It is not uncommon for device models to request mapping of several DMA regions at the same time. Examples include: * net devices, e.g. when transmitting a packet that is split across several TX descriptors (observed with igb) * USB host controllers, when handling a packet with multiple data TRBs (observed with xhci) Previously, qemu only provided a single bounce buffer per AddressSpace and would fail DMA map requests while the buffer was already in use. In turn, this would cause DMA failures that ultimately manifest as hardware errors from the guest perspective. This change allocates DMA bounce buffers dynamically instead of supporting only a single buffer. Thus, multiple DMA mappings work correctly also when RAM can't be mmap()-ed. The total bounce buffer allocation size is limited individually for each AddressSpace. The default limit is 4096 bytes, matching the previous maximum buffer size. A new x-max-bounce-buffer-size parameter is provided to configure the limit for PCI devices. Signed-off-by: Mattias Nissler Reviewed-by: Philippe Mathieu-Daudé Acked-by: Peter Xu Link: https://lore.kernel.org/r/20240819135455.2957406-1-mnissler@rivosinc.com Signed-off-by: Peter Xu (cherry picked from commit 637b0aa139565cb82a7b9269e62214f87082635c) References: bsc#1230915 References: CVE-2024-8612 Signed-off-by: Dario Faggioli --- hw/pci/pci.c | 8 ++++ include/exec/memory.h | 14 +++---- include/hw/pci/pci_device.h | 3 ++ system/memory.c | 5 ++- system/physmem.c | 80 ++++++++++++++++++++++++++----------- 5 files changed, 75 insertions(+), 35 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index fab86d0567..d2caf3ee8b 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -85,6 +85,8 @@ static Property pci_props[] = { QEMU_PCIE_ERR_UNC_MASK_BITNR, true), DEFINE_PROP_BIT("x-pcie-ari-nextfn-1", PCIDevice, cap_present, QEMU_PCIE_ARI_NEXTFN_1_BITNR, false), + DEFINE_PROP_SIZE32("x-max-bounce-buffer-size", PCIDevice, + max_bounce_buffer_size, DEFAULT_MAX_BOUNCE_BUFFER_SIZE), DEFINE_PROP_END_OF_LIST() }; @@ -1204,6 +1206,8 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, "bus master container", UINT64_MAX); address_space_init(&pci_dev->bus_master_as, &pci_dev->bus_master_container_region, pci_dev->name); + pci_dev->bus_master_as.max_bounce_buffer_size = + pci_dev->max_bounce_buffer_size; if (phase_check(PHASE_MACHINE_READY)) { pci_init_bus_master(pci_dev); @@ -2633,6 +2637,10 @@ static void pci_device_class_init(ObjectClass *klass, void *data) k->unrealize = pci_qdev_unrealize; k->bus_type = TYPE_PCI_BUS; device_class_set_props(k, pci_props); + object_class_property_set_description( + klass, "x-max-bounce-buffer-size", + "Maximum buffer size allocated for bounce buffers used for mapped " + "access to indirect DMA memory"); } static void pci_device_class_base_init(ObjectClass *klass, void *data) diff --git a/include/exec/memory.h b/include/exec/memory.h index 296fd068c0..e5e865d1a9 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1084,13 +1084,7 @@ typedef struct AddressSpaceMapClient { QLIST_ENTRY(AddressSpaceMapClient) link; } AddressSpaceMapClient; -typedef struct { - MemoryRegion *mr; - void *buffer; - hwaddr addr; - hwaddr len; - bool in_use; -} BounceBuffer; +#define DEFAULT_MAX_BOUNCE_BUFFER_SIZE (4096) /** * struct AddressSpace: describes a mapping of addresses to #MemoryRegion objects @@ -1110,8 +1104,10 @@ struct AddressSpace { QTAILQ_HEAD(, MemoryListener) listeners; QTAILQ_ENTRY(AddressSpace) address_spaces_link; - /* Bounce buffer to use for this address space. */ - BounceBuffer bounce; + /* Maximum DMA bounce buffer size used for indirect memory map requests */ + size_t max_bounce_buffer_size; + /* Total size of bounce buffers currently allocated, atomically accessed */ + size_t bounce_buffer_size; /* List of callbacks to invoke when buffers free up */ QemuMutex map_client_list_lock; QLIST_HEAD(, AddressSpaceMapClient) map_client_list; diff --git a/include/hw/pci/pci_device.h b/include/hw/pci/pci_device.h index 15694f2489..91df40f989 100644 --- a/include/hw/pci/pci_device.h +++ b/include/hw/pci/pci_device.h @@ -167,6 +167,9 @@ struct PCIDevice { /* ID of standby device in net_failover pair */ char *failover_pair_id; uint32_t acpi_index; + + /* Maximum DMA bounce buffer size used for indirect memory map requests */ + uint32_t max_bounce_buffer_size; }; static inline int pci_intx(PCIDevice *pci_dev) diff --git a/system/memory.c b/system/memory.c index 5e6eb459d5..f6f6fee6d8 100644 --- a/system/memory.c +++ b/system/memory.c @@ -3148,7 +3148,8 @@ void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) as->ioeventfds = NULL; QTAILQ_INIT(&as->listeners); QTAILQ_INSERT_TAIL(&address_spaces, as, address_spaces_link); - as->bounce.in_use = false; + as->max_bounce_buffer_size = DEFAULT_MAX_BOUNCE_BUFFER_SIZE; + as->bounce_buffer_size = 0; qemu_mutex_init(&as->map_client_list_lock); QLIST_INIT(&as->map_client_list); as->name = g_strdup(name ? name : "anonymous"); @@ -3158,7 +3159,7 @@ void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name) static void do_address_space_destroy(AddressSpace *as) { - assert(!qatomic_read(&as->bounce.in_use)); + assert(qatomic_read(&as->bounce_buffer_size) == 0); assert(QLIST_EMPTY(&as->map_client_list)); qemu_mutex_destroy(&as->map_client_list_lock); diff --git a/system/physmem.c b/system/physmem.c index d39f9250eb..72466ecf70 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3097,6 +3097,20 @@ void cpu_flush_icache_range(hwaddr start, hwaddr len) NULL, len, FLUSH_CACHE); } +/* + * A magic value stored in the first 8 bytes of the bounce buffer struct. Used + * to detect illegal pointers passed to address_space_unmap. + */ +#define BOUNCE_BUFFER_MAGIC 0xb4017ceb4ffe12ed + +typedef struct { + uint64_t magic; + MemoryRegion *mr; + hwaddr addr; + size_t len; + uint8_t buffer[]; +} BounceBuffer; + static void address_space_unregister_map_client_do(AddressSpaceMapClient *client) { @@ -3122,9 +3136,9 @@ void address_space_register_map_client(AddressSpace *as, QEMUBH *bh) QEMU_LOCK_GUARD(&as->map_client_list_lock); client->bh = bh; QLIST_INSERT_HEAD(&as->map_client_list, client, link); - /* Write map_client_list before reading in_use. */ + /* Write map_client_list before reading bounce_buffer_size. */ smp_mb(); - if (!qatomic_read(&as->bounce.in_use)) { + if (qatomic_read(&as->bounce_buffer_size) < as->max_bounce_buffer_size) { address_space_notify_map_clients_locked(as); } } @@ -3253,28 +3267,40 @@ void *address_space_map(AddressSpace *as, mr = flatview_translate(fv, addr, &xlat, &l, is_write, attrs); if (!memory_access_is_direct(mr, is_write)) { - if (qatomic_xchg(&as->bounce.in_use, true)) { + size_t used = qatomic_read(&as->bounce_buffer_size); + for (;;) { + hwaddr alloc = MIN(as->max_bounce_buffer_size - used, l); + size_t new_size = used + alloc; + size_t actual = + qatomic_cmpxchg(&as->bounce_buffer_size, used, new_size); + if (actual == used) { + l = alloc; + break; + } + used = actual; + } + + if (l == 0) { *plen = 0; return NULL; } - /* Avoid unbounded allocations */ - l = MIN(l, TARGET_PAGE_SIZE); - as->bounce.buffer = qemu_memalign(TARGET_PAGE_SIZE, l); - as->bounce.addr = addr; - as->bounce.len = l; + BounceBuffer *bounce = g_malloc0(l + sizeof(BounceBuffer)); + bounce->magic = BOUNCE_BUFFER_MAGIC; memory_region_ref(mr); - as->bounce.mr = mr; + bounce->mr = mr; + bounce->addr = addr; + bounce->len = l; + if (!is_write) { flatview_read(fv, addr, MEMTXATTRS_UNSPECIFIED, - as->bounce.buffer, l); + bounce->buffer, l); } *plen = l; - return as->bounce.buffer; + return bounce->buffer; } - memory_region_ref(mr); *plen = flatview_extend_translation(fv, addr, len, mr, xlat, l, is_write, attrs); @@ -3289,12 +3315,11 @@ void *address_space_map(AddressSpace *as, void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, bool is_write, hwaddr access_len) { - if (buffer != as->bounce.buffer) { - MemoryRegion *mr; - ram_addr_t addr1; + MemoryRegion *mr; + ram_addr_t addr1; - mr = memory_region_from_host(buffer, &addr1); - assert(mr != NULL); + mr = memory_region_from_host(buffer, &addr1); + if (mr != NULL) { if (is_write) { invalidate_and_set_dirty(mr, addr1, access_len); } @@ -3304,15 +3329,22 @@ void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len, memory_region_unref(mr); return; } + + + BounceBuffer *bounce = container_of(buffer, BounceBuffer, buffer); + assert(bounce->magic == BOUNCE_BUFFER_MAGIC); + if (is_write) { - address_space_write(as, as->bounce.addr, MEMTXATTRS_UNSPECIFIED, - as->bounce.buffer, access_len); + address_space_write(as, bounce->addr, MEMTXATTRS_UNSPECIFIED, + bounce->buffer, access_len); } - qemu_vfree(as->bounce.buffer); - as->bounce.buffer = NULL; - memory_region_unref(as->bounce.mr); - /* Clear in_use before reading map_client_list. */ - qatomic_set_mb(&as->bounce.in_use, false); + + qatomic_sub(&as->bounce_buffer_size, bounce->len); + bounce->magic = ~BOUNCE_BUFFER_MAGIC; + memory_region_unref(bounce->mr); + g_free(bounce); + /* Write bounce_buffer_size before reading map_client_list. */ + smp_mb(); address_space_notify_map_clients(as); } -- 2.51.1 From 0dbd22c0dd1c7781582a94bc4d4f55daaab27158 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Wed, 28 Aug 2024 11:07:43 +0200 Subject: [PATCH 102/102] softmmu/physmem: fix memory leak in dirty_memory_extend() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As reported by Peter, we might be leaking memory when removing the highest RAMBlock (in the weird ram_addr_t space), and adding a new one. We will fail to realize that we already allocated bitmaps for more dirty memory blocks, and effectively discard the pointers to them. Fix it by getting rid of last_ram_page() and by remembering the number of dirty memory blocks that have been allocated already. While at it, let's use "unsigned int" for the number of blocks, which should be sufficient until we reach ~32 exabytes. Looks like this leak was introduced as we switched from using a single bitmap_zero_extend() to allocating multiple bitmaps: bitmap_zero_extend() relies on g_renew() which should have taken care of this. Resolves: https://lkml.kernel.org/r/CAFEAcA-k7a+VObGAfCFNygQNfCKL=AfX6A4kScq=VSSK0peqPg@mail.gmail.com Reported-by: Peter Maydell Fixes: 5b82b703b69a ("memory: RCU ram_list.dirty_memory[] for safe RAM hotplug") Reviewed-by: Stefan Hajnoczi Reviewed-by: Peter Xu Tested-by: Peter Maydell Cc: qemu-stable@nongnu.org Cc: Stefan Hajnoczi Cc: Paolo Bonzini Cc: Peter Xu Cc: Philippe Mathieu-Daudé Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20240828090743.128647-1-david@redhat.com Signed-off-by: Peter Xu (cherry picked from commit b84f06c2bee727b3870b4eeccbe3a45c5aea14c1) Signed-off-by: Dario Faggioli --- include/exec/ramlist.h | 1 + system/physmem.c | 35 +++++++++-------------------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/include/exec/ramlist.h b/include/exec/ramlist.h index 2ad2a81acc..d9cfe530be 100644 --- a/include/exec/ramlist.h +++ b/include/exec/ramlist.h @@ -50,6 +50,7 @@ typedef struct RAMList { /* RCU-enabled, writes protected by the ramlist lock. */ QLIST_HEAD(, RAMBlock) blocks; DirtyMemoryBlocks *dirty_memory[DIRTY_MEMORY_NUM]; + unsigned int num_dirty_blocks; uint32_t version; QLIST_HEAD(, RAMBlockNotifier) ramblock_notifiers; } RAMList; diff --git a/system/physmem.c b/system/physmem.c index 72466ecf70..5a3de3d5d1 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -1534,18 +1534,6 @@ static ram_addr_t find_ram_offset(ram_addr_t size) return offset; } -static unsigned long last_ram_page(void) -{ - RAMBlock *block; - ram_addr_t last = 0; - - RCU_READ_LOCK_GUARD(); - RAMBLOCK_FOREACH(block) { - last = MAX(last, block->offset + block->max_length); - } - return last >> TARGET_PAGE_BITS; -} - static void qemu_ram_setup_dump(void *addr, ram_addr_t size) { int ret; @@ -1799,13 +1787,11 @@ void qemu_ram_msync(RAMBlock *block, ram_addr_t start, ram_addr_t length) } /* Called with ram_list.mutex held */ -static void dirty_memory_extend(ram_addr_t old_ram_size, - ram_addr_t new_ram_size) +static void dirty_memory_extend(ram_addr_t new_ram_size) { - ram_addr_t old_num_blocks = DIV_ROUND_UP(old_ram_size, - DIRTY_MEMORY_BLOCK_SIZE); - ram_addr_t new_num_blocks = DIV_ROUND_UP(new_ram_size, - DIRTY_MEMORY_BLOCK_SIZE); + unsigned int old_num_blocks = ram_list.num_dirty_blocks; + unsigned int new_num_blocks = DIV_ROUND_UP(new_ram_size, + DIRTY_MEMORY_BLOCK_SIZE); int i; /* Only need to extend if block count increased */ @@ -1837,6 +1823,8 @@ static void dirty_memory_extend(ram_addr_t old_ram_size, g_free_rcu(old_blocks, rcu); } } + + ram_list.num_dirty_blocks = new_num_blocks; } static void ram_block_add(RAMBlock *new_block, Error **errp) @@ -1846,11 +1834,9 @@ static void ram_block_add(RAMBlock *new_block, Error **errp) RAMBlock *block; RAMBlock *last_block = NULL; bool free_on_error = false; - ram_addr_t old_ram_size, new_ram_size; + ram_addr_t ram_size; Error *err = NULL; - old_ram_size = last_ram_page(); - qemu_mutex_lock_ramlist(); new_block->offset = find_ram_offset(new_block->max_length); @@ -1901,11 +1887,8 @@ static void ram_block_add(RAMBlock *new_block, Error **errp) } } - new_ram_size = MAX(old_ram_size, - (new_block->offset + new_block->max_length) >> TARGET_PAGE_BITS); - if (new_ram_size > old_ram_size) { - dirty_memory_extend(old_ram_size, new_ram_size); - } + ram_size = (new_block->offset + new_block->max_length) >> TARGET_PAGE_BITS; + dirty_memory_extend(ram_size); /* Keep the list sorted from biggest to smallest block. Unlike QTAILQ, * QLIST (which has an RCU-friendly variant) does not have insertion at * tail, so save the last element in last_block. -- 2.51.1