qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] List of files containing devices which have not been QOMified
Date: Wed, 7 Nov 2018 00:09:23 +0100	[thread overview]
Message-ID: <ce8c76ea-2e3a-b049-d515-c52f004bfec6@redhat.com> (raw)
In-Reply-To: <CAFEAcA-Wkk9wLOfSYs2_R_2WwSe59egU4dwRBpdALDaA7642mQ@mail.gmail.com>

On 07/11/2018 00:05, Peter Maydell wrote:
> On 6 November 2018 at 19:46, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 06/11/2018 19:43, Peter Maydell wrote:
>>> hw/core/ptimer.c
>>
>> Not a device.
> 
> Indeed not, but it could be a QOM object I guess (would
> that gain us anything?)

I don't know, it seems to me more like a generic high-level abstraction
around QEMUTimer.

>>> hw/i2c/bitbang_i2c.c
>>
>> TYPE_GPIO_I2C?
> 
> That part is, but bitbang_i2c_init() creates an object
> which isn't a QOM object and is used by some other i2c devices.

Ah, I see.  Then I think it is in the same family as AHCIState.

>>> hw/ide/ahci.c
>>
>> Even though AHCIState is not a QOM object, all of its users are
>> (TYPE_SYSBUS_AHCI is in this file, TYPE_ICH9_AHCI is in hw/ide/ich.c)
> 
> Mmm, this is one of those which I was unsure about so
> put on the list anyway.
> 
> Overall something that occurs to me is that I'm not sure
> what exactly (other than tidiness) we gain from converting
> remaining non-QOM devices. In some of the other cases I've
> looked at (like sysbus init methods or old_mmio users) we
> get to complete an API transition and remove the old code.
> For a non-QOM device, how much does it hurt us that they're
> lying around in the codebase? We might do better to
> specifically target APIs we'd like to deal with (like
> direct uses of vmstate_register, maybe?).

Yes, those are ugly and are definitely a sign of a legacy device
(non-qdev even before QOM).  serial_mm_init is the main example as you
point out below.

Paolo

> Some bits I would definitely like to see cleaned up are
> the things like the mmio version of the 16550 UART code
> in hw/char/serial.c -- that not being QOMified has
> knock-on effects in making other devices that would
> like to basically just be 16550-wrappers harder to
> write in a clean way.

  reply	other threads:[~2018-11-06 23:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 18:43 [Qemu-devel] List of files containing devices which have not been QOMified Peter Maydell
2018-11-06 19:16 ` Philippe Mathieu-Daudé
2018-11-06 23:06   ` Peter Maydell
2018-11-07 15:22     ` Philippe Mathieu-Daudé
2018-11-06 19:43 ` Paolo Bonzini
2018-11-06 19:46 ` Paolo Bonzini
2018-11-06 19:51   ` Alistair Francis
2018-11-06 21:23   ` John Snow
2018-11-06 21:26     ` Paolo Bonzini
2018-11-06 23:05   ` Peter Maydell
2018-11-06 23:09     ` Paolo Bonzini [this message]
2018-11-07 18:53 ` Palmer Dabbelt
2018-11-09 10:17 ` Mark Cave-Ayland
2018-11-09 10:31   ` Peter Maydell
2018-11-10 15:20     ` Mark Cave-Ayland
2018-11-12 10:57       ` Peter Maydell
2018-11-09 11:17 ` Gerd Hoffmann
2018-11-09 11:29   ` Gerd Hoffmann
2018-11-09 12:39     ` Thomas Huth
2018-11-09 12:44       ` Peter Maydell
2018-11-09 13:16       ` Paolo Bonzini
2018-11-09 14:03         ` [Qemu-devel] deprecating/removing bluetooth (was: Re: List of files containing devices which have not been QOMified) Gerd Hoffmann
2018-11-12  8:51         ` [Qemu-devel] List of files containing devices which have not been QOMified Thomas Huth

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=ce8c76ea-2e3a-b049-d515-c52f004bfec6@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 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).