[PATCH 0/3] hw/(pci/scsi/virtio-mem): Avoid call to target_info() in class_init

Yonggang Luo posted 3 patches 3 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20261013200525.1340-1-luoyonggang@gmail.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, David Hildenbrand <david@kernel.org>, Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>
There is a newer version of this series
hw/pci/pci.c           | 18 ++++++++++--------
hw/scsi/scsi-disk.c    | 18 ++++++++++--------
hw/virtio/virtio-mem.c | 12 +++++-------
3 files changed, 25 insertions(+), 23 deletions(-)
[PATCH 0/3] hw/(pci/scsi/virtio-mem): Avoid call to target_info() in class_init
Posted by Yonggang Luo 3 weeks, 2 days ago
Now we are going to delay the target select to machine select.
So that avoid call to target_info() in class_init so that we wont
face a NULL target_info() error when do class_init. This is because
class_init is called under object_class_get_list(TYPE_MACHINE, false)

Yonggang Luo (3):
  hw/pci: Avoid guard loadparm with target_s390x() for s390x in
    class_init
  hw/scsi: Avoid guard loadparm with target_s390x() for s390x in
    class_init
  hw/virtio/virtio-mem: Avoid call to target_info() in class_init

 hw/pci/pci.c           | 18 ++++++++++--------
 hw/scsi/scsi-disk.c    | 18 ++++++++++--------
 hw/virtio/virtio-mem.c | 12 +++++-------
 3 files changed, 25 insertions(+), 23 deletions(-)

-- 
2.55.0.windows.3
Re: [PATCH 0/3] hw/(pci/scsi/virtio-mem): Avoid call to target_info() in class_init
Posted by Daniel P. Berrangé 13 hours ago
On Wed, Oct 14, 2026 at 04:05:21AM +0800, Yonggang Luo wrote:
> Now we are going to delay the target select to machine select.
> So that avoid call to target_info() in class_init so that we wont
> face a NULL target_info() error when do class_init. This is because
> class_init is called under object_class_get_list(TYPE_MACHINE, false)
> 
> Yonggang Luo (3):
>   hw/pci: Avoid guard loadparm with target_s390x() for s390x in
>     class_init
>   hw/scsi: Avoid guard loadparm with target_s390x() for s390x in
>     class_init
>   hw/virtio/virtio-mem: Avoid call to target_info() in class_init
> 
>  hw/pci/pci.c           | 18 ++++++++++--------
>  hw/scsi/scsi-disk.c    | 18 ++++++++++--------
>  hw/virtio/virtio-mem.c | 12 +++++-------
>  3 files changed, 25 insertions(+), 23 deletions(-)

If the commit messages are fixed up,

 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|