Trivial patches for 2025-09-03
The following changes since commit 8415b0619f65bff12f10c774659df92d3f61daca:
Merge tag 'qga-pull-2025-08-29-v2' of https://github.com/kostyanf14/qemu into staging (2025-09-02 12:07:05 +0200)
are available in the Git repository at:
https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches
for you to fetch changes up to 25fef09ce17ac1ae22638a0b57d97c2bd5cd7d83:
docs: fix typo in xive doc (2025-09-03 10:57:50 +0300)
----------------------------------------------------------------
trivial patches for 2025-09-03
A few assorted fixes.
Including not-so-trivial (but simple) fix for curl (https) block protocol with recent curl versions.
----------------------------------------------------------------
Aditya Gupta (1):
docs: fix typo in xive doc
Michael Tokarev (2):
block/curl: fix curl internal handles handling block/curl: drop old/unuspported curl version checks
Philippe Mathieu-Daudé (1):
scripts/coverity-scan/COMPONENTS.md: Add a 'plugins' category
Stefan Weil (1):
chardev/baum: Fix compiler warning for Windows builds
block/curl.c | 20 +++----------------- chardev/baum.c | 8 ++++++-- docs/specs/ppc-xive.rst | 2 +- scripts/coverity-scan/COMPONENTS.md | 3 +++ 4 files changed, 13 insertions(+), 20 deletions(-)
[PULL 1/5] chardev/baum: Fix compiler warning for Windows builds
From: Stefan Weil via <[email protected]>
Compiler warning:
../chardev/baum.c:657:25: warning: comparison between pointer and integer
Use brlapi_fileDescriptor instead of int for brlapi_fd and BRLAPI_INVALID_FILE_DESCRIPTOR instead of -1.
--- chardev/baum.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
chardev/baum.c +6 -2
@@ -94,7 +94,7 @@ struct BaumChardev {Chardev parent;brlapi_handle_t *brlapi; -int brlapi_fd; +brlapi_fileDescriptor brlapi_fd;unsigned int x, y;bool deferred_init;
@@ -654,7 +654,7 @@ static void baum_chr_open(Chardev *chr, baum->brlapi = handle; baum->brlapi_fd =brlapi__openConnection (handle,NULL ,NULL ); -if (baum->brlapi_fd ==-1 ) { +if (baum->brlapi_fd ==BRLAPI_INVALID_FILE_DESCRIPTOR ) {error_setg (errp,"brlapi__openConnection: %s" ,brlapi_strerror (brlapi_error_location ()));g_free (handle);
@@ -665,6 +665,10 @@ static void baum_chr_open(Chardev *chr, baum->cellCount_timer =timer_new_ns (QEMU_CLOCK_VIRTUAL , baum_cellCount_timer_cb, baum); +/* +* On Windows, brlapi_fd is a pointer, which is being used here +* as an integer, but in practice it seems to work +*/ qemu_set_fd_handler (baum->brlapi_fd, baum_chr_read,NULL , baum); }
Signature · 1 line
2.47.2
[PULL 3/5] block/curl: drop old/unuspported curl version checks
In reply to Michael TokarevWe currently require libcurl >=7.29.0 (since f9cd86fe72be3cd8). Drop older LIBCURL_VERSION_NUM checks from the driver.
--- block/curl.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
block/curl.c +1 -12
@@ -516,7 +516,7 @@ static int curl_init_state(BDRVCURLState *s, CURLState *state) CURLOPT_REDIR_PROTOCOLS_STR, PROTOCOLS)) { goto err; } -#elif LIBCURL_VERSION_NUM >=0x071304 +#else if (curl_easy_setopt (state->curl,CURLOPT_PROTOCOLS ,PROTOCOLS ) ||curl_easy_setopt (state->curl,CURLOPT_REDIR_PROTOCOLS ,PROTOCOLS )) { goto err;
@@ -821,22 +821,11 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags, goto out; }#endif -/* Prior CURL 7.19.4 return value of 0 could mean that the file size is not -* know or the size is zero. From 7.19.4 CURL returns -1 if size is not -* known and zero if it is really zero-length file. */ -#if LIBCURL_VERSION_NUM >=0x071304 if (cl <0 ) {pstrcpy (state->errmsg,CURL_ERROR_SIZE ,"Server didn't report file size." ); goto out; } -#else -if (cl <=0 ) { -pstrcpy (state->errmsg,CURL_ERROR_SIZE , -"Unknown file size or zero-length file." ); - goto out; - } -#endif s->len = cl;
Signature · 1 line
2.47.2
[PULL 5/5] docs: fix typo in xive doc
In reply to Michael TokarevFrom: Aditya Gupta <[email protected]>
"Interrupt Pending Buffer" IPB, which got written as IBP due to typo.
The "IPB" register is also mentioned in same doc multiple times.
--- docs/specs/ppc-xive.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/specs/ppc-xive.rst +1 -1
@@ -157,7 +157,7 @@ Interrupt flow from an O/S perspective After an event data has been enqueued in the O/S Event Queue, the IVPE raises the bit corresponding to the priority of the pending interrupt -in the register IBP (Interrupt Pending Buffer) to indicate that an +in the register IPB (Interrupt Pending Buffer) to indicate that an event is pending in one of the 8 priority queues. The Pending Interrupt Priority Register (PIPR) is also updated using the IPB. This register represent the priority of the most favored pending
Signature · 1 line
2.47.2
[PULL 4/5] scripts/coverity-scan/COMPONENTS.md: Add a 'plugins' category
In reply to Michael TokarevFrom: Philippe Mathieu-Daudé <[email protected]>
Cover the TCG plugins files under their own Coverity category.
--- scripts/coverity-scan/COMPONENTS.md | 3 +++ 1 file changed, 3 insertions(+)
scripts/coverity-scan/COMPONENTS.md +3 -0
@@ -147,6 +147,9 @@ tcg system ~ .*/qemu(/system/.*|/accel/.*) +plugins + ~ .*/qemu(/contrib|/tests/tcg)?/plugins/.* + (headers) ~ .*/qemu(/include/.*)
Signature · 1 line
2.47.2
[PULL 2/5] block/curl: fix curl internal handles handling
In reply to Michael Tokarevblock/curl.c uses CURLMOPT_SOCKETFUNCTION to register a socket callback. According to the documentation, this callback is called not just with application-created sockets but also with internal curl sockets, - and for such sockets, user data pointer is not set by the application, so the result qemu crashing.
Pass BDRVCURLState directly to the callback function as user pointer, instead of relying on CURLINFO_PRIVATE.
This problem started happening with update of libcurl from 8.9 to 8.10 -- apparently with this change curl started using private handles more.
(CURLINFO_PRIVATE is used in one more place, in curl_multi_check_completion() - it might need a similar fix too)
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3081
--- block/curl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
block/curl.c +2 -5
@@ -162,13 +162,9 @@ static int curl_timer_cb(CURLM *multi, long timeout_ms, void *opaque)static int curl_sock_cb (CURL *curl,curl_socket_t fd,int action,void *userp,void *sp) { -BDRVCURLState *s; -CURLState *state =NULL ; +BDRVCURLState *s = userp;CURLSocket *socket; -curl_easy_getinfo (curl,CURLINFO_PRIVATE , (char **)&state); - s = state->s; - socket =g_hash_table_lookup (s->sockets,GINT_TO_POINTER (fd));if (!socket) { socket =g_new0 (CURLSocket,1 );
@@ -605,6 +601,7 @@ static void curl_attach_aio_context(BlockDriverState *bs,assert (!s->multi); s->multi =curl_multi_init (); s->aio_context = new_context; +curl_multi_setopt (s->multi,CURLMOPT_SOCKETDATA , s);curl_multi_setopt (s->multi,CURLMOPT_SOCKETFUNCTION , curl_sock_cb);curl_multi_setopt (s->multi,CURLMOPT_TIMERDATA , s);curl_multi_setopt (s->multi,CURLMOPT_TIMERFUNCTION , curl_timer_cb);
Signature · 1 line
2.47.2
Richard Henderson
AppliedQuoted 10 lines · Michael Tokarev
The following changes since commit
8415b0619f65bff12f10c774659df92d3f61daca:Merge tag 'qga-pull-2025-08-29-v2' ofhttps://github.com/kostyanf14/qemu into staging (2025-09-02 12:07:05 +0200)are available in the Git repository at:
https://gitlab.com/mjt0k/qemu.git tags/pull-trivial-patches
for you to fetch changes up to
25fef09ce17ac1ae22638a0b57d97c2bd5cd7d83:
Quoted 8 lines
docs: fix typo in xive doc (2025-09-03 10:57:50 +0300)
----------------------------------------------------------------
trivial patches for 2025-09-03A few assorted fixes.
Including not-so-trivial (but simple) fix for curl (https) block protocol with recent curl versions.
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/10.2 as appropriate.
r~