* [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 17:20 ` Manos Pitsidianakis
2023-10-17 14:01 ` [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros Philippe Mathieu-Daudé
` (7 subsequent siblings)
8 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
The get_memory_region() handler is used when (un)plugging the
device, which can only occur *after* it is realized.
virtio_pmem_realize() ensure the instance can not be realized
without 'memdev'. Remove the superfluous check, replacing it
by an assertion.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/virtio/virtio-pmem.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
index c3512c2dae..cc24812d2e 100644
--- a/hw/virtio/virtio-pmem.c
+++ b/hw/virtio/virtio-pmem.c
@@ -147,10 +147,7 @@ static void virtio_pmem_fill_device_info(const VirtIOPMEM *pmem,
static MemoryRegion *virtio_pmem_get_memory_region(VirtIOPMEM *pmem,
Error **errp)
{
- if (!pmem->memdev) {
- error_setg(errp, "'%s' property must be set", VIRTIO_PMEM_MEMDEV_PROP);
- return NULL;
- }
+ assert(pmem->memdev);
return &pmem->memdev->mr;
}
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion
2023-10-17 14:01 ` [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion Philippe Mathieu-Daudé
@ 2023-10-17 17:20 ` Manos Pitsidianakis
0 siblings, 0 replies; 26+ messages in thread
From: Manos Pitsidianakis @ 2023-10-17 17:20 UTC (permalink / raw)
To: qemu-arm, Philippe Mathieu-Daudé , qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>The get_memory_region() handler is used when (un)plugging the
>device, which can only occur *after* it is realized.
>
>virtio_pmem_realize() ensure the instance can not be realized
>without 'memdev'. Remove the superfluous check, replacing it
>by an assertion.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>---
> hw/virtio/virtio-pmem.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
>diff --git a/hw/virtio/virtio-pmem.c b/hw/virtio/virtio-pmem.c
>index c3512c2dae..cc24812d2e 100644
>--- a/hw/virtio/virtio-pmem.c
>+++ b/hw/virtio/virtio-pmem.c
>@@ -147,10 +147,7 @@ static void virtio_pmem_fill_device_info(const VirtIOPMEM *pmem,
> static MemoryRegion *virtio_pmem_get_memory_region(VirtIOPMEM *pmem,
> Error **errp)
> {
>- if (!pmem->memdev) {
>- error_setg(errp, "'%s' property must be set", VIRTIO_PMEM_MEMDEV_PROP);
>- return NULL;
>- }
>+ assert(pmem->memdev);
>
> return &pmem->memdev->mr;
> }
>--
>2.41.0
>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
2023-10-17 14:01 ` [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 17:15 ` Manos Pitsidianakis
2023-10-17 20:09 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro Philippe Mathieu-Daudé
` (6 subsequent siblings)
8 siblings, 2 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/block/vhost-user-blk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index eecf3f7a81..4b37e26120 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -405,7 +405,7 @@ static void vhost_user_blk_event(void *opaque, QEMUChrEvent event)
static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
{
- DeviceState *dev = &s->parent_obj.parent_obj;
+ DeviceState *dev = DEVICE(s);
int ret;
s->connected = false;
@@ -423,7 +423,7 @@ static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
assert(s->connected);
ret = vhost_dev_get_config(&s->dev, (uint8_t *)&s->blkcfg,
- s->parent_obj.config_len, errp);
+ VIRTIO_DEVICE(s)->config_len, errp);
if (ret < 0) {
qemu_chr_fe_disconnect(&s->chardev);
vhost_dev_cleanup(&s->dev);
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
2023-10-17 14:01 ` [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros Philippe Mathieu-Daudé
@ 2023-10-17 17:15 ` Manos Pitsidianakis
2023-10-17 20:09 ` Mark Cave-Ayland
1 sibling, 0 replies; 26+ messages in thread
From: Manos Pitsidianakis @ 2023-10-17 17:15 UTC (permalink / raw)
To: qemu-block, Philippe Mathieu-Daudé , qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>---
> hw/block/vhost-user-blk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
>index eecf3f7a81..4b37e26120 100644
>--- a/hw/block/vhost-user-blk.c
>+++ b/hw/block/vhost-user-blk.c
>@@ -405,7 +405,7 @@ static void vhost_user_blk_event(void *opaque, QEMUChrEvent event)
>
> static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
> {
>- DeviceState *dev = &s->parent_obj.parent_obj;
>+ DeviceState *dev = DEVICE(s);
> int ret;
>
> s->connected = false;
>@@ -423,7 +423,7 @@ static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
> assert(s->connected);
>
> ret = vhost_dev_get_config(&s->dev, (uint8_t *)&s->blkcfg,
>- s->parent_obj.config_len, errp);
>+ VIRTIO_DEVICE(s)->config_len, errp);
> if (ret < 0) {
> qemu_chr_fe_disconnect(&s->chardev);
> vhost_dev_cleanup(&s->dev);
>--
>2.41.0
>
>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
2023-10-17 14:01 ` [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros Philippe Mathieu-Daudé
2023-10-17 17:15 ` Manos Pitsidianakis
@ 2023-10-17 20:09 ` Mark Cave-Ayland
1 sibling, 0 replies; 26+ messages in thread
From: Mark Cave-Ayland @ 2023-10-17 20:09 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:
> Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/block/vhost-user-blk.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
> index eecf3f7a81..4b37e26120 100644
> --- a/hw/block/vhost-user-blk.c
> +++ b/hw/block/vhost-user-blk.c
> @@ -405,7 +405,7 @@ static void vhost_user_blk_event(void *opaque, QEMUChrEvent event)
>
> static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
> {
> - DeviceState *dev = &s->parent_obj.parent_obj;
> + DeviceState *dev = DEVICE(s);
> int ret;
>
> s->connected = false;
> @@ -423,7 +423,7 @@ static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
> assert(s->connected);
>
> ret = vhost_dev_get_config(&s->dev, (uint8_t *)&s->blkcfg,
> - s->parent_obj.config_len, errp);
> + VIRTIO_DEVICE(s)->config_len, errp);
> if (ret < 0) {
> qemu_chr_fe_disconnect(&s->chardev);
> vhost_dev_cleanup(&s->dev);
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
2023-10-17 14:01 ` [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion Philippe Mathieu-Daudé
2023-10-17 14:01 ` [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
2023-10-17 20:10 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro Philippe Mathieu-Daudé
` (5 subsequent siblings)
8 siblings, 2 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
Access QOM parent with the proper QOM VIRTIO_DEVICE() macro.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/display/virtio-gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 93857ad523..51cb517999 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1132,7 +1132,7 @@ static void virtio_gpu_ctrl_bh(void *opaque)
VirtIOGPU *g = opaque;
VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g);
- vgc->handle_ctrl(&g->parent_obj.parent_obj, g->ctrl_vq);
+ vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq);
}
static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
2023-10-17 14:01 ` [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro Philippe Mathieu-Daudé
@ 2023-10-17 17:19 ` Manos Pitsidianakis
2023-10-17 20:10 ` Mark Cave-Ayland
1 sibling, 0 replies; 26+ messages in thread
From: Manos Pitsidianakis @ 2023-10-17 17:19 UTC (permalink / raw)
To: qemu-arm, Philippe Mathieu-Daudé , qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>Access QOM parent with the proper QOM VIRTIO_DEVICE() macro.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>---
> hw/display/virtio-gpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
>index 93857ad523..51cb517999 100644
>--- a/hw/display/virtio-gpu.c
>+++ b/hw/display/virtio-gpu.c
>@@ -1132,7 +1132,7 @@ static void virtio_gpu_ctrl_bh(void *opaque)
> VirtIOGPU *g = opaque;
> VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g);
>
>- vgc->handle_ctrl(&g->parent_obj.parent_obj, g->ctrl_vq);
>+ vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq);
> }
>
> static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
>--
>2.41.0
>
>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
2023-10-17 14:01 ` [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
@ 2023-10-17 20:10 ` Mark Cave-Ayland
1 sibling, 0 replies; 26+ messages in thread
From: Mark Cave-Ayland @ 2023-10-17 20:10 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:
> Access QOM parent with the proper QOM VIRTIO_DEVICE() macro.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/display/virtio-gpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index 93857ad523..51cb517999 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1132,7 +1132,7 @@ static void virtio_gpu_ctrl_bh(void *opaque)
> VirtIOGPU *g = opaque;
> VirtIOGPUClass *vgc = VIRTIO_GPU_GET_CLASS(g);
>
> - vgc->handle_ctrl(&g->parent_obj.parent_obj, g->ctrl_vq);
> + vgc->handle_ctrl(VIRTIO_DEVICE(g), g->ctrl_vq);
> }
>
> static void virtio_gpu_handle_cursor(VirtIODevice *vdev, VirtQueue *vq)
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2023-10-17 14:01 ` [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
` (2 more replies)
2023-10-17 14:01 ` [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro Philippe Mathieu-Daudé
` (4 subsequent siblings)
8 siblings, 3 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/scsi/virtio-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 45b95ea070..fa53f0902c 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
{
- VirtIOSCSICommon *vs = &s->parent_obj;
+ VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
SCSIDevice *d;
int rc;
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-17 14:01 ` [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro Philippe Mathieu-Daudé
@ 2023-10-17 17:19 ` Manos Pitsidianakis
2023-10-17 20:13 ` Mark Cave-Ayland
2023-10-31 13:17 ` Kevin Wolf
2 siblings, 0 replies; 26+ messages in thread
From: Manos Pitsidianakis @ 2023-10-17 17:19 UTC (permalink / raw)
To: qemu-arm, Philippe Mathieu-Daudé , qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
>
>Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>---
> hw/scsi/virtio-scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
>index 45b95ea070..fa53f0902c 100644
>--- a/hw/scsi/virtio-scsi.c
>+++ b/hw/scsi/virtio-scsi.c
>@@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
>
> static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> {
>- VirtIOSCSICommon *vs = &s->parent_obj;
>+ VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> SCSIDevice *d;
> int rc;
>
>--
>2.41.0
>
>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-17 14:01 ` [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
@ 2023-10-17 20:13 ` Mark Cave-Ayland
2023-10-31 13:17 ` Kevin Wolf
2 siblings, 0 replies; 26+ messages in thread
From: Mark Cave-Ayland @ 2023-10-17 20:13 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:
> Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/scsi/virtio-scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index 45b95ea070..fa53f0902c 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
>
> static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> {
> - VirtIOSCSICommon *vs = &s->parent_obj;
> + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> SCSIDevice *d;
> int rc;
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-17 14:01 ` [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
2023-10-17 20:13 ` Mark Cave-Ayland
@ 2023-10-31 13:17 ` Kevin Wolf
2023-10-31 13:21 ` Peter Maydell
2023-10-31 13:48 ` Richard W.M. Jones
2 siblings, 2 replies; 26+ messages in thread
From: Kevin Wolf @ 2023-10-31 13:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Jason Wang, Peter Maydell,
Raphael Norwitz, Edgar E. Iglesias, Alistair Francis,
Gerd Hoffmann, rjones
Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben:
> Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/scsi/virtio-scsi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> index 45b95ea070..fa53f0902c 100644
> --- a/hw/scsi/virtio-scsi.c
> +++ b/hw/scsi/virtio-scsi.c
> @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
>
> static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> {
> - VirtIOSCSICommon *vs = &s->parent_obj;
> + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> SCSIDevice *d;
> int rc;
Why is a dynamic cast more "proper" than a static type-safe access, even
more so in a hot I/O path?
Rich Jones posted a flamegraph the other day that surprised me because
object_class_dynamic_class_assert() and object_dynamic_cast_assert()
were shown to be a big part of scsi_req_new(). In the overall
performance, it's probably dwarved by other issues, but unnecessary
little things can add up, too.
Kevin
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-31 13:17 ` Kevin Wolf
@ 2023-10-31 13:21 ` Peter Maydell
2023-10-31 13:48 ` Richard W.M. Jones
1 sibling, 0 replies; 26+ messages in thread
From: Peter Maydell @ 2023-10-31 13:21 UTC (permalink / raw)
To: Kevin Wolf
Cc: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini,
Hanna Reitz, Fam Zheng, qemu-arm, Michael S. Tsirkin, qemu-block,
Jason Wang, Raphael Norwitz, Edgar E. Iglesias, Alistair Francis,
Gerd Hoffmann, rjones
On Tue, 31 Oct 2023 at 13:18, Kevin Wolf <kwolf@redhat.com> wrote:
>
> Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben:
> > Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > ---
> > hw/scsi/virtio-scsi.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> > index 45b95ea070..fa53f0902c 100644
> > --- a/hw/scsi/virtio-scsi.c
> > +++ b/hw/scsi/virtio-scsi.c
> > @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
> >
> > static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> > {
> > - VirtIOSCSICommon *vs = &s->parent_obj;
> > + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> > SCSIDevice *d;
> > int rc;
>
> Why is a dynamic cast more "proper" than a static type-safe access, even
> more so in a hot I/O path?
I dunno, but it is absolutely the standard QOM style to use
the cast macro to do the downcast, rather than fishing about in
the struct for the parent_obj field. If QOM casts are getting
too expensive we should ideally fix them rather than adding
more and more code that takes some side route around them...
thanks
-- PMM
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-31 13:17 ` Kevin Wolf
2023-10-31 13:21 ` Peter Maydell
@ 2023-10-31 13:48 ` Richard W.M. Jones
2023-10-31 16:35 ` Kevin Wolf
2023-10-31 16:42 ` Kevin Wolf
1 sibling, 2 replies; 26+ messages in thread
From: Richard W.M. Jones @ 2023-10-31 13:48 UTC (permalink / raw)
To: Kevin Wolf
Cc: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini,
Hanna Reitz, Fam Zheng, qemu-arm, Michael S. Tsirkin, qemu-block,
Jason Wang, Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On Tue, Oct 31, 2023 at 02:17:56PM +0100, Kevin Wolf wrote:
> Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben:
> > Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
> >
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > ---
> > hw/scsi/virtio-scsi.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> > index 45b95ea070..fa53f0902c 100644
> > --- a/hw/scsi/virtio-scsi.c
> > +++ b/hw/scsi/virtio-scsi.c
> > @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
> >
> > static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> > {
> > - VirtIOSCSICommon *vs = &s->parent_obj;
> > + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> > SCSIDevice *d;
> > int rc;
>
> Why is a dynamic cast more "proper" than a static type-safe access, even
> more so in a hot I/O path?
>
> Rich Jones posted a flamegraph the other day that surprised me because
> object_class_dynamic_class_assert() and object_dynamic_cast_assert()
> were shown to be a big part of scsi_req_new(). In the overall
> performance, it's probably dwarved by other issues, but unnecessary
> little things can add up, too.
I think Kevin is referring to one of these flamegraphs:
http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg
http://oirase.annexia.org/tmp/2023-kvm-build.svg
Here's a zoom showing scsi_req_new (hopefully this URL is stable ...):
http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg?s=scsi_req_new&x=512.9&y=501
Note that qemu has been compiled with QOM cast debug. This is the
default for Fedora (not RHEL) because we'd like to get early detection
of bugs from Fedora users.
There was another patch recently where a simple change saved about 5%
of total runtime in RISC-V TCG guests (admittedly a much more hot path
than this one).
https://lists.nongnu.org/archive/html/qemu-devel/2023-10/msg02388.html
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-31 13:48 ` Richard W.M. Jones
@ 2023-10-31 16:35 ` Kevin Wolf
2023-10-31 16:42 ` Kevin Wolf
1 sibling, 0 replies; 26+ messages in thread
From: Kevin Wolf @ 2023-10-31 16:35 UTC (permalink / raw)
To: Richard W.M. Jones
Cc: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini,
Hanna Reitz, Fam Zheng, qemu-arm, Michael S. Tsirkin, qemu-block,
Jason Wang, Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
Am 31.10.2023 um 14:48 hat Richard W.M. Jones geschrieben:
> On Tue, Oct 31, 2023 at 02:17:56PM +0100, Kevin Wolf wrote:
> > Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben:
> > > Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
> > >
> > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > ---
> > > hw/scsi/virtio-scsi.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> > > index 45b95ea070..fa53f0902c 100644
> > > --- a/hw/scsi/virtio-scsi.c
> > > +++ b/hw/scsi/virtio-scsi.c
> > > @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
> > >
> > > static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> > > {
> > > - VirtIOSCSICommon *vs = &s->parent_obj;
> > > + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> > > SCSIDevice *d;
> > > int rc;
> >
> > Why is a dynamic cast more "proper" than a static type-safe access, even
> > more so in a hot I/O path?
> >
> > Rich Jones posted a flamegraph the other day that surprised me because
> > object_class_dynamic_class_assert() and object_dynamic_cast_assert()
> > were shown to be a big part of scsi_req_new(). In the overall
> > performance, it's probably dwarved by other issues, but unnecessary
> > little things can add up, too.
>
> I think Kevin is referring to one of these flamegraphs:
>
> http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg
> http://oirase.annexia.org/tmp/2023-kvm-build.svg
>
> Here's a zoom showing scsi_req_new (hopefully this URL is stable ...):
>
> http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg?s=scsi_req_new&x=512.9&y=501
>
> Note that qemu has been compiled with QOM cast debug. This is the
> default for Fedora (not RHEL) because we'd like to get early detection
> of bugs from Fedora users.
Indeed, object_dynamic_cast_assert() probably wouldn't show up any more
if you disabled QOM cast debugging. But we enable it by default, so
that's an explicit setting users have to make, and as you say, at least
Fedora doesn't.
The other one, object_class_dynamic_cast_assert() isn't even affected
by the debug setting because it does more than just asserting a plain
cast. Working around it isn't as trivial either, but I did think about
caching it in the object to avoid a string based class lookup for every
single request.
Looking at it again, strangely CONFIG_QOM_CAST_DEBUG enables a cache in
object_class_dynamic_cast_assert() that isn't used otherwise. Why don't
we want this optimisation without the debug flag?
Kevin
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-31 13:48 ` Richard W.M. Jones
2023-10-31 16:35 ` Kevin Wolf
@ 2023-10-31 16:42 ` Kevin Wolf
2023-10-31 16:48 ` Richard W.M. Jones
1 sibling, 1 reply; 26+ messages in thread
From: Kevin Wolf @ 2023-10-31 16:42 UTC (permalink / raw)
To: Richard W.M. Jones
Cc: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini,
Hanna Reitz, Fam Zheng, qemu-arm, Michael S. Tsirkin, qemu-block,
Jason Wang, Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
Am 31.10.2023 um 14:48 hat Richard W.M. Jones geschrieben:
> On Tue, Oct 31, 2023 at 02:17:56PM +0100, Kevin Wolf wrote:
> > Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben:
> > > Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
> > >
> > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > ---
> > > hw/scsi/virtio-scsi.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> > > index 45b95ea070..fa53f0902c 100644
> > > --- a/hw/scsi/virtio-scsi.c
> > > +++ b/hw/scsi/virtio-scsi.c
> > > @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
> > >
> > > static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> > > {
> > > - VirtIOSCSICommon *vs = &s->parent_obj;
> > > + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> > > SCSIDevice *d;
> > > int rc;
> >
> > Why is a dynamic cast more "proper" than a static type-safe access, even
> > more so in a hot I/O path?
> >
> > Rich Jones posted a flamegraph the other day that surprised me because
> > object_class_dynamic_class_assert() and object_dynamic_cast_assert()
> > were shown to be a big part of scsi_req_new(). In the overall
> > performance, it's probably dwarved by other issues, but unnecessary
> > little things can add up, too.
>
> I think Kevin is referring to one of these flamegraphs:
>
> http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg
> http://oirase.annexia.org/tmp/2023-kvm-build.svg
>
> Here's a zoom showing scsi_req_new (hopefully this URL is stable ...):
>
> http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg?s=scsi_req_new&x=512.9&y=501
Oh, this one (kvm-build-on-device) doesn't even show the object cast.
I was looking at kvm-build, it seems, where both the class and the
object cast are visible:
http://oirase.annexia.org/tmp/2023-kvm-build.svg?s=scsi_req_new&x=455.4&y=533
Kevin
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
2023-10-31 16:42 ` Kevin Wolf
@ 2023-10-31 16:48 ` Richard W.M. Jones
0 siblings, 0 replies; 26+ messages in thread
From: Richard W.M. Jones @ 2023-10-31 16:48 UTC (permalink / raw)
To: Kevin Wolf
Cc: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini,
Hanna Reitz, Fam Zheng, qemu-arm, Michael S. Tsirkin, qemu-block,
Jason Wang, Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On Tue, Oct 31, 2023 at 05:42:37PM +0100, Kevin Wolf wrote:
> Am 31.10.2023 um 14:48 hat Richard W.M. Jones geschrieben:
> > On Tue, Oct 31, 2023 at 02:17:56PM +0100, Kevin Wolf wrote:
> > > Am 17.10.2023 um 16:01 hat Philippe Mathieu-Daudé geschrieben:
> > > > Access QOM parent with the proper QOM VIRTIO_SCSI_COMMON() macro.
> > > >
> > > > Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> > > > ---
> > > > hw/scsi/virtio-scsi.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
> > > > index 45b95ea070..fa53f0902c 100644
> > > > --- a/hw/scsi/virtio-scsi.c
> > > > +++ b/hw/scsi/virtio-scsi.c
> > > > @@ -761,7 +761,7 @@ static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req)
> > > >
> > > > static int virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req)
> > > > {
> > > > - VirtIOSCSICommon *vs = &s->parent_obj;
> > > > + VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
> > > > SCSIDevice *d;
> > > > int rc;
> > >
> > > Why is a dynamic cast more "proper" than a static type-safe access, even
> > > more so in a hot I/O path?
> > >
> > > Rich Jones posted a flamegraph the other day that surprised me because
> > > object_class_dynamic_class_assert() and object_dynamic_cast_assert()
> > > were shown to be a big part of scsi_req_new(). In the overall
> > > performance, it's probably dwarved by other issues, but unnecessary
> > > little things can add up, too.
> >
> > I think Kevin is referring to one of these flamegraphs:
> >
> > http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg
> > http://oirase.annexia.org/tmp/2023-kvm-build.svg
> >
> > Here's a zoom showing scsi_req_new (hopefully this URL is stable ...):
> >
> > http://oirase.annexia.org/tmp/2023-kvm-build-on-device.svg?s=scsi_req_new&x=512.9&y=501
>
> Oh, this one (kvm-build-on-device) doesn't even show the object cast.
> I was looking at kvm-build, it seems, where both the class and the
> object cast are visible:
>
> http://oirase.annexia.org/tmp/2023-kvm-build.svg?s=scsi_req_new&x=455.4&y=533
Not sure if this is the reason why, but the difference between these
two runs is that kvm-build is backed by a qcow2 file and
kvm-build-on-device is backed by a host block device. I believe they
both were otherwise identically configured qemu.
More background in this Fedora thread:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/MSJAL7OE2TBO6U4ZWXKTKQLDSGRFK6YR/
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2023-10-17 14:01 ` [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 20:16 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 6/7] hw/net: " Philippe Mathieu-Daudé
` (3 subsequent siblings)
8 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
Declare link statically using DEFINE_PROP_LINK().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/dma/xilinx_axidma.c | 6 ++----
hw/dma/xlnx-zdma.c | 7 ++-----
hw/dma/xlnx_csu_dma.c | 13 ++++---------
3 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
index 12c90267df..0ae056ed06 100644
--- a/hw/dma/xilinx_axidma.c
+++ b/hw/dma/xilinx_axidma.c
@@ -577,10 +577,6 @@ static void xilinx_axidma_init(Object *obj)
object_initialize_child(OBJECT(s), "axistream-control-connected-target",
&s->rx_control_dev,
TYPE_XILINX_AXI_DMA_CONTROL_STREAM);
- object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
- (Object **)&s->dma_mr,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
sysbus_init_irq(sbd, &s->streams[0].irq);
sysbus_init_irq(sbd, &s->streams[1].irq);
@@ -596,6 +592,8 @@ static Property axidma_properties[] = {
tx_data_dev, TYPE_STREAM_SINK, StreamSink *),
DEFINE_PROP_LINK("axistream-control-connected", XilinxAXIDMA,
tx_control_dev, TYPE_STREAM_SINK, StreamSink *),
+ DEFINE_PROP_LINK("dma", XilinxAXIDMA, dma_mr,
+ TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c
index 4eb7f66e9f..84c0083013 100644
--- a/hw/dma/xlnx-zdma.c
+++ b/hw/dma/xlnx-zdma.c
@@ -795,11 +795,6 @@ static void zdma_init(Object *obj)
TYPE_XLNX_ZDMA, ZDMA_R_MAX * 4);
sysbus_init_mmio(sbd, &s->iomem);
sysbus_init_irq(sbd, &s->irq_zdma_ch_imr);
-
- object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
- (Object **)&s->dma_mr,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
}
static const VMStateDescription vmstate_zdma = {
@@ -817,6 +812,8 @@ static const VMStateDescription vmstate_zdma = {
static Property zdma_props[] = {
DEFINE_PROP_UINT32("bus-width", XlnxZDMA, cfg.bus_width, 64),
+ DEFINE_PROP_LINK("dma", XlnxZDMA, dma_mr,
+ TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c
index 88002698a1..e89089821a 100644
--- a/hw/dma/xlnx_csu_dma.c
+++ b/hw/dma/xlnx_csu_dma.c
@@ -702,6 +702,10 @@ static Property xlnx_csu_dma_properties[] = {
* which channel the device is connected to.
*/
DEFINE_PROP_BOOL("is-dst", XlnxCSUDMA, is_dst, true),
+ DEFINE_PROP_LINK("stream-connected-dma", XlnxCSUDMA, tx_dev,
+ TYPE_STREAM_SINK, StreamSink *),
+ DEFINE_PROP_LINK("dma", XlnxCSUDMA, dma_mr,
+ TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
};
@@ -728,15 +732,6 @@ static void xlnx_csu_dma_init(Object *obj)
memory_region_init(&s->iomem, obj, TYPE_XLNX_CSU_DMA,
XLNX_CSU_DMA_R_MAX * 4);
-
- object_property_add_link(obj, "stream-connected-dma", TYPE_STREAM_SINK,
- (Object **)&s->tx_dev,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
- object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
- (Object **)&s->dma_mr,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
}
static const TypeInfo xlnx_csu_dma_info = {
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro
2023-10-17 14:01 ` [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro Philippe Mathieu-Daudé
@ 2023-10-17 20:16 ` Mark Cave-Ayland
0 siblings, 0 replies; 26+ messages in thread
From: Mark Cave-Ayland @ 2023-10-17 20:16 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:
> Declare link statically using DEFINE_PROP_LINK().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/dma/xilinx_axidma.c | 6 ++----
> hw/dma/xlnx-zdma.c | 7 ++-----
> hw/dma/xlnx_csu_dma.c | 13 ++++---------
> 3 files changed, 8 insertions(+), 18 deletions(-)
>
> diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c
> index 12c90267df..0ae056ed06 100644
> --- a/hw/dma/xilinx_axidma.c
> +++ b/hw/dma/xilinx_axidma.c
> @@ -577,10 +577,6 @@ static void xilinx_axidma_init(Object *obj)
> object_initialize_child(OBJECT(s), "axistream-control-connected-target",
> &s->rx_control_dev,
> TYPE_XILINX_AXI_DMA_CONTROL_STREAM);
> - object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
> - (Object **)&s->dma_mr,
> - qdev_prop_allow_set_link_before_realize,
> - OBJ_PROP_LINK_STRONG);
>
> sysbus_init_irq(sbd, &s->streams[0].irq);
> sysbus_init_irq(sbd, &s->streams[1].irq);
> @@ -596,6 +592,8 @@ static Property axidma_properties[] = {
> tx_data_dev, TYPE_STREAM_SINK, StreamSink *),
> DEFINE_PROP_LINK("axistream-control-connected", XilinxAXIDMA,
> tx_control_dev, TYPE_STREAM_SINK, StreamSink *),
> + DEFINE_PROP_LINK("dma", XilinxAXIDMA, dma_mr,
> + TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c
> index 4eb7f66e9f..84c0083013 100644
> --- a/hw/dma/xlnx-zdma.c
> +++ b/hw/dma/xlnx-zdma.c
> @@ -795,11 +795,6 @@ static void zdma_init(Object *obj)
> TYPE_XLNX_ZDMA, ZDMA_R_MAX * 4);
> sysbus_init_mmio(sbd, &s->iomem);
> sysbus_init_irq(sbd, &s->irq_zdma_ch_imr);
> -
> - object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
> - (Object **)&s->dma_mr,
> - qdev_prop_allow_set_link_before_realize,
> - OBJ_PROP_LINK_STRONG);
> }
>
> static const VMStateDescription vmstate_zdma = {
> @@ -817,6 +812,8 @@ static const VMStateDescription vmstate_zdma = {
>
> static Property zdma_props[] = {
> DEFINE_PROP_UINT32("bus-width", XlnxZDMA, cfg.bus_width, 64),
> + DEFINE_PROP_LINK("dma", XlnxZDMA, dma_mr,
> + TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/hw/dma/xlnx_csu_dma.c b/hw/dma/xlnx_csu_dma.c
> index 88002698a1..e89089821a 100644
> --- a/hw/dma/xlnx_csu_dma.c
> +++ b/hw/dma/xlnx_csu_dma.c
> @@ -702,6 +702,10 @@ static Property xlnx_csu_dma_properties[] = {
> * which channel the device is connected to.
> */
> DEFINE_PROP_BOOL("is-dst", XlnxCSUDMA, is_dst, true),
> + DEFINE_PROP_LINK("stream-connected-dma", XlnxCSUDMA, tx_dev,
> + TYPE_STREAM_SINK, StreamSink *),
> + DEFINE_PROP_LINK("dma", XlnxCSUDMA, dma_mr,
> + TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> @@ -728,15 +732,6 @@ static void xlnx_csu_dma_init(Object *obj)
>
> memory_region_init(&s->iomem, obj, TYPE_XLNX_CSU_DMA,
> XLNX_CSU_DMA_R_MAX * 4);
> -
> - object_property_add_link(obj, "stream-connected-dma", TYPE_STREAM_SINK,
> - (Object **)&s->tx_dev,
> - qdev_prop_allow_set_link_before_realize,
> - OBJ_PROP_LINK_STRONG);
> - object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
> - (Object **)&s->dma_mr,
> - qdev_prop_allow_set_link_before_realize,
> - OBJ_PROP_LINK_STRONG);
> }
>
> static const TypeInfo xlnx_csu_dma_info = {
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2023-10-17 14:01 ` [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 20:17 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 7/7] hw/usb: " Philippe Mathieu-Daudé
` (2 subsequent siblings)
8 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
Declare link statically using DEFINE_PROP_LINK().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/net/cadence_gem.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index f445d8bb5e..37e209cda6 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -1654,11 +1654,6 @@ static void gem_init(Object *obj)
"enet", sizeof(s->regs));
sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
-
- object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
- (Object **)&s->dma_mr,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
}
static const VMStateDescription vmstate_cadence_gem = {
@@ -1691,6 +1686,8 @@ static Property gem_properties[] = {
num_type2_screeners, 4),
DEFINE_PROP_UINT16("jumbo-max-len", CadenceGEMState,
jumbo_max_len, 10240),
+ DEFINE_PROP_LINK("dma", CadenceGEMState, dma_mr,
+ TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
};
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 6/7] hw/net: Declare link using static DEFINE_PROP_LINK() macro
2023-10-17 14:01 ` [PATCH 6/7] hw/net: " Philippe Mathieu-Daudé
@ 2023-10-17 20:17 ` Mark Cave-Ayland
0 siblings, 0 replies; 26+ messages in thread
From: Mark Cave-Ayland @ 2023-10-17 20:17 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:
> Declare link statically using DEFINE_PROP_LINK().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/net/cadence_gem.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
> index f445d8bb5e..37e209cda6 100644
> --- a/hw/net/cadence_gem.c
> +++ b/hw/net/cadence_gem.c
> @@ -1654,11 +1654,6 @@ static void gem_init(Object *obj)
> "enet", sizeof(s->regs));
>
> sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem);
> -
> - object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
> - (Object **)&s->dma_mr,
> - qdev_prop_allow_set_link_before_realize,
> - OBJ_PROP_LINK_STRONG);
> }
>
> static const VMStateDescription vmstate_cadence_gem = {
> @@ -1691,6 +1686,8 @@ static Property gem_properties[] = {
> num_type2_screeners, 4),
> DEFINE_PROP_UINT16("jumbo-max-len", CadenceGEMState,
> jumbo_max_len, 10240),
> + DEFINE_PROP_LINK("dma", CadenceGEMState, dma_mr,
> + TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> };
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 7/7] hw/usb: Declare link using static DEFINE_PROP_LINK() macro
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2023-10-17 14:01 ` [PATCH 6/7] hw/net: " Philippe Mathieu-Daudé
@ 2023-10-17 14:01 ` Philippe Mathieu-Daudé
2023-10-17 20:19 ` Mark Cave-Ayland
2023-10-17 14:09 ` [PATCH 0/7] hw: Few more QOM/QDev cleanups Michael S. Tsirkin
2023-10-19 21:41 ` Philippe Mathieu-Daudé
8 siblings, 1 reply; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-17 14:01 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann, Philippe Mathieu-Daudé
Pull the 'dma' property to the core XHCI type, declare
its link statically using DEFINE_PROP_LINK().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-xhci-sysbus.c | 4 ----
hw/usb/hcd-xhci.c | 2 ++
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
index faf57b4797..15983d0b96 100644
--- a/hw/usb/hcd-xhci-sysbus.c
+++ b/hw/usb/hcd-xhci-sysbus.c
@@ -60,10 +60,6 @@ static void xhci_sysbus_instance_init(Object *obj)
object_initialize_child(obj, "xhci-core", &s->xhci, TYPE_XHCI);
qdev_alias_all_properties(DEVICE(&s->xhci), obj);
- object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
- (Object **)&s->xhci.dma_mr,
- qdev_prop_allow_set_link_before_realize,
- OBJ_PROP_LINK_STRONG);
s->xhci.intr_update = NULL;
s->xhci.intr_raise = xhci_sysbus_intr_raise;
}
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 4b60114207..012a6f3644 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3638,6 +3638,8 @@ static Property xhci_properties[] = {
DEFINE_PROP_UINT32("p3", XHCIState, numports_3, 4),
DEFINE_PROP_LINK("host", XHCIState, hostOpaque, TYPE_DEVICE,
DeviceState *),
+ DEFINE_PROP_LINK("dma", XHCIState, dma_mr,
+ TYPE_MEMORY_REGION, MemoryRegion *),
DEFINE_PROP_END_OF_LIST(),
};
--
2.41.0
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 7/7] hw/usb: Declare link using static DEFINE_PROP_LINK() macro
2023-10-17 14:01 ` [PATCH 7/7] hw/usb: " Philippe Mathieu-Daudé
@ 2023-10-17 20:19 ` Mark Cave-Ayland
0 siblings, 0 replies; 26+ messages in thread
From: Mark Cave-Ayland @ 2023-10-17 20:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/2023 15:01, Philippe Mathieu-Daudé wrote:
> Pull the 'dma' property to the core XHCI type, declare
> its link statically using DEFINE_PROP_LINK().
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> hw/usb/hcd-xhci-sysbus.c | 4 ----
> hw/usb/hcd-xhci.c | 2 ++
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/hw/usb/hcd-xhci-sysbus.c b/hw/usb/hcd-xhci-sysbus.c
> index faf57b4797..15983d0b96 100644
> --- a/hw/usb/hcd-xhci-sysbus.c
> +++ b/hw/usb/hcd-xhci-sysbus.c
> @@ -60,10 +60,6 @@ static void xhci_sysbus_instance_init(Object *obj)
> object_initialize_child(obj, "xhci-core", &s->xhci, TYPE_XHCI);
> qdev_alias_all_properties(DEVICE(&s->xhci), obj);
>
> - object_property_add_link(obj, "dma", TYPE_MEMORY_REGION,
> - (Object **)&s->xhci.dma_mr,
> - qdev_prop_allow_set_link_before_realize,
> - OBJ_PROP_LINK_STRONG);
> s->xhci.intr_update = NULL;
> s->xhci.intr_raise = xhci_sysbus_intr_raise;
> }
> diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
> index 4b60114207..012a6f3644 100644
> --- a/hw/usb/hcd-xhci.c
> +++ b/hw/usb/hcd-xhci.c
> @@ -3638,6 +3638,8 @@ static Property xhci_properties[] = {
> DEFINE_PROP_UINT32("p3", XHCIState, numports_3, 4),
> DEFINE_PROP_LINK("host", XHCIState, hostOpaque, TYPE_DEVICE,
> DeviceState *),
> + DEFINE_PROP_LINK("dma", XHCIState, dma_mr,
> + TYPE_MEMORY_REGION, MemoryRegion *),
> DEFINE_PROP_END_OF_LIST(),
> };
I'm slightly unsure about this one: does pulling the "dma" property into the core
type cause any issues if the property is left unset for any non-sysbus xhci users?
ATB,
Mark.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 0/7] hw: Few more QOM/QDev cleanups
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
` (6 preceding siblings ...)
2023-10-17 14:01 ` [PATCH 7/7] hw/usb: " Philippe Mathieu-Daudé
@ 2023-10-17 14:09 ` Michael S. Tsirkin
2023-10-19 21:41 ` Philippe Mathieu-Daudé
8 siblings, 0 replies; 26+ messages in thread
From: Michael S. Tsirkin @ 2023-10-17 14:09 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
qemu-block, Kevin Wolf, Jason Wang, Peter Maydell,
Raphael Norwitz, Edgar E. Iglesias, Alistair Francis,
Gerd Hoffmann
On Tue, Oct 17, 2023 at 04:01:43PM +0200, Philippe Mathieu-Daudé wrote:
> - Remove a pointless check,
> - Use QOM cast macros,
> - Declare QDev links statically using DEFINE_PROP_LINK()
virtio things
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Philippe Mathieu-Daudé (7):
> hw/virtio/virtio-pmem: Replace impossible check by assertion
> hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
> hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
> hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
> hw/dma: Declare link using static DEFINE_PROP_LINK() macro
> hw/net: Declare link using static DEFINE_PROP_LINK() macro
> hw/usb: Declare link using static DEFINE_PROP_LINK() macro
>
> hw/block/vhost-user-blk.c | 4 ++--
> hw/display/virtio-gpu.c | 2 +-
> hw/dma/xilinx_axidma.c | 6 ++----
> hw/dma/xlnx-zdma.c | 7 ++-----
> hw/dma/xlnx_csu_dma.c | 13 ++++---------
> hw/net/cadence_gem.c | 7 ++-----
> hw/scsi/virtio-scsi.c | 2 +-
> hw/usb/hcd-xhci-sysbus.c | 4 ----
> hw/usb/hcd-xhci.c | 2 ++
> hw/virtio/virtio-pmem.c | 5 +----
> 10 files changed, 17 insertions(+), 35 deletions(-)
>
> --
> 2.41.0
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 0/7] hw: Few more QOM/QDev cleanups
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
` (7 preceding siblings ...)
2023-10-17 14:09 ` [PATCH 0/7] hw: Few more QOM/QDev cleanups Michael S. Tsirkin
@ 2023-10-19 21:41 ` Philippe Mathieu-Daudé
8 siblings, 0 replies; 26+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-10-19 21:41 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Hanna Reitz, Fam Zheng, qemu-arm,
Michael S. Tsirkin, qemu-block, Kevin Wolf, Jason Wang,
Peter Maydell, Raphael Norwitz, Edgar E. Iglesias,
Alistair Francis, Gerd Hoffmann
On 17/10/23 16:01, Philippe Mathieu-Daudé wrote:
> Philippe Mathieu-Daudé (7):
> hw/virtio/virtio-pmem: Replace impossible check by assertion
> hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
> hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
> hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
> hw/dma: Declare link using static DEFINE_PROP_LINK() macro
> hw/net: Declare link using static DEFINE_PROP_LINK() macro
Patches 1-6 queued to hw-misc.
^ permalink raw reply [flat|nested] 26+ messages in thread