All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <eduardo@habkost.net>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Igor Mammedov <imammedo@redhat.com>,
	qemu-arm@nongnu.org, Gavin Shan <gshan@redhat.com>,
	Mario Casquero <mcasquer@redhat.com>
Subject: Re: [PATCH v3 3/7] arm/virt: Use virtio-md-pci (un)plug functions
Date: Tue, 11 Jul 2023 04:47:17 -0400	[thread overview]
Message-ID: <20230711044647-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <b9351bf7-cabd-784c-bebc-a18a9b3f4bc1@redhat.com>

On Tue, Jul 11, 2023 at 10:32:31AM +0200, David Hildenbrand wrote:
> On 10.07.23 23:40, Michael S. Tsirkin wrote:
> > > @@ -2855,12 +2796,11 @@ static void virt_machine_device_plug_cb(HotplugHandler *hotplug_dev,
> > >                                        SYS_BUS_DEVICE(dev));
> > >           }
> > >       }
> > > +
> > >       if (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM)) {
> > >           virt_memory_plug(hotplug_dev, dev, errp);
> > > -    }
> > > -
> > > -    if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MEM_PCI)) {
> > > -        virt_virtio_md_pci_plug(hotplug_dev, dev, errp);
> > > +    } else if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_MD_PCI)) {
> > > +        virtio_md_pci_plug(VIRTIO_MD_PCI(dev), MACHINE(hotplug_dev), errp);
> > >       }
> > >       if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) {
> > 
> > 
> > How is this supposed to link if virtio-md is disabled at compile time?
> > 
> 
> Good point.
> 
> The old code unconditionally enabled MEM_DEVICE, so we never required subs
> for that.
> 
> We either need stubs or have to wrap this in #ifdef.
> 
> Stubs sound cleaner.

That is what we usually do, yes.

-- 
MST


  reply	other threads:[~2023-07-11  8:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 10:07 [PATCH v3 0/7] virtio-mem: Device unplug support David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 1/7] virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 2/7] pc: Factor out (un)plug handling of virtio-md-pci devices David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 3/7] arm/virt: Use virtio-md-pci (un)plug functions David Hildenbrand
2023-07-10 21:40   ` Michael S. Tsirkin
2023-07-11  8:32     ` David Hildenbrand
2023-07-11  8:47       ` Michael S. Tsirkin [this message]
2023-07-11  9:22         ` David Hildenbrand
2023-07-11  9:55           ` David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 4/7] virtio-md-pci: Handle unplug of virtio based memory devices David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 5/7] virtio-md-pci: Support unplug requests for compatible devices David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 6/7] virtio-mem: Prepare for device unplug support David Hildenbrand
2023-07-10 10:07 ` [PATCH v3 7/7] virtio-mem-pci: Device " David Hildenbrand
2023-07-11 14:19 ` [PATCH v3 0/7] virtio-mem: " Mario Casquero
2023-07-11 15:31   ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230711044647-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=gshan@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mcasquer@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.