Skip to content

Conversation

@Mixaill
Copy link

@Mixaill Mixaill commented Dec 3, 2025

Build ui-sdl and audio-sdl modules as some applications (like quickemu https://github.com/quickemu-project/quickemu/blob/master/quickemu#L1896 ) requires them.

SDL2_Image is absent in SLFO/ALP so disable it for them.

dfaggioli and others added 30 commits October 29, 2025 17:43
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 <[email protected]>
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 <[email protected]>
Create a rebuild (for pushes) and a pull request workflow.

Signed-off-by: Dario Faggioli <[email protected]>
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 <[email protected]>
…ith 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 <[email protected]>
…arch64

We add a --cross-file reference so that we can do cross compilation
of qboot from an aarch64 build.

Signed-off-by: Bruce Rogers <[email protected]>
Signed-off-by: Dario Faggioli <[email protected]>
Change QEMU_PATH from /usr/local/bin to /usr/bin prefix.

Signed-off-by: Andreas Färber <[email protected]>
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 <[email protected]>
[JRZ: changes from linux-user/qemu.h wass moved to linux-user/user-internals.h]
Signed-off-by: Jose R Ziviani <[email protected]>
[DF: Forward port, i.e., use ulong for do_prctl too]
Signed-off-by: Dario Faggioli <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
[AF: Rebased for v2.7.0-rc2]
Signed-off-by: Andreas Färber <[email protected]>
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 <[email protected]>
[BR: add include for sys/resource.h]
Signed-off-by: Bruce Rogers <[email protected]>
… 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 <[email protected]>
Signed-off-by: Olaf Hering <[email protected]>
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 <[email protected]>
…c#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: 5d6c599 ("migration, xen: Fix block image lock issue on live migration")

Signed-off-by: Olaf Hering <[email protected]>
References: bsc#1079730, bsc#1101982, bsc#1063993
Signed-off-by: Bruce Rogers <[email protected]>
…EAD CAPACITY (SLE-20965)

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:
...
    <disk type='block' device='lun'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sdc' index='1'/>
      <backingStore/>
      <target dev='sda' bus='scsi'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
...

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 <[email protected]>
…ancelled() (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 <[email protected]>
Reported-by: Cheolwoo Myung <[email protected]>
References: bsc#1180432, CVE-2020-35503
Signed-off-by: Dario Faggioli <[email protected]>
…ion (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 <[email protected]>
Signed-off-by: Lin Ma <[email protected]>
Signed-off-by: Dario Faggioli <[email protected]>
Revert commit "tests/qtest: enable more vhost-user tests by default"
(8dcb404), 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/[email protected]/

Signed-off-by: Dario Faggioli <[email protected]>
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 <[email protected]>
… 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 <[email protected]>
[DF: Small tweaks necessary for rebasing on top of 6.2.0]
Signed-off-by: Dario Faggioli <[email protected]>
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 <[email protected]>
We want to explicitly reference python3 in the scripts we install.

References: bsc#1077564
Signed-off-by: Bruce Rogers <[email protected]>
Turn on the meson install flag for these executables

Signed-off-by: Bruce Rogers <[email protected]>
…en 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 <[email protected]>
Signed-off-by: Dario Faggioli <[email protected]>
…2, 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 <[email protected]>
References: https://lore.kernel.org/qemu-devel/[email protected]/
References: bsc#1202282, jsc#PED-2592
Signed-off-by: Dario Faggioli <[email protected]>
The efi nic boot rom builds depend on this, they need the
EfiRom utility from edk2 BaseTools.

Fixes: 22e1153 ("edk2: replace build scripts")
Reported-by: Olaf Hering <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
References: https://lore.kernel.org/qemu-devel/[email protected]/
Signed-off-by: Dario Faggioli <[email protected]>
…ess (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 <[email protected]>
dfaggioli and others added 28 commits October 29, 2025 17:43
Update to latest stable release (9.2.1)

Full backport list here:
 https://lore.kernel.org/qemu-devel/[email protected]/

A selection of them is reported here below:
 9pfs: fix regression regarding CVE-2023-2861
 tcg: Reset free_temps before tcg_optimize
 tcg/riscv: Fix StoreStore barrier generation
 x86/loader: only patch linux kernels
 roms: re-add edk2-basetools target
 pc-bios: add missing riscv64 descriptor
 hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs
 meson.build: Disallow libnfs v6 to fix the broken macOS build
 target/i386: Reset TSCs of parked vCPUs too on VM reset
 hw/intc/riscv_aplic: Fix APLIC in_clrip and clripnum write emulation
 s390x/s390-virtio-ccw: don't crash on weird RAM sizes
 target/loongarch: Use actual operand size with vbsrl check
 docs: Correct '-runas' and '-fsdev/-virtfs proxy' indentation
 docs: Correct release of TCG trace-events removal
 target/i386/cpu: Fix notes for CPU models
 migration/multifd: Fix compile error caused by page_size usage
 migration/multifd: Fix compat with QEMU < 9.0
 migration: Add more error handling to analyze-migration.py
 migration: Remove unused argument in vmsd_desc_field_end
 migration: Fix parsing of s390 stream
 s390x: Fix CSS migration
 migration: Rename vmstate_info_nullptr
 ...

Signed-off-by: Dario Faggioli <[email protected]>
Signed-off-by: Zhenzhong Duan <[email protected]>
Acked-by: Jason Wang <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
(cherry picked from commit 9609d71)
References: bsc#1228343
Signed-off-by: Dario Faggioli <[email protected]>
Differences:

@@ -1,39 +1,39 @@
 /*
  * Intel ACPI Component Architecture
  * AML/ASL+ Disassembler version 20200925 (64-bit version)
  * Copyright (c) 2000 - 2020 Intel Corporation
  *
- * Disassembly of tests/data/acpi/x86/q35/DMAR.dmar, Mon Nov 11 15:31:18 2024
+ * Disassembly of /tmp/aml-SPJ4W2, Mon Nov 11 15:31:18 2024
  *
  * ACPI Data Table [DMAR]
  *
  * Format: [HexOffset DecimalOffset ByteLength]  FieldName : FieldValue
  */

 [000h 0000   4]                    Signature : "DMAR"    [DMA Remapping table]
 [004h 0004   4]                 Table Length : 00000078
 [008h 0008   1]                     Revision : 01
-[009h 0009   1]                     Checksum : 15
+[009h 0009   1]                     Checksum : 0C
 [00Ah 0010   6]                       Oem ID : "BOCHS "
 [010h 0016   8]                 Oem Table ID : "BXPC    "
 [018h 0024   4]                 Oem Revision : 00000001
 [01Ch 0028   4]              Asl Compiler ID : "BXPC"
 [020h 0032   4]        Asl Compiler Revision : 00000001

-[024h 0036   1]           Host Address Width : 26
+[024h 0036   1]           Host Address Width : 2F
 [025h 0037   1]                        Flags : 01
 [026h 0038  10]                     Reserved : 00 00 00 00 00 00 00 00 00 00

 [030h 0048   2]                Subtable Type : 0000 [Hardware Unit Definition]
 [032h 0050   2]                       Length : 0040

 [034h 0052   1]                        Flags : 00
 [035h 0053   1]                     Reserved : 00
 [036h 0054   2]           PCI Segment Number : 0000
 [038h 0056   8]        Register Base Address : 00000000FED90000

 [040h 0064   1]            Device Scope Type : 03 [IOAPIC Device]
 [041h 0065   1]                 Entry Length : 08
 [042h 0066   2]                     Reserved : 0000
 [044h 0068   1]               Enumeration ID : 00
 [045h 0069   1]               PCI Bus Number : FF

Signed-off-by: Zhenzhong Duan <[email protected]>
Acked-by: Clément Mathieu--Drif<[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
(cherry picked from commit 81ab964)
References: bsc#1228343
Signed-off-by: Dario Faggioli <[email protected]>
Update to latest stable release (9.2.2)

Full backport list here:
 https://lore.kernel.org/qemu-devel/[email protected]/

A selection of them is reported here below:
 net/slirp: libslirp 4.9.0 compatibility
 target/sparc: Fix gdbstub incorrectly handling registers f32-f62
 target/sparc: Fix register selection for all F*TOx and FxTO* instructions
 elfload: Fix alignment when unmapping excess reservation
 hw/net/smc91c111: Ignore attempt to pop from empty RX fifo
 make-release: don't rely on $CWD when excluding subproject directories
 ui/sdl2: reenable the SDL2 Windows keyboard hook procedure
 vfio/iommufd: Fix SIGSEV in iommufd_cdev_attach()
 gitlab-ci.d/cirrus: Update the FreeBSD job to v14.2
 qmp: update vhost-user protocol feature maps
 linux-user: Do not define struct sched_attr if libc headers do
 block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'
 block: Fix leak in send_qmp_error_event
 rust: add --rust-target option for bindgen

Signed-off-by: Dario Faggioli <[email protected]>
…rch-es (bsc#1240157)

qemu-imxe and some *-virtio-gpu-* packages are necessary for ARM, PPC
and s390 to work.

References: bsc#1240157
Signed-off-by: Dario Faggioli <[email protected]>
Update to latest stable release (9.2.3)

Full backport list here:
 https://lore.kernel.org/qemu-devel/[email protected]/

Fixes: bsc#1236329

A selection of them is reported here below:
 hw/intc/aspeed: Fix IRQ handler mask check
 hw/misc/aspeed_hace: Fix buffer overflow in has_padding function
 target/riscv: fix handling of nop for vstart >= vl in some vector instruction
 target/riscv: refactor VSTART_CHECK_EARLY_EXIT() to accept vl as a parameter
 Makefile: "make dist" generates a .xz, not .bz2
 target/ppc: Fix e200 duplicate SPRs
 target/ppc: Fix facility interrupt checks for VSX
 ppc/spapr: fix default cpu for pre-9.0 machines.
 host/include/loongarch64: Fix inline assembly compatibility with Clang
 linux-user/riscv: Fix handling of cpu mask in riscv_hwprobe syscall
 target/riscv: fixes a bug against `ssamoswap` behavior in M-mode
 target/riscv: fix access permission checks for CSR_SSP
 docs/about/emulation: Fix broken link
 vdpa: Allow vDPA to work on big-endian machine
 vdpa: Fix endian bugs in shadow virtqueue
 target/loongarch: Fix vldi inst
 target/arm: Simplify pstate_sm check in sve_access_check
 target/arm: Make DisasContext.{fp, sve}_access_checked tristate
 util/cacheflush: Make first DSB unconditional on aarch64
 docs: Rename default-configs to configs
 block: Zero block driver state before reopening
 hw/xen/hvm: Fix Aarch64 typo
 hw/net/smc91c111: Don't allow data register access to overrun buffer
 hw/net/smc91c111: Sanitize packet length on tx
 hw/net/smc91c111: Sanitize packet numbers
 ppc/pnv/occ: Fix common area sensor offsets
 xen: No need to flush the mapcache for grants (bsc#1236329)
 net: move backend cleanup to NIC cleanup
 net: parameterize the removing client from nc list
 util/qemu-timer.c: Don't warp timer from timerlist_rearm()
 target/arm: Correct STRD atomicity
 target/arm: Correct LDRD atomicity and fault behaviour
 hw/arm: enable secure EL2 timers for sbsa machine
 hw/arm: enable secure EL2 timers for virt machine
 target/arm: Implement SEL2 physical and virtual timers
 ...

Signed-off-by: Dario Faggioli <[email protected]>
qemu-linux-user: drop conditional requirement on pcre, all glib2 versions are recent enough to use pcre2
Update to latest release (10.0.0).

The full list of changes are available at:
  https://wiki.qemu.org/ChangeLog/10.0

Highlights include:
 * block: virtio-scsi multiqueue support for using different I/O threads
   to process requests for each queue (similar to the virtio-blk multiqueue
   support that was added in QEMU 9.2)
 * VFIO: improved support for IGD passthrough on all Intel Gen 11/12
   devices
 * Documentation: significant improvement/overhaul of documentation for
   QEMU
   Machine Protocol to make it clearer and more organized, including all
   commands/events/types now being cross-reference-able via click-able
   links in generated documentation
 * ARM: emulation support for EL2 physical and virtual timers
 * ARM: emulation support for FEAT_AFP, FEAT_RPRES, and FEAT_XS
   architecture features
 * ARM: new board models for NPCM8445 Evaluation and i.MX 8M Plus EVK
   boards
 * HPPA: new SeaBIOS-hppa version 18 with lots of fixes and enhancements
 * HPPA: translation speed and virtual CPU reset improvements
 * HPPA: emulation support for Diva GSP BMC boards
 * LoongArch: support for CPU hotplug, paravirtual IPIs, KVM steal time
   accounting, and virtual 'extioi' interrupt routing.
 * RISC-V: ISA/extension support for riscv-iommu-sys devices, 'svukte',
   'ssstateen', 'smrnmi', 'smdbltrp'/'ssdbltrp', 'supm'/'sspm', and
   IOMMU translation tags
 * RISC-V: emulation support for Ascalon and RV64 Xiangshan Nanhu CPUs,
   and Microblaze V boards.
 * s390x: add CPU model support for the generation 17 mainframe CPU
 * s930x: add support for virtio-mem and for bypassing IOMMU to improve
   PCI device performance
 * x86: CPU model support for Clearwater Forest and Sierra Forest v2
 * x86: faster emulation of string instructions
 * and lots more...

Have a look at the list of deprecated features too, especially
if you're still interested in using 32bits systems as hosts:
 * https://qemu-project.gitlab.io/qemu/about/deprecated.html

Signed-off-by: Dario Faggioli <[email protected]>
Make the %check phases a bit more verbose

Signed-off-by: Dario Faggioli <[email protected]>
…r_space

Since we have the downstream patch that increase the number of physbits
to 42 ("[openSUSE] Increase default phys bits to 42, if host supports
that") some tests that check if things fail due to default physbits
value being 40, actually succeeds, which breaks `%make check`.

Work that around, for now, by just ignoring them. Another thing that
we could do is to compute the new sizes and values for which they will
fail with 42bits, but we'll leave this for later.

Signed-off-by: Dario Faggioli <[email protected]>
test_hppa_seabios (sometimes) times-out during OBS builds,
while it works fine locally (both 'make check' and 'osc build').

Increasing the timeout makes it more reliable, so let's do that.

Signed-off-by: Dario Faggioli <[email protected]>
Build in OBS can be very slow, and this causes intermittent issues
with these tests (test-crypto-tlscredsx509, test-crypto-tlssession)
especially on some arche-es (s390x).

Increase the timeout to make them more reliable.

Signed-off-by: Dario Faggioli <[email protected]>
Update the opensbi submodule reference in order for it to
include patches "include: sbi: Fix compiling with C23 enabled compilers"
and inclue: sbi_utils: Cleanup int vs bool in semihosting_init()
definitions".

References: bsc#1241473
Signed-off-by: Dario Faggioli <[email protected]>
Backport the following patches in ipxe:
 [build] Disable gcc unterminated-string-initializer warnings (bsc#1241473)
 [build] Remove unsafe disable function wrapper from legacy NIC (bsc#1241473)
 [build] Prevent the use of reserved words in C23 (bsc#1241473)
 [build] Fix old-style function definition (bsc#1241473)
 [build] Fix typo in xenver.h header guard (bsc#1241473)

Signed-off-by: Dario Faggioli <[email protected]>
References: bsc#1241473
Backport the following patches in edk2:
 BaseTools/Pccts: set C standard (bsc#1241473
 MdePkg/BaseFdtLib: fix build with gcc 15 (bsc#1241473)

Signed-off-by: Dario Faggioli <[email protected]>
References: bsc#1241473
Update to latest stable release (10.0.2)

Full backport list:
 https://lore.kernel.org/qemu-devel/1748499690.323471.13081.nullmailer@localhost/

A selection of them is reported below:
 Revert "Drop support for Python 3.8"
 Update version for 10.0.1 release
 Drop support for Python 3.8
 target/hppa: Fix FPE exceptions
 linux-user/hppa: Send proper si_code on SIGFPE exception
 target/hppa: Copy instruction code into fr1 on FPU assist fault
 migration: Allow caps to be set when preempt or multifd cap enabled
 migration/multifd: Don't send device state packets with zerocopy flag
 qapi/misc-target: Fix the doc to distinguish query-sgx and query-sgx-capabilities
 hw/pci-host: Remove unused pci_host_data_be_ops
 hw/pci-host/gt64120: Fix endianness handling
 i386/hvf: Make CPUID_HT supported
 i386/tcg: Make CPUID_HT and CPUID_EXT3_CMP_LEG supported
 target/riscv/kvm: do not read unavailable CSRs
 target/riscv/kvm: add kvm_csr_cfgs[]
 target/riscv/kvm: turn kvm_riscv_reg_id_ulong() into a macro
 target/riscv/kvm: turn u32/u64 reg functions into macros
 target/riscv/kvm: fix leak in kvm_riscv_init_multiext_cfg()
 target/riscv/kvm: minor fixes/tweaks
 target/riscv: Fix vslidedown with rvv_ta_all_1s
 target/riscv: Fix the rvv reserved encoding of unmasked instructions
 target/riscv: rvv: Apply vext_check_input_eew to vector indexed load/store instructions
 target/riscv: rvv: Apply vext_check_input_eew to vector narrow/widen instructions
 target/riscv: rvv: Apply vext_check_input_eew to vector integer extension instructions(OPMVV)
 target/riscv: rvv: Apply vext_check_input_eew to vector slide instructions(OPIVI/OPIVX)
 target/riscv: rvv: Apply vext_check_input_eew to OPIVV/OPFVV(vext_check_sss) instructions
 target/riscv: rvv: Apply vext_check_input_eew to OPIVI/OPIVX/OPFVF(vext_check_ss) instructions
 target/riscv: rvv: Apply vext_check_input_eew to vrgather instructions to check mismatched input EEWs encoding constraint
 target/riscv: rvv: Add CHECK arg to GEN_OPFVF_WIDEN_TRANS
 target/riscv: rvv: Source vector registers cannot overlap mask register
 common-user/host/riscv: use tail pseudoinstruction for calling tail
 target/riscv: fix endless translation loop on big endian systems
 hw/riscv: Fix type conflict of GLib function pointers
 target/riscv: pmp: fix checks on writes to pmpcfg in Smepmp MML mode
 target/riscv: pmp: move Smepmp operation conversion into a function
 target/riscv: pmp: don't allow RLB to bypass rule privileges
 hw/nvme: fix nvme hotplugging
 virtio: Call set_features during reset
 s390x: Fix leak in machine_set_loadparm
 9pfs: fix FD leak and reduce latency of v9fs_reclaim_fd()
 9pfs: fix concurrent v9fs_reclaim_fd() calls
 hw/i2c/imx: Always set interrupt status bit if interrupt condition occurs
 xen: mapcache: Split mapcache_grants by ro and rw
 xen: mapcache: Fix finding matching entry
 target/i386: do not block singlestep for STI
 target/i386: do not trigger IRQ shadow for LSS
 hw/gpio/imx_gpio: Fix interpretation of GDIR polarity
 docs: Don't define duplicate label in qemu-block-drivers.rst.inc
 target/arm: Don't assert() for ISB/SB inside IT block
 hw/arm/npcm8xx_boards: Correct valid_cpu_types setting of NPCM8XX SoC
 accel/tcg: Don't use TARGET_LONG_BITS in decode_sleb128
 meson: Use osdep_prefix for strchrnul()
 meson: Share common C source prefixes
 meson: Remove CONFIG_STATX and CONFIG_STATX_MNT_ID
 meson: Use has_header_symbol() to check getcpu()
 target/mips: Fix MIPS16e translation
 hw/core/cpu: gdb_arch_name string should not be freed
 hw/core: Get default_cpu_type calling machine_class_default_cpu_type()
 target/avr: Improve decode of LDS, STS
 target/i386/hvf: fix lflags_to_rflags
 target/i386: Reset parked vCPUs together with the online ones
 target/i386: Fix model number of Zhaoxin YongFeng vCPU template
Update to latest stable release (10.0.3)

Full backport list:
 https://lore.kernel.org/qemu-devel/1748499690.323471.13081.nullmailer@localhost/

A selection of them is reported below:
 hvf: arm: Emulate ICC_RPR_EL1 accesses properly
 target/arm: Correct encoding of Debug Communications Channel registers
 ui: fix setting client_endian field defaults
 hw/net/npcm_gmac.c: Send the right data for second packet in a row
 target/i386: do not expose ARCH_CAPABILITIES on AMD CPU
 i386/cpu: Honor maximum value for CPUID.8000001DH.EAX[25:14]
 i386/cpu: Fix overflow of cache topology fields in CPUID.04H
 i386/cpu: Fix cpu number overflow in CPUID.01H.EBX[23:16]
 ui/vnc: Do not copy z_stream
 vhost: Fix used memslot tracking when destroying a vhost device
 roms: re-remove execute bit from hppa-firmware*
 file-posix: Fix aio=threads performance regression after enablign FUA
 amd_iommu: Fix truncation of oldval in amdvi_writeq
 amd_iommu: Remove duplicated definitions
 amd_iommu: Fix the calculation for Device Table size
 amd_iommu: Fix mask to retrieve Interrupt Table Root Pointer from DTE
 amd_iommu: Fix masks for various IOMMU MMIO Registers
 amd_iommu: Update bitmasks representing DTE reserved fields
 amd_iommu: Fix Device ID decoding for INVALIDATE_IOTLB_PAGES command
 amd_iommu: Fix Miscellaneous Information Register 0 encoding
 virtio-net: Add queues for RSS during migration
 net: fix buffer overflow in af_xdp_umem_create()
 accel/kvm: Adjust the note about the minimum required kernel version
 linux-user: Use qemu_set_cloexec() to mark pidfd as FD_CLOEXEC
 migration: Don't sync volatile memory after migration completes
 linux-user: Hold the fd-trans lock across fork
 linux-user: Check for EFAULT failure in nanosleep
 linux-user: Implement fchmodat2 syscall
 hw/arm/fsl-imx8mp: Wire VIRQ and VFIQ
 target/arm: Don't enforce NSE,NS check for EL3->EL3 returns
 target/i386: fix TB exit logic in gen_movl_seg() when writing to SS
 target/arm: Fix bfdotadd_ebf vs nan selection
 target/arm: Fix f16_dotadd vs nan selection
 target/arm: Fix PSEL size operands to tcg_gen_gvec_ands
 target/arm: Fix 128-bit element ZIP, UZP, TRN
 target/arm: Fix sve_access_check for SME
 target/arm: Fix SME vs AdvSIMD exception priority
 hw/s390x/ccw-device: Fix memory leak in loadparm setter
 virtio-gpu: support context init multiple timeline
 target/arm: Correct KVM & HVF dtb_compatible value
 target/arm: Make RETA[AB] UNDEF when pauth is not implemented
 tcg: Fix constant propagation in tcg_reg_alloc_dup
 target/loongarch: fix vldi/xvldi raise wrong error
 target/loongarch: add check for fcond
 linux-user/arm: Fix return value of SYS_cacheflush
 hw/arm/mps2: Configure the AN500 CPU with 16 MPU regions
 qemu-options.hx: Fix reversed description of icount sleep behavior
 hw/arm/virt: Check bypass iommu is not set for iommu-map DT property
 hw/loongarch/virt: Fix big endian support with MCFG table
 hw/core/qdev-properties-system: Add missing return in set_drive_helper()
 iotests: fix 240
 target/i386: Remove FRED dependency on WRMSRNS
 hw/audio/asc: fix SIGSEGV in asc_realize()
 audio: fix size calculation in AUD_get_buffer_size_out()
 audio: fix SIGSEGV in AUD_get_buffer_size_out()
 hw/i386/amd_iommu: Fix xtsup when vcpus < 255
 hw/i386/amd_iommu: Fix device setup failure when PT is on.

Signed-off-by: Dario Faggioli <[email protected]>
The systemd-binfmt service registers the binfmt_misc handler with the F
(fix binary) flag which causes the kernel to open a reference to the
interpreter right away and keeps it open until the handler is removed.
Updating the qemu-linux-user package thus needs to restart
systemd-binfmt to force those references to point to the updated
interpreter files.

Suggested-by: Andreas Schwab <[email protected]>
Signed-off-by: Dario Faggioli <[email protected]>
Point the submodules to the repositories that host our downstream.

Signed-off-by: Dario Faggioli <[email protected]>
Update to latest release (10.1.0).

The full list of changes are available at:
 https://wiki.qemu.org/ChangeLog/10.1

Highlights include:
 * VFIO: Initial support for accessing/mapping memory for confidential
   guests when guest_memfd is being utilized, allowing passthrough support
   for virtual machines running under SEV-SNP/TDX
 * Live migration: support for utilizing multifd to accelerate post-copy
   migration, optimizations for pre-copy migration, and RDMA migration
   support for ipv6
 * QEMU guest agent: support for querying load of virtual machines
   running Windows via new 'guest-get-load' command
 * ARM: support for CPU features FEAT_SME2, FEAT_SME2p1, FEAT_SME_B16B16,
   FEAT_SME_F16F16, FEAT_SVE_B16B16, and FEAT_SVE2p1
 * ARM: support for new board/machine models 'max78000fthr',
   'ast2700fc', 'catalina-bmc', 'gb200-bmc', and 'ast2700a0-evb'
 * ARM: 'virt' board now supports nested virtualization under KVM, CXL,
   and ACPI-based PCI hotplug
 * LoongArch: support for in-kernel irqchip
 * Microblaze: support for selecting the endianess of 'petalogix_s3adsp1800'
   machine type
 * RISC-V: ISA/extension support for atomic instruction fetch (Ziccif),
   'Svrsw60t59b', and numerous other improvements/additions/fixes
 * RISC-V: support for Kunminghu CPU and platform
 * x86: KVM support for running confidential guests via Intel TDX
 * x86: Support for initializing confidential TDX or SEV-SNP virtual
   machines using the IGVM file format
 * and lots more...

Have a look at the list of deprecated features too, especially
if you're still interested in using 32bits systems as hosts:
 * https://qemu-project.gitlab.io/qemu/about/deprecated.html

Signed-off-by: Dario Faggioli <[email protected]>
Given how VMs are configured by default, the qemu-vgabios package
should be consedered a Requires: for ppc (like it already is, e.g.,
on x86).

References: bsc#1230042
Signed-off-by: Dario Faggioli <[email protected]>
Update to latest stable release (10.1.1)

Full backports list:
 tests/functional/aarch64: Fix assets of test_hotplug_pci
 physmem: Destroy all CPU AddressSpaces on unrealize
 memory: New AS helper to serialize destroy+free
 include/system/memory.h: Clarify address_space_destroy() behaviour
 migration: Fix state transition in postcopy_start() error handling
 target/riscv: rvv: Modify minimum VLEN according to enabled vector extensions
 target/riscv: rvv: Replace checking V by checking Zve32x
 target/riscv: Fix endianness swap on compressed instructions
 hw/riscv/riscv-iommu: Fixup PDT Nested Walk
 target/riscv: do not use translator_ldl in opcode_at
 target/riscv: use riscv_csrr in riscv_csr_read
 hw/char: sifive_uart: Raise IRQ according to the Tx/Rx watermark thresholds
 docs/interop/firmware: Add riscv64 to FirmwareArchitecture
 hw/riscv/riscv-iommu: Fix MSI table size limit
 ui/icons/qemu.svg: Add metadata information (author, license) to the logo
 ui/spice: fix crash when disabling GL scanout on
 ui/spice: Fix abort on macOS
 ppc/spapr: init lrdr-capapcity phys with ram size if maxmem not provided
 hw/intc/xics: Add missing call to register vmstate_icp_server
 net/passt: Fix build failure due to missing GIO dependency
 hw/usb/hcd-uhci: don't assert for SETUP to non-0 endpoint
 tests/tcg/multiarch: Add tb-link test
 accel/tcg: Properly unlink a TB linked to itself
 tests: Fix "make check-functional" for targets without thorough tests
 .gitlab-ci.d/buildtest.yml: Unset CI_COMMIT_DESCRIPTION for htags
 tcg/optimize: Fix folding of vector bitsel
 hw/pci-host/astro: Don't call pci_regsiter_root_bus() in init
 hw/pci-host/dino: Don't call pci_register_root_bus() in init
 target/sparc: Relax decode of rs2_or_imm for v7
 target/sparc: Loosen decode of RDTBR for v7
 target/sparc: Loosen decode of RDWIM for v7
 target/sparc: Loosen decode of RDPSR for v7
 target/sparc: Loosen decode of RDY for v7
 target/sparc: Loosen decode of STBAR for v8
 target/sparc: Allow TRANS macro with no extra arguments
 linux-user: avoid -Werror=int-in-bool-context
 multiboot: Fix the split lock
 target/i386: Define enum X86ASIdx for x86's address spaces
 i386/cpu: Enable SMM cpu address space under KVM
 hw/usb/network: Remove hardcoded 0x40 prefix in STRING_ETHADDR response
 .gitmodules: move u-boot mirrors to qemu-project-mirrors
 iotests/check: always enable all python warnings
 iotests/151: ensure subprocesses are cleaned up
 iotests/147: ensure temporary sockets are closed before exiting
 python: ensure QEMUQtestProtocol closes its socket
 iotests: drop compat for old version context manager
 python: backport 'avoid creating additional event loops per thread'
 python: backport 'Remove deprecated get_event_loop calls'
 python: backport 'qmp-tui: Do not crash if optional dependencies are not met'
 python: backport 'qmp-shell-wrap: handle missing binary gracefully'
 python: backport 'Use @asynciocontextmanager'
 python: backport 'drop Python3.6 workarounds'
 python: backport 'kick event queue on legacy event_pull()'
 ui/vnc: Fix crash when specifying [vnc] without id in the config file
 hw/vfio-user: add x-pci-class-code
 hw/intc/loongarch_pch_pic: Fix ubsan warning and endianness issue
 target/loongarch: Guard 64-bit-only insn translation with TRANS64 macro
 block/curl: fix curl internal handles handling
 hw/char/max78000_uart: Destroy FIFO on deinit
 hw/gpio/pca9554: Avoid leak in pca9554_set_pin()
 hw/ppc: Fix build error with CONFIG_POWERNV disabled
 target/mips: fix TLB huge page check to use 64-bit shift
 linux-user/mips: Select M14Kc CPU to run microMIPS binaries
 linux-user/mips: Select 74Kf CPU to run MIPS16e binaries
 elf: Add EF_MIPS_ARCH_ASE definitions
 e1000e: Prevent crash from legacy interrupt firing after MSI-X enable
 Revert "tests/qtest: use qos_printf instead of g_test_message"
 vfio scsi ui: Error-check qio_channel_socket_connect_sync() the same way
 i386/kvm/vmsr_energy: Plug memory leak on failure to connect socket
 qga: Fix truncated output handling in guest-exec status reporting
 qga-vss: Write hex value of error in log
 qga/installer: Remove QGA VSS if QGA installation failed
 hw/arm/stm32f205_soc: Don't leak TYPE_OR_IRQ objects
 qemu/atomic: Finish renaming atomic128-cas.h headers
 scripts/kernel-doc: Avoid new Perl precedence warning
 target/arm: Trap PMCR when MDCR_EL2.TPMCR is set
 hw/intc/arm_gicv3_kvm: preserve pending interrupts during cpr
 tests/functional: Fix reverse_debugging asset precaching
 linux-user: Add strace for rseq
 i386/tcg/svm: fix incorrect canonicalization
 python: mkvenv: fix messages printed by mkvenv

Signed-off-by: Dario Faggioli <[email protected]>
Update to latest stable release (10.1.2)

Full backport list here:
 https://lore.kernel.org/qemu-devel/[email protected]/

A selection of them is reported here below:
 linux-user/microblaze: Fix little-endianness binary
 target/hppa: correct size bit parity for fmpyadd
 accel/tcg: Hoist first page lookup above pointer_wrap
 target/i386: user: do not set up a valid LDT on reset
 async: access bottom half flags with qatomic_read
 target/i386: fix access to the T bit of the TSS
 target/i386: fix x86_64 pushw op
 i386/tcg/smm_helper: Properly apply DR values on SMM entry / exit
 i386/cpu: Prevent delivering SIPI during SMM in TCG mode
 i386/kvm: Expose ARCH_CAP_FB_CLEAR when invulnerable to MDS
 target/i386: Fix CR2 handling for non-canonical addresses
 block/curl.c: Use explicit long constants in curl_easy_setopt calls
 target/i386: add compatibility property for pdcm feature
 target/i386: add compatibility property for arch_capabilities
 target/riscv: rvv: Fix vslide1[up|down].vx unexpected result when XLEN2 and SEWd
 target/riscv: Fix ssamoswap error handling
 target/riscv: Fix SSP CSR error handling in VU/VS mode
 target/riscv: Fix the mepc when sspopchk triggers the exception
 target/arm: Don't set HCR.RW for AArch32 only CPUs
 pcie_sriov: make pcie_sriov_pf_exit() safe on non-SR-IOV devices
 docs/devel: Correct uefi-vars-x64 device name
 hid: fix incorrect return value for hid
 pcie_sriov: Fix broken MMIO accesses from SR-IOV VFs

Signed-off-by: Dario Faggioli <[email protected]>
While code is supposed to call qio_channel_close() before releasing the
last reference on an QIOChannel, this is not guaranteed. QIOChannelFile
and QIOChannelSocket both cleanup resources in their finalizer if the
close operation was missed.

This ensures the TLS channel will do the same failsafe cleanup.

Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
(cherry picked from commit 2c14761)
References: bsc#1250984
Signed-off-by: Dario Faggioli <[email protected]>
The QIOChannelWebsock object releases all its resources in the
finalize callback. This is later than desired, as callers expect
to be able to call qio_channel_close() to fully close a channel
and release resources related to I/O.

The logic in the finalize method is at most a failsafe to handle
cases where a consumer forgets to call qio_channel_close.

This adds equivalent logic to the close method to release the
resources, using g_clear_handle_id/g_clear_pointer to be robust
against repeated invocations. The finalize method is tweaked
so that the GSource is removed before releasing the underlying
channel.

Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
(cherry picked from commit 322c3c4)
References: bsc#1250984
Signed-off-by: Dario Faggioli <[email protected]>
If the QIOChannelWebsock object is freed while it is waiting to
complete a handshake, a GSource is leaked. This can lead to the
callback firing later on and triggering a use-after-free in the
use of the channel. This was observed in the VNC server with the
following trace from valgrind:

==2523108== Invalid read of size 4
==2523108==    at 0x4054A24: vnc_disconnect_start (vnc.c:1296)
==2523108==    by 0x4054A24: vnc_client_error (vnc.c:1392)
==2523108==    by 0x4068A09: vncws_handshake_done (vnc-ws.c:105)
==2523108==    by 0x44863B4: qio_task_complete (task.c:197)
==2523108==    by 0x448343D: qio_channel_websock_handshake_io (channel-websock.c:588)
==2523108==    by 0x6EDB862: UnknownInlinedFun (gmain.c:3398)
==2523108==    by 0x6EDB862: g_main_context_dispatch_unlocked.lto_priv.0 (gmain.c:4249)
==2523108==    by 0x6EDBAE4: g_main_context_dispatch (gmain.c:4237)
==2523108==    by 0x45EC79F: glib_pollfds_poll (main-loop.c:287)
==2523108==    by 0x45EC79F: os_host_main_loop_wait (main-loop.c:310)
==2523108==    by 0x45EC79F: main_loop_wait (main-loop.c:589)
==2523108==    by 0x423A56D: qemu_main_loop (runstate.c:835)
==2523108==    by 0x454F300: qemu_default_main (main.c:37)
==2523108==    by 0x73D6574: (below main) (libc_start_call_main.h:58)
==2523108==  Address 0x57a6e0dc is 28 bytes inside a block of size 103,608 free'd
==2523108==    at 0x5F2FE43: free (vg_replace_malloc.c:989)
==2523108==    by 0x6EDC444: g_free (gmem.c:208)
==2523108==    by 0x4053F23: vnc_update_client (vnc.c:1153)
==2523108==    by 0x4053F23: vnc_refresh (vnc.c:3225)
==2523108==    by 0x4042881: dpy_refresh (console.c:880)
==2523108==    by 0x4042881: gui_update (console.c:90)
==2523108==    by 0x45EFA1B: timerlist_run_timers.part.0 (qemu-timer.c:562)
==2523108==    by 0x45EFC8F: timerlist_run_timers (qemu-timer.c:495)
==2523108==    by 0x45EFC8F: qemu_clock_run_timers (qemu-timer.c:576)
==2523108==    by 0x45EFC8F: qemu_clock_run_all_timers (qemu-timer.c:663)
==2523108==    by 0x45EC765: main_loop_wait (main-loop.c:600)
==2523108==    by 0x423A56D: qemu_main_loop (runstate.c:835)
==2523108==    by 0x454F300: qemu_default_main (main.c:37)
==2523108==    by 0x73D6574: (below main) (libc_start_call_main.h:58)
==2523108==  Block was alloc'd at
==2523108==    at 0x5F343F3: calloc (vg_replace_malloc.c:1675)
==2523108==    by 0x6EE2F81: g_malloc0 (gmem.c:133)
==2523108==    by 0x4057DA3: vnc_connect (vnc.c:3245)
==2523108==    by 0x448591B: qio_net_listener_channel_func (net-listener.c:54)
==2523108==    by 0x6EDB862: UnknownInlinedFun (gmain.c:3398)
==2523108==    by 0x6EDB862: g_main_context_dispatch_unlocked.lto_priv.0 (gmain.c:4249)
==2523108==    by 0x6EDBAE4: g_main_context_dispatch (gmain.c:4237)
==2523108==    by 0x45EC79F: glib_pollfds_poll (main-loop.c:287)
==2523108==    by 0x45EC79F: os_host_main_loop_wait (main-loop.c:310)
==2523108==    by 0x45EC79F: main_loop_wait (main-loop.c:589)
==2523108==    by 0x423A56D: qemu_main_loop (runstate.c:835)
==2523108==    by 0x454F300: qemu_default_main (main.c:37)
==2523108==    by 0x73D6574: (below main) (libc_start_call_main.h:58)
==2523108==

The above can be reproduced by launching QEMU with

  $ qemu-system-x86_64 -vnc localhost:0,websocket=5700

and then repeatedly running:

  for i in {1..100}; do
     (echo -n "GET / HTTP/1.1" && sleep 0.05) | nc -w 1 localhost 5700 &
  done

CVE-2025-11234
Reported-by: Grant Millar | Cylo <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
(cherry picked from commit b7a1f2c)
References: bsc#1250984
Signed-off-by: Dario Faggioli <[email protected]>
Commit a0274eb ("[openSUSE][RPM] spec: Require ipxe and virtio-gpu
packages for more arch-es (bsc#1240157)") wanted to make (among other
things) qemu-hw-display-virtio-gpu-pci an hard dependency on ARM,
but failed at it, due to a wrong macro. Fix that

Fixes: a0274eb
References: bsc#1254286
Signed-off-by: Dario Faggioli <[email protected]>
Build ui-sdl and audio-sdl modules as some applications (like quickemu) requires them.

SDL2_Image is absent in SLFO/ALP so disable it for them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.