qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 34f58d: Revert "qapi: fix examples of blockde


From: Paolo Bonzini
Subject: [Qemu-commits] [qemu/qemu] 34f58d: Revert "qapi: fix examples of blockdev-add with qc...
Date: Wed, 12 Oct 2022 13:05:21 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 34f58df51daf49863077d2b809f08510a20b4d9a
      
https://github.com/qemu/qemu/commit/34f58df51daf49863077d2b809f08510a20b4d9a
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M qapi/block-core.json

  Log Message:
  -----------
  Revert "qapi: fix examples of blockdev-add with qcow2"

This reverts commit b6522938327141235b97ab38e40c6c4512587373.

Kevin Wolf NAKed this patch, because:

    'file' is a required member (defined in BlockdevOptionsGenericFormat),
    removing it makes the example invalid. 'data-file' is only an additional
    optional member to be used for external data files (i.e. when the guest
    data is kept separate from the metadata in the .qcow2 file).

However, it had already been merged then.  Revert.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220930171908.846769-1-armbru@redhat.com>
Reviewed-by: Victor Toso <victortoso@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M include/qemu/coroutine.h

  Log Message:
  -----------
  coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()

qemu_coroutine_self() can be called from outside coroutine context,
returning the leader coroutine, and several such invocations currently
exist (mostly in qcow2 tracing calls).

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


  Commit: 82c45371ba698ff63e9d3d4792a34593f73e54d8
      
https://github.com/qemu/qemu/commit/82c45371ba698ff63e9d3d4792a34593f73e54d8
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/nvme.c

  Log Message:
  -----------
  block/nvme: separate nvme_get_free_req cases for coroutine/non-coroutine 
context

nvme_get_free_req has very difference semantics when called in
coroutine context (where it waits) and in non-coroutine context
(where it doesn't).  Split the two cases to make it clear what
is being requested.

Cc: qemu-block@nongnu.org
Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-2-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 881a4c553c06caa3b05a729b13d3cc781506c3a8
      
https://github.com/qemu/qemu/commit/881a4c553c06caa3b05a729b13d3cc781506c3a8
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

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

  Log Message:
  -----------
  block: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-3-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3840144987840131c6d490d2460443e4b9ef062e
      
https://github.com/qemu/qemu/commit/3840144987840131c6d490d2460443e4b9ef062e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

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

  Log Message:
  -----------
  qcow2: remove incorrect coroutine_fn annotations

This is incorrect because qcow2_mark_clean() calls qcow2_flush_caches().
qcow2_mark_clean() is called from non-coroutine context in
qcow2_inactivate() and qcow2_amend_options().

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


  Commit: 9fb26291acf9806e5b1211db2315e1d4140cfe40
      
https://github.com/qemu/qemu/commit/9fb26291acf9806e5b1211db2315e1d4140cfe40
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/block/nbd.h

  Log Message:
  -----------
  nbd: remove incorrect coroutine_fn annotations

nbd_co_establish_connection_cancel() cancels a coroutine but is not called
from coroutine context itself, for example in nbd_cancel_in_flight()
and in timer callbacks reconnect_delay_timer_cb() and open_timer_cb().

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


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

  Changed paths:
    M include/qemu/coroutine.h
    M util/qemu-coroutine.c

  Log Message:
  -----------
  coroutine: remove incorrect coroutine_fn annotations

qemu_coroutine_get_aio_context inspects a coroutine, but it does
not have to be called from the coroutine itself (or from any
coroutine).

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


  Commit: 617b4b17fbddb31742bb9a854e6acdbee65c4fc0
      
https://github.com/qemu/qemu/commit/617b4b17fbddb31742bb9a854e6acdbee65c4fc0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/blkverify.c

  Log Message:
  -----------
  blkverify: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


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

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


  Commit: 3d6dcf40cebca93b432bfd888009cb1bcaa70a40
      
https://github.com/qemu/qemu/commit/3d6dcf40cebca93b432bfd888009cb1bcaa70a40
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/iscsi.c

  Log Message:
  -----------
  iscsi: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-10-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 8e5a19df670423d5166351c38fa5b849d13ffb2e
      
https://github.com/qemu/qemu/commit/8e5a19df670423d5166351c38fa5b849d13ffb2e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/nbd.c

  Log Message:
  -----------
  nbd: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-11-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M block/nfs.c

  Log Message:
  -----------
  nfs: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


  Commit: 711b12e7c35fc0c8970ac9e8a8dca72e18458c09
      
https://github.com/qemu/qemu/commit/711b12e7c35fc0c8970ac9e8a8dca72e18458c09
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/nvme.c

  Log Message:
  -----------
  nvme: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-13-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 7644d2dca88916a0f69aa72a4e591c3d79c212db
      
https://github.com/qemu/qemu/commit/7644d2dca88916a0f69aa72a4e591c3d79c212db
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/parallels.c

  Log Message:
  -----------
  parallels: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-14-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 050ed2e7362c9086c07a86965ac754d1e46a7138
      
https://github.com/qemu/qemu/commit/050ed2e7362c9086c07a86965ac754d1e46a7138
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

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

  Log Message:
  -----------
  qcow2: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-15-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3e614042c4ab0f371351e1a8bf0577bd0c9defab
      
https://github.com/qemu/qemu/commit/3e614042c4ab0f371351e1a8bf0577bd0c9defab
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/copy-before-write.c

  Log Message:
  -----------
  copy-before-write: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-16-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 9bae2aca0f852e3b7547ef954e481c63aef1f553
      
https://github.com/qemu/qemu/commit/9bae2aca0f852e3b7547ef954e481c63aef1f553
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/curl.c

  Log Message:
  -----------
  curl: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


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

  Changed paths:
    M block/qed.c

  Log Message:
  -----------
  qed: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


  Commit: 2987ae7d84dd46e784effb2107a21489fab95781
      
https://github.com/qemu/qemu/commit/2987ae7d84dd46e784effb2107a21489fab95781
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-19-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 4cb1bc3464136832d936eca00330ad70d70d770e
      
https://github.com/qemu/qemu/commit/4cb1bc3464136832d936eca00330ad70d70d770e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/throttle.c

  Log Message:
  -----------
  throttle: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


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

  Changed paths:
    M block/vmdk.c

  Log Message:
  -----------
  vmdk: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-21-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 06753a0750a1973983505c2b544445042f555ba6
      
https://github.com/qemu/qemu/commit/06753a0750a1973983505c2b544445042f555ba6
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/qemu/job.h
    M job.c

  Log Message:
  -----------
  job: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


  Commit: 46cd09dee10d66a6943fa0c8b133355048e81206
      
https://github.com/qemu/qemu/commit/46cd09dee10d66a6943fa0c8b133355048e81206
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M util/qemu-coroutine-lock.c

  Log Message:
  -----------
  coroutine-lock: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

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


  Commit: 7390b08a2d021d9b5391c0d98fa959c5c2013be2
      
https://github.com/qemu/qemu/commit/7390b08a2d021d9b5391c0d98fa959c5c2013be2
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/raw-format.c

  Log Message:
  -----------
  raw-format: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-24-pbonzini@redhat.com>
[kwolf: Fixed up coding style]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 9204028dbbdaf742264c5de40dfcc3dfd43a6355
      
https://github.com/qemu/qemu/commit/9204028dbbdaf742264c5de40dfcc3dfd43a6355
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/9pfs/9p.h

  Log Message:
  -----------
  9p: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-25-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 38e8f9af08bc00939479131f38c95139d91ee126
      
https://github.com/qemu/qemu/commit/38e8f9af08bc00939479131f38c95139d91ee126
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-26-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: f7bbb1564d389e180c2dee7fbbad78b381e4d4ac
      
https://github.com/qemu/qemu/commit/f7bbb1564d389e180c2dee7fbbad78b381e4d4ac
  Author: Marc-André Lureau <marcandre.lureau@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/unit/test-coroutine.c

  Log Message:
  -----------
  test-coroutine: add missing coroutine_fn annotations

Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Alberto Faria <afaria@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220922084924.201610-27-pbonzini@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 2ffc10d53b6ab57ab228359709f8703b0b010430
      
https://github.com/qemu/qemu/commit/2ffc10d53b6ab57ab228359709f8703b0b010430
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/quorum.c

  Log Message:
  -----------
  quorum: Remove unnecessary forward declaration

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20221006122607.162769-1-kwolf@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 55c5a25a0363f153d8875a60001342eb6fe6e4f5
      
https://github.com/qemu/qemu/commit/55c5a25a0363f153d8875a60001342eb6fe6e4f5
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/qemu/job.h
    M job.c

  Log Message:
  -----------
  job.c: make job_mutex and job_lock/unlock() public

job mutex will be used to protect the job struct elements and list,
replacing AioContext locks.

Right now use a shared lock for all jobs, in order to keep things
simple. Once the AioContext lock is gone, we can introduce per-job
locks.

To simplify the switch from aiocontext to job lock, introduce
*nop* lock/unlock functions and macros.
We want to always call job_lock/unlock outside the AioContext locks,
and not vice-versa, otherwise we might get a deadlock. This is not
straightforward to do, and that's why we start with nop functions.
Once everything is protected by job_lock/unlock, we can change the nop into
an actual mutex and remove the aiocontext lock.

Since job_mutex is already being used, add static
real_job_{lock/unlock} for the existing usage.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-2-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M include/qemu/job.h

  Log Message:
  -----------
  job.h: categorize fields in struct Job

Categorize the fields in struct Job to understand which ones
need to be protected by the job mutex and which don't.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220926093214.506243-3-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 544f4d5258d4e4dd6652d28607b605e7801ed7dd
      
https://github.com/qemu/qemu/commit/544f4d5258d4e4dd6652d28607b605e7801ed7dd
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/qemu/job.h
    M job.c

  Log Message:
  -----------
  job.c: API functions not used outside should be static

job_event_* functions can all be static, as they are not used
outside job.c.

Same applies for job_txn_add_job().

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-4-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M include/block/aio-wait.h

  Log Message:
  -----------
  aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED

Same as AIO_WAIT_WHILE macro, but if we are in the Main loop
do not release and then acquire ctx_ 's aiocontext.

Once all Aiocontext locks go away, this macro will replace
AIO_WAIT_WHILE.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-5-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M include/qemu/job.h
    M job.c

  Log Message:
  -----------
  job.c: add job_lock/unlock while keeping job.h intact

With "intact" we mean that all job.h functions implicitly
take the lock. Therefore API callers are unmodified.

This means that:
- many static functions that will be always called with job lock held
  become _locked, and call _locked functions
- all public functions take the lock internally if needed, and call _locked
  functions
- all public functions called internally by other functions in job.c will have a
  _locked counterpart (sometimes public), to avoid deadlocks (job lock already 
taken).
  These functions are not used for now.
- some public functions called only from exernal files (not job.c) do not
  have _locked() counterpart and take the lock inside. Others won't need
  the lock at all because use fields only set at initialization and
  never modified.

job_{lock/unlock} is independent from real_job_{lock/unlock}.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-6-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M blockjob.c
    M job.c

  Log Message:
  -----------
  job: move and update comments from blockjob.c

This comment applies more on job, it was left in blockjob as in the past
the whole job logic was implemented there.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

No functional change intended.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220926093214.506243-7-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M blockjob.c
    M include/block/blockjob.h

  Log Message:
  -----------
  blockjob: introduce block_job _locked() APIs

Just as done with job.h, create _locked() functions in blockjob.h

These functions will be later useful when caller has already taken
the lock. All blockjob _locked functions call job _locked functions.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220926093214.506243-8-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 962411244192a21717dcce216ec7bbc44272184c
      
https://github.com/qemu/qemu/commit/962411244192a21717dcce216ec7bbc44272184c
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M blockdev.c
    M job-qmp.c

  Log Message:
  -----------
  jobs: add job lock in find_* functions

Both blockdev.c and job-qmp.c have TOC/TOU conditions, because
they first search for the job and then perform an action on it.
Therefore, we need to do the search + action under the same
job mutex critical section.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-9-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 191e7af3949b51a0a675a3e13539c17140dc2fba
      
https://github.com/qemu/qemu/commit/191e7af3949b51a0a675a3e13539c17140dc2fba
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/unit/test-bdrv-drain.c
    M tests/unit/test-block-iothread.c
    M tests/unit/test-blockjob-txn.c
    M tests/unit/test-blockjob.c

  Log Message:
  -----------
  jobs: use job locks also in the unit tests

Add missing job synchronization in the unit tests, with
explicit locks.

We are deliberately using _locked functions wrapped by a guard
instead of a normal call because the normal call will be removed
in future, as the only usage is limited to the tests.

In other words, if a function like job_pause() is/will be only used
in tests to avoid:

WITH_JOB_LOCK_GUARD(){
    job_pause_locked();
}

then it is not worth keeping job_pause(), and just use the guard.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-10-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 279ac06e55698b6152e7a6431f77b4db9d059002
      
https://github.com/qemu/qemu/commit/279ac06e55698b6152e7a6431f77b4db9d059002
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/mirror.c

  Log Message:
  -----------
  block/mirror.c: use of job helpers in drivers

Once job lock is used and aiocontext is removed, mirror has
to perform job operations under the same critical section,
Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-11-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 880eeec61329abc0aead900f0037fce91571b1ec
      
https://github.com/qemu/qemu/commit/880eeec61329abc0aead900f0037fce91571b1ec
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block.c
    M blockdev.c
    M blockjob.c
    M job-qmp.c
    M monitor/qmp-cmds.c
    M qemu-img.c

  Log Message:
  -----------
  jobs: group together API calls under the same job lock

Now that the API offers also _locked() functions, take advantage
of it and give also the caller control to take the lock and call
_locked functions.

This makes sense especially when we have for loops, because it
makes no sense to have:

for(job = job_next(); ...)

where each job_next() takes the lock internally.
Instead we want

JOB_LOCK_GUARD();
for(job = job_next_locked(); ...)

In addition, protect also direct field accesses, by either creating a
new critical section or widening the existing ones.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-12-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M job.c

  Log Message:
  -----------
  job: detect change of aiocontext within job coroutine

We want to make sure access of job->aio_context is always done
under either BQL or job_mutex. The problem is that using
aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond
makes the coroutine immediately resume, so we can't hold the job lock.
And caching it is not safe either, as it might change.

job_start is under BQL, so it can freely read job->aiocontext, but
job_enter_cond is not.
We want to avoid reading job->aio_context in job_enter_cond, therefore:
1) use aio_co_wake(), since it doesn't want an aiocontext as argument
   but uses job->co->ctx
2) detect possible discrepancy between job->co->ctx and job->aio_context
   by checking right after the coroutine resumes back from yielding if
   job->aio_context has changed. If so, reschedule the coroutine to the
   new context.

Calling bdrv_try_set_aio_context() will issue the following calls
(simplified):
* in terms of  bdrv callbacks:
  .drained_begin -> .set_aio_context -> .drained_end
* in terms of child_job functions:
  child_job_drained_begin -> child_job_set_aio_context -> child_job_drained_end
* in terms of job functions:
  job_pause_locked -> job_set_aio_context -> job_resume_locked

We can see that after setting the new aio_context, job_resume_locked
calls again job_enter_cond, which then invokes aio_co_wake(). But
while job->aiocontext has been set in job_set_aio_context,
job->co->ctx has not changed, so the coroutine would be entering in
the wrong aiocontext.

Using aio_co_schedule in job_resume_locked() might seem as a valid
alternative, but the problem is that the bh resuming the coroutine
is not scheduled immediately, and if in the meanwhile another
bdrv_try_set_aio_context() is run (see test_propagate_mirror() in
test-block-iothread.c), we would have the first schedule in the
wrong aiocontext, and the second set of drains won't even manage
to schedule the coroutine, as job->busy would still be true from
the previous job_resume_locked().

The solution is to stick with aio_co_wake() and detect every time
the coroutine resumes back from yielding if job->aio_context
has changed. If so, we can reschedule it to the new context.

Check for the aiocontext change in job_do_yield_locked because:
1) aio_co_reschedule_self requires to be in the running coroutine
2) since child_job_set_aio_context allows changing the aiocontext only
   while the job is paused, this is the exact place where the coroutine
   resumes, before running JobDriver's code.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220926093214.506243-13-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3ed4f708fe12537066d21f3dd111af013f7a6b8c
      
https://github.com/qemu/qemu/commit/3ed4f708fe12537066d21f3dd111af013f7a6b8c
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/replication.c
    M blockjob.c
    M include/qemu/job.h
    M job.c

  Log Message:
  -----------
  jobs: protect job.aio_context with BQL and job_mutex

In order to make it thread safe, implement a "fake rwlock",
where we allow reads under BQL *or* job_mutex held, but
writes only under BQL *and* job_mutex.

The only write we have is in child_job_set_aio_ctx, which always
happens under drain (so the job is paused).
For this reason, introduce job_set_aio_context and make sure that
the context is set under BQL, job_mutex and drain.
Also make sure all other places where the aiocontext is read
are protected.

The reads in commit.c and mirror.c are actually safe, because always
done under BQL.

Note: at this stage, job_{lock/unlock} and job lock guard macros
are *nop*.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220926093214.506243-14-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 3937e12cf8887660d86034c7d54c4f2236f0cb0e
      
https://github.com/qemu/qemu/commit/3937e12cf8887660d86034c7d54c4f2236f0cb0e
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/block/blockjob.h

  Log Message:
  -----------
  blockjob.h: categorize fields in struct BlockJob

The same job lock is being used also to protect some of blockjob fields.
Categorize them just as done in job.h.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220926093214.506243-15-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 243c6ec7fe8a2ce8bf1481444049ffce649c8f76
      
https://github.com/qemu/qemu/commit/243c6ec7fe8a2ce8bf1481444049ffce649c8f76
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M blockjob.c

  Log Message:
  -----------
  blockjob: rename notifier callbacks as _locked

They all are called with job_lock held, in job_event_*_locked()

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-16-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M block/mirror.c
    M blockjob.c

  Log Message:
  -----------
  blockjob: protect iostatus field in BlockJob struct

iostatus is the only field (together with .job) that needs
protection using the job mutex.

It is set in the main loop (GLOBAL_STATE functions) but read
in I/O code (block_job_error_action).

In order to protect it, change block_job_iostatus_set_err
to block_job_iostatus_set_err_locked(), always called under
job lock.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-17-eesposit@redhat.com>
[kwolf: Fixed up type of iostatus]
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 2fc3bdc3843d2d8bde54c2be4d4f4cc8a9ffcf50
      
https://github.com/qemu/qemu/commit/2fc3bdc3843d2d8bde54c2be4d4f4cc8a9ffcf50
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/qemu/job.h

  Log Message:
  -----------
  job.h: categorize JobDriver callbacks that need the AioContext lock

Some callbacks implementation use bdrv_* APIs that assume the
AioContext lock is held. Make sure this invariant is documented.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-18-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 6f592e5aca1a27fe1c1f661cfe68b35b90850acf
      
https://github.com/qemu/qemu/commit/6f592e5aca1a27fe1c1f661cfe68b35b90850acf
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/replication.c
    M blockdev.c
    M include/qemu/job.h
    M job-qmp.c
    M job.c
    M qemu-img.c
    M tests/unit/test-bdrv-drain.c
    M tests/unit/test-block-iothread.c
    M tests/unit/test-blockjob.c

  Log Message:
  -----------
  job.c: enable job lock/unlock and remove Aiocontext locks

Change the job_{lock/unlock} and macros to use job_mutex.

Now that they are not nop anymore, remove the aiocontext
to avoid deadlocks.

Therefore:
- when possible, remove completely the aiocontext lock/unlock pair
- if it is used by some other function too, reduce the locking
  section as much as possible, leaving the job API outside.
- change AIO_WAIT_WHILE in AIO_WAIT_WHILE_UNLOCKED, since we
  are not using the aiocontext lock anymore

The only functions that still need the aiocontext lock are:
- the JobDriver callbacks, already documented in job.h
- job_cancel_sync() in replication.c is called with aio_context_lock
  taken, but now job is using AIO_WAIT_WHILE_UNLOCKED so we need to
  release the lock.

Reduce the locking section to only cover the callback invocation
and document the functions that take the AioContext lock,
to avoid taking it twice.

Also remove real_job_{lock/unlock}, as they are replaced by the
public functions.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220926093214.506243-19-eesposit@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M blockjob.c

  Log Message:
  -----------
  block_job_query: remove atomic read

Not sure what the atomic here was supposed to do, since job.busy
is protected by the job lock. Since the whole function
is called under job_mutex, just remove the atomic.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-20-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


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

  Changed paths:
    M blockjob.c
    M include/block/blockjob.h

  Log Message:
  -----------
  blockjob: remove unused functions

These public functions are not used anywhere, thus can be dropped.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20220926093214.506243-21-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 9bd4d3c2e3d2e1df979e818ff0a5c05ca455721a
      
https://github.com/qemu/qemu/commit/9bd4d3c2e3d2e1df979e818ff0a5c05ca455721a
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/qemu/job.h
    M job.c
    M tests/unit/test-blockjob.c

  Log Message:
  -----------
  job: remove unused functions

These public functions are not used anywhere, thus can be dropped.
Also, since this is the final job API that doesn't use AioContext
lock and replaces it with job_lock, adjust all remaining function
documentation to clearly specify if the job lock is taken or not.

Also document the locking requirements for a few functions
where the second version is not removed.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220926093214.506243-22-eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: a7ca2eb488ff149c898f43abe103f8bd8e3ca3c4
      
https://github.com/qemu/qemu/commit/a7ca2eb488ff149c898f43abe103f8bd8e3ca3c4
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M block/file-posix.c

  Log Message:
  -----------
  file-posix: Remove unused s->discard_zeroes

The field is unused (only ever set, but never read) since commit
ac9185603. Additionally, the commit message of commit 34fa110e already
explained earlier why it's unreliable. Remove it.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20220923142838.91043-1-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>


  Commit: 02b61f38d3574900fb4cc4c450b17c75956a6a04
      
https://github.com/qemu/qemu/commit/02b61f38d3574900fb4cc4c450b17c75956a6a04
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  hw/virtio: incorporate backend features in features

There are some extra bits used over a vhost-user connection which are
hidden from the device itself. We need to set them here to ensure we
enable things like the protocol extensions.

Currently net/vhost-user.c has it's own inscrutable way of persisting
this data but it really should live in the core vhost_user code.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220726192150.2435175-7-alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-2-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: ea5d6ea7788c83216547fe72874033d4bf693182
      
https://github.com/qemu/qemu/commit/ea5d6ea7788c83216547fe72874033d4bf693182
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/hw/virtio/virtio.h

  Log Message:
  -----------
  include/hw/virtio: more comment for VIRTIO_F_BAD_FEATURE

When debugging a new vhost user you may be surprised to see
VHOST_USER_F_PROTOCOL getting squashed in the maze of
backend_features, acked_features and guest_features. Expand the
description here to help the next poor soul trying to work through
this.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Message-Id: <20220802095010.3330793-6-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: c7066f2d30d6d9c7f83cf741afb2f489e0cdd16d
      
https://github.com/qemu/qemu/commit/c7066f2d30d6d9c7f83cf741afb2f489e0cdd16d
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  include/hw: document vhost_dev feature life-cycle

Try and explicitly document the various state of feature bits as
related to the vhost_dev structure. Importantly the backend_features
can advertise things like VHOST_USER_F_PROTOCOL_FEATURES which is
never exposed to the driver and is only present in the vhost-user
feature negotiation.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220802095010.3330793-7-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: c97c76b3e75496e8d63ca6b754727446c4e74768
      
https://github.com/qemu/qemu/commit/c97c76b3e75496e8d63ca6b754727446c4e74768
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-user.c

  Log Message:
  -----------
  hw/virtio: fix some coding style issues

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220802095010.3330793-8-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: 8d11c10d0699d9ee9745b4b5bc138e573d852c0f
      
https://github.com/qemu/qemu/commit/8d11c10d0699d9ee9745b4b5bc138e573d852c0f
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/virtio/virtio.c

  Log Message:
  -----------
  hw/virtio: log potentially buggy guest drivers

If the guest driver attempts to use the UNUSED(30) bit it is
potentially buggy as 6.3 Legacy Interface: Reserved Feature Bits
states it "SHOULD NOT be negotiated". For now just log this guest
error.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220802095010.3330793-9-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: a27612311988aff8f29a68ed5eaecde3bf6cdf99
      
https://github.com/qemu/qemu/commit/a27612311988aff8f29a68ed5eaecde3bf6cdf99
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/virtio/trace-events
    M hw/virtio/vhost.c

  Log Message:
  -----------
  hw/virtio: add some vhost-user trace events

These are useful for tracing the lifetime of vhost-user connections.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-10-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: 9f6bcfd99f46377888059d8539befec9505f57fb
      
https://github.com/qemu/qemu/commit/9f6bcfd99f46377888059d8539befec9505f57fb
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/virtio/vhost-user-fs.c
    M hw/virtio/vhost-user-i2c.c
    M hw/virtio/vhost-user-rng.c
    M hw/virtio/vhost-user-vsock.c
    M hw/virtio/vhost-vsock.c
    M include/hw/virtio/virtio.h

  Log Message:
  -----------
  hw/virtio: move vm_running check to virtio_device_started

All the boilerplate virtio code does the same thing (or should at
least) of checking to see if the VM is running before attempting to
start VirtIO. Push the logic up to the common function to avoid
getting a copy and paste wrong.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-11-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b8f3e6a18de6ad5cb668c5430b4933f1e40783cf
      
https://github.com/qemu/qemu/commit/b8f3e6a18de6ad5cb668c5430b4933f1e40783cf
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/block/vhost-user-blk.c
    M hw/scsi/vhost-scsi.c
    M hw/scsi/vhost-user-scsi.c
    M hw/virtio/vhost-user-fs.c
    M hw/virtio/vhost-user-i2c.c
    M hw/virtio/vhost-user-rng.c
    M hw/virtio/vhost-user-vsock.c
    M hw/virtio/vhost-vsock-common.c
    M hw/virtio/vhost-vsock.c
    M include/hw/virtio/vhost.h

  Log Message:
  -----------
  hw/virtio: move vhd->started check into helper and add FIXME

The `started` field is manipulated internally within the vhost code
except for one place, vhost-user-blk via f5b22d06fb (vhost: recheck
dev state in the vhost_migration_log routine). Mark that as a FIXME
because it introduces a potential race. I think the referenced fix
should be tracking its state locally.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-12-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwittz@nutanix.com>


  Commit: 27ba7b027f0f06479091bcfbcd308a6b272563a4
      
https://github.com/qemu/qemu/commit/27ba7b027f0f06479091bcfbcd308a6b272563a4
  Author: Viresh Kumar <viresh.kumar@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M MAINTAINERS
    M hw/virtio/Kconfig
    M hw/virtio/meson.build
    M hw/virtio/trace-events
    A hw/virtio/vhost-user-gpio.c
    A include/hw/virtio/vhost-user-gpio.h

  Log Message:
  -----------
  hw/virtio: add boilerplate for vhost-user-gpio device

This creates the QEMU side of the vhost-user-gpio device which connects
to the remote daemon. It is based of vhost-user-i2c code.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: 
<5390324a748194a21bc99b1538e19761a8c64092.1641987128.git.viresh.kumar@linaro.org>
[AJB: fixes for qtest, tweaks to feature bits]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Vincent Whitchurch <vincent.whitchurch@axis.com>

Message-Id: <20220802095010.3330793-13-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 25c60a4612dd30976dc2c471ebe050dd5f6635a4
      
https://github.com/qemu/qemu/commit/25c60a4612dd30976dc2c471ebe050dd5f6635a4
  Author: Viresh Kumar <viresh.kumar@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M MAINTAINERS
    M hw/virtio/meson.build
    A hw/virtio/vhost-user-gpio-pci.c

  Log Message:
  -----------
  hw/virtio: add vhost-user-gpio-pci boilerplate

This allows is to instantiate a vhost-user-gpio device as part of a PCI
bus. It is mostly boilerplate which looks pretty similar to the
vhost-user-fs-pci device.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: 
<5f560cab92d0d789b1c94295ec74b9952907d69d.1641987128.git.viresh.kumar@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Message-Id: <20220802095010.3330793-14-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: bbd971153745ca2aa9a26b7d6370374ef559a328
      
https://github.com/qemu/qemu/commit/bbd971153745ca2aa9a26b7d6370374ef559a328
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/qos-test.c

  Log Message:
  -----------
  tests/qtest: pass stdout/stderr down to subtests

When trying to work out what the virtio-net-tests where doing it was
hard because the g_test_trap_subprocess redirects all output to
/dev/null. Lift this restriction by using the appropriate flags so you
can see something similar to what the vhost-user-blk tests show when
running.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220407150042.2338562-1-alex.bennee@linaro.org>

Message-Id: <20220802095010.3330793-15-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ebaa07083b57aab2d2dabf86d9bf172f43bad7a6
      
https://github.com/qemu/qemu/commit/ebaa07083b57aab2d2dabf86d9bf172f43bad7a6
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/qos-test.c

  Log Message:
  -----------
  tests/qtest: add a timeout for subprocess_run_one_test

Hangs have been observed in the tests and currently we don't timeout
if a subprocess hangs. Rectify that.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>

Message-Id: <20220802095010.3330793-16-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


  Commit: 30ea13e9d97dcbd4ea541ddf9e8857fa1d5cb30f
      
https://github.com/qemu/qemu/commit/30ea13e9d97dcbd4ea541ddf9e8857fa1d5cb30f
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/qos-test.c
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: use qos_printf instead of g_test_message

The vhost-user tests respawn qos-test as a standalone process. As a
result the gtester framework squashes all messages coming out of it
which make it hard to debug. As the test does not care about asserting
certain messages just convert the tests to use the direct qos_printf.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-17-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 20a4127fbd4f54ab5ff2e0f3538c2b8e89011bce
      
https://github.com/qemu/qemu/commit/20a4127fbd4f54ab5ff2e0f3538c2b8e89011bce
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: catch unhandled vhost-user messages

We don't need to action every message but lets document the ones we
are expecting to consume so future tests don't get confused about
unhandled bits.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Message-Id: <20220802095010.3330793-18-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f48d994fb50c49093dd1dfe64c0d7314c6b62faf
      
https://github.com/qemu/qemu/commit/f48d994fb50c49093dd1dfe64c0d7314c6b62faf
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: plain g_assert for VHOST_USER_F_PROTOCOL_FEATURES

checkpatch.pl warns that non-plain asserts should be avoided so
convert the check to a plain g_assert.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-19-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3bd869f36e3bec51969c8cdb0e3637312d85eb1b
      
https://github.com/qemu/qemu/commit/3bd869f36e3bec51969c8cdb0e3637312d85eb1b
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/libqos/virtio.c

  Log Message:
  -----------
  tests/qtest: add assert to catch bad features

No device driver (which is what the qvirtio_ access functions
represent) should be setting UNUSED(30) in the feature space. Although
existing libqos users mask it out lets ensure nothing sneaks through.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-20-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: ff070f602af6163b6ef4d803d5c3bde735035fed
      
https://github.com/qemu/qemu/commit/ff070f602af6163b6ef4d803d5c3bde735035fed
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: implement stub for VHOST_USER_GET_CONFIG

We don't implement the full solution because frankly none of the tests
need to at the moment. We may end up re-implementing libvhostuser in
the end.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-21-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 19d55a19a4b9151f15eb5e2b5d0610aa2a738c7c
      
https://github.com/qemu/qemu/commit/19d55a19a4b9151f15eb5e2b5d0610aa2a738c7c
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: add a get_features op to vhost-user-test

As we expand this test for more virtio devices we will need to support
different feature sets. Add a mandatory op field to fetch the list of
features needed for the test itself.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-22-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 8fcfc8235e43649cd4045c815abdaac078cff9c2
      
https://github.com/qemu/qemu/commit/8fcfc8235e43649cd4045c815abdaac078cff9c2
  Author: Alex Bennée <alex.bennee@linaro.org>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M MAINTAINERS
    M tests/qtest/libqos/meson.build
    A tests/qtest/libqos/virtio-gpio.c
    A tests/qtest/libqos/virtio-gpio.h
    M tests/qtest/libqos/virtio.c
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  tests/qtest: enable tests for virtio-gpio

We don't have a virtio-gpio implementation in QEMU and only
support a vhost-user backend. The QEMU side of the code is minimal so
it should be enough to instantiate the device and pass some vhost-user
messages over the control socket. To do this we hook into the existing
vhost-user-test code and just add the bits required for gpio.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Message-Id: <20220408155704.2777166-1-alex.bennee@linaro.org>

Message-Id: <20220802095010.3330793-23-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d74c30c81159d703fb4e1caa0ec6772ff89dd02f
      
https://github.com/qemu/qemu/commit/d74c30c81159d703fb4e1caa0ec6772ff89dd02f
  Author: Daniil Tatianin <d-tatianin@yandex-team.ru>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M hw/block/virtio-blk.c
    M hw/net/virtio-net.c
    M hw/virtio/virtio.c
    M include/hw/virtio/virtio.h

  Log Message:
  -----------
  virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

This is the first step towards moving all device config size calculation
logic into the virtio core code. In particular, this adds a struct that
contains all the necessary information for common virtio code to be able
to calculate the final config size for a device. This is expected to be
used with the new virtio_get_config_size helper, which calculates the
final length based on the provided host features.

This builds on top of already existing code like VirtIOFeature and
virtio_feature_get_config_size(), but adds additional fields, as well as
sanity checking so that device-specifc code doesn't have to duplicate it.

An example usage would be:

    static const VirtIOFeature dev_features[] = {
        {.flags = 1ULL << FEATURE_1_BIT,
         .end = endof(struct virtio_dev_config, feature_1)},
        {.flags = 1ULL << FEATURE_2_BIT,
         .end = endof(struct virtio_dev_config, feature_2)},
        {}
    };

    static const VirtIOConfigSizeParams dev_cfg_size_params = {
        .min_size = DEV_BASE_CONFIG_SIZE,
        .max_size = sizeof(struct virtio_dev_config),
        .feature_sizes = dev_features
    };

    // code inside my_dev_device_realize()
    size_t config_size = virtio_get_config_size(&dev_cfg_size_params,
                                                host_features);
    virtio_init(vdev, VIRTIO_ID_MYDEV, config_size);

Currently every device is expected to write its own boilerplate from the
example above in device_realize(), however, the next step of this
transition is moving VirtIOConfigSizeParams into VirtioDeviceClass,
so that it can be done automatically by the virtio initialization code.

All of the users of virtio_feature_get_config_size have been converted
to use virtio_get_config_size so it's no longer needed and is removed
with this commit.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Message-Id: <20220906073111.353245-2-d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: d9cf55a86d315efc9fa07daad72f74f769555183
      
https://github.com/qemu/qemu/commit/d9cf55a86d315efc9fa07daad72f74f769555183
  Author: Daniil Tatianin <d-tatianin@yandex-team.ru>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

  Changed paths:
    M MAINTAINERS
    M hw/block/meson.build
    A hw/block/virtio-blk-common.c
    M hw/block/virtio-blk.c
    A include/hw/virtio/virtio-blk-common.h

  Log Message:
  -----------
  virtio-blk: move config size params to virtio-blk-common

This way we can reuse it for other virtio-blk devices, e.g
vhost-user-blk, which currently does not control its config space size
dynamically.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20220906073111.353245-3-d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 246db16d43b664d7fbf1993858fe193feb712978
      
https://github.com/qemu/qemu/commit/246db16d43b664d7fbf1993858fe193feb712978
  Author: Daniil Tatianin <d-tatianin@yandex-team.ru>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

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

  Log Message:
  -----------
  vhost-user-blk: make it possible to disable write-zeroes/discard

It is useful to have the ability to disable these features for
compatibility with older VMs that don't have these implemented.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20220906073111.353245-4-d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: f1c25f295dc784a2e8270d94c8d12d8a55a0882c
      
https://github.com/qemu/qemu/commit/f1c25f295dc784a2e8270d94c8d12d8a55a0882c
  Author: Daniil Tatianin <d-tatianin@yandex-team.ru>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

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

  Log Message:
  -----------
  vhost-user-blk: make 'config_wce' part of 'host_features'

No reason to have this be a separate field. This also makes it more akin
to what the virtio-blk device does.

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20220906073111.353245-5-d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 8edd56735baa7f58aa504d0f2c4ed6f893630cce
      
https://github.com/qemu/qemu/commit/8edd56735baa7f58aa504d0f2c4ed6f893630cce
  Author: Daniil Tatianin <d-tatianin@yandex-team.ru>
  Date:   2022-10-07 (Fri, 07 Oct 2022)

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

  Log Message:
  -----------
  vhost-user-blk: dynamically resize config space based on features

Make vhost-user-blk backwards compatible when migrating from older VMs
running with modern features turned off, the same way it was done for
virtio-blk in 20764be0421c ("virtio-blk: set config size depending on the 
features enabled")

It's currently impossible to migrate from an older VM with
vhost-user-blk (with disable-legacy=off) because of errors like this:

qemu-system-x86_64: get_pci_config_device: Bad config data: i=0x10 read: 41 
device: 1 cmask: ff wmask: 80 w1cmask:0
qemu-system-x86_64: Failed to load PCIDevice:config
qemu-system-x86_64: Failed to load virtio-blk:virtio
qemu-system-x86_64: error while loading state for instance 0x0 of device 
'0000:00:05.0:00.0:02.0/virtio-blk'
qemu-system-x86_64: load of migration failed: Invalid argument

This is caused by the newer (destination) VM requiring a bigger BAR0
alignment because it has to cover a bigger configuration space, which
isn't actually needed since those additional config fields are not
active (write-zeroes/discard).

Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <20220906073111.353245-6-d-tatianin@yandex-team.ru>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: b1b146f53cad89ed51956f67bc5b672348753777
      
https://github.com/qemu/qemu/commit/b1b146f53cad89ed51956f67bc5b672348753777
  Author: Miguel Luis <miguel.luis@oracle.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: virt: allow acpi GTDT changes

Step 3 from bios-tables-test.c documented procedure.

Signed-off-by: Miguel Luis <miguel.luis@oracle.com>
Message-Id: <20220920162137.75239-2-miguel.luis@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>


  Commit: 5dbc9a27856b7b345c6cbd47eba0d730d9852ce1
      
https://github.com/qemu/qemu/commit/5dbc9a27856b7b345c6cbd47eba0d730d9852ce1
  Author: Miguel Luis <miguel.luis@oracle.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/arm/virt-acpi-build.c

  Log Message:
  -----------
  acpi: arm/virt: build_gtdt: fix invalid 64-bit physical addresses

Per the ACPI 6.5 specification, on the GTDT Table Structure, the Counter Control
Block Address and Counter Read Block Address fields of the GTDT table should be
set to 0xFFFFFFFFFFFFFFFF if not provided, rather than 0x0.

Fixes: 41041e57085 ("acpi: arm/virt: build_gtdt: use 
acpi_table_begin()/acpi_table_end() instead of build_header()")

Signed-off-by: Miguel Luis <miguel.luis@oracle.com>
Message-Id: <20220920162137.75239-3-miguel.luis@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>


  Commit: 0a17270761e7d90a67edadb19c7f6871387931be
      
https://github.com/qemu/qemu/commit/0a17270761e7d90a67edadb19c7f6871387931be
  Author: Miguel Luis <miguel.luis@oracle.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/data/acpi/virt/GTDT
    M tests/data/acpi/virt/GTDT.memhp
    M tests/data/acpi/virt/GTDT.numamem
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests/acpi: virt: update ACPI GTDT binaries

Step 6 & 7 of the bios-tables-test.c documented procedure.

Differences between disassembled ASL files for GTDT:

    @@ -13,14 +13,14 @@
     [000h 0000   4]                    Signature : "GTDT"    [Generic Timer 
Description Table]
     [004h 0004   4]                 Table Length : 00000060
     [008h 0008   1]                     Revision : 02
    -[009h 0009   1]                     Checksum : 8C
    +[009h 0009   1]                     Checksum : 9C
     [00Ah 0010   6]                       Oem ID : "BOCHS "
     [010h 0016   8]                 Oem Table ID : "BXPC    "
     [018h 0024   4]                 Oem Revision : 00000001
     [01Ch 0028   4]              Asl Compiler ID : "BXPC"
     [020h 0032   4]        Asl Compiler Revision : 00000001

    -[024h 0036   8]        Counter Block Address : 0000000000000000
    +[024h 0036   8]        Counter Block Address : FFFFFFFFFFFFFFFF
     [02Ch 0044   4]                     Reserved : 00000000

     [030h 0048   4]         Secure EL1 Interrupt : 0000001D
    @@ -46,16 +46,16 @@
                                     Trigger Mode : 0
                                         Polarity : 0
                                        Always On : 0
    -[050h 0080   8]   Counter Read Block Address : 0000000000000000
    +[050h 0080   8]   Counter Read Block Address : FFFFFFFFFFFFFFFF

     [058h 0088   4]         Platform Timer Count : 00000000
     [05Ch 0092   4]        Platform Timer Offset : 00000000

     Raw Table Data: Length 96 (0x60)

    -    0000: 47 54 44 54 60 00 00 00 02 8C 42 4F 43 48 53 20  // 
GTDT`.....BOCHS
    +    0000: 47 54 44 54 60 00 00 00 02 9C 42 4F 43 48 53 20  // 
GTDT`.....BOCHS
         0010: 42 58 50 43 20 20 20 20 01 00 00 00 42 58 50 43  // BXPC    
....BXPC
    -    0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // 
................
    +    0020: 01 00 00 00 FF FF FF FF FF FF FF FF 00 00 00 00  // 
................
         0030: 1D 00 00 00 00 00 00 00 1E 00 00 00 04 00 00 00  // 
................
         0040: 1B 00 00 00 00 00 00 00 1A 00 00 00 00 00 00 00  // 
................
    -    0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  // 
................
    +    0050: FF FF FF FF FF FF FF FF 00 00 00 00 00 00 00 00  // 
................

Signed-off-by: Miguel Luis <miguel.luis@oracle.com>
Message-Id: <20220920162137.75239-4-miguel.luis@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Ani Sinha <ani@anisinha.ca>


  Commit: 9c769e04465118601dea96b02c27887bd46cce25
      
https://github.com/qemu/qemu/commit/9c769e04465118601dea96b02c27887bd46cce25
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/mem/cxl_type3.c
    M include/hw/cxl/cxl_device.h

  Log Message:
  -----------
  mem/cxl-type3: Add sn option to provide serial number for PCI ecap

The Device Serial Number Extended Capability PCI r6.0 sec 7.9.3
provides a standard way to provide a device serial number as
an IEEE defined 64-bit extended unique identifier EUI-64.

CXL 2.0 section 8.1.12.2 Memory Device PCIe Capabilities and
Extended Capabilities requires this to be used to uniquely
identify CXL memory devices.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20220923161835.9805-1-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Ben Widawsky <bwidawsk@kernel.org>


  Commit: 20ca47429e96df84e7b2e741f740bfce8a813fb2
      
https://github.com/qemu/qemu/commit/20ca47429e96df84e7b2e741f740bfce8a813fb2
  Author: Peter Xu <peterx@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/intel_iommu.c

  Log Message:
  -----------
  Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

It's true that when vcpus<=255 we don't require the length of 32bit APIC
IDs.  However here since we already have EIM=ON it means the hypervisor
will declare the VM as x2apic supported (e.g. VT-d ECAP register will have
EIM bit 4 set), so the guest should assume the APIC IDs are 32bits width
even if vcpus<=255.  In short, commit 77250171bdc breaks any simple cmdline
that wants to boot a VM with >=9 but <=255 vcpus with:

  -device intel-iommu,intremap=on

For anyone who does not want to enable x2apic, we can use eim=off in the
intel-iommu parameters to skip enabling KVM x2apic.

This partly reverts commit 77250171bdc02aee106083fd2a068147befa1a38, while
keeping the valid bit on checking split irqchip, but revert the other change.

One thing to mention is that this patch may break migration compatibility
of such VM, however that's probably the best thing we can do, because the
old behavior was simply wrong and not working for >8 vcpus.  For <=8 vcpus,
there could be a light guest ABI change (by enabling KVM x2apic after this
patch), but logically it shouldn't affect the migration from working.

Also, this is not the 1st commit to change x2apic behavior.  Igor provided
a full history of how this evolved for the past few years:

https://lore.kernel.org/qemu-devel/20220922154617.57d1a1fb@redhat.com/

Relevant commits for reference:

  fb506e701e ("intel_iommu: reject broken EIM", 2016-10-17)
  c1bb5418e3 ("target/i386: Support up to 32768 CPUs without IRQ remapping", 
2020-12-10)
  77250171bd ("intel_iommu: Fix irqchip / X2APIC configuration checks", 
2022-05-16)
  dc89f32d92 ("target/i386: Fix sanity check on max APIC ID / X2APIC 
enablement", 2022-05-16)

We may want to have this for stable too (mostly for 7.1.0 only).  Adding a
fixes tag.

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Claudio Fontana <cfontana@suse.de>
Cc: Igor Mammedov <imammedo@redhat.com>
Fixes: 77250171bd ("intel_iommu: Fix irqchip / X2APIC configuration checks")
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220926153206.10881-1-peterx@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>


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

  Changed paths:
    M hw/virtio/meson.build
    A hw/virtio/virtio-stub.c
    M hw/virtio/virtio.c
    M include/hw/virtio/virtio.h
    M qapi/meson.build
    M qapi/qapi-schema.json
    A qapi/virtio.json
    M tests/qtest/qmp-cmd-test.c

  Log Message:
  -----------
  qmp: add QMP command x-query-virtio

This new command lists all the instances of VirtIODevices with
their canonical QOM path and name.

[Jonah: @virtio_list duplicates information that already exists in
 the QOM composition tree. However, extracting necessary information
 from this tree seems to be a bit convoluted.

 Instead, we still create our own list of realized virtio devices
 but use @qmp_qom_get with the device's canonical QOM path to confirm
 that the device exists and is realized. If the device exists but
 is actually not realized, then we remove it from our list (for
 synchronicity to the QOM composition tree).

 Also, the QMP command @x-query-virtio is redundant as @qom-list
 and @qom-get are sufficient to search '/machine/' for realized
 virtio devices. However, @x-query-virtio is much more convenient
 in listing realized virtio devices.]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-2-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 90c066cd6822fb5e892e3daedd0a72b40e33dc30
      
https://github.com/qemu/qemu/commit/90c066cd6822fb5e892e3daedd0a72b40e33dc30
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/virtio/virtio-stub.c
    M hw/virtio/virtio.c
    M qapi/virtio.json

  Log Message:
  -----------
  qmp: add QMP command x-query-virtio-status

This new command shows the status of a VirtIODevice, including
its corresponding vhost device's status (if active).

Next patch will improve output by decoding feature bits, including
vhost device's feature bits (backend, protocol, acked, and features).
Also will decode status bits of a VirtIODevice.

[Jonah: From patch v12; added a check to @virtio_device_find to ensure
 synchronicity between @virtio_list and the devices in the QOM
 composition tree.]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-3-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


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

  Changed paths:
    M hw/virtio/virtio.c
    M include/hw/virtio/vhost.h
    M include/hw/virtio/virtio.h
    M qapi/virtio.json

  Log Message:
  -----------
  qmp: decode feature & status bits in virtio-status

Display feature names instead of bitmaps for host, guest, and
backend for VirtIODevices.

Display status names instead of bitmaps for VirtIODevices.

Display feature names instead of bitmaps for backend, protocol,
acked, and features (hdev->features) for vhost devices.

Decode features according to device ID. Decode statuses
according to configuration status bitmap (config_status_map).
Decode vhost user protocol features according to vhost user
protocol bitmap (vhost_user_protocol_map).

Transport features are on the first line. Undecoded bits (if
any) are stored in a separate field.

[Jonah: Several changes made to this patch from prev. version (v14):
 - Moved all device features mappings to hw/virtio/virtio.c
 - Renamed device features mappings (less generic)
 - Generalized @FEATURE_ENTRY macro for all device mappings
 - Virtio device feature map definitions include descriptions of
   feature bits
 - Moved @VHOST_USER_F_PROTOCOL_FEATURES feature bit from transport
   feature map to vhost-user-supported device feature mappings
   (blk, fs, i2c, rng, net, gpu, input, scsi, vsock)
 - New feature bit added for virtio-vsock: @VIRTIO_VSOCK_F_SEQPACKET
 - New feature bit added for virtio-iommu: @VIRTIO_IOMMU_F_BYPASS_CONFIG
 - New feature bit added for virtio-mem: @VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
 - New virtio transport feature bit added: @VIRTIO_F_IN_ORDER
 - Added device feature map definition for virtio-rng
]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-4-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 07536ddda73a07bba6da8087fed5dd5a02320b11
      
https://github.com/qemu/qemu/commit/07536ddda73a07bba6da8087fed5dd5a02320b11
  Author: Laurent Vivier <lvivier@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/virtio/virtio-stub.c
    M hw/virtio/virtio.c
    M qapi/virtio.json

  Log Message:
  -----------
  qmp: add QMP commands for virtio/vhost queue-status

These new commands show the internal status of a VirtIODevice's
VirtQueue and a vhost device's vhost_virtqueue (if active).

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-5-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


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

  Changed paths:
    M hw/virtio/virtio-stub.c
    M hw/virtio/virtio.c
    M qapi/virtio.json

  Log Message:
  -----------
  qmp: add QMP command x-query-virtio-queue-element

This new command shows the information of a VirtQueue element.

[Note: Up until v10 of this patch series, virtio.json had many (15+)
 enums defined (e.g. decoded device features, statuses, etc.). In v10
 most of these enums were removed and replaced with string literals.
 By doing this we get (1) simpler schema, (2) smaller generated code,
 and (3) less maintenance burden for when new things are added (e.g.
 devices, device features, etc.).]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-6-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


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

  Changed paths:
    M hmp-commands-info.hx
    M include/monitor/hmp.h
    M monitor/hmp-cmds.c

  Log Message:
  -----------
  hmp: add virtio commands

This patch implements the HMP versions of the virtio QMP commands.

[Jonah: Adjusted hmp monitor output format for features / statuses
        with their descriptions.]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <1660220684-24909-7-git-send-email-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 31e039e76d60fab708d49444ba40effc3037670d
      
https://github.com/qemu/qemu/commit/31e039e76d60fab708d49444ba40effc3037670d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: Remove unused pci_get_*_by_mask() functions

The helper functions pci_get_{byte,word,long,quad}_by_mask()
were added in 2012 in commit c9f50cea70a1596. In the decade
since we have never added a single use of them.

The helpers clearly aren't that helpful, so drop them
rather than carrying around dead code.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220818135421.2515257-2-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 775cc426a986742fb252dd3aa865763c10cdb438
      
https://github.com/qemu/qemu/commit/775cc426a986742fb252dd3aa865763c10cdb438
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M include/hw/pci/pci.h

  Log Message:
  -----------
  pci: Sanity check mask argument to pci_set_*_by_mask()

Coverity complains that in functions like pci_set_word_by_mask()
we might end up shifting by more than 31 bits. This is true,
but only if the caller passes in a zero mask. Help Coverity out
by asserting that the mask argument is valid.

Fixes: CID 1487168

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220818135421.2515257-3-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: fd8caa253c56ed126c09d3b9cc682753ff12218f
      
https://github.com/qemu/qemu/commit/fd8caa253c56ed126c09d3b9cc682753ff12218f
  Author: Hal Martin <hal.martin@gmail.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/smbios/smbios.c
    M include/hw/firmware/smbios.h
    M qemu-options.hx

  Log Message:
  -----------
  hw/smbios: support for type 8 (port connector)

PATCH v1: add support for SMBIOS type 8 to qemu
PATCH v2: incorporate patch v1 feedback and add smbios type=8 to qemu-options

internal_reference: internal reference designator
external_reference: external reference designator
connector_type: hex value for port connector type (see SMBIOS 7.9.2)
port_type: hex value for port type (see SMBIOS 7.9.3)

After studying various vendor implementationsi (Dell, Lenovo, MSI),
the value of internal connector type was hard-coded to 0x0 (None).

Example usage:
-smbios 
type=8,internal_reference=JUSB1,external_reference=USB1,connector_type=0x12,port_type=0x10
 \
-smbios type=8,internal_reference=JAUD1,external_reference="Audio 
Jack",connector_type=0x1f,port_type=0x1d \
-smbios 
type=8,internal_reference=LAN,external_reference=Ethernet,connector_type=0x0b,port_type=0x1f
 \
-smbios 
type=8,internal_reference=PS2,external_reference=Mouse,connector_type=0x0f,port_type=0x0e
 \
-smbios 
type=8,internal_reference=PS2,external_reference=Keyboard,connector_type=0x0f,port_type=0x0d

Signed-off-by: Hal Martin <hal.martin@gmail.com>

Message-Id: <20220812135153.17859-1-hal.martin@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: beec628c80bbc9475b05f4465fe36188de14999e
      
https://github.com/qemu/qemu/commit/beec628c80bbc9475b05f4465fe36188de14999e
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: whitelist pc/q35 DSDT due to HPET AML move

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-2-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: e05acc360e50626e253ddfa185561b0383a8f3e0
      
https://github.com/qemu/qemu/commit/e05acc360e50626e253ddfa185561b0383a8f3e0
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: x86: deduplicate HPET AML building

HPET AML doesn't depend on piix4 nor q35, move code buiding it
to common scope to avoid duplication.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-3-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 4609296d0601f24899863d5a6895f31be6e4b897
      
https://github.com/qemu/qemu/commit/4609296d0601f24899863d5a6895f31be6e4b897
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.hpbrroot
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpierst
    M tests/data/acpi/q35/DSDT.acpihmat
    M tests/data/acpi/q35/DSDT.applesmc
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.cxl
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    M tests/data/acpi/q35/DSDT.ipmismbus
    M tests/data/acpi/q35/DSDT.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.numamem
    M tests/data/acpi/q35/DSDT.pvpanic-isa
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.viot
    M tests/data/acpi/q35/DSDT.xapic
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs after HPET move

HPET AML moved after PCI host bridge description (no functional change)

diff example for PC machine:

@@ -54,47 +54,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
         }
     }

-    Scope (_SB)
-    {
-        Device (HPET)
-        {
-            Name (_HID, EisaId ("PNP0103") /* HPET System Timer */)  // _HID: 
Hardware ID
-            Name (_UID, Zero)  // _UID: Unique ID
-            OperationRegion (HPTM, SystemMemory, 0xFED00000, 0x0400)
-            Field (HPTM, DWordAcc, Lock, Preserve)
-            {
-                VEND,   32,
-                PRD,    32
-            }
-
-            Method (_STA, 0, NotSerialized)  // _STA: Status
-            {
-                Local0 = VEND /* \_SB_.HPET.VEND */
-                Local1 = PRD /* \_SB_.HPET.PRD_ */
-                Local0 >>= 0x10
-                If (((Local0 == Zero) || (Local0 == 0xFFFF)))
-                {
-                    Return (Zero)
-                }
-
-                If (((Local1 == Zero) || (Local1 > 0x05F5E100)))
-                {
-                    Return (Zero)
-                }
-
-                Return (0x0F)
-            }
-
-            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
-            {
-                Memory32Fixed (ReadOnly,
-                    0xFED00000,         // Address Base
-                    0x00000400,         // Address Length
-                    )
-            })
-        }
-    }
-
     Scope (_SB.PCI0)
     {
         Device (ISA)
@@ -529,6 +488,47 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
         }
     }

+    Scope (_SB)
+    {
+        Device (HPET)
+        {
+            Name (_HID, EisaId ("PNP0103") /* HPET System Timer */)  // _HID: 
Hardware ID
+            Name (_UID, Zero)  // _UID: Unique ID
+            OperationRegion (HPTM, SystemMemory, 0xFED00000, 0x0400)
+            Field (HPTM, DWordAcc, Lock, Preserve)
+            {
+                VEND,   32,
+                PRD,    32
+            }
+
+            Method (_STA, 0, NotSerialized)  // _STA: Status
+            {
+                Local0 = VEND /* \_SB_.HPET.VEND */
+                Local1 = PRD /* \_SB_.HPET.PRD_ */
+                Local0 >>= 0x10
+                If (((Local0 == Zero) || (Local0 == 0xFFFF)))
+                {
+                    Return (Zero)
+                }
+
+                If (((Local1 == Zero) || (Local1 > 0x05F5E100)))
+                {
+                    Return (Zero)
+                }
+
+                Return (0x0F)
+            }
+
+            Name (_CRS, ResourceTemplate ()  // _CRS: Current Resource Settings
+            {
+                Memory32Fixed (ReadOnly,
+                    0xFED00000,         // Address Base
+                    0x00000400,         // Address Length
+                    )
+            })
+        }
+    }
+
     Scope (_SB)
     {
         Device (\_SB.PCI0.PRES)

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-4-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 31b5dd03908e0c78fe8ad27e10be630cec5d4a93
      
https://github.com/qemu/qemu/commit/31b5dd03908e0c78fe8ad27e10be630cec5d4a93
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: whitelist pc/q35 DSDT due to HPET AML move

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-5-imammedo@redhat.com>


  Commit: a12cf6923ce121633d877cf3ec53b2bcc85763ca
      
https://github.com/qemu/qemu/commit/a12cf6923ce121633d877cf3ec53b2bcc85763ca
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi: x86: refactor PDSM method to reduce nesting

.., it will help with code readability and make easier
to extend method in followup patches

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-6-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 467d099a2985c1e1bd41b234529d7f2262fd2e27
      
https://github.com/qemu/qemu/commit/467d099a2985c1e1bd41b234529d7f2262fd2e27
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  x86: acpi: _DSM: use Package to pass parameters

Numer of possible arguments to pass to a method is limited
in ACPI. The following patches will need to pass over more
parameters to PDSM method, will hit that limit.

Prepare for this by passing structure (Package) to method,
which let us workaround arguments limitation.
Pass to PDSM all standard arguments of _DSM as is, and
pack custom parameters into Package that is passed as
the last argument to PDSM.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-7-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 13508ea26a978e1326424ca80a1346c0492f3813
      
https://github.com/qemu/qemu/commit/13508ea26a978e1326424ca80a1346c0492f3813
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpierst
    M tests/data/acpi/q35/DSDT.acpihmat
    M tests/data/acpi/q35/DSDT.applesmc
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.cxl
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    M tests/data/acpi/q35/DSDT.ipmismbus
    M tests/data/acpi/q35/DSDT.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.nohpet
    M tests/data/acpi/q35/DSDT.numamem
    M tests/data/acpi/q35/DSDT.pvpanic-isa
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.viot
    M tests/data/acpi/q35/DSDT.xapic
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs

An intermediate blobs update to keep changes (last 2 patches)
reviewable.

Includes refactored PDSM that uses Package argument for custom
parameters.

 ===== PDSM taking package as arguments

             Return (Local0)
         }

-        Method (PDSM, 6, Serialized)
+        Method (PDSM, 5, Serialized)
         {
-            If ((Arg0 == ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") /* 
Device Labeling Interface */))
+            If ((Arg2 == Zero))
             {
-                Local0 = AIDX (Arg4, Arg5)
-                If ((Arg2 == Zero))
-                {
-                    If ((Arg1 == 0x02))
+                Local0 = Buffer (One)
                     {
-                        If (!((Local0 == Zero) | (Local0 == 0xFFFFFFFF)))
-                        {
-                            Return (Buffer (One)
-                            {
-                                 0x81                                          
   // .
-                            })
-                        }
+                         0x00                                             // .
                     }
+                Local1 = Zero
+                If ((Arg0 != ToUUID ("e5c937d0-3553-4d7a-9117-ea4d19c3434d") 
/* Device Labeling Interface */))
+                {
+                    Return (Local0)
+                }

-                    Return (Buffer (One)
-                    {
-                         0x00                                             // .
-                    })
+                If ((Arg1 < 0x02))
+                {
+                    Return (Local0)
                 }
-                ElseIf ((Arg2 == 0x07))
+
+                Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
+                    ))
+                If (!((Local2 == Zero) | (Local2 == 0xFFFFFFFF)))
                 {
-                    Local1 = Package (0x02)
-                        {
-                            Zero,
-                            ""
-                        }
-                    Local1 [Zero] = Local0
-                    Return (Local1)
+                    Local1 |= One
+                    Local1 |= (One << 0x07)
                 }
+
+                Local0 [Zero] = Local1
+                Return (Local0)
+            }
+
+            If ((Arg2 == 0x07))
+            {
+                Local0 = Package (0x02)
+                    {
+                        Zero,
+                        ""
+                    }
+                Local2 = AIDX (DerefOf (Arg4 [Zero]), DerefOf (Arg4 [One]
+                    ))
+                Local0 [Zero] = Local2
+                Return (Local0)
             }
         }
     }

 =====  PCI slot using Package to pass arguments to _DSM

                 Name (ASUN, Zero)
                 Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                 {
-                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, ASUN))
+                    Local0 = Package (0x02)
+                        {
+                            BSEL,
+                            ASUN
+                        }
+                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                 }
             }

 ===== hotpluggable PCI slot using Package to pass arguments to _DSM

                 Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                 {
-                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, BSEL, _SUN))
+                    Local0 = Package (0x02)
+                        {
+                            BSEL,
+                            _SUN
+                        }
+                    Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                 }
             }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-8-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 18a31b8d3e75f5bb727826dfe6a0c762536bf408
      
https://github.com/qemu/qemu/commit/18a31b8d3e75f5bb727826dfe6a0c762536bf408
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-9-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 5840a16364b8d7b474b2730a4c73ffb4c1dbaf47
      
https://github.com/qemu/qemu/commit/5840a16364b8d7b474b2730a4c73ffb4c1dbaf47
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  x86: acpi: cleanup PCI device _DSM duplication

add ASUN variable to hotpluggable slots and use it
instead of _SUN which has the same value to reuse
_DMS code on both branches (hot- and non-hotpluggable).
No functional change.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-10-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 01766490708273b66e7175c1ff5921edd934348e
      
https://github.com/qemu/qemu/commit/01766490708273b66e7175c1ff5921edd934348e
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs

It's expected that hotpluggable slots will, get ASUN variable
and use that instead of _SUN with its _DSM method.

For example:

  @@ -979,8 +979,9 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)

               Device (S18)
               {
  -                Name (_SUN, 0x03)  // _SUN: Slot User Number
  +                Name (ASUN, 0x03)
                   Name (_ADR, 0x00030000)  // _ADR: Address
  +                Name (_SUN, 0x03)  // _SUN: Slot User Number
                   Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
                   {
                       PCEJ (BSEL, _SUN)
  @@ -991,7 +992,7 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC    ", 
0x00000001)
                       Local0 = Package (0x02)
                           {
                               BSEL,
  -                            _SUN
  +                            ASUN
                           }
                       Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                   }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-11-imammedo@redhat.com>


  Commit: 5d08517fd723a8d2348a93a5706f6bd3aa659adf
      
https://github.com/qemu/qemu/commit/5d08517fd723a8d2348a93a5706f6bd3aa659adf
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: whitelist pc/q35 DSDT before moving _ADR field

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-12-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 366047d6251f931eb72049b8d32b0eb7f894cc4c
      
https://github.com/qemu/qemu/commit/366047d6251f931eb72049b8d32b0eb7f894cc4c
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  x86: pci: acpi: reorder Device's _ADR and _SUN fields

no functional change, align order of fields in empty slot
descriptor with a populated slot ordering.
Expected diff:
  -                Name (_SUN, 0x0X)  // _SUN: Slot User Number
                   Name (_ADR, 0xY)  // _ADR: Address
  ...
  +                Name (_SUN, 0xX)  // _SUN: Slot User Number

that will eliminate contextual changes (causing test failures)
when follow up patches merge code generating populated and empty
slots descriptors.

Put mandatory _ADR as the 1st field, then ASUN as it can be
present for both pupulated and empty slots and only then _SUN
which is present only when slot is hotpluggable.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-13-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 3c99559269ed6b6cc3051a1219e1785487b9249c
      
https://github.com/qemu/qemu/commit/3c99559269ed6b6cc3051a1219e1785487b9249c
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs

Expected change:
  -                Name (_SUN, 0x0X)  // _SUN: Slot User Number
                   Name (_ADR, 0xY)  // _ADR: Address
  ...
  +                Name (_SUN, 0xX)  // _SUN: Slot User Number

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-14-imammedo@redhat.com>


  Commit: 166cff2b8fa428ec411dd4beea98d8c4aa07f76d
      
https://github.com/qemu/qemu/commit/166cff2b8fa428ec411dd4beea98d8c4aa07f76d
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: whitelist pc/q35 DSDT before moving _ADR field

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-15-imammedo@redhat.com>


  Commit: 87debd32a8e0fe272135d50ffe52b9287ccbdbd7
      
https://github.com/qemu/qemu/commit/87debd32a8e0fe272135d50ffe52b9287ccbdbd7
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  x86: pci: acpi: reorder Device's _DSM method

align _DSM method in empty slot descriptor with
a populated slot position.
Expected change:
  +            Device (SE8)
  +            {
  +                Name (_ADR, 0x001D0000)  // _ADR: Address
  +                Name (ASUN, 0x1D)
                   Method (_DSM, 4, Serialized)  // _DSM: Device-Specific Method
                   {
                       Local0 = Package (0x02)
                           {
                               BSEL,
                               ASUN
                           }
                       Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                   }
  -            }

  -            Device (SE8)
  -            {
  -                Name (_ADR, 0x001D0000)  // _ADR: Address
  -                Name (ASUN, 0x1D)
                   Name (_SUN, 0x1D)  // _SUN: Slot User Number
                   Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
                   {
                       PCEJ (BSEL, _SUN)
                   }
  +            }

i.e. put _DSM right after ASUN, with _SUN/_EJ0 following it.

that will eliminate contextual changes (causing test failures)
when follow up patches merge code generating populated and empty
slots descriptors.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-16-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: 1ccd2220948c8d577ec8a3473a15f52ce2841800
      
https://github.com/qemu/qemu/commit/1ccd2220948c8d577ec8a3473a15f52ce2841800
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/qtest/bios-tables-test-allowed-diff.h

  Log Message:
  -----------
  tests: acpi: update expected blobs

    Expected change:
      +            Device (SE8)
      +            {
      +                Name (_ADR, 0x001D0000)  // _ADR: Address
      +                Name (ASUN, 0x1D)
                       Method (_DSM, 4, Serialized)  // _DSM: Device-Specific 
Method
                       {
                           Local0 = Package (0x02)
                               {
                                   BSEL,
                                   ASUN
                               }
                           Return (PDSM (Arg0, Arg1, Arg2, Arg3, Local0))
                       }
      -            }

      -            Device (SE8)
      -            {
      -                Name (_ADR, 0x001D0000)  // _ADR: Address
      -                Name (ASUN, 0x1D)
                       Name (_SUN, 0x1D)  // _SUN: Slot User Number
                       Method (_EJ0, 1, NotSerialized)  // _EJx: Eject Device
                       {
                           PCEJ (BSEL, _SUN)
                       }
      +            }

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-17-imammedo@redhat.com>


  Commit: 3216ab2acb08b47d4ff83e709406690d37e44aff
      
https://github.com/qemu/qemu/commit/3216ab2acb08b47d4ff83e709406690d37e44aff
  Author: Igor Mammedov <imammedo@redhat.com>
  Date:   2022-10-09 (Sun, 09 Oct 2022)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  x86: pci: acpi: consolidate PCI slots creation

No functional changes nor AML bytecode changes.
Consolidate code that generates empty and populated slot
descriptors. Besides eliminating duplication,
it helps consolidate conditions for generating
parts of Device{} desriptor in one place, which makes
code more compact and easier to read.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20220701133515.137890-18-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>


  Commit: bbde13cd14ad4eec18529ce0bf5876058464e124
      
https://github.com/qemu/qemu/commit/bbde13cd14ad4eec18529ce0bf5876058464e124
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/kvm.c

  Log Message:
  -----------
  target/arm/kvm: Retry KVM_CREATE_VM call if it fails EINTR

Occasionally the KVM_CREATE_VM ioctl can return EINTR, even though
there is no pending signal to be taken. In commit 94ccff13382055
we added a retry-on-EINTR loop to the KVM_CREATE_VM call in the
generic KVM code. Adopt the same approach for the use of the
ioctl in the Arm-specific KVM code (where we use it to create a
scratch VM for probing for various things).

For more information, see the mailing list thread:
https://lore.kernel.org/qemu-devel/8735e0s1zw.wl-maz@kernel.org/

Reported-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Vitaly Chikunov <vt@altlinux.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Message-id: 20220930113824.1933293-1-peter.maydell@linaro.org


  Commit: 06f2adccfa26be55237ac966c376a42c52efb299
      
https://github.com/qemu/qemu/commit/06f2adccfa26be55237ac966c376a42c52efb299
  Author: Jerome Forissier <jerome.forissier@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/cpu.h
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented

Updates write_scr() to allow setting SCR_EL3.EnTP2 when FEAT_SME is
implemented. SCR_EL3 being a 64-bit register, valid_mask is changed
to uint64_t and the SCR_* constants in target/arm/cpu.h are extended
to 64-bit so that masking and bitwise not (~) behave as expected.

This enables booting Linux with Trusted Firmware-A at EL3 with
"-M virt,secure=on -cpu max".

Cc: qemu-stable@nongnu.org
Fixes: 78cb9776662a ("target/arm: Enable SME for -cpu max")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221004072354.27037-1-jerome.forissier@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 86a85d73e3167c97da8f9680536af89e66943b76
      
https://github.com/qemu/qemu/commit/86a85d73e3167c97da8f9680536af89e66943b76
  Author: Joel Stanley <joel@jms.id.au>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M docs/system/arm/nuvoton.rst

  Log Message:
  -----------
  docs/nuvoton: Update URL for images

openpower.xyz was retired some time ago. The OpenBMC Jenkins is where
images can be found these days.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Hao Wu <wuhaotsh@google.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20221004050042.22681-1-joel@jms.id.au
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: c7637be307d36ad8c51bd0e9852e09115969bc29
      
https://github.com/qemu/qemu/commit/c7637be307d36ad8c51bd0e9852e09115969bc29
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Split s2walk_secure from ipa_secure in get_phys_addr

The starting security state comes with the translation regime,
not the current state of arm_is_secure_below_el3().

Create a new local variable, s2walk_secure, which does not need
to be written back to result->attrs.secure -- we compute that
value later, after the S2 walk is complete.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221001162318.153420-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 9b5ba97ac77889b9bf7d27d40da232ee8ff40b09
      
https://github.com/qemu/qemu/commit/9b5ba97ac77889b9bf7d27d40da232ee8ff40b09
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Make the final stage1+2 write to secure be unconditional

While the stage2 call to get_phys_addr_lpae should never set
attrs.secure when given a non-secure input, it's just as easy
to make the final update to attrs.secure be unconditional and
false in the case of non-secure input.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221007152159.1414065-1-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: c23f08a56cf01f947e2554339b42f641d5853d32
      
https://github.com/qemu/qemu/commit/c23f08a56cf01f947e2554339b42f641d5853d32
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Add is_secure parameter to get_phys_addr_lpae

Remove the use of regime_is_secure from get_phys_addr_lpae,
using the new parameter instead.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: bf25b7b079c523c8eeebb35c0f914dd2cf3fba24
      
https://github.com/qemu/qemu/commit/bf25b7b079c523c8eeebb35c0f914dd2cf3fba24
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Fix S2 disabled check in S1_ptw_translate

Pass the correct stage2 mmu_idx to regime_translation_disabled,
which we computed afterward.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221001162318.153420-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 7e80c0a4ff68da09e1de292e4660f959ffed6fcd
      
https://github.com/qemu/qemu/commit/7e80c0a4ff68da09e1de292e4660f959ffed6fcd
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Add is_secure parameter to regime_translation_disabled

Remove the use of regime_is_secure from regime_translation_disabled,
using the new parameter instead.

This fixes a bug in S1_ptw_translate and get_phys_addr where we had
passed ARMMMUIdx_Stage2 and not ARMMMUIdx_Stage2_S to determine if
Stage2 is disabled, affecting FEAT_SEL2.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: def8aa5b80a1c12a3a758801d585c0950867ac94
      
https://github.com/qemu/qemu/commit/def8aa5b80a1c12a3a758801d585c0950867ac94
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/internals.h
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Split out get_phys_addr_with_secure

Retain the existing get_phys_addr interface using the security
state derived from mmu_idx.  Move the kerneldoc comments to the
header file where they belong.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 9cd5f1710e2d786042f747f128bc9e954fd7f6c6
      
https://github.com/qemu/qemu/commit/9cd5f1710e2d786042f747f128bc9e954fd7f6c6
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/m_helper.c

  Log Message:
  -----------
  target/arm: Add is_secure parameter to v7m_read_half_insn

Remove the use of regime_is_secure from v7m_read_half_insn, using
the new parameter instead.

As it happens, both callers pass true, propagated from the argument
to arm_v7m_mmu_idx_for_secstate which created the mmu_idx argument,
but that is a detail of v7m_handle_execute_nsc we need not expose
to the callee.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: a393dee0194488d3e5f5f83e4ef7ea1f3556f44f
      
https://github.com/qemu/qemu/commit/a393dee0194488d3e5f5f83e4ef7ea1f3556f44f
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/cpu.h
    M target/arm/helper.c
    M target/arm/translate.c

  Log Message:
  -----------
  target/arm: Add TBFLAG_M32.SECURE

Remove the use of regime_is_secure from arm_tr_init_disas_context.
Instead, provide the value of v8m_secure directly from tb_flags.
Rather than use regime_is_secure, use the env->v7m.secure directly,
as per arm_mmu_idx_el.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 03bea66e7fa3af42976ceafb20512c59abf2e699
      
https://github.com/qemu/qemu/commit/03bea66e7fa3af42976ceafb20512c59abf2e699
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/internals.h
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Merge regime_is_secure into get_phys_addr

This is the last use of regime_is_secure; remove it
entirely before changing the layout of ARMMMUIdx.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 7aee3cb9569f83353b17df05dc9d3a7f791b5fdf
      
https://github.com/qemu/qemu/commit/7aee3cb9569f83353b17df05dc9d3a7f791b5fdf
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Add is_secure parameter to do_ats_write

Use get_phys_addr_with_secure directly.  For a-profile, this is the
one place where the value of is_secure may not equal arm_is_secure(env).

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-10-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: d902ae7558690a8442bf3560d5707167e485ab92
      
https://github.com/qemu/qemu/commit/d902ae7558690a8442bf3560d5707167e485ab92
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/cpu-param.h
    M target/arm/cpu.h
    M target/arm/helper.c
    M target/arm/internals.h
    M target/arm/ptw.c
    M target/arm/translate-a64.c
    M target/arm/translate.c

  Log Message:
  -----------
  target/arm: Fold secure and non-secure a-profile mmu indexes

For a-profile aarch64, which does not bank system registers, it takes
quite a lot of code to switch between security states.  In the process,
registers such as TCR_EL{1,2} must be swapped, which in itself requires
the flushing of softmmu tlbs.  Therefore it doesn't buy us anything to
separate tlbs by security state.

Retain the distinction between Stage2 and Stage2_S.

This will be important as we implement FEAT_RME, and do not wish to
add a third set of mmu indexes for Realm state.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 3b2af99313504b65f582e034cf505fea839984e9
      
https://github.com/qemu/qemu/commit/3b2af99313504b65f582e034cf505fea839984e9
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Reorg regime_translation_disabled

Use a switch on mmu_idx for the a-profile indexes, instead of
three different if's vs regime_el and arm_mmu_idx_is_stage1_of_2.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-12-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: fdf12933390119a06cfb74dc892c5ce868b6a963
      
https://github.com/qemu/qemu/commit/fdf12933390119a06cfb74dc892c5ce868b6a963
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M

The effect of TGE does not only apply to non-secure state,
now that Secure EL2 exists.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: b74c04431d0afac930634794c8a7b74ec0d8572b
      
https://github.com/qemu/qemu/commit/b74c04431d0afac930634794c8a7b74ec0d8572b
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/cpu.h
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Introduce arm_hcr_el2_eff_secstate

For page walking, we may require HCR for a security state
that is not "current".

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-14-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: ab1f78859dd711fed72b1aeb7e46e05b0273a017
      
https://github.com/qemu/qemu/commit/ab1f78859dd711fed72b1aeb7e46e05b0273a017
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Hoist read of *is_secure in S1_ptw_translate

Rename the argument to is_secure_ptr, and introduce a
local variable is_secure with the value.  We only write
back to the pointer toward the end of the function.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-15-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 72cef09caa2ce23324777676979c62bbdd02cb35
      
https://github.com/qemu/qemu/commit/72cef09caa2ce23324777676979c62bbdd02cb35
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Remove env argument from combined_attrs_fwb

This value is unused.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221001162318.153420-16-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: ac76c2e508871e8180780338aa035c67ece75888
      
https://github.com/qemu/qemu/commit/ac76c2e508871e8180780338aa035c67ece75888
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Pass HCR to attribute subroutines.

These subroutines did not need ENV for anything except
retrieving the effective value of HCR anyway.

We have computed the effective value of HCR in the callers,
and this will be especially important for interpreting HCR
in a non-current security state.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 2189c79858a9eadd85851afc2369d8679ecd563a
      
https://github.com/qemu/qemu/commit/2189c79858a9eadd85851afc2369d8679ecd563a
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Fix ATS12NSO* from S PL1

Use arm_hcr_el2_eff_secstate instead of arm_hcr_el2_eff, so
that we use is_secure instead of the current security state.
These AT* operations have been broken since arm_hcr_el2_eff
gained a check for "el2 enabled" for Secure EL2.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-18-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 448e42fdc1013b3497c9a6902f8052488fc8af1a
      
https://github.com/qemu/qemu/commit/448e42fdc1013b3497c9a6902f8052488fc8af1a
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Split out get_phys_addr_disabled

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221001162318.153420-19-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 5b74f9b4ed9033dc5427cd69f5ee37e7b726ecfd
      
https://github.com/qemu/qemu/commit/5b74f9b4ed9033dc5427cd69f5ee37e7b726ecfd
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Fix cacheattr in get_phys_addr_disabled

Do not apply memattr or shareability for Stage2 translations.
Make sure to apply HCR_{DC,DCT} only to Regime_EL10, per the
pseudocode in AArch64.S1DisabledOutput.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221001162318.153420-20-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 7fa7ea8f480cd6f3f5f2a9453eea5733510b6c8b
      
https://github.com/qemu/qemu/commit/7fa7ea8f480cd6f3f5f2a9453eea5733510b6c8b
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/helper.c
    M target/arm/internals.h
    M target/arm/m_helper.c
    M target/arm/ptw.c
    M target/arm/tlb_helper.c

  Log Message:
  -----------
  target/arm: Use tlb_set_page_full

Adjust GetPhysAddrResult to fill in CPUTLBEntryFull,
so that it may be passed directly to tlb_set_page_full.

The change is large, but mostly mechanical.  The major
non-mechanical change is page_size -> lg_page_size.
Most of the time this is obvious, and is related to
TARGET_PAGE_BITS.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221001162318.153420-21-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 0ff993193fe759b735e382fbe06b8258b537f95d
      
https://github.com/qemu/qemu/commit/0ff993193fe759b735e382fbe06b8258b537f95d
  Author: Jerome Forissier <jerome.forissier@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M hw/arm/boot.c

  Log Message:
  -----------
  hw/arm/boot: set CPTR_EL3.ESM and SCR_EL3.EnTP2 when booting Linux with EL3

According to the Linux kernel booting.rst [1], CPTR_EL3.ESM and
SCR_EL3.EnTP2 must be initialized to 1 when EL3 is present and FEAT_SME
is advertised. This has to be taken care of when QEMU boots directly
into the kernel (i.e., "-M virt,secure=on -cpu max -kernel Image").

Cc: qemu-stable@nongnu.org
Fixes: 78cb9776662a ("target/arm: Enable SME for -cpu max")
Link: [1] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/arm64/booting.rst?h=v6.0#n321
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Message-id: 20221003145641.1921467-1-jerome.forissier@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 104f703d93c9f12984a165985af653f83527c84e
      
https://github.com/qemu/qemu/commit/104f703d93c9f12984a165985af653f83527c84e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/cpu.h
    M target/arm/helper.c
    M target/arm/internals.h

  Log Message:
  -----------
  target/arm: Don't allow guest to use unimplemented granule sizes

Arm CPUs support some subset of the granule (page) sizes 4K, 16K and
64K.  The guest selects the one it wants using bits in the TCR_ELx
registers.  If it tries to program these registers with a value that
is either reserved or which requests a size that the CPU does not
implement, the architecture requires that the CPU behaves as if the
field was programmed to some size that has been implemented.
Currently we don't implement this, and instead let the guest use any
granule size, even if the CPU ID register fields say it isn't
present.

Make aa64_va_parameters() check against the supported granule size
and force use of a different one if it is not implemented.

(A subsequent commit will make ARMVAParameters use the new enum
rather than the current pair of using16k/using64k bools.)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221003162315.2833797-2-peter.maydell@linaro.org


  Commit: 3c003f7029eb322c15f137b33af1120096e14f4d
      
https://github.com/qemu/qemu/commit/3c003f7029eb322c15f137b33af1120096e14f4d
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M target/arm/helper.c
    M target/arm/internals.h
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Use ARMGranuleSize in ARMVAParameters

Now we have an enum for the granule size, use it in the
ARMVAParameters struct instead of the using16k/using64k bools.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221003162315.2833797-3-peter.maydell@linaro.org


  Commit: 915f62844cf62e428c7c178149b5ff1cbe129b07
      
https://github.com/qemu/qemu/commit/915f62844cf62e428c7c178149b5ff1cbe129b07
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M docs/system/arm/emulation.rst

  Log Message:
  -----------
  docs/system/arm/emulation.rst: Report FEAT_GTG support

FEAT_GTG is a change tho the ID register ID_AA64MMFR0_EL1 so that it
can report a different set of supported granule (page) sizes for
stage 1 and stage 2 translation tables.  As of commit c20281b2a5048
we already report the granule sizes that way for '-cpu max', and now
we also correctly make attempts to use unimplemented granule sizes
fail, so we can report the support of the feature in the
documentation.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221003162315.2833797-4-peter.maydell@linaro.org


  Commit: 7fa24b8d61be040ba58bed6fc1c16fd5fb7b6af0
      
https://github.com/qemu/qemu/commit/7fa24b8d61be040ba58bed6fc1c16fd5fb7b6af0
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-10-12 (Wed, 12 Oct 2022)

  Changed paths:
    M block.c
    M block/blkverify.c
    M block/block-backend.c
    M block/copy-before-write.c
    M block/curl.c
    M block/file-posix.c
    M block/io.c
    M block/iscsi.c
    M block/mirror.c
    M block/nbd.c
    M block/nfs.c
    M block/nvme.c
    M block/parallels.c
    M block/qcow2-cluster.c
    M block/qcow2-refcount.c
    M block/qcow2.c
    M block/qcow2.h
    M block/qed.c
    M block/quorum.c
    M block/raw-format.c
    M block/replication.c
    M block/throttle.c
    M block/vmdk.c
    M blockdev.c
    M blockjob.c
    M hw/9pfs/9p.h
    M include/block/aio-wait.h
    M include/block/blockjob.h
    M include/block/nbd.h
    M include/qemu/coroutine.h
    M include/qemu/job.h
    M job-qmp.c
    M job.c
    M migration/migration.c
    M monitor/qmp-cmds.c
    M qapi/block-core.json
    M qemu-img.c
    M tests/unit/test-bdrv-drain.c
    M tests/unit/test-block-iothread.c
    M tests/unit/test-blockjob-txn.c
    M tests/unit/test-blockjob.c
    M tests/unit/test-coroutine.c
    M util/qemu-coroutine-lock.c
    M util/qemu-coroutine.c

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

Block layer patches

- job: replace AioContext lock with job_mutex
- Fixes to make coroutine_fn annotations more accurate
- QAPI schema: Fix incorrect example
- Code cleanup

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmNAAz8RHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9a6zg//QYLx+FYMStb50lS+6VBio8AKOVbwn5zp
# ZANoXinMknnxI5wTldjkkM1cBRg27BVjpOHz4XemBtQgT5nBqWq8+Ov31lwASVID
# na/L9o4Pa0xmywM777K+edceWk0fpJTLmnFf1Qxan9qB/VSjNFtk+fjwFopoatKg
# XbHd6maQtrY8bIOyBsBoZozNaS39E/uPqkP67V6GF09re17f0PBctGHKFkTKZr8w
# 2HfyMt8/UIhFet++NFgxppTcvIKfZ20pk4AQ+yYsL+FxWr/cs4leKWl5BSc7thtP
# Sm/y0WiEB4nPNo4CSf9sA1Vo8EIGYzBhUVteqYQUF2vSXSzFmZb191fLJRYwp5bQ
# QxEmHzPVGqcUHr+jkfXI0yLolWduiKV1ATZ0zW3N41VfzGLYZdSgI2ZhbHJ0/yKO
# ZhyC63gye9V6TXxviYIz2V6iOD8QuwJ8X1P0E3yRsGploF1UY/N1lwbmek1XhFn/
# +xn/mrTeV0lu4wKuWRpUfY2C/7SR0Za6MB2GqduRWnbcAonLH3/syAxXSfu2611N
# Z1Cf9Wu8Mm0IQz0LbbVvEJZ4yoEPkg/tGH8q6dpau2uTfCb6sSylRxLcXEa5R0UQ
# W+wX5GSoTDe4DQKOSaJE7jWV/QwY5diTLHBIvSF8uKAfeCenkDDLowrMvbWafL0X
# XTFzpZ/1aA8=
# =jMFT
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 07 Oct 2022 06:45:19 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 git://repo.or.cz/qemu/kevin: (50 commits)
  file-posix: Remove unused s->discard_zeroes
  job: remove unused functions
  blockjob: remove unused functions
  block_job_query: remove atomic read
  job.c: enable job lock/unlock and remove Aiocontext locks
  job.h: categorize JobDriver callbacks that need the AioContext lock
  blockjob: protect iostatus field in BlockJob struct
  blockjob: rename notifier callbacks as _locked
  blockjob.h: categorize fields in struct BlockJob
  jobs: protect job.aio_context with BQL and job_mutex
  job: detect change of aiocontext within job coroutine
  jobs: group together API calls under the same job lock
  block/mirror.c: use of job helpers in drivers
  jobs: use job locks also in the unit tests
  jobs: add job lock in find_* functions
  blockjob: introduce block_job _locked() APIs
  job: move and update comments from blockjob.c
  job.c: add job_lock/unlock while keeping job.h intact
  aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED
  job.c: API functions not used outside should be static
  ...

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


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

  Changed paths:
    M docs/system/arm/emulation.rst
    M docs/system/arm/nuvoton.rst
    M hw/arm/boot.c
    M target/arm/cpu-param.h
    M target/arm/cpu.h
    M target/arm/helper.c
    M target/arm/internals.h
    M target/arm/kvm.c
    M target/arm/m_helper.c
    M target/arm/ptw.c
    M target/arm/tlb_helper.c
    M target/arm/translate-a64.c
    M target/arm/translate.c

  Log Message:
  -----------
  Merge tag 'pull-target-arm-20221010' of 
https://git.linaro.org/people/pmaydell/qemu-arm into staging

target-arm queue:
 * Retry KVM_CREATE_VM call if it fails EINTR
 * allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented
 * docs/nuvoton: Update URL for images
 * refactoring of page table walk code
 * hw/arm/boot: set CPTR_EL3.ESM and SCR_EL3.EnTP2 when booting Linux with EL3
 * Don't allow guest to use unimplemented granule sizes
 * Report FEAT_GTG support

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmNEK54ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3kzHD/9StYmulAf0iwe1ZNp6NavK
# CioOgZi6XyZl4rS2DrCf6/IO5XRFJP68byZd4Po554r2jcPc149yTuQAn4wb7d5e
# kejMZRQeWsXdxschhoVzDp9fgfzyZBn9X+gbdEZFFPWzOHMyWuu4cTok0dAKQvQY
# tZDLGmKeTv4MRUFJCri0310Sq0T0v/nAX/AyFtpvIr2SBx7DVCWYY02s5R4Yy5+M
# ntDWb0j12r78/bPwI1ll+g19JXUV5Tfh9AsbcYjKv45kdftz/Xc8fBiSiEpxyMrF
# mnVrr3kesZHOYAnOr2K1MnwsF0vU41kRg7kMRqSnu7pZXlI/8tmRyXoPR3c2aDbW
# Q5HWtsA48j2h0CJ0ESzl5SQnl3TSPa94m/HmpRSBFrYkU727QgnWDhUmBb4n54xs
# 9iBJDhcKGZLq68CB2+j6ENdRNTndolr14OwwEns0lbkoiCKUOQY3AigtZJQGRBGM
# J5r3ED7jfTWpvP6vpp5X484fK6KVprSMxsRFDkmiwhbb3J+WtKLxbSlgsWIrkZ7s
# +JgTGfGB8sD9hJVuFZYyPQb/XWP8Bb8jfgsLsTu1vW9Xs1ASrLimFYdRO3hhwSg3
# c5yubz6Vu9GB/JYh7hGprlMD5Yv48AA3if70hOu2d4P8A4OitavT7o+4Thwqjhds
# cSV1RsBJ8ha6L3CziZaKrQ==
# =s+1f
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 10 Oct 2022 10:26:38 EDT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [full]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" 
[full]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [unknown]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20221010' of 
https://git.linaro.org/people/pmaydell/qemu-arm: (28 commits)
  docs/system/arm/emulation.rst: Report FEAT_GTG support
  target/arm: Use ARMGranuleSize in ARMVAParameters
  target/arm: Don't allow guest to use unimplemented granule sizes
  hw/arm/boot: set CPTR_EL3.ESM and SCR_EL3.EnTP2 when booting Linux with EL3
  target/arm: Use tlb_set_page_full
  target/arm: Fix cacheattr in get_phys_addr_disabled
  target/arm: Split out get_phys_addr_disabled
  target/arm: Fix ATS12NSO* from S PL1
  target/arm: Pass HCR to attribute subroutines.
  target/arm: Remove env argument from combined_attrs_fwb
  target/arm: Hoist read of *is_secure in S1_ptw_translate
  target/arm: Introduce arm_hcr_el2_eff_secstate
  target/arm: Drop secure check for HCR.TGE vs SCTLR_EL1.M
  target/arm: Reorg regime_translation_disabled
  target/arm: Fold secure and non-secure a-profile mmu indexes
  target/arm: Add is_secure parameter to do_ats_write
  target/arm: Merge regime_is_secure into get_phys_addr
  target/arm: Add TBFLAG_M32.SECURE
  target/arm: Add is_secure parameter to v7m_read_half_insn
  target/arm: Split out get_phys_addr_with_secure
  ...

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


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

  Changed paths:
    M MAINTAINERS
    M hmp-commands-info.hx
    M hw/arm/virt-acpi-build.c
    M hw/block/meson.build
    M hw/block/vhost-user-blk.c
    A hw/block/virtio-blk-common.c
    M hw/block/virtio-blk.c
    M hw/i386/acpi-build.c
    M hw/i386/intel_iommu.c
    M hw/mem/cxl_type3.c
    M hw/net/virtio-net.c
    M hw/scsi/vhost-scsi.c
    M hw/scsi/vhost-user-scsi.c
    M hw/smbios/smbios.c
    M hw/virtio/Kconfig
    M hw/virtio/meson.build
    M hw/virtio/trace-events
    M hw/virtio/vhost-user-fs.c
    A hw/virtio/vhost-user-gpio-pci.c
    A hw/virtio/vhost-user-gpio.c
    M hw/virtio/vhost-user-i2c.c
    M hw/virtio/vhost-user-rng.c
    M hw/virtio/vhost-user-vsock.c
    M hw/virtio/vhost-user.c
    M hw/virtio/vhost-vsock-common.c
    M hw/virtio/vhost-vsock.c
    M hw/virtio/vhost.c
    A hw/virtio/virtio-stub.c
    M hw/virtio/virtio.c
    M include/hw/cxl/cxl_device.h
    M include/hw/firmware/smbios.h
    M include/hw/pci/pci.h
    M include/hw/virtio/vhost-user-blk.h
    A include/hw/virtio/vhost-user-gpio.h
    M include/hw/virtio/vhost.h
    A include/hw/virtio/virtio-blk-common.h
    M include/hw/virtio/virtio.h
    M include/monitor/hmp.h
    M monitor/hmp-cmds.c
    M qapi/meson.build
    M qapi/qapi-schema.json
    A qapi/virtio.json
    M qemu-options.hx
    M tests/data/acpi/pc/DSDT
    M tests/data/acpi/pc/DSDT.acpierst
    M tests/data/acpi/pc/DSDT.acpihmat
    M tests/data/acpi/pc/DSDT.bridge
    M tests/data/acpi/pc/DSDT.cphp
    M tests/data/acpi/pc/DSDT.dimmpxm
    M tests/data/acpi/pc/DSDT.hpbridge
    M tests/data/acpi/pc/DSDT.hpbrroot
    M tests/data/acpi/pc/DSDT.ipmikcs
    M tests/data/acpi/pc/DSDT.memhp
    M tests/data/acpi/pc/DSDT.nohpet
    M tests/data/acpi/pc/DSDT.numamem
    M tests/data/acpi/pc/DSDT.roothp
    M tests/data/acpi/q35/DSDT
    M tests/data/acpi/q35/DSDT.acpierst
    M tests/data/acpi/q35/DSDT.acpihmat
    M tests/data/acpi/q35/DSDT.applesmc
    M tests/data/acpi/q35/DSDT.bridge
    M tests/data/acpi/q35/DSDT.cphp
    M tests/data/acpi/q35/DSDT.cxl
    M tests/data/acpi/q35/DSDT.dimmpxm
    M tests/data/acpi/q35/DSDT.ipmibt
    M tests/data/acpi/q35/DSDT.ipmismbus
    M tests/data/acpi/q35/DSDT.ivrs
    M tests/data/acpi/q35/DSDT.memhp
    M tests/data/acpi/q35/DSDT.mmio64
    M tests/data/acpi/q35/DSDT.multi-bridge
    M tests/data/acpi/q35/DSDT.nohpet
    M tests/data/acpi/q35/DSDT.numamem
    M tests/data/acpi/q35/DSDT.pvpanic-isa
    M tests/data/acpi/q35/DSDT.tis.tpm12
    M tests/data/acpi/q35/DSDT.tis.tpm2
    M tests/data/acpi/q35/DSDT.viot
    M tests/data/acpi/q35/DSDT.xapic
    M tests/data/acpi/virt/GTDT
    M tests/data/acpi/virt/GTDT.memhp
    M tests/data/acpi/virt/GTDT.numamem
    M tests/qtest/libqos/meson.build
    A tests/qtest/libqos/virtio-gpio.c
    A tests/qtest/libqos/virtio-gpio.h
    M tests/qtest/libqos/virtio.c
    M tests/qtest/qmp-cmd-test.c
    M tests/qtest/qos-test.c
    M tests/qtest/vhost-user-test.c

  Log Message:
  -----------
  Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu 
into staging

pc,virtio: features, tests, fixes, cleanups

virtio introspection
new serial number opton for cxl
vhost user blk dynamic config size
virtio-gpio vhost user backend

Tests fixes cleanups all over the place

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmNEVeoPHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRph8YH+gMWpb5IglE0Q+H2JiQPBwB/Ghy1ohRKnOvZ
# lChB7+oy18o2xXRFTOXwG9Ijqsbdn0QMbU/r3NWxBuMzxDow012xiMDniJlJmcXw
# /4POOCSTKrIfzVBhsEErVSA9NwSE5cQKr1oiRBGIa9UdZfZ//v7s6SoP4vtyj8RZ
# UJVYVnMDtq/0PaN92IMs06lhqo/LkegE7gTGHMBf8Nvw4SgQoZgfPyp1eR+dKOhz
# lXNqqvTds9yt8yS65UWbuSrZ9d7GpCQf8nuyLaLaENHd6FQUVfmTTT37l2EKziwp
# PK0EwWMHeGkj7LHrylztradhE9xBlIW23ROP8wPdGZHmgLNHbC0=
# =20Zb
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 10 Oct 2022 13:27:06 EDT
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (55 
commits)
  x86: pci: acpi: consolidate PCI slots creation
  tests: acpi: update expected blobs
  x86: pci: acpi: reorder Device's _DSM method
  tests: acpi: whitelist pc/q35 DSDT before moving _ADR field
  tests: acpi: update expected blobs
  x86: pci: acpi: reorder Device's _ADR and _SUN fields
  tests: acpi: whitelist pc/q35 DSDT before moving _ADR field
  tests: acpi: update expected blobs
  x86: acpi: cleanup PCI device _DSM duplication
  tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN
  tests: acpi: update expected blobs
  x86: acpi: _DSM: use Package to pass parameters
  acpi: x86: refactor PDSM method to reduce nesting
  tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
  tests: acpi: update expected blobs after HPET move
  acpi: x86: deduplicate HPET AML building
  tests: acpi: whitelist pc/q35 DSDT due to HPET AML move
  hw/smbios: support for type 8 (port connector)
  pci: Sanity check mask argument to pci_set_*_by_mask()
  pci: Remove unused pci_get_*_by_mask() functions
  ...

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


Compare: https://github.com/qemu/qemu/compare/ab44ea105924...cdcb7dcb4017



reply via email to

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