Allow building accelerators as module.
Start with qtest as first user.
Signed-off-by: Gerd Hoffmann
---
accel/qtest/meson.build | 8 ++--
meson.build | 6 ++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/accel/qtest/meson.build b/accel/qtest/meson.build
index
Add module annotations for qtest so autoloading works.
Signed-off-by: Gerd Hoffmann
---
accel/qtest/qtest.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/accel/qtest/qtest.c b/accel/qtest/qtest.c
index edb29f6fa4c0..7e6b8110d52b 100644
--- a/accel/qtest/qtest.c
+++ b/accel/qtest/qtest.c
With target-specific modules we can have multiple modules implementing
the same object. Therefore we have to check the target arch on lookup
to find the correct module.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/util/module.c b/util/
Use module database to figure which module adds given QemuOpts group.
Signed-off-by: Gerd Hoffmann
---
softmmu/vl.c| 17 -
stubs/module-opts.c | 4
util/module.c | 19 +++
3 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/softmmu
Use module database to figure which module implements a given QOM type.
Drop hard-coded object list.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 77 ---
1 file changed, 24 insertions(+), 53 deletions(-)
diff --git a/util/module.c b/util/modul
Signed-off-by: Gerd Hoffmann
---
hw/s390x/virtio-ccw-gpu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/s390x/virtio-ccw-gpu.c b/hw/s390x/virtio-ccw-gpu.c
index 75a9e4bb3908..5868a2a07093 100644
--- a/hw/s390x/virtio-ccw-gpu.c
+++ b/hw/s390x/virtio-ccw-gpu.c
@@ -59,6 +59,7 @@ static
Signed-off-by: Gerd Hoffmann
---
block/iscsi-opts.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/iscsi-opts.c b/block/iscsi-opts.c
index afaf8837d6c1..4f2da405e645 100644
--- a/block/iscsi-opts.c
+++ b/block/iscsi-opts.c
@@ -68,3 +68,4 @@ static void iscsi_block_opts_init(void)
}
Build tcg accel ops as module.
Which is only a small fraction of tcg.
Also only x86 for now.
Signed-off-by: Gerd Hoffmann
---
accel/tcg/meson.build | 5 -
meson.build | 14 +-
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/accel/tcg/meson.build b/accel
Add module_allow_arch() to set the target architecture.
In case a module is limited to some arch verify arches
match and ignore the module if not.
Signed-off-by: Gerd Hoffmann
---
include/qemu/module.h | 1 +
softmmu/vl.c | 3 +++
util/module.c | 29 +++
Signed-off-by: Gerd Hoffmann
---
hw/usb/ccid-card-emulated.c | 1 +
hw/usb/ccid-card-passthru.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 5c76bed77aa0..6c8c0355e099 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/cc
Signed-off-by: Gerd Hoffmann
---
hw/display/qxl.c | 4
1 file changed, 4 insertions(+)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 6e1f8ff1b2a7..84f99088e0a0 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2522,6 +2522,7 @@ static const TypeInfo qxl_primary_info = {
Signed-off-by: Gerd Hoffmann
---
audio/spiceaudio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c
index 999bfbde47c5..a8d370fe6f31 100644
--- a/audio/spiceaudio.c
+++ b/audio/spiceaudio.c
@@ -317,3 +317,5 @@ static void register_audio_spice(void)
Add module annotations for tcg so autoloading works.
Signed-off-by: Gerd Hoffmann
---
accel/tcg/tcg-accel-ops.c | 1 +
accel/tcg/tcg-all.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
index 7191315aeed4..1a8e8390bd60 100644
---
Signed-off-by: Gerd Hoffmann
---
meson.build | 36
1 file changed, 36 insertions(+)
diff --git a/meson.build b/meson.build
index 9cf50a50d39a..e822477a231a 100644
--- a/meson.build
+++ b/meson.build
@@ -1781,6 +1781,7 @@ user_ss = ss.source_set()
util_ss = s
One for module load and one for qom type lookup.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 3 +++
util/trace-events | 4
2 files changed, 7 insertions(+)
diff --git a/util/module.c b/util/module.c
index a9ec2da9972e..acaaecad56c9 100644
--- a/util/module.c
+++ b/util/module.c
@@
Use module database for module dependencies.
Drop hard-coded dependency list.
Signed-off-by: Gerd Hoffmann
---
util/module.c | 55 ---
1 file changed, 21 insertions(+), 34 deletions(-)
diff --git a/util/module.c b/util/module.c
index 8d3e8275b9f7.
Signed-off-by: Gerd Hoffmann
---
hw/usb/redirect.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 6a75b0dc4ab2..4ec9326e0582 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -2608,6 +2608,7 @@ static const TypeInfo usbredir_dev_info = {
Call module_object_class_by_name() instead of object_class_by_name()
for objects possibly implemented as module
Signed-off-by: Gerd Hoffmann
---
accel/accel-common.c | 2 +-
accel/accel-softmmu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/accel/accel-common.c b/accel
This patch series adds support for module meta-data. Today this is
either hard-coded in qemu (see qemu_load_module_for_opts) or handled
with manually maintained lists in util/module (see module_deps[] and
qom_modules[]). This series replaced that scheme with annotation
macros, so the meta-data ca
Signed-off-by: Gerd Hoffmann
---
ui/egl-headless.c | 4
ui/gtk.c | 4
ui/sdl2.c | 4
ui/spice-app.c| 3 +++
ui/spice-core.c | 5 +
5 files changed, 20 insertions(+)
diff --git a/ui/egl-headless.c b/ui/egl-headless.c
index da377a74af69..75404e0e8700 10064
Signed-off-by: Gerd Hoffmann
---
chardev/baum.c | 1 +
chardev/spice.c | 4
2 files changed, 5 insertions(+)
diff --git a/chardev/baum.c b/chardev/baum.c
index 5deca778bc44..79d618e35045 100644
--- a/chardev/baum.c
+++ b/chardev/baum.c
@@ -680,6 +680,7 @@ static const TypeInfo char_braille
Signed-off-by: Gerd Hoffmann
---
hw/display/vhost-user-gpu-pci.c | 1 +
hw/display/vhost-user-gpu.c | 1 +
hw/display/vhost-user-vga.c | 1 +
hw/display/virtio-gpu-base.c| 1 +
hw/display/virtio-gpu-gl.c | 3 +++
hw/display/virtio-gpu-pci-gl.c | 3 +++
hw/display/virtio-gpu-pci.
Add script to collect the module meta-data from the source code,
store the results in *.modinfo files.
Signed-off-by: Gerd Hoffmann
---
scripts/modinfo-collect.py | 67 ++
meson.build| 11 +++
2 files changed, 78 insertions(+)
create mode
Add script to generate C source with a small
database containing the module meta-data.
Signed-off-by: Gerd Hoffmann
---
scripts/modinfo-generate.py | 84 +
include/qemu/module.h | 17
softmmu/vl.c| 4 ++
util/module.c
Add macros for module info annotations.
Instead of having that module meta-data stored in lists in util/module.c
place directly in the module source code.
Signed-off-by: Gerd Hoffmann
---
include/qemu/module.h | 25 +
1 file changed, 25 insertions(+)
diff --git a/includ
Recently we added support of zstd to qcow2 format, as zstd seems to be
better than zlib in general, and which is important (as qcow2
compression used mostly for backups) compressed writes are faster with
zstd.
Let's add a build option to use zstd by default.
Signed-off-by: Vladimir Sementsov-Ogie
From: Klaus Jensen
Prior to this patch, the aios associated with broadcast format are
submitted anonymously (no aiocb reference saved from the blk_aio call).
Fix this by formatting the namespaces one after another, saving a
reference to the aiocb for each.
Signed-off-by: Klaus Jensen
---
hw/n
From: Klaus Jensen
Before this patch the code would issue several aios simultaneously
without saving a reference to the aiocb. Without the aiocb reference the
individual copies cannot be canceled.
Fix this by issuing copies of the ranges one after another.
Signed-off-by: Klaus Jensen
---
hw/n
On Jun 7 11:47, Klaus Jensen wrote:
From: Klaus Jensen
Qiang Liu reported that an access on an unknown address is triggered in
memory_region_set_enabled because a check on CAP.PMRS is missing for the
PMRCTL register write when no PMR is configured.
Cc: qemu-sta...@nongnu.org
Fixes: 75c3c9de96
From: Klaus Jensen
The nvme_check_prinfo() and nvme_dif_check() functions operate on the
16 bit "control" member of the NvmeCmd. These functions do not otherwise
operate on an NvmeCmd or an NvmeRequest, so change them to expect the
actual 4 bit PRINFO field and add constants that work on this fie
From: Klaus Jensen
Prepare nvme_dif_pract_generate_dif() and nvme_dif_check() to be
callable in smaller increments by making the reftag a pointer parameter
updated by the function.
Signed-off-by: Klaus Jensen
---
hw/nvme/nvme.h | 4 ++--
hw/nvme/ctrl.c | 10 +-
hw/nvme/dif.c | 22 +++
From: Klaus Jensen
This partially reverts commit 98f84f5a4eca5c03e32fff20f246d9b4b96d6422.
Since all "multi aio" commands are now reimplemented to properly track
the nested aiocbs, we can revert the "hack" that was introduced to make
sure all requests we're properly drained upon sq deletion.
Th
From: Klaus Jensen
Some commands report additional useful information in dw0 and dw1 of the
completion queue entry.
Add them to the trace.
Signed-off-by: Klaus Jensen
---
hw/nvme/ctrl.c | 2 ++
hw/nvme/trace-events | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw
From: Klaus Jensen
Prior to this patch, the aios associated with zone reset are submitted
anonymously (no reference saved to the aiocb from the blk_aio call).
Fix this by resetting the zones one after another, saving a reference to
the aiocb for each reset.
Signed-off-by: Klaus Jensen
---
hw/
From: Klaus Jensen
Make nvme_get_zone_by_slba() return NULL if the slba is out of range.
This allows the function to be used without guarding the call with a
call to nvme_check_bounds(), in preparation for the next patch.
Add asserts after calling nvme_get_zone_by_slba() instead.
Signed-off-by:
From: Klaus Jensen
Pull the gist of nvme_check_dulbe() into a helper function. This is in
preparation for dsm refactoring.
Signed-off-by: Klaus Jensen
---
hw/nvme/ctrl.c | 41 -
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/hw/nvme/ctrl
From: Klaus Jensen
Prior to this patch, a loop was used to issue multiple "fire and forget"
aios for each range in the command. Without a reference to the aiocb
returned from the blk_aio_pdiscard calls, the aios cannot be canceled.
Fix this by processing the ranges one after another.
As a bonus
From: Klaus Jensen
Prior to this patch, a broadcast flush would result in submitting
multiple "fire and forget" aios (no reference saved to the aiocbs
returned from the blk_aio_flush calls).
Fix this by issuing the flushes one after another.
Signed-off-by: Klaus Jensen
---
hw/nvme/nvme.h
From: Klaus Jensen
This series reimplements flush, dsm, copy, zone reset and format nvm to
allow cancellation. I posted an RFC back in March ("hw/block/nvme:
convert ad-hoc aio tracking to aiocb") and I've applied some feedback
from Stefan and reimplemented the remaining commands.
The basic idea
From: Klaus Jensen
Jakub noticed[1] that, when using pin-based interrupts, the device will
unconditionally deasssert when any CQEs are acknowledged. However, the
pin should not be deasserted if other completion queues still holds
unacknowledged CQEs.
The bug is an artifact of commit ca247d35098d
On Jun 17 07:50, Keith Busch wrote:
On Thu, Jun 17, 2021 at 12:08:20PM +0200, Klaus Jensen wrote:
if (cq->tail != cq->head) {
+if (!pending) {
+n->cq_pending++;
+}
You should check cq->irq_enabled before incrementing cq_pending. You
don't want to leave the irq
15.06.2021 23:47, Eric Blake wrote:
From: Vladimir Sementsov-Ogievskiy
block/nbd doesn't need underlying sioc channel anymore. So, we can
update nbd/client-connection interface to return only one top-most io
channel, which is more straight forward.
Signed-off-by: Vladimir Sementsov-Ogievskiy
On 6/17/21 2:40 PM, Maxim Levitsky wrote:
> On Mon, 2021-06-14 at 18:03 +0200, Philippe Mathieu-Daudé wrote:
>> On 6/11/21 1:46 PM, Philippe Mathieu-Daudé wrote:
>>> When the NVMe block driver was introduced (see commit bdd6a90a9e5,
>>> January 2018), Linux VFIO_IOMMU_MAP_DMA ioctl was only returni
Starting from ceph Pacific, RBD has built-in support for image-level encryption.
Currently supported formats are LUKS version 1 and 2.
There are 2 new relevant librbd APIs for controlling encryption, both expect an
open image context:
rbd_encryption_format: formats an image (i.e. writes the LUKS
bdrv_co_block_status() does it for us, we do not need to do it here.
The advantage of not capping *pnum is that bdrv_co_block_status() can
cache larger data regions than requested by its caller.
Signed-off-by: Max Reitz
---
block/iscsi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/blo
bdrv_co_block_status() does it for us, we do not need to do it here.
The advantage of not capping *pnum is that bdrv_co_block_status() can
cache larger data regions than requested by its caller.
Signed-off-by: Max Reitz
---
block/gluster.c | 7 ---
1 file changed, 4 insertions(+), 3 deletio
As we have attempted before
(https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html,
"file-posix: Cache lseek result for data regions";
https://lists.nongnu.org/archive/html/qemu-block/2021-02/msg00934.html,
"file-posix: Cache next hole"), this patch seeks to reduce the number of
SEEK_
bdrv_co_block_status() does it for us, we do not need to do it here.
The advantage of not capping *pnum is that bdrv_co_block_status() can
cache larger data regions than requested by its caller.
Signed-off-by: Max Reitz
---
block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
bdrv_co_block_status() does it for us, we do not need to do it here.
The advantage of not capping *pnum is that bdrv_co_block_status() can
cache larger data regions than requested by its caller.
Signed-off-by: Max Reitz
---
block/file-posix.c | 7 ---
1 file changed, 4 insertions(+), 3 dele
Hi,
We’ve already had two attempts at introducing a block-status cache for
data regions
(https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg06451.html,
"file-posix: Cache lseek result for data regions";
https://lists.nongnu.org/archive/html/qemu-block/2021-02/msg00934.html,
"file-posix: Cach
There is a comment above the BDS definition stating care must be taken
to consider handling newly added fields in bdrv_append().
Actually, this comment should have said "bdrv_swap()" as of 4ddc07cac
(nine years ago), and in any case, bdrv_swap() was dropped in
8e419aefa (six years ago). So no suc
On Thu, Jun 17, 2021 at 12:08:20PM +0200, Klaus Jensen wrote:
> if (cq->tail != cq->head) {
> +if (!pending) {
> +n->cq_pending++;
> +}
You should check cq->irq_enabled before incrementing cq_pending. You
don't want to leave the irq asserted when polled queues have
On Wed, May 19, 2021 at 4:27 PM Peter Lieven wrote:
>
> Signed-off-by: Peter Lieven
> ---
> block/rbd.c | 255 ++--
> 1 file changed, 87 insertions(+), 168 deletions(-)
>
> diff --git a/block/rbd.c b/block/rbd.c
> index 97a2ae4c84..0d8612a988 10064
On 6/17/21 12:09 PM, Klaus Jensen wrote:
On Jun 17 12:08, Klaus Jensen wrote:
From: Klaus Jensen
Jakub noticed[1] that, when using pin-based interrupts, the device will
unconditionally deasssert when any CQEs are acknowledged. However, the
pin should not be deasserted if other completion queue
On Mon, 2021-06-14 at 18:03 +0200, Philippe Mathieu-Daudé wrote:
> On 6/11/21 1:46 PM, Philippe Mathieu-Daudé wrote:
> > When the NVMe block driver was introduced (see commit bdd6a90a9e5,
> > January 2018), Linux VFIO_IOMMU_MAP_DMA ioctl was only returning
> > -ENOMEM in case of error. The driver w
On Jun 17 12:08, Klaus Jensen wrote:
From: Klaus Jensen
Jakub noticed[1] that, when using pin-based interrupts, the device will
unconditionally deasssert when any CQEs are acknowledged. However, the
pin should not be deasserted if other completion queues still holds
unacknowledged CQEs.
The bu
From: Klaus Jensen
Jakub noticed[1] that, when using pin-based interrupts, the device will
unconditionally deasssert when any CQEs are acknowledged. However, the
pin should not be deasserted if other completion queues still holds
unacknowledged CQEs.
The bug is an artifact of commit ca247d35098d
On Jun 14 21:59, Gollu Appalanaidu wrote:
Add the controller identifiers list CNS 0x13, available list of ctrls
in NVM Subsystem that may or may not be attached to namespaces.
In Identify Ctrl List of the CNS 0x12 and 0x13 no endian conversion
for the nsid field.
These two CNS values shows affe
58 matches
Mail list logo