qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] d0180f: hw/mem/nvdimm: fix error message for


From: Paolo Bonzini
Subject: [Qemu-commits] [qemu/qemu] d0180f: hw/mem/nvdimm: fix error message for 'unarmed' flag
Date: Mon, 31 Oct 2022 03:12:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: d0180f0acb142ca78e30857b8d8511ee9f3bd764
      
https://github.com/qemu/qemu/commit/d0180f0acb142ca78e30857b8d8511ee9f3bd764
  Author: Julia Suvorova <jusual@redhat.com>
  Date:   2022-10-24 (Mon, 24 Oct 2022)

  Changed paths:
    M hw/mem/nvdimm.c

  Log Message:
  -----------
  hw/mem/nvdimm: fix error message for 'unarmed' flag

In the ACPI specification [1], the 'unarmed' bit is set when a device
cannot accept a persistent write. This means that when a memdev is
read-only, the 'unarmed' flag must be turned on. The logic is correct,
just changing the error message.

[1] ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM State Flags" Bit 3

Fixes: dbd730e859 ("nvdimm: check -object memory-backend-file, readonly=on 
option")
Signed-off-by: Julia Suvorova <jusual@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: David Hildenbrand <david@redhat.com>
Message-Id: <20221023195812.15523-1-jusual@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: bf98afc75efedf10965a3f2d98aa43c234cf69ed
      
https://github.com/qemu/qemu/commit/bf98afc75efedf10965a3f2d98aa43c234cf69ed
  Author: Jungmin Park <pjm0616@gmail.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M crypto/pbkdf.c

  Log Message:
  -----------
  crypto/luks: Support creating LUKS image on Darwin

When the user creates a LUKS-encrypted qcow2 image using the qemu-img
program, the passphrase is hashed using PBKDF2 with a dynamic
number of iterations. The number of iterations is determined by
measuring thread cpu time usage, such that it takes approximately
2 seconds to compute the hash.

Because Darwin doesn't implement getrusage(RUSAGE_THREAD), we get an
error message:
> qemu-img: test.qcow2: Unable to calculate thread CPU usage on this platform
for this command:
> qemu-img create --object secret,id=key,data=1234 -f qcow2 -o 
> 'encrypt.format=luks,encrypt.key-secret=key' test.qcow2 100M

This patch implements qcrypto_pbkdf2_get_thread_cpu() for Darwin so that
the above command works.

Signed-off-by: Jungmin Park <pjm0616@gmail.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 926a895c2cfcd621373eb86288dd83d08cb53f15
      
https://github.com/qemu/qemu/commit/926a895c2cfcd621373eb86288dd83d08cb53f15
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M util/qemu-sockets.c

  Log Message:
  -----------
  util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary 
files

Replace the existing logic to get the directory for temporary files
with g_get_tmp_dir(), which works for win32 too.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 985be62d4481e11830485a25a47a932e5829d223
      
https://github.com/qemu/qemu/commit/985be62d4481e11830485a25a47a932e5829d223
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M io/channel-watch.c

  Log Message:
  -----------
  io/channel-watch: Drop a superfluous '#ifdef WIN32'

In the win32 version qio_channel_create_socket_watch() body there is
no need to do a '#ifdef WIN32'.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 6c822a031b9e87fea8303373d6501f6d6a3c1e31
      
https://github.com/qemu/qemu/commit/6c822a031b9e87fea8303373d6501f6d6a3c1e31
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M io/channel-watch.c

  Log Message:
  -----------
  io/channel-watch: Drop the unnecessary cast

There is no need to do a type cast on ssource->socket as it is
already declared as a SOCKET.

Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 23f77f05f2faa8ff3028fef388322f7b4f09533e
      
https://github.com/qemu/qemu/commit/23f77f05f2faa8ff3028fef388322f7b4f09533e
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M io/channel-watch.c

  Log Message:
  -----------
  io/channel-watch: Fix socket watch on Windows

Random failure was observed when running qtests on Windows due to
"Broken pipe" detected by qmp_fd_receive(). What happened is that
the qtest executable sends testing data over a socket to the QEMU
under test but no response is received. The errno of the recv()
call from the qtest executable indicates ETIMEOUT, due to the qmp
chardev's tcp_chr_read() is never called to receive testing data
hence no response is sent to the other side.

tcp_chr_read() is registered as the callback of the socket watch
GSource. The reason of the callback not being called by glib, is
that the source check fails to indicate the source is ready. There
are two socket watch sources created to monitor the same socket
event object from the char-socket backend in update_ioc_handlers().
During the source check phase, qio_channel_socket_source_check()
calls WSAEnumNetworkEvents() to discover occurrences of network
events for the indicated socket, clear internal network event records,
and reset the event object. Testing shows that if we don't reset the
event object by not passing the event handle to WSAEnumNetworkEvents()
the symptom goes away and qtest runs very stably.

It seems we don't need to call WSAEnumNetworkEvents() at all, as we
don't parse the result of WSANETWORKEVENTS returned from this API.
We use select() to poll the socket status. Fix this instability by
dropping the WSAEnumNetworkEvents() call.

Some side notes:

During the testing, I removed the following codes in update_ioc_handlers():

  remove_hup_source(s);
  s->hup_source = qio_channel_create_watch(s->ioc, G_IO_HUP);
  g_source_set_callback(s->hup_source, (GSourceFunc)tcp_chr_hup,
                        chr, NULL);
  g_source_attach(s->hup_source, chr->gcontext);

and such change also makes the symptom go away.

And if I moved the above codes to the beginning, before the call to
io_add_watch_poll(), the symptom also goes away.

It seems two sources watching on the same socket event object is
the key that leads to the instability. The order of adding a source
watch seems to also play a role but I can't explain why.
Hopefully a Windows and glib expert could explain this behavior.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 73422d9524376526ab5950b3be3098901cd605d6
      
https://github.com/qemu/qemu/commit/73422d9524376526ab5950b3be3098901cd605d6
  Author: Michal Privoznik <mprivozn@redhat.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M meson.build
    M softmmu/qemu-seccomp.c

  Log Message:
  -----------
  seccomp: Get actual errno value from failed seccomp functions

Upon failure, a libseccomp API returns actual errno value very
rarely. Fortunately, after its commit 34bf78ab (contained in
2.5.0 release), the SCMP_FLTATR_API_SYSRAWRC attribute can be set
which makes subsequent APIs return true errno on failure.

This is especially critical when seccomp_load() fails, because
generic -ECANCELED says nothing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 3f7febc93785bf0e622072b01f846d2acbcd9c0b
      
https://github.com/qemu/qemu/commit/3f7febc93785bf0e622072b01f846d2acbcd9c0b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M qom/object.c

  Log Message:
  -----------
  qom: Improve error messages when property has no getter or setter

When you try to set a property that has no setter, the error message
blames "insufficient permission":

    $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio
    QEMU 7.1.50 monitor - type 'help' for more information
    (qemu) qom-set /machine type q35
    Error: Insufficient permission to perform this operation

This implies it could work with "sufficient permission".  It can't.
Change the error message to:

    Error: Property 'pc-i440fx-7.2-machine.type' is not writable

Do the same for getting a property that has no getter.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221012153801.2604340-2-armbru@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>


  Commit: ff924448849f4fca48df15ecad67dc93854392e5
      
https://github.com/qemu/qemu/commit/ff924448849f4fca48df15ecad67dc93854392e5
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M backends/cryptodev-vhost-user.c
    M backends/rng-egd.c
    M backends/rng-random.c
    M backends/vhost-user.c

  Log Message:
  -----------
  backends: Improve error messages when property can no longer be set

When you try to set virtio-rng property "filename" after the backend
has been completed with user_creatable_complete(), the error message
blames "insufficient permission":

    $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio -object 
rng-random,id=rng0 -device virtio-rng,id=vrng0,rng=rng0
    QEMU 7.1.50 monitor - type 'help' for more information
    (qemu) qom-set /objects/rng0 filename /dev/random
    Error: Insufficient permission to perform this operation

This implies it could work with "sufficient permission".  It can't.
Change the error message to:

    Error: Property 'filename' can no longer be set

Same for cryptodev-vhost-user property "chardev", rng-egd property
"chardev", and vhost-user-backend property "chardev".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221012153801.2604340-3-armbru@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
[Commit message tidied up]


  Commit: 8d095933148a0a88ecf1b6bccbbe4ce6c248e2cd
      
https://github.com/qemu/qemu/commit/8d095933148a0a88ecf1b6bccbbe4ce6c248e2cd
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M softmmu/qtest.c

  Log Message:
  -----------
  qtest: Improve error messages when property can not be set right now

When you try to set qtest property "log" while the qtest object is
active, the error message blames "insufficient permission":

    $ qemu-system-x86_64 -S -display none -nodefaults -monitor stdio -chardev 
socket,id=chrqt0,path=qtest.socket,server=on,wait=off -object 
qtest,id=qt0,chardev=chrqt0,log=/dev/null
    QEMU 7.1.50 monitor - type 'help' for more information
    (qemu) qom-set /objects/qt0 log qtest.log
    Error: Insufficient permission to perform this operation

This implies it could work with "sufficient permission".  It can't.
Change the error message to:

    Error: Property 'log' can not be set now

Same for property "chardev".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221012153801.2604340-4-armbru@redhat.com>


  Commit: 0dddb0fc80f83d3bb469dc220ba8e2496b27a205
      
https://github.com/qemu/qemu/commit/0dddb0fc80f83d3bb469dc220ba8e2496b27a205
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/qapi/qmp/qerror.h

  Log Message:
  -----------
  qerror: QERR_PERMISSION_DENIED is no longer used, drop

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221012153801.2604340-5-armbru@redhat.com>


  Commit: 6556aadc18c560e493b29dd99cae2cbf86d214cb
      
https://github.com/qemu/qemu/commit/6556aadc18c560e493b29dd99cae2cbf86d214cb
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M backends/hostmem.c
    M hw/virtio/virtio-mem.c
    M include/qemu/osdep.h
    M softmmu/cpus.c
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  util: Cleanup and rename os_mem_prealloc()

Let's
* give the function a "qemu_*" style name
* make sure the parameters in the implementation match the prototype
* rename smp_cpus to max_threads, which makes the semantics of that
  parameter clearer

... and add a function documentation.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <20221014134720.168738-2-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: 7730f32c281f6005b5d35e0ba4b537a47d2dbf32
      
https://github.com/qemu/qemu/commit/7730f32c281f6005b5d35e0ba4b537a47d2dbf32
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/qemu/thread.h
    M meson.build
    M util/qemu-thread-posix.c
    M util/qemu-thread-win32.c

  Log Message:
  -----------
  util: Introduce qemu_thread_set_affinity() and qemu_thread_get_affinity()

Usually, we let upper layers handle CPU pinning, because
pthread_setaffinity_np() (-> sched_setaffinity()) is blocked via
seccomp when starting QEMU with
    -sandbox enable=on,resourcecontrol=deny

However, we want to configure and observe the CPU affinity of threads
from QEMU directly in some cases when the sandbox option is either not
enabled or not active yet.

So let's add a way to configure CPU pinning via
qemu_thread_set_affinity() and obtain CPU affinity via
qemu_thread_get_affinity() and implement them under POSIX using
pthread_setaffinity_np() + pthread_getaffinity_np().

Implementation under Windows is possible using SetProcessAffinityMask()
+ GetProcessAffinityMask(), however, that is left as future work.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <20221014134720.168738-3-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: e2de2c497e5744bc2c009aadd0af7633f2947948
      
https://github.com/qemu/qemu/commit/e2de2c497e5744bc2c009aadd0af7633f2947948
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    A include/qemu/thread-context.h
    M qapi/qom.json
    M util/meson.build
    M util/oslib-posix.c
    A util/thread-context.c

  Log Message:
  -----------
  util: Introduce ThreadContext user-creatable object

Setting the CPU affinity of QEMU threads is a bit problematic, because
QEMU doesn't always have permissions to set the CPU affinity itself,
for example, with seccomp after initialized by QEMU:
    -sandbox enable=on,resourcecontrol=deny

General information about CPU affinities can be found in the man page of
taskset:
    CPU affinity is a scheduler property that "bonds" a process to a given
    set of CPUs on the system. The Linux scheduler will honor the given CPU
    affinity and the process will not run on any other CPUs.

While upper layers are already aware of how to handle CPU affinities for
long-lived threads like iothreads or vcpu threads, especially short-lived
threads, as used for memory-backend preallocation, are more involved to
handle. These threads are created on demand and upper layers are not even
able to identify and configure them.

Introduce the concept of a ThreadContext, that is essentially a thread
used for creating new threads. All threads created via that context
thread inherit the configured CPU affinity. Consequently, it's
sufficient to create a ThreadContext and configure it once, and have all
threads created via that ThreadContext inherit the same CPU affinity.

The CPU affinity of a ThreadContext can be configured two ways:

(1) Obtaining the thread id via the "thread-id" property and setting the
    CPU affinity manually (e.g., via taskset).

(2) Setting the "cpu-affinity" property and letting QEMU try set the
    CPU affinity itself. This will fail if QEMU doesn't have permissions
    to do so anymore after seccomp was initialized.

A simple QEMU example to set the CPU affinity to host CPU 0,1,6,7 would be:
    qemu-system-x86_64 -S \
      -object thread-context,id=tc1,cpu-affinity=0-1,cpu-affinity=6-7

And we can query it via HMP/QMP:
    (qemu) qom-get tc1 cpu-affinity
    [
        0,
        1,
        6,
        7
    ]

But note that due to dynamic library loading this example will not work
before we actually make use of thread_context_create_thread() in QEMU
code, because the type will otherwise not get registered. We'll wire
this up next to make it work.

In general, the interface behaves like pthread_setaffinity_np(): host
CPU numbers that are currently not available are ignored; only host CPU
numbers that are impossible with the current kernel will fail. If the
list of host CPU numbers does not include a single CPU that is
available, setting the CPU affinity will fail.

A ThreadContext can be reused, simply by reconfiguring the CPU affinity.
Note that the CPU affinity of previously created threads will not get
adjusted.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221014134720.168738-4-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: 10218ae6d006f76410804cc4dc690085b3d008b5
      
https://github.com/qemu/qemu/commit/10218ae6d006f76410804cc4dc690085b3d008b5
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M qapi/qom.json
    M util/meson.build
    M util/thread-context.c

  Log Message:
  -----------
  util: Add write-only "node-affinity" property for ThreadContext

Let's make it easier to pin threads created via a ThreadContext to
all host CPUs currently belonging to a given set of host NUMA nodes --
which is the common case.

"node-affinity" is simply a shortcut for setting "cpu-affinity" manually
to the list of host CPUs belonging to the set of host nodes. This property
can only be written.

A simple QEMU example to set the CPU affinity to host node 1 on a system
with two nodes, 24 CPUs each, whereby odd-numbered host CPUs belong to
host node 1:
    qemu-system-x86_64 -S \
      -object thread-context,id=tc1,node-affinity=1

And we can query the cpu-affinity via HMP/QMP:
    (qemu) qom-get tc1 cpu-affinity
    [
        1,
        3,
        5,
        7,
        9,
        11,
        13,
        15,
        17,
        19,
        21,
        23,
        25,
        27,
        29,
        31,
        33,
        35,
        37,
        39,
        41,
        43,
        45,
        47
    ]

We cannot query the node-affinity:
    (qemu) qom-get tc1 node-affinity
    Error: Insufficient permission to perform this operation

But note that due to dynamic library loading this example will not work
before we actually make use of thread_context_create_thread() in QEMU
code, because the type will otherwise not get registered. We'll wire
this up next to make it work.

Note that if the host CPUs for a host node change due do CPU hot(un)plug
CPU onlining/offlining (i.e., lscpu output changes) after the ThreadContext
was started, the CPU affinity will not get updated.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221014134720.168738-5-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: e04a34e55cf1911099e2d8a680f9bee4f6d90e4a
      
https://github.com/qemu/qemu/commit/e04a34e55cf1911099e2d8a680f9bee4f6d90e4a
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M backends/hostmem.c
    M hw/virtio/virtio-mem.c
    M include/qemu/osdep.h
    M util/oslib-posix.c
    M util/oslib-win32.c

  Log Message:
  -----------
  util: Make qemu_prealloc_mem() optionally consume a ThreadContext

... and implement it under POSIX. When a ThreadContext is provided,
create new threads via the context such that these new threads obtain a
properly configured CPU affinity.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <20221014134720.168738-6-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: e6816458624813de4a31f89096a620b410e1c2b8
      
https://github.com/qemu/qemu/commit/e6816458624813de4a31f89096a620b410e1c2b8
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M backends/hostmem.c
    M include/sysemu/hostmem.h
    M qapi/qom.json

  Log Message:
  -----------
  hostmem: Allow for specifying a ThreadContext for preallocation

Let's allow for specifying a thread context via the "prealloc-context"
property. When set, preallcoation threads will be crated via the
thread context -- inheriting the same CPU affinity as the thread
context.

Pinning preallcoation threads to CPUs can heavily increase performance
in NUMA setups, because, preallocation from a CPU close to the target
NUMA node(s) is faster then preallocation from a CPU further remote,
simply because of memory bandwidth for initializing memory with zeroes.
This is especially relevant for very large VMs backed by huge/gigantic
pages, whereby preallocation is mandatory.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <20221014134720.168738-7-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: bd77c30df984faefa85e6a402939b485d6e05f05
      
https://github.com/qemu/qemu/commit/bd77c30df984faefa85e6a402939b485d6e05f05
  Author: David Hildenbrand <david@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M softmmu/vl.c

  Log Message:
  -----------
  vl: Allow ThreadContext objects to be created before the sandbox option

Currently, there is no way to configure a CPU affinity inside QEMU when
the sandbox option disables it for QEMU as a whole, for example, via:
    -sandbox enable=on,resourcecontrol=deny

While ThreadContext objects can be created on the QEMU commandline and
the CPU affinity can be configured externally via the thread-id, this is
insufficient if a ThreadContext with a certain CPU affinity is already
required during QEMU startup, before we can intercept QEMU and
configure the CPU affinity.

Blocking sched_setaffinity() was introduced in 24f8cdc57224 ("seccomp:
add resourcecontrol argument to command line"), "to avoid any bigger of the
process". However, we only care about once QEMU is running, not when
the instance starting QEMU explicitly requests a certain CPU affinity
on the QEMU comandline.

Right now, for NUMA-aware preallocation of memory backends used for initial
machine RAM, one has to:

1) Start QEMU with the memory-backend with "prealloc=off"
2) Pause QEMU before it starts the guest (-S)
3) Create ThreadContext, configure the CPU affinity using the thread-id
4) Configure the ThreadContext as "prealloc-context" of the memory
   backend
5) Trigger preallocation by setting "prealloc=on"

To simplify this handling especially for initial machine RAM,
allow creation of ThreadContext objects before parsing sandbox options,
such that the CPU affinity requested on the QEMU commandline alongside the
sandbox option can be set. As ThreadContext objects essentially only create
a persistent context thread and set the CPU affinity, this is easily
possible.

With this change, we can create a ThreadContext with a CPU affinity on
the QEMU commandline and use it for preallocation of memory backends
glued to the machine (simplified example):

To make "-name debug-threads=on" keep working as expected for the
context threads, perform earlier parsing of "-name".

qemu-system-x86_64 -m 1G \
 -object thread-context,id=tc1,cpu-affinity=3-4 \
 -object 
memory-backend-ram,id=pc.ram,size=1G,prealloc=on,prealloc-threads=2,prealloc-context=tc1
 \
 -machine memory-backend=pc.ram \
 -S -monitor stdio -sandbox enable=on,resourcecontrol=deny

And while we can query the current CPU affinity:
  (qemu) qom-get tc1 cpu-affinity
  [
      3,
      4
  ]

We can no longer change it from QEMU directly:
  (qemu) qom-set tc1 cpu-affinity 1-2
  Error: Setting CPU affinity failed: Operation not permitted

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Message-Id: <20221014134720.168738-8-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>


  Commit: dd84a906e061550daaedea6ce88762f1839253ab
      
https://github.com/qemu/qemu/commit/dd84a906e061550daaedea6ce88762f1839253ab
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M scripts/git-submodule.sh

  Log Message:
  -----------
  scripts: check if .git exists before checking submodule status

Currently we check status of each submodule, before actually checking
if we're in a git repo. These status commands will all fail, but we
are hiding their output so we don't see it currently.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 3983bf1b41cefcf553a2c6316f767367d6977b51
      
https://github.com/qemu/qemu/commit/3983bf1b41cefcf553a2c6316f767367d6977b51
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/tlscredspsk.c

  Log Message:
  -----------
  crypto: check for and report errors setting PSK credentials

If setting credentials fails, the handshake will later fail to complete
with an obscure error message which is hard to diagnose.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: f1018ea0a30f577d1e3515d0a6362e362a0cb86f
      
https://github.com/qemu/qemu/commit/f1018ea0a30f577d1e3515d0a6362e362a0cb86f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M tests/unit/crypto-tls-psk-helpers.c

  Log Message:
  -----------
  tests: avoid DOS line endings in PSK file

Using FILE * APIs for writing the PSK file results in translation from
UNIX to DOS line endings on Windows. When the crypto PSK code later
loads the credentials the stray \r will result in failure to load the
PSK credentials into GNUTLS.

Rather than switching the FILE* APIs to open in binary format, just
switch to the more concise g_file_set_contents API.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: c1d8634c207defb547a57515729233e47f65718f
      
https://github.com/qemu/qemu/commit/c1d8634c207defb547a57515729233e47f65718f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: sanity check that LUKS header strings are NUL-terminated

The LUKS spec requires that header strings are NUL-terminated, and our
code relies on that. Protect against maliciously crafted headers by
adding validation.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: f1195961f36b19ce9008dabf11ee8362803bcd92
      
https://github.com/qemu/qemu/commit/f1195961f36b19ce9008dabf11ee8362803bcd92
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: enforce that LUKS stripes is always a fixed value

Although the LUKS stripes are encoded in the keyslot header and so
potentially configurable, in pratice the cryptsetup impl mandates
this has the fixed value 4000. To avoid incompatibility apply the
same enforcement in QEMU too. This also caps the memory usage for
key material when QEMU tries to open a LUKS volume.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 93569c373027c5c46e518e01c0c3e2d07fbb6890
      
https://github.com/qemu/qemu/commit/93569c373027c5c46e518e01c0c3e2d07fbb6890
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: enforce that key material doesn't overlap with LUKS header

We already check that key material doesn't overlap between key slots,
and that it doesn't overlap with the payload. We didn't check for
overlap with the LUKS header.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: d233fbc327d3f1f03bc30e0486b9ade3aa23f9ec
      
https://github.com/qemu/qemu/commit/d233fbc327d3f1f03bc30e0486b9ade3aa23f9ec
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: validate that LUKS payload doesn't overlap with header

We already validate that LUKS keyslots don't overlap with the
header, or with each other. This closes the remaining hole in
validation of LUKS file regions.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: c5f6962801b868b02fbaf01861f64783470d3d2a
      
https://github.com/qemu/qemu/commit/c5f6962801b868b02fbaf01861f64783470d3d2a
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: strengthen the check for key slots overlapping with LUKS header

The LUKS header data on disk is a fixed size, however, there's expected
to be a gap between the end of the header and the first key slot to get
alignment with the 2nd sector on 4k drives. This wasn't originally part
of the LUKS spec, but was always part of the reference implementation,
so it is worth validating this.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: b57151ac0366d3fb14318a55b0fc943134f7f80b
      
https://github.com/qemu/qemu/commit/b57151ac0366d3fb14318a55b0fc943134f7f80b
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: check that LUKS PBKDF2 iterations count is non-zero

Both the master key and key slot passphrases are run through the PBKDF2
algorithm. The iterations count is expected to be generally very large
(many 10's or 100's of 1000s). It is hard to define a low level cutoff,
but we can certainly say that iterations count should be non-zero. A
zero count likely indicates an initialization mistake so reject it.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 36445acebdd100237551b47b4fd77f0c5403a10f
      
https://github.com/qemu/qemu/commit/36445acebdd100237551b47b4fd77f0c5403a10f
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    A crypto/block-luks-priv.h
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: split LUKS header definitions off into file

This will allow unit testing code to use the structs.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 98c72dfb714385b03da03abb45f931a14af6138e
      
https://github.com/qemu/qemu/commit/98c72dfb714385b03da03abb45f931a14af6138e
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks-priv.h
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: split off helpers for converting LUKS header endianess

The unit test suite is shortly going to want to convert header
endianness separately from the main I/O functions.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 6c1989321eb95d5d2e29d3537484836bf0f21744
      
https://github.com/qemu/qemu/commit/6c1989321eb95d5d2e29d3537484836bf0f21744
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M crypto/block-luks.c

  Log Message:
  -----------
  crypto: quote algorithm names in error messages

If given a malformed LUKS header, it is possible that the algorithm
names end up being an empty string. This leads to confusing error
messages unless quoting is used to highlight where the empty string
is subsituted in the error message.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: 741c314a337ff4c79b8a86fbd5891054b0191d44
      
https://github.com/qemu/qemu/commit/741c314a337ff4c79b8a86fbd5891054b0191d44
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M tests/unit/test-crypto-block.c

  Log Message:
  -----------
  crypto: ensure LUKS tests run with GNUTLS crypto provider

GNUTLS is supported as a crypto provider since

  commit cc4c7c738297958b3d1d16269f57d71d22f5a9ff
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   Wed Jun 30 17:20:02 2021 +0100

    crypto: introduce build system for gnutls crypto backend

So enable the LUKS tests in this config.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: da0ab2c4c4d22dece12acd9ddaed901a10a5edee
      
https://github.com/qemu/qemu/commit/da0ab2c4c4d22dece12acd9ddaed901a10a5edee
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M tests/unit/test-crypto-block.c

  Log Message:
  -----------
  crypto: add test cases for many malformed LUKS header scenarios

Validate that we diagnose each malformed LUKS header scenario with a
distinct error report.

Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>


  Commit: b885cdda79045791e1f33600639b7614ea114f16
      
https://github.com/qemu/qemu/commit/b885cdda79045791e1f33600639b7614ea114f16
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

Section "Block QAPI, monitor, command line" is about the external
interfaces we provide for block devices.  It covers the relevant QAPI
schema parts, monitor and command line code, more or less.

The section's files are also covered by section "Block layer core",
except for the QAPI schema files.

I haven't acted as maintainer in this area for a long time.  Make it
official: add the QAPI schema files to section "Block layer core", and
delete section "Block QAPI, monitor, command line".

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221020120541.80757-1-armbru@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 6b6471eee11dce4c995419b68441c6637be3d90a
      
https://github.com/qemu/qemu/commit/6b6471eee11dce4c995419b68441c6637be3d90a
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: Ignore close() failure in get_tmp_filename()

The temporary file has been created and is ready for use. Checking
return value of close() does not seem useful. The file descriptor
is almost certainly closed; see close(2) under "Dealing with error
returns from close()".

Let's simply ignore close() failure here.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221010040432.3380478-1-bin.meng@windriver.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 69fbfff95e849156985cf95e2010ffc8762e34e6
      
https://github.com/qemu/qemu/commit/69fbfff95e849156985cf95e2010ffc8762e34e6
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/vvfat.c
    M include/block/block_int-common.h
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out

  Log Message:
  -----------
  block: Refactor get_tmp_filename()

At present there are two callers of get_tmp_filename() and they are
inconsistent.

One does:

    /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */
    char *tmp_filename = g_malloc0(PATH_MAX + 1);
    ...
    ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);

while the other does:

    s->qcow_filename = g_malloc(PATH_MAX);
    ret = get_tmp_filename(s->qcow_filename, PATH_MAX);

As we can see different 'size' arguments are passed. There are also
platform specific implementations inside the function, and the use
of snprintf is really undesirable.

The function name is also misleading. It creates a temporary file,
not just a filename.

Refactor this routine by changing its name and signature to:

    char *create_tmp_file(Error **errp)

and use g_get_tmp_dir() / g_mkstemp() for a consistent implementation.

While we are here, add some comments to mention that /var/tmp is
preferred over /tmp on non-win32 hosts.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Message-Id: <20221010040432.3380478-2-bin.meng@windriver.com>
[kwolf: Fixed incorrect errno negation and iotest 051]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: d0f95b6ca0241b14d6cc0f366d162684909370a9
      
https://github.com/qemu/qemu/commit/d0f95b6ca0241b14d6cc0f366d162684909370a9
  Author: Hervé Poussineau <hpoussin@reactos.org>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: allow some writes to bootsector

'reserved1' field in bootsector is used to mark volume dirty, or need to verify.
Allow writes to bootsector which only changes the 'reserved1' field.

This fixes I/O errors on Windows guests.

Resolves: https://bugs.launchpad.net/qemu/+bug/1889421
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Message-Id: <20221010175511.3414357-2-hpoussin@reactos.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1e85c7259b7f5b5b7f9a360e2327b1baff723c79
      
https://github.com/qemu/qemu/commit/1e85c7259b7f5b5b7f9a360e2327b1baff723c79
  Author: Hervé Poussineau <hpoussin@reactos.org>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/vvfat.c

  Log Message:
  -----------
  vvfat: allow spaces in file names

In R/W mode, files with spaces were never created on host side.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1176
Fixes: c79e243ed67683d6d06692bd7040f7394da178b0
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221010175511.3414357-3-hpoussin@reactos.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 7845e731471365663dea8e34338f93791d31ea44
      
https://github.com/qemu/qemu/commit/7845e731471365663dea8e34338f93791d31ea44
  Author: Sam Li <faithilikerun@gmail.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/io_uring.c
    M meson.build

  Log Message:
  -----------
  block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1193

The commit "Use io_uring_register_ring_fd() to skip fd operations" broke
when booting a guest with iothread and io_uring. That is because the
io_uring_register_ring_fd() call is made from the main thread instead of
IOThread where io_uring_submit() is called. It can not be guaranteed
to register the ring fd in the correct thread or unregister the same ring
fd if the IOThread is disabled. This optimization is not critical so we
will revert previous commit.

This reverts commit e2848bc574fe2715c694bf8fe9a1ba7f78a1125a
and 77e3f038af1764983087e3551a0fde9951952c4d.

Cc: qemu-stable@nongnu.org
Signed-off-by: Sam Li <faithilikerun@gmail.com>
Message-Id: <20220924144815.5591-1-faithilikerun@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Tested-by: Dario Faggioli <dfaggioli@suse.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: ab6075d849f4285fc730d3ae6e17418d65d09998
      
https://github.com/qemu/qemu/commit/ab6075d849f4285fc730d3ae6e17418d65d09998
  Author: Li Feng <fengli@smartx.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M hw/block/vhost-user-blk.c

  Log Message:
  -----------
  vhost-user-blk: fix the resize crash

If the os is not installed and doesn't have the virtio guest driver,
the vhost dev isn't started, so the dev->vdev is NULL.

Reproduce: mount a Win 2019 iso, go into the install ui, then resize
the virtio-blk device, qemu crash.

Signed-off-by: Li Feng <fengli@smartx.com>
Message-Id: <20220919121816.3252223-1-fengli@smartx.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 046fd84facfc4d326070bf5306dd9cedb7bd9854
      
https://github.com/qemu/qemu/commit/046fd84facfc4d326070bf5306dd9cedb7bd9854
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/commit.c
    M block/mirror.c
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: BlockDriver: add .filtered_child_is_backing field

Unfortunately not all filters use .file child as filtered child. Two
exclusions are mirror_top and commit_top. Happily they both are private
filters. Bad thing is that this inconsistency is observable through qmp
commands query-block / query-named-block-nodes. So, could we just
change mirror_top and commit_top to use file child as all other filter
driver is an open question. Probably, we could do that with some kind
of deprecation period, but how to warn users during it?

For now, let's just add a field so we can distinguish them in generic
code, it will be used in further commits.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-2-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 83930780325b144a5908c45b3957b9b6457b3831
      
https://github.com/qemu/qemu/commit/83930780325b144a5908c45b3957b9b6457b3831
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/blkdebug.c
    M block/blklogwrites.c
    M block/blkreplay.c
    M block/blkverify.c
    M block/bochs.c
    M block/cloop.c
    M block/copy-before-write.c
    M block/copy-on-read.c
    M block/crypto.c
    M block/dmg.c
    M block/filter-compress.c
    M block/parallels.c
    M block/preallocate.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/replication.c
    M block/throttle.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M include/block/block-global-state.h

  Log Message:
  -----------
  block: introduce bdrv_open_file_child() helper

Almost all drivers call bdrv_open_child() similarly. Let's create a
helper for this.

The only not updated drivers that call bdrv_open_child() to set
bs->file are raw-format and snapshot-access:
    raw-format sometimes want to have filtered child but
        don't set drv->is_filter to true.
    snapshot-access wants only DATA | PRIMARY

Possibly we should implement drv->is_filter_func() handler, to consider
raw-format as filter when it works as filter.. But it's another story.

Note also, that we decrease assignments to bs->file in code: it helps
us restrict modifying this field in further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-3-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78
      
https://github.com/qemu/qemu/commit/a987aa7d3c70a2f7d2e052c1e8e449fcd35c3f78
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/blklogwrites.c

  Log Message:
  -----------
  block/blklogwrites: don't care to remove bs->file child on failure

We don't need to remove bs->file, generic layer takes care of it. No
other driver cares to remove bs->file on failure by hand.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-4-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1dcea719794b38752fdd4f8f47c743ecb03be1cc
      
https://github.com/qemu/qemu/commit/1dcea719794b38752fdd4f8f47c743ecb03be1cc
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M tests/unit/test-bdrv-graph-mod.c

  Log Message:
  -----------
  test-bdrv-graph-mod: update test_parallel_perm_update test case

test_parallel_perm_update() does two things that we are going to
restrict in the near future:

1. It updates bs->file field by hand. bs->file will be managed
   automatically by generic code (together with bs->children list).

   Let's better refactor our "tricky" bds to have own state where one
   of children is linked as "selected".
   This also looks less "tricky", so avoid using this word.

2. It create FILTERED children that are not PRIMARY. Except for tests
   all FILTERED children in the Qemu block layer are always PRIMARY as
   well.  We are going to formalize this rule, so let's better use DATA
   children here.

3. It creates more than one FILTERED child, which is already abandoned
   in BDRV_CHILD_FILTERED's description.

While being here, update the picture to better correspond to the test
code.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-5-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 9ebfc111a1e34fcec5285095954c360acc2be01a
      
https://github.com/qemu/qemu/commit/9ebfc111a1e34fcec5285095954c360acc2be01a
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M tests/unit/test-bdrv-drain.c

  Log Message:
  -----------
  tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

We do add COW child to the node.  In future we are going to forbid
adding COW child to the node that doesn't support backing. So, fix it
here now.

Don't worry about setting bs->backing itself: in further commit we'll
update the block-layer to automatically set/unset this field in generic
code.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-6-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1921b4f7868cb398a8939b48e2cdac4d6ff79e41
      
https://github.com/qemu/qemu/commit/1921b4f7868cb398a8939b48e2cdac4d6ff79e41
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/block/block_int-common.h
    M tests/unit/test-bdrv-graph-mod.c

  Log Message:
  -----------
  test-bdrv-graph-mod: fix filters to be filters

bdrv_pass_through is used as filter, even all node variables has
corresponding names. We want to append it, so it should be
backing-child-based filter like mirror_top.
So, in test_update_perm_tree, first child should be DATA, as we don't
want filters with two filtered children.

bdrv_exclusive_writer is used as a filter once. So it should be filter
anyway. We want to append it, so it should be backing-child-based
fitler too.

Make all FILTERED children to be PRIMARY as well. We are going to force
this rule by assertion soon.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-7-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 71ca43852aeb59d69d39ca12f93063aa171a9dbf
      
https://github.com/qemu/qemu/commit/71ca43852aeb59d69d39ca12f93063aa171a9dbf
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/block/block-common.h

  Log Message:
  -----------
  block: document connection between child roles and bs->backing/bs->file

Make the informal rules formal. In further commit we'll add
corresponding assertions.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-8-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 0c6100a7ff4733773e32b4b9bd00eb81955bd788
      
https://github.com/qemu/qemu/commit/0c6100a7ff4733773e32b4b9bd00eb81955bd788
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/snapshot.c

  Log Message:
  -----------
  block/snapshot: stress that we fallback to primary child

Actually what we chose is a primary child. Let's stress it in the code.

We are going to drop indirect pointer logic here in future. Actually
this commit simplifies the future work: we drop use of indirection in
the assertion now.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-9-vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 4eba825a8237985dc1c53a42bc810dcfa1a3d5e3
      
https://github.com/qemu/qemu/commit/4eba825a8237985dc1c53a42bc810dcfa1a3d5e3
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  Revert "block: Let replace_child_noperm free children"

We are going to reimplement this behavior (clear bs->file / bs->backing
pointers automatically when child->bs is cleared) in a nicer way, see
further commit
"block: Manipulate bs->file / bs->backing pointers in .attach/.detach".

With this revert we bring back a problem that was fixed by b0a9f6fed3d8.
Still the problem was mostly theoretical, we don't have concrete bugs
fixed by b0a9f6fed3d8, we don't have a specific test. Probably some
accidental failures of iotests are related.

Alternatively, we may merge this and following three reverts into final
"block: Manipulate ..." to avoid any kind of regression. But seems that
in this case having separate clear revert commits is better.

This reverts commit b0a9f6fed3d80de610dcd04a7e66f9f30a04174f.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-10-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 0f0b1e29d35e0a7da6271b3fa0fefa63380204e7
      
https://github.com/qemu/qemu/commit/0f0b1e29d35e0a7da6271b3fa0fefa63380204e7
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  Revert "block: Let replace_child_tran keep indirect pointer"

That's a preparation to previously reverted
"block: Let replace_child_noperm free children". Drop it too, we don't
need it for a new approach.

This reverts commit 82b54cf51656bf3cd5ed1ac549e8a1085a0e3290.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-11-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a2c37a30422328fe2391bd1ff342f8941c7681bc
      
https://github.com/qemu/qemu/commit/a2c37a30422328fe2391bd1ff342f8941c7681bc
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  Revert "block: Restructure remove_file_or_backing_child()"

That's a preparation to previously reverted
"block: Let replace_child_noperm free children". Drop it too, we don't
need it for a new approach.

This reverts commit 562bda8bb41879eeda0bd484dd3d55134579b28e.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-12-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 544acc7d1e1eebce76c9a8bc76a660433df2c3cd
      
https://github.com/qemu/qemu/commit/544acc7d1e1eebce76c9a8bc76a660433df2c3cd
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  Revert "block: Pass BdrvChild ** to replace_child_noperm"

That's a preparation to previously reverted
"block: Let replace_child_noperm free children". Drop it too, we don't
need it for a new approach.

This reverts commit be64bbb0149748f3999c49b13976aafb8330ea86.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-13-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 5bb047477807375e2d5e2494b1d1302d5cea4b73
      
https://github.com/qemu/qemu/commit/5bb047477807375e2d5e2494b1d1302d5cea4b73
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/raw-format.c
    M block/snapshot-access.c
    M block/snapshot.c
    M include/block/block_int-common.h
    M tests/unit/test-bdrv-drain.c

  Log Message:
  -----------
  block: Manipulate bs->file / bs->backing pointers in .attach/.detach

bs->file and bs->backing are a kind of duplication of part of
bs->children. But very useful diplication, so let's not drop them at
all:)

We should manage bs->file and bs->backing in same place, where we
manage bs->children, to keep them in sync.

Moreover, generic io paths are unprepared to BdrvChild without a bs, so
it's double good to clear bs->file / bs->backing when we detach the
child.

Detach is simple: if we detach bs->file or bs->backing child, just
set corresponding field to NULL.

Attach is a bit more complicated. But we still can precisely detect
should we set one of bs->file / bs->backing or not:

- if role is BDRV_CHILD_COW, we definitely deal with bs->backing
- else, if role is BDRV_CHILD_FILTERED (it must be also
  BDRV_CHILD_PRIMARY), it's a filtered child. Use
  bs->drv->filtered_child_is_backing to chose the pointer field to
  modify.
- else, if role is BDRV_CHILD_PRIMARY, we deal with bs->file
- in all other cases, it's neither bs->backing nor bs->file. It's some
  other child and we shouldn't care

OK. This change brings one more good thing: we can (and should) get rid
of all indirect pointers in the block-graph-change transactions:

bdrv_attach_child_common() stores BdrvChild** into transaction to clear
it on abort.

bdrv_attach_child_common() has two callers: bdrv_attach_child_noperm()
just pass-through this feature, bdrv_root_attach_child() doesn't need
the feature.

Look at bdrv_attach_child_noperm() callers:
  - bdrv_attach_child() doesn't need the feature
  - bdrv_set_file_or_backing_noperm() uses the feature to manage
    bs->file and bs->backing, we don't want it anymore
  - bdrv_append() uses the feature to manage bs->backing, again we
    don't want it anymore

So, we should drop this stuff! Great!

We could probably keep BdrvChild** argument to keep the int return
value, but it seems not worth the complexity.

Finally, we now set .file / .backing automatically in generic code and
want to restring setting them by hand outside of .attach/.detach.
So, this patch cleanups all remaining places where they were set.
To find such places I use:

  git grep '\->file ='
  git grep '\->backing ='
  git grep '&.*\<backing\>'
  git grep '&.*\<file\>'

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-14-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: c5c2174146a30423103f25a76e079b3c9c4e59b1
      
https://github.com/qemu/qemu/commit/c5c2174146a30423103f25a76e079b3c9c4e59b1
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/snapshot.c

  Log Message:
  -----------
  block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr

Now the indirection is not actually used, we can safely reduce it to
simple pointer. For consistency do a bit of refactoring to get rid of
_ptr suffixes that become meaningless.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-15-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 57f08941d32a81e687d222294d33bdbfd75b5f44
      
https://github.com/qemu/qemu/commit/57f08941d32a81e687d222294d33bdbfd75b5f44
  Author: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child

Now the function can remove any child, so give it more common name.
Drop assertions and drop bs argument which becomes unused. Function
would be reused in a further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220726201134.924743-16-vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 7f898610f6782d6303c14c3c180b88ce1b303754
      
https://github.com/qemu/qemu/commit/7f898610f6782d6303c14c3c180b88ce1b303754
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block.c: assert bs->aio_context is written under BQL and drains

Also here ->aio_context is read by I/O threads and written
under BQL.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20221025084952.2139888-2-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 7e8c182fb5e5950a52623b0d463c2f1fcd15a80a
      
https://github.com/qemu/qemu/commit/7e8c182fb5e5950a52623b0d463c2f1fcd15a80a
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M include/block/block-global-state.h
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: use transactions as a replacement of ->{can_}set_aio_context()

Simplify the way the aiocontext can be changed in a BDS graph.
There are currently two problems in bdrv_try_set_aio_context:
- There is a confusion of AioContext locks taken and released, because
  we assume that old aiocontext is always taken and new one is
  taken inside.

- It doesn't look very safe to call bdrv_drained_begin while some
  nodes have already switched to the new aiocontext and others haven't.
  This could be especially dangerous because bdrv_drained_begin polls, so
  something else could be executed while graph is in an inconsistent
  state.

Additional minor nitpick: can_set and set_ callbacks both traverse the
graph, both using the ignored list of visited nodes in a different way.

Therefore, get rid of all of this and introduce a new callback,
change_aio_context, that uses transactions to efficiently, cleanly
and most importantly safely change the aiocontext of a graph.

This new callback is a "merge" of the two previous ones:
- Just like can_set_aio_context, recursively traverses the graph.
  Marks all nodes that are visited using a GList, and checks if
  they *could* change the aio_context.
- For each node that passes the above check, drain it and add a new transaction
  that implements a callback that effectively changes the aiocontext.
- Once done, the recursive function returns if *all* nodes can change
  the AioContext. If so, commit the above transactions.
  Regardless of the outcome, call transaction.clean() to undo all drains
  done in the recursion.
- The transaction list is scanned only after all nodes are being drained, so
  we are sure that they all are in the same context, and then
  we switch their AioContext, concluding the drain only after all nodes
  switched to the new AioContext. In this way we make sure that
  bdrv_drained_begin() is always called under the old AioContext, and
  bdrv_drained_end() under the new one.
- Because of the above, we don't need to release and re-acquire the
  old AioContext every time, as everything is done once (and not
  per-node drain and aiocontext change).

Note that the "change" API is not yet invoked anywhere.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20221025084952.2139888-3-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: e08cc001d502958040565636e19a42c06e1ae8b7
      
https://github.com/qemu/qemu/commit/e08cc001d502958040565636e19a42c06e1ae8b7
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M include/block/block-global-state.h
    M include/block/block_int-common.h

  Log Message:
  -----------
  bdrv_change_aio_context: use hash table instead of list of visited nodes

Minor performance improvement, but given that we have hash tables
available, avoid iterating in the visited nodes list every time just
to check if a node has been already visited.

The data structure is not actually a proper hash map, but an hash set,
as we are just adding nodes and not key,value pairs.

Suggested-by: Hanna Reitz <hreitz@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-4-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3428b100dc65dbce3e3b646df471a8fb2a5df556
      
https://github.com/qemu/qemu/commit/3428b100dc65dbce3e3b646df471a8fb2a5df556
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M blockjob.c

  Log Message:
  -----------
  blockjob: implement .change_aio_ctx in child_job

child_job_change_aio_ctx() is very similar to
child_job_can_set_aio_ctx(), but it implements a new transaction
so that if all check pass, the new transaction's .commit()
will take care of changin the BlockJob AioContext.
child_job_set_aio_ctx_commit() is similar to child_job_set_aio_ctx(),
but it doesn't need to invoke the recursion, as this is already
taken care by child_job_change_aio_ctx().

Note: bdrv_child_try_change_aio_context() is not called by
anyone at this point.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-5-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 27633e740e784709f256f6ee70f2dd0b5a87279f
      
https://github.com/qemu/qemu/commit/27633e740e784709f256f6ee70f2dd0b5a87279f
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c

  Log Message:
  -----------
  block: implement .change_aio_ctx in child_of_bds

bdrv_child_cb_change_aio_ctx() is identical to
bdrv_child_cb_can_set_aio_ctx(), as we only need
to recursively go on the parent bs.

Note: bdrv_child_try_change_aio_context() is not called by
anyone at this point.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-6-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 33949396216fa16a97f5b33877b50d5830f21aad
      
https://github.com/qemu/qemu/commit/33949396216fa16a97f5b33877b50d5830f21aad
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block-backend: implement .change_aio_ctx in child_root

blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(),
but implements a new transaction so that if all check pass, the new
transaction's .commit will take care of changing the BlockBackend
AioContext. blk_root_set_aio_ctx_commit() is the same as
blk_root_set_aio_ctx().

Note: bdrv_child_try_change_aio_context() is not called by
anyone at this point.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-7-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: f8be48adf08641f43dfb34b6abf50f9bc21fc250
      
https://github.com/qemu/qemu/commit/f8be48adf08641f43dfb34b6abf50f9bc21fc250
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/block-backend.c

  Log Message:
  -----------
  block: use the new _change_ API instead of _can_set_ and _set_

Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx,
and call bdrv_child_try_change_aio_context() in
bdrv_try_set_aio_context(), the main function called through
the whole block layer.

>From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx
won't be used anymore.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-8-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: d2aafbb68a0390b8166fbf62c572b306f7bf02ce
      
https://github.com/qemu/qemu/commit/d2aafbb68a0390b8166fbf62c572b306f7bf02ce
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/block-backend.c
    M blockjob.c
    M include/block/block-global-state.h
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

Together with all _can_set_ and _set_ APIs, as they are not needed
anymore.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-9-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a41cfda12674a296579bc5459646ded9547b1220
      
https://github.com/qemu/qemu/commit/a41cfda12674a296579bc5459646ded9547b1220
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/block-backend.c
    M include/block/block-global-state.h

  Log Message:
  -----------
  block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context

No functional changes intended.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-10-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 142e6907120d12de1e7ac402e556597ebbab86e8
      
https://github.com/qemu/qemu/commit/142e6907120d12de1e7ac402e556597ebbab86e8
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/export/export.c
    M blockdev.c
    M docs/devel/multiple-iothreads.txt
    M include/block/block-global-state.h
    M job.c
    M tests/unit/test-bdrv-drain.c
    M tests/unit/test-block-iothread.c

  Log Message:
  -----------
  block: remove bdrv_try_set_aio_context and replace it with 
bdrv_try_change_aio_context

No functional change intended.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221025084952.2139888-11-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: ebdebe47283dd7d20d88834f03f741758419c254
      
https://github.com/qemu/qemu/commit/ebdebe47283dd7d20d88834f03f741758419c254
  Author: Bin Meng <bin.meng@windriver.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/nfs.c

  Log Message:
  -----------
  block/nfs: Fix 32-bit Windows build

libnfs.h declares nfs_fstat() as the following for win32:

  int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh,
                struct __stat64 *st);

The 'st' parameter should be of type 'struct __stat64'. The
codes happen to build successfully for 64-bit Windows, but it
does not build for 32-bit Windows.

Fixes: 6542aa9c75bc ("block: add native support for NFS")
Fixes: 18a8056e0bc7 ("block/nfs: cache allocated filesize for read-only files")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Message-Id: <20220908132817.1831008-6-bmeng.cn@gmail.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 1a2152568ad5d9afafff96d47d2bf340ac3dc2ea
      
https://github.com/qemu/qemu/commit/1a2152568ad5d9afafff96d47d2bf340ac3dc2ea
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/backup.c

  Log Message:
  -----------
  backup: remove incorrect coroutine_fn annotation

The .set_speed callback is not called from coroutine.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-2-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 7c85803c496744c30d070a37be2faf2070d417d3
      
https://github.com/qemu/qemu/commit/7c85803c496744c30d070a37be2faf2070d417d3
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/io.c

  Log Message:
  -----------
  block: remove incorrect coroutine_fn annotation

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-3-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 6894ee2bee20fd22055f8a7337ef465efab0c823
      
https://github.com/qemu/qemu/commit/6894ee2bee20fd22055f8a7337ef465efab0c823
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/monitor/block-hmp-cmds.c
    M include/block/block-hmp-cmds.h
    M include/monitor/hmp.h

  Log Message:
  -----------
  monitor: add missing coroutine_fn annotation

hmp_block_resize and hmp_screendump are defined as a ".coroutine = true" 
command,
so they must be coroutine_fn.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-4-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 42f6ad79e38b0a64d154c2131c5adb09fd181eb1
      
https://github.com/qemu/qemu/commit/42f6ad79e38b0a64d154c2131c5adb09fd181eb1
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/ssh.c

  Log Message:
  -----------
  ssh: add missing coroutine_fn annotation

ssh_write is only called from ssh_co_writev.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-5-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 16bb776f5b48e045f5eb5d105ee74135bfc781dd
      
https://github.com/qemu/qemu/commit/16bb776f5b48e045f5eb5d105ee74135bfc781dd
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/block/block-io.h

  Log Message:
  -----------
  block: add missing coroutine_fn annotation to prototypes

The functions are marked coroutine_fn in the definition.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-6-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: d63f006a58b32f6df51ca12ac9d9e87b648eb617
      
https://github.com/qemu/qemu/commit/d63f006a58b32f6df51ca12ac9d9e87b648eb617
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/qemu/coroutine.h

  Log Message:
  -----------
  coroutine-lock: add missing coroutine_fn annotation to prototypes

The functions are marked coroutine_fn in the definition.

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-7-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 512ef174fb531a00e6762b007e42095631d2b48d
      
https://github.com/qemu/qemu/commit/512ef174fb531a00e6762b007e42095631d2b48d
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M include/qemu/coroutine.h

  Log Message:
  -----------
  coroutine-io: add missing coroutine_fn annotation to prototypes

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-8-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: c2d7680893a53c3d1443dd729fa60814dd1b2bad
      
https://github.com/qemu/qemu/commit/c2d7680893a53c3d1443dd729fa60814dd1b2bad
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qcow2.h
    M include/block/block_int-common.h

  Log Message:
  -----------
  block: add missing coroutine_fn annotation to BlockDriverState callbacks

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-9-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 014688a1b56bab8f3e15810971667ac15acbaa88
      
https://github.com/qemu/qemu/commit/014688a1b56bab8f3e15810971667ac15acbaa88
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: add coroutine_fn annotation for indirect-called functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-10-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: f72b38b67e49e1460c6a2dffd4ee97c0155347eb
      
https://github.com/qemu/qemu/commit/f72b38b67e49e1460c6a2dffd4ee97c0155347eb
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/blkdebug.c

  Log Message:
  -----------
  blkdebug: add missing coroutine_fn annotation for indirect-called functions

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-11-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: ea4b80146e4a000b7e9452390f71dca030a8a1b0
      
https://github.com/qemu/qemu/commit/ea4b80146e4a000b7e9452390f71dca030a8a1b0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qcow.c

  Log Message:
  -----------
  qcow: manually add more coroutine_fn annotations

get_cluster_offset() and decompress_cluster() are only called from
the read and write paths.

The validity of these was double-checked with Alberto Faria's static analyzer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-12-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a1b4ecfd6f4e7d8bfba3a3990150cb92577d92d4
      
https://github.com/qemu/qemu/commit/a1b4ecfd6f4e7d8bfba3a3990150cb92577d92d4
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qcow2-bitmap.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.h

  Log Message:
  -----------
  qcow2: manually add more coroutine_fn annotations

The validity of these was double-checked with Alberto Faria's static
analyzer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-13-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: c9d43d0deb367d35bb911a5b2cf8233a426699cd
      
https://github.com/qemu/qemu/commit/c9d43d0deb367d35bb911a5b2cf8233a426699cd
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: manually add more coroutine_fn annotations

The validity of these was double-checked with Alberto Faria's static analyzer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-14-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a06678874bf6ed4f437b384749c704e21a4e61b9
      
https://github.com/qemu/qemu/commit/a06678874bf6ed4f437b384749c704e21a4e61b9
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/commit.c

  Log Message:
  -----------
  commit: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-15-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: ce47ff20b9f3c05b2b371539bedc437c531c0beb
      
https://github.com/qemu/qemu/commit/ce47ff20b9f3c05b2b371539bedc437c531c0beb
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block.c
    M block/io.c

  Log Message:
  -----------
  block: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-16-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 882762165a3be58cf6752330878a5c2b181183ce
      
https://github.com/qemu/qemu/commit/882762165a3be58cf6752330878a5c2b181183ce
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  mirror: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-17-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 50688be02a679b7e385a051da6ae18c09de77098
      
https://github.com/qemu/qemu/commit/50688be02a679b7e385a051da6ae18c09de77098
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/parallels.c

  Log Message:
  -----------
  parallels: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-18-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 58684155e42fe16a21d8c1fcc7927c5b96706ff4
      
https://github.com/qemu/qemu/commit/58684155e42fe16a21d8c1fcc7927c5b96706ff4
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qcow.c

  Log Message:
  -----------
  qcow: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-19-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 38505e2a147c4f9fade382ede4a40e287c7bd846
      
https://github.com/qemu/qemu/commit/38505e2a147c4f9fade382ede4a40e287c7bd846
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c

  Log Message:
  -----------
  qcow2: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-20-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3aba34adb19131ebfb996f700c518a0352a489ac
      
https://github.com/qemu/qemu/commit/3aba34adb19131ebfb996f700c518a0352a489ac
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/qed-table.c
    M block/qed.c

  Log Message:
  -----------
  qed: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-21-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3f6530282226587e9253e4129e2297e955cc90b2
      
https://github.com/qemu/qemu/commit/3f6530282226587e9253e4129e2297e955cc90b2
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/vdi.c

  Log Message:
  -----------
  vdi: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-22-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: eb342749c0cc8002fc19a5589fb5c3d836118185
      
https://github.com/qemu/qemu/commit/eb342749c0cc8002fc19a5589fb5c3d836118185
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/vhdx.c

  Log Message:
  -----------
  vhdx: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-23-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a5c4e5be7e09d46bd57693c139e74f9cbab042a3
      
https://github.com/qemu/qemu/commit/a5c4e5be7e09d46bd57693c139e74f9cbab042a3
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-24-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 247cf5c035ee598a58386230ab9db551ca3c1b1d
      
https://github.com/qemu/qemu/commit/247cf5c035ee598a58386230ab9db551ca3c1b1d
  Author: Alberto Faria <afaria@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  monitor: switch to *_co_* functions

Signed-off-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20221013123711.620631-25-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: be8da05b5ed8fb546731b9edb997f303f272bad8
      
https://github.com/qemu/qemu/commit/be8da05b5ed8fb546731b9edb997f303f272bad8
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M block/block-backend.c

  Log Message:
  -----------
  block/block-backend: blk_set_enable_write_cache is IO_CODE

blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE
but can be invoked from iothreads when handling scsi requests.
This triggers an assertion failure:

 0x00007fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 0x00007fd6c34ff537 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 0x00007fd6c34ff40f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
 0x00007fd6c350e662 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
 0x000056149e2cea03 in blk_set_enable_write_cache (wce=true, blk=0x5614a01c27f0)
   at ../src/block/block-backend.c:1949
 0x000056149e2d0a67 in blk_set_enable_write_cache (blk=0x5614a01c27f0,
   wce=<optimized out>) at ../src/block/block-backend.c:1951
 0x000056149dfe9c59 in scsi_disk_apply_mode_select (p=0x7fd6b400c00e "\004",
   page=<optimized out>, s=<optimized out>) at ../src/hw/scsi/scsi-disk.c:1520
 mode_select_pages (change=true, len=18, p=0x7fd6b400c00e "\004", 
r=0x7fd6b4001ff0)
   at ../src/hw/scsi/scsi-disk.c:1570
 scsi_disk_emulate_mode_select (inbuf=<optimized out>, r=0x7fd6b4001ff0) at
   ../src/hw/scsi/scsi-disk.c:1640
 scsi_disk_emulate_write_data (req=0x7fd6b4001ff0) at 
../src/hw/scsi/scsi-disk.c:1934
 0x000056149e18ff16 in virtio_scsi_handle_cmd_req_submit (req=<optimized out>,
   req=<optimized out>, s=0x5614a12f16b0) at ../src/hw/scsi/virtio-scsi.c:719
 virtio_scsi_handle_cmd_vq (vq=0x7fd6bab92140, s=0x5614a12f16b0) at
   ../src/hw/scsi/virtio-scsi.c:761
 virtio_scsi_handle_cmd (vq=<optimized out>, vdev=<optimized out>) at
   ../src/hw/scsi/virtio-scsi.c:775
 virtio_scsi_handle_cmd (vdev=0x5614a12f16b0, vq=0x7fd6bab92140) at
   ../src/hw/scsi/virtio-scsi.c:765
 0x000056149e1a8aa6 in virtio_queue_notify_vq (vq=0x7fd6bab92140) at
   ../src/hw/virtio/virtio.c:2365
 0x000056149e3ccea5 in aio_dispatch_handler (ctx=ctx@entry=0x5614a01babe0,
   node=<optimized out>) at ../src/util/aio-posix.c:369
 0x000056149e3cd868 in aio_dispatch_ready_handlers (ready_list=0x7fd6c09b2680,
   ctx=0x5614a01babe0) at ../src/util/aio-posix.c:399
 aio_poll (ctx=0x5614a01babe0, blocking=blocking@entry=true) at
   ../src/util/aio-posix.c:713
 0x000056149e2a7796 in iothread_run (opaque=opaque@entry=0x56149ffde500) at
   ../src/iothread.c:67
 0x000056149e3d0859 in qemu_thread_start (args=0x7fd6c09b26f0) at
   ../src/util/qemu-thread-posix.c:504
 0x00007fd6c36b9ea7 in start_thread () from 
/lib/x86_64-linux-gnu/libpthread.so.0
 0x00007fd6c35d9aef in clone () from /lib/x86_64-linux-gnu/libc.so.6

Changing GLOBAL_STATE_CODE in IO_CODE is allowed, since GSC callers are
allowed to call IO_CODE.

Resolves: #1272

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20221027072726.2681500-1-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Tested-by: Antoine Damhet <antoine.damhet@shadow.tech>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: df8d07081718c29d04d106583d9c300128686cda
      
https://github.com/qemu/qemu/commit/df8d07081718c29d04d106583d9c300128686cda
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  virtio-net: fix bottom-half packet TX on asynchronous completion

When virtio-net is used with the socket netdev backend, the backend
can be busy and not able to collect new packets.

In this case, net_socket_receive() returns 0 and registers a poll function
to detect when the socket is ready again.

In virtio_net_tx_bh(), virtio_net_flush_tx() forwards the 0, the virtio
notifications are disabled and the function is not re-scheduled, waiting
for the backend to be ready.

When the socket netdev backend is again able to send packets, the poll
function re-starts to flush remaining packets. This is done by
calling virtio_net_tx_complete(). It re-enables notifications and calls
again virtio_net_flush_tx().

But it seems if virtio_net_flush_tx() reaches the tx_burst value all
the queue is not flushed and no new notification is sent to re-schedule
virtio_net_tx_bh(). Nothing re-start to flush the queue and remaining
packets are stuck in the queue.

To fix that, detect in virtio_net_tx_complete() if virtio_net_flush_tx()
has been stopped by tx_burst and if yes re-schedule the bottom half
function virtio_net_tx_bh() to flush the remaining packets.

This is what is done in virtio_net_tx_bh() when the virtio_net_flush_tx()
is synchronous, and completly by-passed when the operation needs to be
asynchronous.

Fixes: a697a334b3c4 ("virtio-net: Introduce a new bottom half packet TX")
Cc: alex.williamson@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 7550a82259fcf9ce5f1f6443ced779d0eb8afdca
      
https://github.com/qemu/qemu/commit/7550a82259fcf9ce5f1f6443ced779d0eb8afdca
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/net/virtio-net.c

  Log Message:
  -----------
  virtio-net: fix TX timer with tx_burst

When virtio_net_flush_tx() reaches the tx_burst value all
the queue is not flushed and nothing restart the timer.

Fix that by doing for TX timer as we do for bottom half TX:
rearming the timer if we find any packet to send during the
virtio_net_flush_tx() call.

Fixes: e3f30488e5f8 ("virtio-net: Limit number of packets sent per TX flush")
Cc: alex.williamson@redhat.com
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: faa825ddb3f116c2aa4db0ab5ed72bd093f39337
      
https://github.com/qemu/qemu/commit/faa825ddb3f116c2aa4db0ab5ed72bd093f39337
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Delete duplicated vdpa_feature_bits entry

This entry was duplicated on referenced commit. Removing it.

Fixes: 402378407dbd ("vhost-vdpa: multiqueue support")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 6ce262fbe7744a3d82d872e232fd0d39cfba0363
      
https://github.com/qemu/qemu/commit/6ce262fbe7744a3d82d872e232fd0d39cfba0363
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/vhost-vdpa.c

  Log Message:
  -----------
  vdpa: Remove shadow CVQ command check

The guest will see undefined behavior if it issue not negotiate
commands, bit it is expected somehow.

Simplify code deleting this check.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 8801ccd0500437a86e3d15a806f37ebb84605dce
      
https://github.com/qemu/qemu/commit/8801ccd0500437a86e3d15a806f37ebb84605dce
  Author: Si-Wei Liu <si-wei.liu@oracle.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/vhost-vdpa.c
    M qapi/net.json
    M qemu-options.hx

  Log Message:
  -----------
  vhost-vdpa: allow passing opened vhostfd to vhost-vdpa

Similar to other vhost backends, vhostfd can be passed to vhost-vdpa
backend as another parameter to instantiate vhost-vdpa net client.
This would benefit the use case where only open file descriptors, as
opposed to raw vhost-vdpa device paths, are accessible from the QEMU
process.

(qemu) netdev_add type=vhost-vdpa,vhostfd=61,id=vhost-vdpa1

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 7d0e12af59286f3784c3ab7502325fc6a051d117
      
https://github.com/qemu/qemu/commit/7d0e12af59286f3784c3ab7502325fc6a051d117
  Author: Daniel P. Berrangé <berrange@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/net.c

  Log Message:
  -----------
  net: improve error message for missing netdev backend

The current message when using '-net user...' with SLIRP disabled at
compile time is:

  qemu-system-x86_64: -net user: Parameter 'type' expects a net backend type 
(maybe it is not compiled into this binary)

An observation is that we're using the 'netdev->type' field here which
is an enum value, produced after QAPI has converted from its string
form.

IOW, at this point in the code, we know that the user's specified
type name was a valid network backend. The only possible scenario that
can make the backend init function be NULL, is if support for that
backend was disabled at build time. Given this, we don't need to caveat
our error message with a 'maybe' hint, we can be totally explicit.

The use of QERR_INVALID_PARAMETER_VALUE doesn't really lend itself to
user friendly error message text. Since this is not used to set a
specific QAPI error class, we can simply stop using this pre-formatted
error text and provide something better.

Thus the new message is:

  qemu-system-x86_64: -net user: network backend 'user' is not compiled into 
this binary

The case of passing 'hubport' for -net is also given a message reminding
people they should have used -netdev/-nic instead, as this backend type
is only valid for the modern syntax.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: f0c48e05bd7c535aa0614d284d165d998936c79b
      
https://github.com/qemu/qemu/commit/f0c48e05bd7c535aa0614d284d165d998936c79b
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-shadow-virtqueue.c

  Log Message:
  -----------
  vhost: allocate event_idx fields on vring

There was not enough room to accomodate them.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 01f8beacea2a31edb6c270653052bea2778ae65d
      
https://github.com/qemu/qemu/commit/01f8beacea2a31edb6c270653052bea2778ae65d
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-shadow-virtqueue.c

  Log Message:
  -----------
  vhost: toggle device callbacks using used event idx

Actually use the new field of the used ring and tell the device if SVQ
wants to be notified.

The code is not reachable at the moment.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 22a6840ff282727df3e3c745d92d764c7081f49b
      
https://github.com/qemu/qemu/commit/22a6840ff282727df3e3c745d92d764c7081f49b
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-shadow-virtqueue.c

  Log Message:
  -----------
  vhost: use avail event idx on vhost_svq_kick

So SVQ code knows if an event is needed.

The code is not reachable at the moment.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 396d512669dccea2bb982685870356ab71e956ed
      
https://github.com/qemu/qemu/commit/396d512669dccea2bb982685870356ab71e956ed
  Author: Eugenio Pérez <eperezma@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-shadow-virtqueue.c

  Log Message:
  -----------
  vhost: Accept event idx flag

Enabling all the code path created before.

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 30e4226b78f888a75dade5a2cf1488f94da3a8db
      
https://github.com/qemu/qemu/commit/30e4226b78f888a75dade5a2cf1488f94da3a8db
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M include/qemu/sockets.h
    M net/net.c

  Log Message:
  -----------
  net: introduce convert_host_port()

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: d63ef17bfcba1126df6bfcb7bca64c96ac4a8d99
      
https://github.com/qemu/qemu/commit/d63ef17bfcba1126df6bfcb7bca64c96ac4a8d99
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M include/net/net.h
    M net/net.c
    M softmmu/vl.c

  Log Message:
  -----------
  net: remove the @errp argument of net_client_inits()

The only caller passes &error_fatal, so use this directly in the function.

It's what we do for -blockdev, -device, and -object.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 21fccb2cbbacdc045f19605915e847de31ca9862
      
https://github.com/qemu/qemu/commit/21fccb2cbbacdc045f19605915e847de31ca9862
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M include/net/net.h
    M net/net.c
    M softmmu/vl.c

  Log Message:
  -----------
  net: simplify net_client_parse() error management

All net_client_parse() callers exit in case of error.

Move exit(1) to net_client_parse() and remove error checking from
the callers.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: f3eedcddba36dddfb7769a8c96a0f710e894ffc0
      
https://github.com/qemu/qemu/commit/f3eedcddba36dddfb7769a8c96a0f710e894ffc0
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M include/net/net.h
    M net/net.c
    M softmmu/vl.c

  Log Message:
  -----------
  qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field
of Netdev structure can collides with "type" field of SocketAddress),
we introduce a way to bypass qemu_opts_parse_noisily() and use directly
visit_type_Netdev() to parse the backend parameters.

More details from Markus:

qemu_init() passes the argument of -netdev, -nic, and -net to
net_client_parse().

net_client_parse() parses with qemu_opts_parse_noisily(), passing
QemuOptsList qemu_netdev_opts for -netdev, qemu_nic_opts for -nic, and
qemu_net_opts for -net.  Their desc[] are all empty, which means any
keys are accepted.  The result of the parse (a QemuOpts) is stored in
the QemuOptsList.

Note that QemuOpts is flat by design.  In some places, we layer non-flat
on top using dotted keys convention, but not here.

net_init_clients() iterates over the stored QemuOpts, and passes them to
net_init_netdev(), net_param_nic(), or net_init_client(), respectively.

These functions pass the QemuOpts to net_client_init().  They also do
other things with the QemuOpts, which we can ignore here.

net_client_init() uses the opts visitor to convert the (flat) QemOpts to
a (non-flat) QAPI object Netdev.  Netdev is also the argument of QMP
command netdev_add.

The opts visitor was an early attempt to support QAPI in
(QemuOpts-based) CLI.  It restricts QAPI types to a certain shape; see
commit eb7ee2cbeb "qapi: introduce OptsVisitor".

A more modern way to support QAPI is qobject_input_visitor_new_str().
It uses keyval_parse() instead of QemuOpts for KEY=VALUE,... syntax, and
it also supports JSON syntax.  The former isn't quite as expressive as
JSON, but it's a lot closer than QemuOpts + opts visitor.

This commit paves the way to use of the modern way instead.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 53b85d9574f3c162c0aadbd988f95e207d4c6e31
      
https://github.com/qemu/qemu/commit/53b85d9574f3c162c0aadbd988f95e207d4c6e31
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hw/net/xen_nic.c
    M include/net/net.h
    M net/l2tpv3.c
    M net/net.c
    M net/slirp.c
    M net/socket.c
    M net/tap-win32.c
    M net/tap.c
    M net/vde.c
    M net/vhost-user.c
    M net/vhost-vdpa.c

  Log Message:
  -----------
  net: introduce qemu_set_info_str() function

Embed the setting of info_str in a function.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 5166fe0ae46dbfed8cd7e7c3743c591caef81336
      
https://github.com/qemu/qemu/commit/5166fe0ae46dbfed8cd7e7c3743c591caef81336
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M hmp-commands.hx
    M net/clients.h
    A net/dgram.c
    M net/hub.c
    M net/meson.build
    M net/net.c
    A net/stream.c
    M qapi/net.json
    M qemu-options.hx

  Log Message:
  -----------
  qapi: net: add stream and dgram netdevs

Copied from socket netdev file and modified to use SocketAddress
to be able to introduce new features like unix socket.

"udp" and "mcast" are squashed into dgram netdev, multicast is detected
according to the IP address type.
"listen" and "connect" modes are managed by stream netdev. An optional
parameter "server" defines the mode (off by default)

The two new types need to be parsed the modern way with -netdev, because
with the traditional way, the "type" field of netdev structure collides with
the "type" field of SocketAddress and prevents the correct evaluation of the
command line option. Moreover the traditional way doesn't allow to use
the same type (SocketAddress) several times with the -netdev option
(needed to specify "local" and "remote" addresses).

The previous commit paved the way for parsing the modern way, but
omitted one detail: how to pick modern vs. traditional, in
netdev_is_modern().

We want to pick based on the value of parameter "type".  But how to
extract it from the option argument?

Parsing the option argument, either the modern or the traditional way,
extracts it for us, but only if parsing succeeds.

If parsing fails, there is no good option.  No matter which parser we
pick, it'll be the wrong one for some arguments, and the error
reporting will be confusing.

Fortunately, the traditional parser accepts *anything* when called in
a certain way.  This maximizes our chance to extract the value of
"type", and in turn minimizes the risk of confusing error reporting.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: daf188ff04ea86fedf447ce366af3d1025020909
      
https://github.com/qemu/qemu/commit/daf188ff04ea86fedf447ce366af3d1025020909
  Author: Stefano Brivio <sbrivio@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/socket.c

  Log Message:
  -----------
  net: socket: Don't ignore EINVAL on netdev socket connection

Other errors are treated as failure by net_socket_connect_init(),
but if connect() returns EINVAL, we'll fail silently. Remove the
related exception.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 80d3e4779d6c5fee0402b0b48de15c3c812845a4
      
https://github.com/qemu/qemu/commit/80d3e4779d6c5fee0402b0b48de15c3c812845a4
  Author: Stefano Brivio <sbrivio@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/stream.c

  Log Message:
  -----------
  net: stream: Don't ignore EINVAL on netdev socket connection

Other errors are treated as failure by net_stream_client_init(),
but if connect() returns EINVAL, we'll fail silently. Remove the
related exception.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
[lvivier: applied to net/stream.c]
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 13c6be96618c4435ba412c098bfe35a76355bc45
      
https://github.com/qemu/qemu/commit/13c6be96618c4435ba412c098bfe35a76355bc45
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/stream.c
    M qapi/net.json
    M qemu-options.hx

  Log Message:
  -----------
  net: stream: add unix socket

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com> (QAPI schema)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 7c1f0c33cc9d7436172da0882f088b3cfc8a0733
      
https://github.com/qemu/qemu/commit/7c1f0c33cc9d7436172da0882f088b3cfc8a0733
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/dgram.c

  Log Message:
  -----------
  net: dgram: make dgram_dst generic

dgram_dst is a sockaddr_in structure. To be able to use it with
unix socket, use a pointer to a generic sockaddr structure.

Rename it dest_addr, and store socket length in dest_len.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 8ecc7f40bc76f2a565a74d1e5b2d7462cf050f1d
      
https://github.com/qemu/qemu/commit/8ecc7f40bc76f2a565a74d1e5b2d7462cf050f1d
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/dgram.c

  Log Message:
  -----------
  net: dgram: move mcast specific code from net_socket_fd_init_dgram()

It is less complex to manage special cases directly in
net_dgram_mcast_init() and net_dgram_udp_init().

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 784e7a2531040824f88f33494be256a9e331e219
      
https://github.com/qemu/qemu/commit/784e7a2531040824f88f33494be256a9e331e219
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/dgram.c
    M qapi/net.json
    M qemu-options.hx

  Log Message:
  -----------
  net: dgram: add unix socket

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com> (QAPI schema)
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 18bf1c94565b1b594873aaea9dfd47c83abd8543
      
https://github.com/qemu/qemu/commit/18bf1c94565b1b594873aaea9dfd47c83abd8543
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M include/qemu/sockets.h
    M monitor/hmp-cmds.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  qemu-sockets: move and rename SocketAddress_to_str()

Rename SocketAddress_to_str() to socket_uri() and move it to
util/qemu-sockets.c close to socket_parse().

socket_uri() generates a string from a SocketAddress while
socket_parse() generates a SocketAddress from a string.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 7651b3211904eda3207d50f31c7f9acc8c375cec
      
https://github.com/qemu/qemu/commit/7651b3211904eda3207d50f31c7f9acc8c375cec
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M util/qemu-sockets.c

  Log Message:
  -----------
  qemu-sockets: update socket_uri() and socket_parse() to be consistent

To be consistent with socket_uri(), add 'tcp:' prefix for inet type in
socket_parse(), by default socket_parse() use tcp when no prefix is
provided (format is host:port).

In socket_uri(), use 'vsock:' prefix for vsock type rather than 'tcp:'
because it makes a vsock address look like an inet address with CID
misinterpreted as host.
Goes back to commit 9aca82ba31 "migration: Create socket-address parameter"

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: 1f9c890fa3b6a09b34aea915500f9f002b5d9d60
      
https://github.com/qemu/qemu/commit/1f9c890fa3b6a09b34aea915500f9f002b5d9d60
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/stream.c
    M qemu-options.hx

  Log Message:
  -----------
  net: stream: move to QIO to enable additional parameters

Use QIOChannel, QIOChannelSocket and QIONetListener.
This allows net/stream to use all the available parameters provided by
SocketAddress.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: e506fee8b1e092f6ac6f9459bf6a35b807644ad2
      
https://github.com/qemu/qemu/commit/e506fee8b1e092f6ac6f9459bf6a35b807644ad2
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M net/stream.c
    M qapi/net.json

  Log Message:
  -----------
  net: stream: add QAPI events to report connection state

The netdev reports NETDEV_STREAM_CONNECTED event when the backend
is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected.

The NETDEV_STREAM_CONNECTED event includes the destination address.

This allows a system manager like libvirt to detect when the server
fails.

For instance with passt:

{ 'execute': 'qmp_capabilities' }
{ "return": { } }
{ "timestamp": { "seconds": 1666341395, "microseconds": 505347 },
    "event": "NETDEV_STREAM_CONNECTED",
    "data": { "netdev-id": "netdev0",
        "addr": { "path": "/tmp/passt_1.socket", "type": "unix" } } }

[killing passt here]

{ "timestamp": { "seconds": 1666341430, "microseconds": 968694 },
    "event": "NETDEV_STREAM_DISCONNECTED",
    "data": { "netdev-id": "netdev0" } }

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>


  Commit: a8183c34688f7066fc2c169771bcae2b387eb297
      
https://github.com/qemu/qemu/commit/a8183c34688f7066fc2c169771bcae2b387eb297
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-10-30 (Sun, 30 Oct 2022)

  Changed paths:
    A crypto/block-luks-priv.h
    M crypto/block-luks.c
    M crypto/pbkdf.c
    M crypto/tlscredspsk.c
    M io/channel-watch.c
    M meson.build
    M scripts/git-submodule.sh
    M softmmu/qemu-seccomp.c
    M tests/unit/crypto-tls-psk-helpers.c
    M tests/unit/test-crypto-block.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Merge tag 'misc-next-pull-request' of https://gitlab.com/berrange/qemu into 
staging

pull: crypto and io queue

 * Many LUKS header robustness checks
 * Fix TLS PSK error reporting
 * Enable LUKS creation on macOS
 * Report useful errnos from seccomp
 * I/O chanel Windows portability fix

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE2vOm/bJrYpEtDo4/vobrtBUQT98FAmNawAcACgkQvobrtBUQ
# T9/pWA/9FXE6kvkv9YQhb/h1rMALO1aLKqUG/jWKP/mzqqLpDKHxxPin/nw8RYff
# xyHt5mC7t1g7a8FFMlXxFHw1WE9o46j3tQg2IokWlX2ossYaZQx+BVv4s1zjTxcK
# KPVKWoEqN5sfa2T7gUGbfZ+dH9LSZ29DRT+GrO9YEvjdSg0yUKHXPetjw6iw5OVT
# GuI22xOVKbuCBf7PW/nvUe/6prxAfc7IavvAusrdkMFXymcys87q7ZCxGYEsDxyC
# vUkLdAoB9kcjwvmU+sZl9WhjasRQkUxW8zCToKea4TSS1fp5pgVL0TT4x7yq7ts4
# nqnaqiSTBfRda62lF64A9lM91K7hbDqPC33FkCNKWJGsQAYIFvdVJdqJsvZHUr1/
# 3KyHkXMsyzRfGnT7MHK+GpwcgvTupBP8ceiyYq28CLNAKXpXb6vmJIsIAdF3UaYi
# N320ogiU3iRmkqdbbbGTpBB40UQvQvdbmqKTTDmigLdpDL2TLzAqfpu1zepg+7xE
# wcXoPM9ZcRSwM7i9QyPMtjharCTeVR/QPlUN9agDGOlzNpUahIC5YrmCVKXNunnE
# M259Ytyb6ymaMrsHgshW1gJP3327N/lIOp5yLLHEzgLM1xAGOaDP83FsF8JA/Zsd
# f1he75N3KbDPYhgrdfFfitcO8F8zvhK3AqyqNDPCpJKVSeKKqFE=
# =qrzm
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 27 Oct 2022 13:29:43 EDT
# gpg:                using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full]
# gpg:                 aka "Daniel P. Berrange <berrange@redhat.com>" [full]
# Primary key fingerprint: DAF3 A6FD B26B 6291 2D0E  8E3F BE86 EBB4 1510 4FDF

* tag 'misc-next-pull-request' of https://gitlab.com/berrange/qemu:
  crypto: add test cases for many malformed LUKS header scenarios
  crypto: ensure LUKS tests run with GNUTLS crypto provider
  crypto: quote algorithm names in error messages
  crypto: split off helpers for converting LUKS header endianess
  crypto: split LUKS header definitions off into file
  crypto: check that LUKS PBKDF2 iterations count is non-zero
  crypto: strengthen the check for key slots overlapping with LUKS header
  crypto: validate that LUKS payload doesn't overlap with header
  crypto: enforce that key material doesn't overlap with LUKS header
  crypto: enforce that LUKS stripes is always a fixed value
  crypto: sanity check that LUKS header strings are NUL-terminated
  tests: avoid DOS line endings in PSK file
  crypto: check for and report errors setting PSK credentials
  scripts: check if .git exists before checking submodule status
  seccomp: Get actual errno value from failed seccomp functions
  io/channel-watch: Fix socket watch on Windows
  io/channel-watch: Drop the unnecessary cast
  io/channel-watch: Drop a superfluous '#ifdef WIN32'
  util/qemu-sockets: Use g_get_tmp_dir() to get the directory for temporary 
files
  crypto/luks: Support creating LUKS image on Darwin

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: d5ab9490cdf3ebcd97793982d4664f951816f6db
      
https://github.com/qemu/qemu/commit/d5ab9490cdf3ebcd97793982d4664f951816f6db
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-10-30 (Sun, 30 Oct 2022)

  Changed paths:
    M MAINTAINERS
    M block.c
    M block/backup.c
    M block/blkdebug.c
    M block/blklogwrites.c
    M block/blkreplay.c
    M block/blkverify.c
    M block/block-backend.c
    M block/bochs.c
    M block/cloop.c
    M block/commit.c
    M block/copy-before-write.c
    M block/copy-on-read.c
    M block/crypto.c
    M block/dmg.c
    M block/export/export.c
    M block/filter-compress.c
    M block/io.c
    M block/io_uring.c
    M block/mirror.c
    M block/monitor/block-hmp-cmds.c
    M block/nfs.c
    M block/parallels.c
    M block/preallocate.c
    M block/qcow.c
    M block/qcow2-bitmap.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qcow2.h
    M block/qed-table.c
    M block/qed.c
    M block/raw-format.c
    M block/replication.c
    M block/snapshot-access.c
    M block/snapshot.c
    M block/ssh.c
    M block/throttle.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M blockdev.c
    M blockjob.c
    M docs/devel/multiple-iothreads.txt
    M hw/block/vhost-user-blk.c
    M include/block/block-common.h
    M include/block/block-global-state.h
    M include/block/block-hmp-cmds.h
    M include/block/block-io.h
    M include/block/block_int-common.h
    M include/monitor/hmp.h
    M include/qemu/coroutine.h
    M job.c
    M meson.build
    M tests/qemu-iotests/051
    M tests/qemu-iotests/051.out
    M tests/qemu-iotests/051.pc.out
    M tests/unit/test-bdrv-drain.c
    M tests/unit/test-bdrv-graph-mod.c
    M tests/unit/test-block-iothread.c

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://repo.or.cz/qemu/kevin into staging

Block layer patches

- Cleanup bs->backing and bs->file handling
- Refactor bdrv_try_set_aio_context using transactions
- Changes for improved coroutine_fn consistency
- vhost-user-blk: fix the resize crash
- io_uring: Use of io_uring_register_ring_fd() led to breakage, revert
- vvfat: Fix some problems with r/w mode
- Code cleanup
- MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmNazhIRHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9ZyTw/8Dfck/SuxfyeLlnQItkjaV4cnqWOU8vHs
# 9x0KhlptCs+HXdF/3iicpA0lHojn7mNnbdFGjPRY4E0LriQv91TQ5ycdEmrseFPf
# sgeQlgdKCVU/pHjZ2wYarm2pE43Cx85a5xuufmw+7w49dNNZn14l4t+DgviuClVM
# nuVaogfZFbYyetre+Qd2TgLl+gJ+0d4o7Zs5lSWLrT8t0L9AGkcWPA7Nrbl6loIE
# dOautV4G7jLjuMiCeJZOGcnuRVe3gCQ5rCGBFzzH4DUtz4BmiYx4hd3LMEsP0PMM
# CrsfDZS04Ztybl9M7TmJuwkAm1gx1JDMOuJuh18lbJocIOBvhkKKxY2wI5LIdZVI
# ZntmU36RowkX+GGu/PYpYyMjBDClJppZCl7vnjyLYsVt6r0Vu6SmlHpJhcRYabhe
# 96Kv1LXH9A6+ogKPU3Layw6JGjg01GNr1ALuT7PO3pGto/JshmOuBEJJDucoF84M
# 5AfxFCohMROVldwblA6M0eKnlQBgtr5BvtgbV54BBo88VlFJgDJFQn7R09cTFUEo
# UwaJoS+nIaiZ0bQQVZhZloVppUaTdVJojzfVRCZZctga96/tu1HSFnGLnbEFpUN3
# KOf+XnVNS6Ro+nPSDf9bMjbIom2JicGFfV+6yMgIoxY/d5UA2dTZfefil4TAlSod
# 6PsTgg+jrm8=
# =/Fw0
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 27 Oct 2022 14:29:38 EDT
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* tag 'for-upstream' of https://repo.or.cz/qemu/kevin: (58 commits)
  block/block-backend: blk_set_enable_write_cache is IO_CODE
  monitor: switch to *_co_* functions
  vmdk: switch to *_co_* functions
  vhdx: switch to *_co_* functions
  vdi: switch to *_co_* functions
  qed: switch to *_co_* functions
  qcow2: switch to *_co_* functions
  qcow: switch to *_co_* functions
  parallels: switch to *_co_* functions
  mirror: switch to *_co_* functions
  block: switch to *_co_* functions
  commit: switch to *_co_* functions
  vmdk: manually add more coroutine_fn annotations
  qcow2: manually add more coroutine_fn annotations
  qcow: manually add more coroutine_fn annotations
  blkdebug: add missing coroutine_fn annotation for indirect-called functions
  qcow2: add coroutine_fn annotation for indirect-called functions
  block: add missing coroutine_fn annotation to BlockDriverState callbacks
  coroutine-io: add missing coroutine_fn annotation to prototypes
  coroutine-lock: add missing coroutine_fn annotation to prototypes
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 2281c822ee74072659d247a2eb3abf2b786f73b3
      
https://github.com/qemu/qemu/commit/2281c822ee74072659d247a2eb3abf2b786f73b3
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-10-30 (Sun, 30 Oct 2022)

  Changed paths:
    M hmp-commands.hx
    M hw/net/virtio-net.c
    M hw/net/xen_nic.c
    M hw/virtio/vhost-shadow-virtqueue.c
    M include/net/net.h
    M include/qemu/sockets.h
    M monitor/hmp-cmds.c
    M net/clients.h
    A net/dgram.c
    M net/hub.c
    M net/l2tpv3.c
    M net/meson.build
    M net/net.c
    M net/slirp.c
    M net/socket.c
    A net/stream.c
    M net/tap-win32.c
    M net/tap.c
    M net/vde.c
    M net/vhost-user.c
    M net/vhost-vdpa.c
    M qapi/net.json
    M qemu-options.hx
    M softmmu/vl.c
    M util/qemu-sockets.c

  Log Message:
  -----------
  Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging

# -----BEGIN PGP SIGNATURE-----
# Version: GnuPG v1
#
# iQEcBAABAgAGBQJjW2i1AAoJEO8Ells5jWIR5HMIAIvDEmWQ2eZ1R+CfsefXkD5H
# W3RSZbMrOHR6sb9cbYpqK/vWmH8E/jZkKY4n/q7vQ3QerFMeDPgxu0Qn43iElLXS
# iGHhC51fa5IwJNDomjUGI8oJzyk0sxAbgwOjXZ4qbAkk9KeQYWU+JqYghvOrBYbd
# VaIwEiBlECuBy0DKx2gBTfxgeuw3V3WvtjpKeZVRlR+4vLQtI9Goga78qIPfjpH2
# sN/lFhZGaX1FT8DSft0oCCBxCK8ZaNzmMpmr39a8+e4g/EJZC9xbgNkl3fN0yYa5
# P0nluv/Z6e1TZ4FBDaiVFysTS5WnS0KRjUrodzctiGECE3sQiAvkWbKZ+QdGrlw=
# =0/b/
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 28 Oct 2022 01:29:25 EDT
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) 
<jasowang@redhat.com>" [full]
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* tag 'net-pull-request' of https://github.com/jasowang/qemu: (26 commits)
  net: stream: add QAPI events to report connection state
  net: stream: move to QIO to enable additional parameters
  qemu-sockets: update socket_uri() and socket_parse() to be consistent
  qemu-sockets: move and rename SocketAddress_to_str()
  net: dgram: add unix socket
  net: dgram: move mcast specific code from net_socket_fd_init_dgram()
  net: dgram: make dgram_dst generic
  net: stream: add unix socket
  net: stream: Don't ignore EINVAL on netdev socket connection
  net: socket: Don't ignore EINVAL on netdev socket connection
  qapi: net: add stream and dgram netdevs
  net: introduce qemu_set_info_str() function
  qapi: net: introduce a way to bypass qemu_opts_parse_noisily()
  net: simplify net_client_parse() error management
  net: remove the @errp argument of net_client_inits()
  net: introduce convert_host_port()
  vhost: Accept event idx flag
  vhost: use avail event idx on vhost_svq_kick
  vhost: toggle device callbacks using used event idx
  vhost: allocate event_idx fields on vring
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 5eff7badae58fdfb8ff179e72cd5546425cf8a6f
      
https://github.com/qemu/qemu/commit/5eff7badae58fdfb8ff179e72cd5546425cf8a6f
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-10-30 (Sun, 30 Oct 2022)

  Changed paths:
    M backends/cryptodev-vhost-user.c
    M backends/rng-egd.c
    M backends/rng-random.c
    M backends/vhost-user.c
    M include/qapi/qmp/qerror.h
    M qom/object.c
    M softmmu/qtest.c

  Log Message:
  -----------
  Merge tag 'pull-error-2022-10-28' of https://repo.or.cz/qemu/armbru into 
staging

Error reporting patches for 2022-10-28

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmNbcVMSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTpWwQAKkM9rulU/ulNEI8nLzyUoabVi9ZIUY0
# UsU0jGzve7v6HKHeWnCryjECeMOa/lS5sc6MUegRXvu6PJLyThXWCoQuluz2oyz2
# tPs9g4lo3TKjZuxAHFVnHpu8cpXInRejuc0/0p9mMYmpKYiJYbQE4o52C1srzjLK
# +1h0oTaFh5LtapCbqDQqKvuNfwU9TqJQW6CzNQTdYWXNK1MS0ALLSGJA6lzDkqmT
# H0E+Y33LRfz2kllsSRRJdghzBhGfGEp80FABNUBECnwkaL27vZev5nTn3/DRQOs+
# 2V8lTrOm+QqOueKE9AkZTOT5OF6vXXNCvtcYeFpSGhqjbOyMU1X0I/hzQu/GraCm
# 59SDOcuQMUErM5sgoOPh1+0VAwjZ9tWUS1NioyGzdPBeF/DiOqx7e1HwKdvYIOQb
# 6cndxg1ctAwhuNyG5bKvnQJkV2AHl9xWNrdypnVISXhR7pMmrtXan8LZCVHMuA2z
# e5dmuDu/L7LpNy61zK5/oeU8PKgSxliea09Foh0QXSDo2WqoXKUmBPfr5Jbddjbu
# 8IuL3ZtUs4zP8jODm38iiFANnsjxGt9AByFSwe/byuY/3dqxoWzVxNbnWcVxOH8e
# 8CvXSvX2HQhwgq7C2TwZ5XQaK+7gBRHSBOeD9GYuPQLMPPAthHaRQzIRuoPaFAn6
# aPamW/RKYBPP
# =lhw3
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 28 Oct 2022 02:06:11 EDT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-error-2022-10-28' of https://repo.or.cz/qemu/armbru:
  qerror: QERR_PERMISSION_DENIED is no longer used, drop
  qtest: Improve error messages when property can not be set right now
  backends: Improve error messages when property can no longer be set
  qom: Improve error messages when property has no getter or setter

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 7208429223963c405c62fa2611398f1aa8033593
      
https://github.com/qemu/qemu/commit/7208429223963c405c62fa2611398f1aa8033593
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-10-30 (Sun, 30 Oct 2022)

  Changed paths:
    M backends/hostmem.c
    M hw/mem/nvdimm.c
    M hw/virtio/virtio-mem.c
    M include/qemu/osdep.h
    A include/qemu/thread-context.h
    M include/qemu/thread.h
    M include/sysemu/hostmem.h
    M meson.build
    M qapi/qom.json
    M softmmu/cpus.c
    M softmmu/vl.c
    M util/meson.build
    M util/oslib-posix.c
    M util/oslib-win32.c
    M util/qemu-thread-posix.c
    M util/qemu-thread-win32.c
    A util/thread-context.c

  Log Message:
  -----------
  Merge tag 'mem-2022-10-28' of https://github.com/davidhildenbrand/qemu into 
staging

Hi,

"Host Memory Backends" and "Memory devices" queue ("mem"):
- Fix NVDIMM error message
- Add ThreadContext user-creatable object and wire it up for NUMA-aware
  hostmem preallocation

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAmNbpHARHGRhdmlkQHJl
# ZGhhdC5jb20ACgkQTd4Q9wD/g1pDpw//bG9cyIlzTzDnU5pbQiXyLm0nF9tW/tli
# npGPSbFFYz/72XD9VJSVLhbNHoQSmFcMK5m/DA4WAMdOc5zF7lP3XdZcj72pDyxu
# 31hJRvuRhxNb09jhEdWRfX5+Jg9UyYXuIvtKXHSWgrtaYDtHBdTXq/ojZlvlo/rr
# 36v0jaVaTNRs7dKQL2oaN+DSMiPXHxBzA6FABqYmJNNwuMJT0kkX8pfz0OFwkRn+
# iqf9uRhM6b/fNNB0+ReA7FfGL+hzU6Uv8AvAL3orXUqjwPMRe9Fz2gE7HpFnE6DD
# dOP4Xk2iSSJ5XQA8HwtvrQfrGPh4gPYE80ziK/+8boy3alVeGYbYbvWVtdsNju41
# Cq9kM1wDyjZf6SSUIAbjOrNPdbhwyK4GviVBR1zh+/gA3uF5MhrDtZh4h3mWX2if
# ijmT9mfte4NwF3K1MvckAl7IHRb8nxmr7wjjhJ26JwpD+76lfAcmXC2YOlFGHCMi
# 028mjvThf3HW7BD2LjlQSX4UkHmM2vUBrgMGQKyeMham1VmMfSK32wzvUNfF7xSz
# o9k0loBh7unGcUsv3EbqUGswV5F6AgjK3vWRkDql8dNrdIoapDfaejPCd58kVM98
# 5N/aEoha4bAeJ6NGIKzD+4saiMxUqJ0y2NjSrE8iO4HszXgZW5e1Gbkn4Ae6d37D
# QSSqyfasVHY=
# =bLuc
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 28 Oct 2022 05:44:16 EDT
# gpg:                using RSA key 1BD9CAAD735C4C3A460DFCCA4DDE10F700FF835A
# gpg:                issuer "david@redhat.com"
# gpg: Good signature from "David Hildenbrand <david@redhat.com>" [unknown]
# gpg:                 aka "David Hildenbrand <davidhildenbrand@gmail.com>" 
[full]
# gpg:                 aka "David Hildenbrand <hildenbr@in.tum.de>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 1BD9 CAAD 735C 4C3A 460D  FCCA 4DDE 10F7 00FF 835A

* tag 'mem-2022-10-28' of https://github.com/davidhildenbrand/qemu:
  vl: Allow ThreadContext objects to be created before the sandbox option
  hostmem: Allow for specifying a ThreadContext for preallocation
  util: Make qemu_prealloc_mem() optionally consume a ThreadContext
  util: Add write-only "node-affinity" property for ThreadContext
  util: Introduce ThreadContext user-creatable object
  util: Introduce qemu_thread_set_affinity() and qemu_thread_get_affinity()
  util: Cleanup and rename os_mem_prealloc()
  hw/mem/nvdimm: fix error message for 'unarmed' flag

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


Compare: https://github.com/qemu/qemu/compare/75d30fde5548...720842922396



reply via email to

[Prev in Thread] Current Thread [Next in Thread]