[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 4/5] s390x: implement virtio-mem-ccw
From: |
Cornelia Huck |
Subject: |
Re: [PATCH RFC 4/5] s390x: implement virtio-mem-ccw |
Date: |
Thu, 9 Jul 2020 11:24:36 +0200 |
On Wed, 8 Jul 2020 20:51:34 +0200
David Hildenbrand <david@redhat.com> wrote:
> Add a proper CCW proxy device, similar to the PCI variant.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
> hw/s390x/virtio-ccw-mem.c | 165 ++++++++++++++++++++++++++++++++++++++
> hw/s390x/virtio-ccw.h | 13 +++
> 2 files changed, 178 insertions(+)
> create mode 100644 hw/s390x/virtio-ccw-mem.c
(...)
> +static void virtio_ccw_mem_instance_init(Object *obj)
> +{
> + VirtIOMEMCcw *ccw_mem = VIRTIO_MEM_CCW(obj);
> + VirtIOMEMClass *vmc;
> + VirtIOMEM *vmem;
> +
I think you want
ccw_dev->force_revision_1 = true;
here (similar to forcing virtio-pci to modern-only.)
> + virtio_instance_init_common(obj, &ccw_mem->vdev, sizeof(ccw_mem->vdev),
> + TYPE_VIRTIO_MEM);
> +
> + ccw_mem->size_change_notifier.notify = virtio_ccw_mem_size_change_notify;
> + vmem = VIRTIO_MEM(&ccw_mem->vdev);
> + vmc = VIRTIO_MEM_GET_CLASS(vmem);
> + /*
> + * We never remove the notifier again, as we expect both devices to
> + * disappear at the same time.
> + */
> + vmc->add_size_change_notifier(vmem, &ccw_mem->size_change_notifier);
> +
> + object_property_add_alias(obj, VIRTIO_MEM_BLOCK_SIZE_PROP,
> + OBJECT(&ccw_mem->vdev),
> + VIRTIO_MEM_BLOCK_SIZE_PROP);
> + object_property_add_alias(obj, VIRTIO_MEM_SIZE_PROP,
> OBJECT(&ccw_mem->vdev),
> + VIRTIO_MEM_SIZE_PROP);
> + object_property_add_alias(obj, VIRTIO_MEM_REQUESTED_SIZE_PROP,
> + OBJECT(&ccw_mem->vdev),
> + VIRTIO_MEM_REQUESTED_SIZE_PROP);
> +}
(...)
(have not looked at the rest yet)
- Re: [PATCH RFC 2/5] s390x: implement diag260, (continued)
- Re: [PATCH RFC 2/5] s390x: implement diag260, Heiko Carstens, 2020/07/15
- Re: [PATCH RFC 2/5] s390x: implement diag260, David Hildenbrand, 2020/07/15
- Re: [PATCH RFC 2/5] s390x: implement diag260, Heiko Carstens, 2020/07/15
- Re: [PATCH RFC 2/5] s390x: implement diag260, David Hildenbrand, 2020/07/15
- Re: [PATCH RFC 2/5] s390x: implement diag260, David Hildenbrand, 2020/07/15
- Re: [PATCH RFC 2/5] s390x: implement diag260, Heiko Carstens, 2020/07/20
- Re: [PATCH RFC 2/5] s390x: implement diag260, David Hildenbrand, 2020/07/20
[PATCH RFC 1/5] s390x: move setting of maximum ram size to machine init, David Hildenbrand, 2020/07/08
[PATCH RFC 5/5] s390x: initial support for virtio-mem, David Hildenbrand, 2020/07/08
[PATCH RFC 4/5] s390x: implement virtio-mem-ccw, David Hildenbrand, 2020/07/08
- Re: [PATCH RFC 4/5] s390x: implement virtio-mem-ccw,
Cornelia Huck <=
[PATCH RFC 3/5] s390x: prepare device memory address space, David Hildenbrand, 2020/07/08