Commit Graph

118862 Commits

Author SHA1 Message Date
Matt Borgerson f1ce017bd2 meson: Support system glslang 2025-03-08 00:55:46 -07:00
Alexandre Bouvier 7b9b7a0c25 meson: Optionally use system tomlplusplus, xxhash, json 2025-03-08 00:55:46 -07:00
Matt Borgerson 05072e23f1 build.sh: Change macOS PKG_CONFIG_PATH -> PKG_CONFIG_LIBDIR 2025-03-08 00:55:46 -07:00
Matt Borgerson 67bb27f760 meson: Enable curl platform-specific features 2025-03-08 00:55:46 -07:00
Matt Borgerson f305279f67 scripts/gen-license.py: Drop openssl 2025-03-07 22:12:49 -07:00
Matt Borgerson 7c8cde51d1 build.sh: Drop openssl11 fixes 2025-03-07 22:12:49 -07:00
Matt Borgerson 38b7cbe668 scripts/download-macos-libs.py: Drop openssl11 dep 2025-03-07 22:12:49 -07:00
Matt Borgerson f2830ce9ae meson: Drop openssl dep 2025-03-07 22:12:49 -07:00
Matt Borgerson d2948f18fe scripts/gen-license.py: Drop cpp-httplib 2025-03-07 22:12:49 -07:00
Matt Borgerson 5428760104 meson: Drop cpp-httplib dep 2025-03-07 22:12:49 -07:00
Matt Borgerson 8d2c1dbc32 ui: Migrate updater from httplib to libcurl wrapper 2025-03-07 22:12:49 -07:00
Matt Borgerson f6de4f03d7 ui: Migrate reporter from httplib to libcurl wrapper 2025-03-07 22:12:49 -07:00
Matt Borgerson 1cf3858ba1 util/http: Add simple wrapper functions for libcurl 2025-03-07 22:12:49 -07:00
Matt Borgerson ccbf45aecf scripts/gen-license.py: Add libcurl 2025-03-07 22:12:49 -07:00
Matt Borgerson 3decda5614 meson: Add libcurl subproject fallback 2025-03-07 22:12:49 -07:00
Matt Borgerson 714ec0c4da meson: Require libcurl 2025-03-07 22:12:49 -07:00
Matt Borgerson 14c35466f3 debian: Add libcurl4-gnutls-dev dep 2025-03-07 22:12:49 -07:00
Matt Borgerson 046d127f31 ui: Trim FontAwesome font to glyphs in use (save 940KiB) 2025-03-06 03:00:45 -07:00
Matt Borgerson fdb78c5dbd meson: Don't build glslang with hlsl support 2025-03-06 00:50:08 -07:00
Matt Borgerson eeaee81223 ci: Drop -fuse-ld option on Ubuntu builds 2025-03-06 00:49:06 -07:00
Erik Abair f701573d44 nv2a: Use rounded values for alpha testing 2025-03-05 17:12:14 -07:00
Matt Borgerson 203b33ecf0 ci: Zero Ubuntu dpkg version to eliminate cflag differences 2025-03-05 14:40:46 -07:00
Matt Borgerson c3120831bb ci: Update Ubuntu x86-64 release runner to ubuntu-24.04 2025-03-05 14:40:46 -07:00
Matt Borgerson 41ad49c9e9 scripts/download-macos-libs.py: Skip libsndfile 2025-03-04 22:58:26 -07:00
Matt Borgerson 4ca9cd9691 ci: Bump Windows build container 2025-03-04 22:58:26 -07:00
Matt Borgerson 3bdb9e7fd4 ubuntu-win64-cross: Bump mxe/build-win64-mxe 2025-02-15 16:56:30 -07:00
Matt Borgerson 906d085d66 meson: Update xxHash wrap 2025-02-15 16:56:30 -07:00
Matt Borgerson 65844f02e3 meson: Update VulkanMemoryAllocator wrap 2025-02-15 16:56:30 -07:00
Daniel Cook 33046acd82
ui: Add 720x480 resolution to Window size options 2025-02-15 16:17:58 -07:00
mborgerson de1f311efa
Merge QEMU v9.2.1 2025-02-15 15:17:25 -07:00
coldhex 0427ae8cfc mcpx: Implement APU multipass voice processing
Voice Processor (VP) multipass feature allows configuring lists of voices
that are first mixed (in order) into a designated mixbin which is then used
as a sample source when processing voices with multipass flag set to true
in NV_PAVS_VOICE_CFG_FMT. Setting correct voice order in lists is the
responsibility of the game/application and in practice is handled by the
DirectSound library. The multipass mixbin is hardcoded to 31 in
DirectSound, but hardware would allow other bins.

This implementation also adds additional info to audio debug UI to see what
the source and destination voices involved are. The info is only shown
when DSP processing is off, i.e. "VP Only" (MON_VP) is selected. This is
because storing the voice numbers requires additional digging which is
required for MON_VP anyway and therefore is free. The multipass feature
itself works fine with DSP (i.e. GP and EP) enabled, only the additional
debug info is not shown.
2025-02-15 15:01:29 -07:00
Matt Borgerson 366aacb398 v9.2.1 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZKoqtTHVaQM2a/75gqpKJDselHgFAmenP10ACgkQgqpKJDse
 lHhYXxAAhSGXrrfEjfyNPO0N5tRKqCzYkoeB5GDScRMb3UogF2/jg/VV2uAVBKnl
 ikCO87w81+8FctiYKfMYnhTk+axlxYq//H8JALX3tyt35BpSfSkyxS8RGzVl4S3l
 0TMA0l+cs3zPDq+yA3UAhppV5CgwBbzaN8xCm9mNFe49nlIHymgcFc3tFFtS0x+H
 PLjbqGX3X7joyqZ0O2cYk3UwzF01ZR1RKgM3sUumvsoSOwuKGul4jc0iLCn9hTHX
 QdxrThxb9KL5iL+fY5DlYc/LiJNPk1NcU1dQzqJinzrux9wNr4RpF7iSrs+m0Y/d
 3FNzMTPuiqwBh4JJFGuSguR83q6nJLlVR/kKxPmPNBSX86q4L1Dw0rbyb40ZRGAA
 xV88kv8gzvmhR2hnScn7S+2d3EG9D3DKDCKTPp0unHhMjZk9rP+hcPmQaTqi1CIW
 c400CI2gP0e0a8TFLKTnTFVP2+scvOkVn6rBy9+pQat0eTMgWjA9VSxvG5GRJ4W9
 +i/9RSTyCLy3s7DWX3JN9nytZ5mS/RDv5YB3FfeMlT/1wH5PFYitxHdyxjHrBE+8
 KjXPtqDsJTMvwqPP+2nDD7D1MQWJgz0468GeuPK5itJCYBVYilIOUlibKfAEPbo+
 0eUtq1oVMJfKnJadARf2cQrzR2IGEWF1rZqrRrkxfl+mHnTxnss=
 =XhYS
 -----END PGP SIGNATURE-----

Merge QEMU v9.2.1
2025-02-15 13:59:10 -07:00
Michael Tokarev cac3fb4414 Update version for 9.2.1 release
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-02-08 14:26:21 +03:00
Matt Borgerson ac781ea8d1 ci: Fix ubuntu artifact unpack 2025-02-04 18:08:08 -07:00
Matt Borgerson 9f97cdc027 ci: Build AppImage for aarch64 2025-02-04 16:41:21 -07:00
Matt Borgerson a730f078e5 ci: Fix Windows ccache key 2025-02-04 16:41:21 -07:00
Dominik 'Disconnect3d' Czarnota 4404720764 gdbstub/user-target: fix gdbserver int format (%d -> %x)
This commit fixes an incorrect format string for formatting integers
provided to GDB when debugging a target run in QEMU user mode.

The correct format is hexadecimal for both success and errno values,
some of which can be seen here [0].

[0] e65a355022/gdbserver/hostio.cc (L196-L213)

Signed-off-by: Dominik 'Disconnect3d' Czarnota <dominik.b.czarnota@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Fixes: e282010b2e ("gdbstub: Add support for info proc mappings")
Cc: qemu-stable@nongnu.org
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 8b647bd352505234cab2acd2422aba183a1aa1fd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-02-01 12:21:08 +03:00
Laurent Vivier 7dc66ede71 net/dump: Correctly compute Ethernet packet offset
When a packet is sent with QEMU_NET_PACKET_FLAG_RAW by QEMU it
never includes virtio-net header even if qemu_get_vnet_hdr_len()
is not 0, and filter-dump is not managing this case.

The only user of QEMU_NET_PACKET_FLAG_RAW is announce_self,
we can show the problem using it and tcpddump:

- QEMU parameters:

  .. -monitor stdio \
     -netdev bridge,id=netdev0,br=virbr0 \
     -device virtio-net,mac=9a:2b:2c:2d:2e:2f,netdev=netdev0 \
     -object filter-dump,netdev=netdev0,file=log.pcap,id=pcap0

- HMP command:

  (qemu) announce_self

- TCP dump:

  $ tcpdump -nxr log.pcap

  without the fix:

    08:00:06:04:00:03 > 2e:2f:80:35:00:01, ethertype Unknown (0x9a2b), length 50:
         0x0000:  2c2d 2e2f 0000 0000 9a2b 2c2d 2e2f 0000
         0x0010:  0000 0000 0000 0000 0000 0000 0000 0000
         0x0020:  0000 0000

  with the fix:

    ARP, Reverse Request who-is 9a:2b:2c:2d:2e:2f tell 9a:2b:2c:2d:2e:2f, length 46
         0x0000:  0001 0800 0604 0003 9a2b 2c2d 2e2f 0000
         0x0010:  0000 9a2b 2c2d 2e2f 0000 0000 0000 0000
         0x0020:  0000 0000 0000 0000 0000 0000 0000

Fixes: 481c52320a ("net: Strip virtio-net header when dumping")
Cc: akihiko.odaki@daynix.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit c6a1b591a68b4d7230d6c3f56965e18080d737e5)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-02-01 12:01:02 +03:00
Laurent Vivier eec417351f net: Fix announce_self
b9ad513e18 ("net: Remove receive_raw()") adds an iovec entry
in qemu_deliver_packet_iov() to add the virtio-net header
in the data when QEMU_NET_PACKET_FLAG_RAW is set but forgets
to increase the number of iovec entries in the array, so
receive_iov() will only send the first entry (the virtio-net
entry, full of 0) and no data. The packet will be discarded.

The only user of QEMU_NET_PACKET_FLAG_RAW is announce_self.

We can see the problem with tcpdump:

- QEMU parameters:

  .. -monitor stdio \
     -netdev bridge,id=netdev0,br=virbr0 \
     -device virtio-net,mac=9a:2b:2c:2d:2e:2f,netdev=netdev0 \

- HMP command:

  (qemu) announce_self

- TCP dump:

  $ sudo tcpdump -nxi virbr0

  without the fix:

    <nothing>

  with the fix:

   ARP, Reverse Request who-is 9a:2b:2c:2d:2e:2f tell 9a:2b:2c:2d:2e:2f, length 46
        0x0000:  0001 0800 0604 0003 9a2b 2c2d 2e2f 0000
        0x0010:  0000 9a2b 2c2d 2e2f 0000 0000 0000 0000
        0x0020:  0000 0000 0000 0000 0000 0000 0000

Reported-by: Xiaohui Li <xiaohli@redhat.com>
Bug: https://issues.redhat.com/browse/RHEL-73891
Fixes: b9ad513e18 ("net: Remove receive_raw()")
Cc: akihiko.odaki@daynix.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 84dfdcbff33fff185528501be408c25c44499f32)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-02-01 12:00:13 +03:00
Ilya Leoshkevich 066b9de4b3 target/s390x: Fix MVC not always invalidating translation blocks
Node.js crashes in qemu-system-s390x with random SIGSEGVs / SIGILLs.

The v8 JIT used by Node.js can garbage collect and overwrite unused
code. Overwriting is performed by WritableJitAllocation::CopyCode(),
which ultimately calls memcpy(). For certain sizes, memcpy() uses the
MVC instruction.

QEMU implements MVC and other similar instructions using helpers. While
TCG store ops invalidate affected translation blocks automatically,
helpers must do this manually by calling probe_access_flags(). The MVC
helper does this using the access_prepare() -> access_prepare_nf() ->
s390_probe_access() -> probe_access_flags() call chain.

At the last step of this chain, the store size is replaced with 0. This
causes the probe_access_flags() -> notdirty_write() ->
tb_invalidate_phys_range_fast() chain to miss some translation blocks.

When this happens, QEMU executes a mix of old and new code. This
quickly leads to either a SIGSEGV or a SIGILL in case the old code
ends in the middle of a new instruction.

Fix by passing the true size.

Reported-by: Berthold Gunreben <azouhr@opensuse.org>
Cc: Sarah Kriesch <ada.lovelace@gmx.de>
Cc: qemu-stable@nongnu.org
Closes: https://bugzilla.opensuse.org/show_bug.cgi?id=1235709
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Fixes: e2faabee78 ("accel/tcg: Forward probe size on to notdirty_write")
Message-ID: <20250128001338.11474-1-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit e43ced8be18dda77c229ab09f85136a4d600d40d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-02-01 11:59:14 +03:00
Steve Sistare 7fd0224457 physmem: fix qemu_ram_alloc_from_fd size calculation
qemu_ram_alloc_from_fd allocates space if file_size == 0.  If non-zero,
it uses the existing space and verifies it is large enough, but the
verification was broken when the offset parameter was introduced.  As
a result, a file smaller than offset passes the verification and causes
errors later.  Fix that, and update the error message to include offset.

Peter provides this concise reproducer:

  $ touch ramfile
  $ truncate -s 64M ramfile
  $ ./qemu-system-x86_64 -object memory-backend-file,mem-path=./ramfile,offset=128M,size=128M,id=mem1,prealloc=on
  qemu-system-x86_64: qemu_prealloc_mem: preallocating memory failed: Bad address

With the fix, the error message is:
  qemu-system-x86_64: mem1 backing store size 0x4000000 is too small for 'size' option 0x8000000 plus 'offset' option 0x8000000

Cc: qemu-stable@nongnu.org
Fixes: 4b870dc4d0 ("hostmem-file: add offset option")
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Link: https://lore.kernel.org/r/1736967650-129648-3-git-send-email-steven.sistare@oracle.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
(cherry picked from commit 719168fba7c3215cc996dcfd32a6e5e9c7b8eee0)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-02-01 11:56:57 +03:00
Hongren Zheng e82fbf01b6 hw/usb/canokey: Fix buffer overflow for OUT packet
When USBPacket in OUT direction has larger payload
than the ep_out_buffer (of size 512), a buffer overflow
would occur.

It could be fixed by limiting the size of usb_packet_copy
to be at most buffer size. Further optimization gets rid
of the ep_out_buffer and directly uses ep_out as the target
buffer.

This is reported by a security researcher who artificially
constructed an OUT packet of size 2047. The report has gone
through the QEMU security process, and as this device is for
testing purpose and no deployment of it in virtualization
environment is observed, it is triaged not to be a security bug.

Cc: qemu-stable@nongnu.org
Fixes: d7d3491855 ("hw/usb: Add CanoKey Implementation")
Reported-by: Juan Jose Lopez Jaimez <thatjiaozi@gmail.com>
Signed-off-by: Hongren Zheng <i@zenithal.me>
Message-id: Z4TfMOrZz6IQYl_h@Sun
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
(cherry picked from commit 664280abddcb3cacc9c6204706bb739fcc1316f7)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-01-29 22:29:03 +03:00
Peter Maydell c806bbe8c1 target/arm: arm_reset_sve_state() should set FPSR, not FPCR
The pseudocode ResetSVEState() does:
    FPSR = ZeroExtend(0x0800009f<31:0>, 64);
but QEMU's arm_reset_sve_state() called vfp_set_fpcr() by accident.

Before the advent of FEAT_AFP, this was only setting a collection of
RES0 bits, which vfp_set_fpsr() would then ignore, so the only effect
was that we didn't actually set the FPSR the way we are supposed to
do.  Once FEAT_AFP is implemented, setting the bottom bits of FPSR
will change the floating point behaviour.

Call vfp_set_fpsr(), as we ought to.

(Note for stable backports: commit 7f2a01e736 moved this function
from sme_helper.c to helper.c, but it had the same bug before the
move too.)

Cc: qemu-stable@nongnu.org
Fixes: f84734b874 ("target/arm: Implement SMSTART, SMSTOP")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20250124162836.2332150-4-peter.maydell@linaro.org
(cherry picked from commit 1edc3d43f20df0d04f8d00b906ba19fed37512a5)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-01-29 22:25:22 +03:00
Zhao Liu c597e6f26d stub: Fix build failure with --enable-user --disable-system --enable-tools
Configuring "--enable-user --disable-system --enable-tools" causes the
build failure with the following information:

/usr/bin/ld: libhwcore.a.p/hw_core_qdev.c.o: in function `device_finalize':
/qemu/build/../hw/core/qdev.c:688: undefined reference to `qapi_event_send_device_deleted'
collect2: error: ld returned 1 exit status

To fix the above issue, add qdev.c stub when build with `have_tools`.

With this fix, QEMU could be successfully built in the following cases:
 --enable-user --disable-system --enable-tools
 --enable-user --disable-system --disable-tools
 --enable-user --disable-system

Cc: qemu-stable@nongnu.org
Fixes: 388b849fb6 ("stubs: avoid duplicate symbols in libqemuutil.a")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2766
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250121154318.214680-1-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 8113dbbcdaee05f319a7e48272416d918cb2b04a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-01-29 22:23:55 +03:00
Matt Borgerson 86344a8543 nv2a: Add swizzle test and benchmark 2025-01-26 18:47:46 -07:00
Matt Borgerson 7cb7bb68a9 nv2a: Multiversion [un]swizzle to optimize for common bpp 2025-01-26 18:47:46 -07:00
Matt Borgerson eae328dc19 nv2a: Move [un]swizzle_rect to swizzle.h 2025-01-26 18:47:46 -07:00
Matt Borgerson bb5ee6865b nv2a: Drop osdep.h, add stdbool.h to swizzle.c 2025-01-26 18:47:46 -07:00
NZJenkins ae4b5c0695
nv2a: Speed up software swizzling 2025-01-26 14:00:35 -07:00
Matt Borgerson 61e29a0678 ci: Bump Windows build container 2025-01-26 04:45:03 -07:00