Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-12 Thread Peter Maydell
On 10 November 2018 at 15:20, Mark Cave-Ayland wrote: > On 09/11/2018 10:31, Peter Maydell wrote: >> I think the code I saw that looked like a non-QOMified >> device was cpu_timer_create(). > Ah okay. The above timers are certainly internal CPU timers rather than > external, so > should they sti

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-12 Thread Thomas Huth
On 2018-11-09 14:16, Paolo Bonzini wrote: > On 09/11/2018 13:39, Thomas Huth wrote: >> On 2018-11-09 12:29, Gerd Hoffmann wrote: >>> On Fri, Nov 09, 2018 at 12:17:31PM +0100, Gerd Hoffmann wrote: Hi, > I am also suspicious about hw/bt/ but don't know enough > about that subsyste

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-10 Thread Mark Cave-Ayland
On 09/11/2018 10:31, Peter Maydell wrote: > On 9 November 2018 at 10:17, Mark Cave-Ayland > wrote: >> On 06/11/2018 18:43, Peter Maydell wrote: >> >>> I had an idea for how to get a rough list of source files >>> containing devices that haven't been QOMified. The theory >>> is that a pre-QOM devi

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Paolo Bonzini
On 09/11/2018 13:39, Thomas Huth wrote: > On 2018-11-09 12:29, Gerd Hoffmann wrote: >> On Fri, Nov 09, 2018 at 12:17:31PM +0100, Gerd Hoffmann wrote: >>> Hi, >>> I am also suspicious about hw/bt/ but don't know enough about that subsystem to say if it could benefit from using QOM o

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Peter Maydell
On 9 November 2018 at 12:39, Thomas Huth wrote: > On 2018-11-09 12:29, Gerd Hoffmann wrote: >> On Fri, Nov 09, 2018 at 12:17:31PM +0100, Gerd Hoffmann wrote: >>> Hi, >>> I am also suspicious about hw/bt/ but don't know enough about that subsystem to say if it could benefit from us

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Thomas Huth
On 2018-11-09 12:29, Gerd Hoffmann wrote: > On Fri, Nov 09, 2018 at 12:17:31PM +0100, Gerd Hoffmann wrote: >> Hi, >> >>> I am also suspicious about hw/bt/ but don't know enough >>> about that subsystem to say if it could benefit from >>> using QOM objects more. >> >> I'm wondering whenever anyone

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Gerd Hoffmann
On Fri, Nov 09, 2018 at 12:17:31PM +0100, Gerd Hoffmann wrote: > Hi, > > > I am also suspicious about hw/bt/ but don't know enough > > about that subsystem to say if it could benefit from > > using QOM objects more. > > I'm wondering whenever anyone would even notice if we just rm -rf hw/bt >

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Gerd Hoffmann
Hi, > I am also suspicious about hw/bt/ but don't know enough > about that subsystem to say if it could benefit from > using QOM objects more. I'm wondering whenever anyone would even notice if we just rm -rf hw/bt Looking through the changelog for the last five years (after hw/ split) the onl

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Peter Maydell
On 9 November 2018 at 10:17, Mark Cave-Ayland wrote: > On 06/11/2018 18:43, Peter Maydell wrote: > >> I had an idea for how to get a rough list of source files >> containing devices that haven't been QOMified. The theory >> is that a pre-QOM device generally has an "init" function >> which allocat

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-09 Thread Mark Cave-Ayland
On 06/11/2018 18:43, Peter Maydell wrote: > I had an idea for how to get a rough list of source files > containing devices that haven't been QOMified. The theory > is that a pre-QOM device generally has an "init" function > which allocates memory for the device struct. So looking in > hw/ for file

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-07 Thread Palmer Dabbelt
On Tue, 06 Nov 2018 10:43:17 PST (-0800), Peter Maydell wrote: I had an idea for how to get a rough list of source files containing devices that haven't been QOMified. The theory is that a pre-QOM device generally has an "init" function which allocates memory for the device struct. So looking in

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-07 Thread Philippe Mathieu-Daudé
On 7/11/18 0:06, Peter Maydell wrote: On 6 November 2018 at 19:16, Philippe Mathieu-Daudé wrote: On 6/11/18 19:43, Peter Maydell wrote: I had an idea for how to get a rough list of source files containing devices that haven't been QOMified. The theory is that a pre-QOM device generally has an

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 07/11/2018 00:05, Peter Maydell wrote: > On 6 November 2018 at 19:46, Paolo Bonzini 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 m

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 19:16, Philippe Mathieu-Daudé wrote: > On 6/11/18 19:43, Peter Maydell wrote: >> >> I had an idea for how to get a rough list of source files >> containing devices that haven't been QOMified. The theory >> is that a pre-QOM device generally has an "init" function >> which all

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Peter Maydell
On 6 November 2018 at 19:46, Paolo Bonzini 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?) >> hw/i2c/bitbang_i2c.c > > TYPE_GPIO_I2C? That part is, but bitbang_i2c_init() cre

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 22:23, John Snow wrote: > > > On 11/06/2018 02:46 PM, Paolo Bonzini wrote: >> On 06/11/2018 19:43, Peter Maydell wrote: > >>> 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)

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread John Snow
On 11/06/2018 02:46 PM, Paolo Bonzini wrote: > On 06/11/2018 19:43, Peter Maydell wrote: >> 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). > Yeah, if there's something *further* that n

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Alistair Francis
On Tue, Nov 6, 2018 at 11:47 AM Paolo Bonzini wrote: > > On 06/11/2018 19:43, Peter Maydell wrote: > > hw/core/ptimer.c > > Not a device. > > > hw/i2c/bitbang_i2c.c > > TYPE_GPIO_I2C? > > > hw/ide/ahci.c > > Even though AHCIState is not a QOM object, all of its users are > (TYPE_SYSBUS_AHCI is in

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 19:43, Peter Maydell wrote: > hw/core/ptimer.c Not a device. > hw/i2c/bitbang_i2c.c TYPE_GPIO_I2C? > 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). Paolo

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Paolo Bonzini
On 06/11/2018 19:43, Peter Maydell wrote: > hw/pci/shpc.c ? This is not a device, it is a PCI capability. Paolo

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Philippe Mathieu-Daudé
On 6/11/18 19:43, Peter Maydell wrote: I had an idea for how to get a rough list of source files containing devices that haven't been QOMified. The theory is that a pre-QOM device generally has an "init" function which allocates memory for the device struct. So looking in hw/ for files which call

[Qemu-devel] List of files containing devices which have not been QOMified

2018-11-06 Thread Peter Maydell
I had an idea for how to get a rough list of source files containing devices that haven't been QOMified. The theory is that a pre-QOM device generally has an "init" function which allocates memory for the device struct. So looking in hw/ for files which call g_new*() or g_malloc*() should get us al