qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Thomas Huth <thuth@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Markus Armbruster <armbru@redhat.com>,
	Shannon Zhao <zhaoshenglong@huawei.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: Re: [Qemu-devel] [RFC 19/19] virtio-mmio: Remove user_creatable flag
Date: Wed, 5 Apr 2017 10:30:40 +0200	[thread overview]
Message-ID: <2fd26554-9dd7-91dc-5bc0-cf9b317f9916@redhat.com> (raw)
In-Reply-To: <20170404193510.GA15929@thinpad.lan.raisama.net>

On 04/04/17 21:35, Eduardo Habkost wrote:
> On Mon, Apr 03, 2017 at 05:50:13PM +0200, Laszlo Ersek wrote:
>> On 04/01/17 02:46, Eduardo Habkost wrote:
>>> virtio-mmio needs to be wired and mapped by other device or board
>>> code, and won't work with -device. Remove the user_creatable flag
>>> from the device class.
>>>
>>> Cc: Peter Maydell <peter.maydell@linaro.org>
>>> Cc: Shannon Zhao <zhaoshenglong@huawei.com>
>>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>>> ---
>>>  hw/virtio/virtio-mmio.c | 5 -----
>>>  1 file changed, 5 deletions(-)
>>>
>>> diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
>>> index b595512a3d..5807aa87fe 100644
>>> --- a/hw/virtio/virtio-mmio.c
>>> +++ b/hw/virtio/virtio-mmio.c
>>> @@ -450,11 +450,6 @@ static void virtio_mmio_class_init(ObjectClass *klass, void *data)
>>>      dc->reset = virtio_mmio_reset;
>>>      set_bit(DEVICE_CATEGORY_MISC, dc->categories);
>>>      dc->props = virtio_mmio_properties;
>>> -    /*
>>> -     * FIXME: Set only for compatibility on q35 machine-type.
>>> -     * Probably never meant to be user-creatable
>>> -     */
>>> -    dc->user_creatable = true;
>>>  }
>>>  
>>>  static const TypeInfo virtio_mmio_info = {
>>>
>>
>> Possible addition to the commit message: a reference to commit
>> 587078f0ed63 ("hw/arm/virt: explain device-to-transport mapping in
>> create_virtio_devices()", 2015-02-05).
> 
> I'm confused by the comments there: it says "Unfortunately, we
> can't counteract the kernel change by reversing the loop; it
> would break existing command lines". But, which comment-lines it
> would break,

Reversing the order in which the platform code generates the virtio-mmio
transports would break guest kernel command lines that identify the root
filesystem by virtio device name, such as /dev/vda1 vs. /dev/vdb1.

And, a QEMU command line can actually contain the guest kernel command
line; consider -kernel / -initrd / -append. In that sense, if you break
the guest kernel command line, you break the QEMU command line as well.

> if "-device virtio-mmio" was never supported?

The relevant "-device" options on the qemu command line are not "-device
virtio-mmio"; they are "-device virtio-blk-device". QEMU first
auto-generates the virtio-mmio transports, then assigns those virtio
block devices to the transports. The comment documents the interplay between
- order of virtio mmio transport creation (QEMU),
- order of assigning virtio block devices to transports (QEMU),
- order of naming disks based on transport address (guest kernel).

Anyway, it's not important to include a reference to commit 587078f0ed63.

Thanks
Laszlo

> 
>>
>> That's another example showing that board code has to participate in
>> virtio-mmio transport placement.
>>
>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> Thanks!
> 

      reply	other threads:[~2017-04-05  8:30 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-01  0:46 [Qemu-devel] [RFC 00/19] sysbus: Don't allow -device/device_add by default Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 01/19] qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable Eduardo Habkost
2017-04-03 17:16   ` Alistair Francis
2017-04-01  0:46 ` [Qemu-devel] [RFC 02/19] s390: Add FIXME for unexplained user_creatable=false line Eduardo Habkost
2017-04-03  8:55   ` Cornelia Huck
2017-04-03 19:20     ` Eduardo Habkost
2017-04-04  6:46       ` Cornelia Huck
2017-04-01  0:46 ` [Qemu-devel] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE Eduardo Habkost
2017-04-03 19:49   ` Peter Maydell
2017-04-03 20:10     ` Eduardo Habkost
2017-04-03 20:15       ` Alexander Graf
2017-04-03 21:00         ` Eduardo Habkost
2017-04-04  6:53           ` Alexander Graf
2017-04-04  6:58             ` Thomas Huth
2017-04-04  7:02               ` Alexander Graf
2017-04-04 12:59                 ` Eduardo Habkost
2017-04-04 13:06                   ` Alexander Graf
2017-04-04 14:44                     ` Eduardo Habkost
2017-04-04 13:05             ` Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 04/19] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 05/19] pflash_cfi01: Remove user_creatable flag Eduardo Habkost
2017-04-03 12:43   ` Philippe Mathieu-Daudé
2017-04-03 15:45   ` Laszlo Ersek
2017-04-01  0:46 ` [Qemu-devel] [RFC 06/19] iommu: Remove FIXME comment about user_creatable=true Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 07/19] kvmclock: Remove user_creatable flag Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 08/19] ioapic: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 09/19] kvmvapic: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 10/19] sysbus-ahci: " Eduardo Habkost
2017-04-03 17:19   ` Alistair Francis
2017-04-01  0:46 ` [Qemu-devel] [RFC 11/19] allwinner-ahci: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 12/19] isabus-bridge: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 13/19] unimplemented-device: " Eduardo Habkost
2017-04-03 12:44   ` Philippe Mathieu-Daudé
2017-04-03 12:57   ` Peter Maydell
2017-04-03 13:34     ` Eduardo Habkost
2017-04-03 13:38       ` Peter Maydell
2017-04-03 13:54         ` Eduardo Habkost
2017-04-03 14:08           ` Peter Maydell
2017-04-03 18:30             ` Eduardo Habkost
2017-04-03 19:42               ` Peter Maydell
2017-04-03 20:05                 ` Eduardo Habkost
2017-04-04  7:05                   ` Thomas Huth
2017-04-04  7:12                     ` Alexander Graf
2017-04-04 13:12                       ` Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 14/19] fw_cfg: " Eduardo Habkost
2017-04-03 15:46   ` Laszlo Ersek
2017-04-01  0:46 ` [Qemu-devel] [RFC 15/19] esp: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 16/19] generic-sdhci: " Eduardo Habkost
2017-04-03 17:20   ` Alistair Francis
2017-04-01  0:46 ` [Qemu-devel] [RFC 17/19] hpet: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 18/19] sysbus-ohci: " Eduardo Habkost
2017-04-01  0:46 ` [Qemu-devel] [RFC 19/19] virtio-mmio: " Eduardo Habkost
2017-04-03 15:50   ` Laszlo Ersek
2017-04-04 19:35     ` Eduardo Habkost
2017-04-05  8:30       ` Laszlo Ersek [this message]

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=2fd26554-9dd7-91dc-5bc0-cf9b317f9916@redhat.com \
    --to=lersek@redhat.com \
    --cc=agraf@suse.de \
    --cc=armbru@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=zhaoshenglong@huawei.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).