Re: [PATCH v0 0/2] virtio-blk and vhost-user-blk cross-device migration

2021-10-05 Thread Eduardo Habkost
On Tue, Oct 05, 2021 at 03:01:05PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Oct 05, 2021 at 02:18:40AM +0300, Roman Kagan wrote: > > > On Mon, Oct 04, 2021 at 11:11:00AM -0400, Michael S. Tsirkin wrote: > > > > On Mon, Oct 04, 2021 at 06:07:29

Re: [PATCH for-6.2 05/12] [automated] Move QOM typedefs and add missing includes

2021-08-10 Thread Eduardo Habkost
On Tue, Aug 10, 2021 at 02:01:40PM +0200, Juan Quintela wrote: > Eduardo Habkost wrote: > > Some typedefs and macros are defined after the type check macros. > > This makes it difficult to automatically replace their > > definitions with OBJECT_DECLARE_TYPE. > >

[PATCH for-6.2 12/12] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible

2021-08-06 Thread Eduardo Habkost
Replace typedef + DECLARE_INSTANCE_CHECKER with equivalent OBJECT_DECLARE_SIMPLE_TYPE macro. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: Thomas Huth

[PATCH for-6.2 11/12] [automated] Use OBJECT_DECLARE_TYPE when possible

2021-08-06 Thread Eduardo Habkost
Replace typedefs + DECLARE_OBJ_CHECKERS with equivalent OBJECT_DECLARE_TYPE macro. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: John Snow Cc: Kevin Wol

[PATCH for-6.2 07/12] [automated] Use DECLARE_*CHECKER* macros when possible

2021-08-06 Thread Eduardo Habkost
type checker macros manually. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: "Marc-André Lureau" Cc: Paolo Bonzini Cc: Patrick Venture Cc: Thomas Huth

[PATCH for-6.2 06/12] [automated] Split QOM "typedef struct T { ... } T" declarations

2021-08-06 Thread Eduardo Habkost
automated removal of typedef lines will be easier and safer. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: "Marc-André Lureau" Cc: Paolo Bo

[PATCH for-6.2 05/12] [automated] Move QOM typedefs and add missing includes

2021-08-06 Thread Eduardo Habkost
]') which will: - split "typdef struct { ... } TypedefName" declarations - move the typedefs and #defines above the type check macros - add missing #include "qom/object.h" lines if necessary Signed-off-by: Eduardo Habkost --- Cc: Richard Henderson Cc: Paolo Bonzini Cc: &q

Re: [PATCH v4 01/34] modules: add modinfo macros

2021-06-24 Thread Eduardo Habkost
On Thu, Jun 24, 2021 at 12:38:03PM +0200, Gerd Hoffmann wrote: > Add macros for module info annotations. > > Instead of having that module meta-data stored in lists in util/module.c > place directly in the module source code. > [...] > +/* module implements QOM type */ > +#define module_obj(name

Re: [PATCH] virtio-blk: drop deprecated scsi=on|off property

2021-05-04 Thread Eduardo Habkost
On Tue, May 04, 2021 at 03:32:55PM +0100, Stefan Hajnoczi wrote: > On Thu, Apr 29, 2021 at 02:03:52PM -0400, Eduardo Habkost wrote: > > On Thu, Apr 29, 2021 at 04:52:21PM +0100, Stefan Hajnoczi wrote: > > > Live migrating old guests from an old QEMU with the SCSI feature bit

Re: [PATCH] virtio-blk: drop deprecated scsi=on|off property

2021-04-29 Thread Eduardo Habkost
On Thu, Apr 29, 2021 at 04:52:21PM +0100, Stefan Hajnoczi wrote: > The scsi=on|off property was deprecated in QEMU 5.0 and can be removed > completely at this point. > > Drop the scsi=on|off option. It was only available on Legacy virtio-blk > devices. Linux v5.6 already dropped support for it. >

Re: [PATCH 1/6] qdev: introduce qapi/hmp command for kick/call event

2021-04-07 Thread Eduardo Habkost
On Thu, Mar 25, 2021 at 10:44:28PM -0700, Dongli Zhang wrote: > The virtio device/driver (e.g., vhost-scsi or vhost-net) may hang due to > the loss of doorbell kick, e.g., > > https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg01711.html > > ... or due to the loss of IRQ, e.g., as fixed by

Re: [PATCH RFC 0/1] QOM type names and QAPI

2021-02-01 Thread Eduardo Habkost
On Fri, Jan 29, 2021 at 02:25:56PM +0100, Paolo Bonzini wrote: > On 29/01/21 13:17, Daniel P. Berrangé wrote: > > > On this one, my vote would be "no". "Versioned machine names > > > include the QEMU version number" is pretty well entrenched, > > > and requiring users to remember that when they wan

Re: [PATCH v4 23/32] qdev: Move dev->realized check to qdev_property_set()

2020-12-14 Thread Eduardo Habkost
On Mon, Dec 14, 2020 at 03:55:30PM +0100, Igor Mammedov wrote: > On Fri, 11 Dec 2020 17:05:20 -0500 > Eduardo Habkost wrote: > > > Every single qdev property setter function manually checks > > dev->realized. We can just check dev->realized inside > > qdev_pro

[PATCH v4 30/32] qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr()

2020-12-11 Thread Eduardo Habkost
The function will be moved to common QOM code, as it is not specific to TYPE_DEVICE anymore. Reviewed-by: Stefan Berger Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rename to object_field_prop_ptr() instead of object_static_prop_ptr() --- Cc: Stefan Berger Cc: Stefano Stabellini

[PATCH v4 23/32] qdev: Move dev->realized check to qdev_property_set()

2020-12-11 Thread Eduardo Habkost
ed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Removed unused variable at xen_block_set_vdev() * Redone patch after changes in the previous patches in the series --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bo

[PATCH v4 09/32] qdev: Make qdev_get_prop_ptr() get Object* arg

2020-12-11 Thread Eduardo Habkost
Make the code more generic and not specific to TYPE_DEVICE. Reviewed-by: Marc-André Lureau Reviewed-by: Cornelia Huck #s390 parts Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Fix build error with CONFIG_XEN I took the liberty of keeping the Reviewed-by line from Marc-André as

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-03 Thread Eduardo Habkost
On Thu, Dec 03, 2020 at 07:10:37PM +0100, Paolo Bonzini wrote: > On 03/12/20 18:52, Eduardo Habkost wrote: > > On Thu, Dec 03, 2020 at 05:50:46PM +0100, Paolo Bonzini wrote: > > > On 03/12/20 16:15, Kevin Wolf wrote: > > > > I don't think this is an intermedia

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-03 Thread Eduardo Habkost
On Thu, Dec 03, 2020 at 05:50:46PM +0100, Paolo Bonzini wrote: > On 03/12/20 16:15, Kevin Wolf wrote: > > I don't think this is an intermediate state like Eduardo wants to have. > > Creating the object, then setting properties, then realize [1] will fail > > after your change. But keeping it workin

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-03 Thread Eduardo Habkost
On Thu, Dec 03, 2020 at 07:46:29AM +0100, Gerd Hoffmann wrote: > Hi, > > > It would be much nicer to do the wrapper the other way round, i.e. > > setting properties before the device is realized would update a > > configuration struct and realize would then call .create() with that > > struct. T

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 06:35:06PM +0100, Kevin Wolf wrote: > Am 02.12.2020 um 17:05 hat Eduardo Habkost geschrieben: > > > > Looks nice as end goal. Then, these are a few questions I would > > > > have about the transition plan: > > > > > &

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 04:17:13PM +0100, Kevin Wolf wrote: > Am 02.12.2020 um 14:54 hat Eduardo Habkost geschrieben: > > On Wed, Dec 02, 2020 at 02:26:44PM +0100, Paolo Bonzini wrote: > > > On 02/12/20 13:51, Eduardo Habkost wrote: > > > > > > I'm liking

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 02:26:44PM +0100, Paolo Bonzini wrote: > On 02/12/20 13:51, Eduardo Habkost wrote: > > > > I'm liking the direction this is taking. However, I would still > > > > like to have a clearer and feasible plan that would work for >

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-02 Thread Eduardo Habkost
On Wed, Dec 02, 2020 at 10:30:11AM +0100, Paolo Bonzini wrote: > On 01/12/20 23:08, Eduardo Habkost wrote: > > > Properties are only a useful concept if they have a use. If > > > -object/object_add/object-add can do the same job without properties, > > > pro

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-01 Thread Eduardo Habkost
On Tue, Dec 01, 2020 at 10:23:57PM +0100, Paolo Bonzini wrote: > On 01/12/20 20:35, Kevin Wolf wrote: > > Am 01.12.2020 um 18:16 hat Paolo Bonzini geschrieben: > > I don't think this is actually a new things. We already have types and > > commands declared with things like 'if': 'defined(TARGET_S39

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-01 Thread Eduardo Habkost
On Tue, Dec 01, 2020 at 06:16:14PM +0100, Paolo Bonzini wrote: > On 01/12/20 17:20, Kevin Wolf wrote: [...] > > BlockdevOptions is about external interfaces, not about > > implementation details. Same thing as QOM properties are external > > interfaces, not implementation details. There may be fiel

[PATCH v2 6/6] Rename arch_init.h to arch_type.h

2020-11-25 Thread Eduardo Habkost
The only declarations in arch_init.h are related to the arch_type variable (which is a useful feature that allows us to simplify command line option handling). Rename the header to reflect its purpose. Signed-off-by: Eduardo Habkost --- Cc: Markus Armbruster Cc: Kevin Wolf Cc: Max Reitz Cc

[PATCH v3 23/53] qdev: Move dev->realized check to qdev_property_set()

2020-11-12 Thread Eduardo Habkost
ed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Removed unused variable at xen_block_set_vdev() * Redone patch after changes in the previous patches in the series --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bo

[PATCH v3 30/53] qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr()

2020-11-12 Thread Eduardo Habkost
The function will be moved to common QOM code, as it is not specific to TYPE_DEVICE anymore. Reviewed-by: Stefan Berger Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rename to object_field_prop_ptr() instead of object_static_prop_ptr() --- Cc: Stefan Berger Cc: Stefano Stabellini

[PATCH v3 09/53] qdev: Make qdev_get_prop_ptr() get Object* arg

2020-11-12 Thread Eduardo Habkost
Make the code more generic and not specific to TYPE_DEVICE. Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Fix build error with CONFIG_XEN I took the liberty of keeping the Reviewed-by line from Marc-André as the build fix is a trivial one line cha

[PATCH 6/7] qom: Add FIELD_PTR, a type-safe wrapper for object_field_prop_ptr()

2020-11-04 Thread Eduardo Habkost
Introduce a FIELD_PTR macro that will ensure the size of the area we are accessing has the correct size, and will return a pointer of the correct type. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max

[PATCH 4/7] qom: Replace void* parameter with Property* on field getters/setters

2020-11-04 Thread Eduardo Habkost
All field property getters and setters must interpret the fourth argument as Property*. Change the function signature of field property getters and setters to indicate that. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc

[PATCH v2 36/44] qdev: Rename qdev_get_prop_ptr() to object_field_prop_ptr()

2020-11-04 Thread Eduardo Habkost
The function will be moved to common QOM code, as it is not specific to TYPE_DEVICE anymore. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rename to object_field_prop_ptr() instead of object_static_prop_ptr() --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: P

[PATCH v2 22/44] qdev: Move dev->realized check to qdev_property_set()

2020-11-04 Thread Eduardo Habkost
Every single qdev property setter function manually checks dev->realized. We can just check dev->realized inside qdev_property_set() instead. The check is being added as a separate function (qdev_prop_allow_set()) because it will become a callback later. Signed-off-by: Eduardo H

[PATCH v2 09/44] qdev: Make qdev_get_prop_ptr() get Object* arg

2020-11-04 Thread Eduardo Habkost
Make the code more generic and not specific to TYPE_DEVICE. Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Fix build error with CONFIG_XEN I took the liberty of keeping the Reviewed-by line from Marc-André as the build fix is a trivial one line cha

--enable-xen on gitlab CI? (was Re: [PATCH 09/36] qdev: Make qdev_get_prop_ptr() get Object* arg)

2020-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2020 at 11:29:25AM +0400, Marc-André Lureau wrote: > On Fri, Oct 30, 2020 at 2:07 AM Eduardo Habkost wrote: > > > Make the code more generic and not specific to TYPE_DEVICE. > > > > Signed-off-by: Eduardo Habkost > > > > Nice cleanup!, but

[PATCH 14/36] qdev: Move dev->realized check to qdev_property_set()

2020-10-29 Thread Eduardo Habkost
Every single qdev property setter function manually checks dev->realized. We can just check dev->realized inside qdev_property_set() instead. The check is being added as a separate function (qdev_prop_allow_set()) because it will become a callback later. Signed-off-by: Eduardo Habkost

[PATCH 25/36] qdev: Rename qdev_get_prop_ptr() to object_static_prop_ptr()

2020-10-29 Thread Eduardo Habkost
The function will be moved to common QOM code, as it is not specific to TYPE_DEVICE anymore. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" C

[PATCH 09/36] qdev: Make qdev_get_prop_ptr() get Object* arg

2020-10-29 Thread Eduardo Habkost
Make the code more generic and not specific to TYPE_DEVICE. Signed-off-by: Eduardo Habkost --- Cc: Stefan Berger Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: Kevin Wolf Cc: Max Reitz Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: Richard

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 07:24:24PM +0200, Paolo Bonzini wrote: > On 30/09/20 19:15, Eduardo Habkost wrote: > > On Wed, Sep 30, 2020 at 06:49:38PM +0200, Philippe Mathieu-Daudé wrote: > >> This is the third part of a series reducing user-mode > >> dependencies. By str

Re: [PATCH v3 10/11] target/i386: Restrict X86CPUFeatureWord to X86 targets

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 06:49:48PM +0200, Philippe Mathieu-Daudé wrote: > Only qemu-system-FOO and qemu-storage-daemon provide QMP > monitors, therefore such declarations and definitions are > irrelevant for user-mode emulation. > > Restricting the x86-specific commands to machine-target.json > pu

Re: [PATCH v3 00/11] user-mode: Prune build dependencies (part 3)

2020-09-30 Thread Eduardo Habkost
On Wed, Sep 30, 2020 at 06:49:38PM +0200, Philippe Mathieu-Daudé wrote: > This is the third part of a series reducing user-mode > dependencies. By stripping out unused code, the build > and testing time is reduced (as is space used by objects). I'm queueing patches 2-9 on machine-next. Thanks! M

Re: [PATCH 0/5] qom: Convert more declarations to OBJECT_DECLARE*

2020-09-18 Thread Eduardo Habkost
On Wed, Sep 16, 2020 at 02:25:14PM -0400, Eduardo Habkost wrote: > This converts many QOM types to use OBJECT_DECLARE* instead of > manually using DECLARE*_CHECKER*. > > Before doing that, I'm simplifying the OBJECT_DECLARE* API to > make it easier to use and more diffi

[PATCH 4/5] [automated] Use OBJECT_DECLARE_TYPE when possible

2020-09-16 Thread Eduardo Habkost
This converts existing DECLARE_OBJ_CHECKERS usage to OBJECT_DECLARE_TYPE when possible. $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: Peter Maydell Cc: Andrzej Zaborowski

[PATCH 3/5] qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros

2020-09-16 Thread Eduardo Habkost
; identifier InstanceType, lowercase, UPPERCASE; @@ OBJECT_DECLARE_SIMPLE_TYPE(InstanceType, -lowercase, UPPERCASE); Signed-off-by: Eduardo Habkost --- Cc: "Marc-André Lureau" Cc: Gerd Hoffmann Cc: "Michael S. Tsirkin" Cc: "Danie

Re: [PATCH 00/63] qom: Rename macros for consistency

2020-09-03 Thread Eduardo Habkost
On Wed, Sep 02, 2020 at 06:42:08PM -0400, Eduardo Habkost wrote: > Reducing boilerplate QOM code using the new OBJECT_DEFINE_* and > OBJECT_DECLARE_* macros is quite difficult when there are > multiple ways a TYPE_* constant name is written. > > This series renames many type chec

[PATCH 32/63] ahci: Rename ICH_AHCI to ICH9_AHCI

2020-09-02 Thread Eduardo Habkost
Make the type checking macro name consistent with the TYPE_* constant. Signed-off-by: Eduardo Habkost --- Cc: John Snow Cc: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org --- include/hw/ide/ahci.h | 2 +- hw/ide/ahci.c | 4 ++-- hw/ide/ich.c | 8 3 files changed, 7

Re: [PATCH v4 00/18] qom: Automated conversion of type checking boilerplate

2020-09-02 Thread Eduardo Habkost
On Mon, Aug 31, 2020 at 05:07:22PM -0400, Eduardo Habkost wrote: > Latest version of this series can be found at the branch: > https://github.com/ehabkost/qemu-hacks/tree/work/qom-macros-autoconvert > > This is an extension of the series previously submitted by > Daniel[1], inc

[PATCH v4 15/18] [automated] Use OBJECT_DECLARE_TYPE where possible

2020-08-31 Thread Eduardo Habkost
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé Signed-off

[PATCH v4 14/18] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode)

2020-08-31 Thread Eduardo Habkost
'*.[ch]') Then each case was manually reviewed, and a comment was added indicating what's unusual about those type checking macros/functions. Despite not following the usual pattern, the changes in this patch were found to be safe. Reviewed-by: Daniel P. Berrangé Signed-off-by: E

Re: [PATCH v3 00/74] qom: Automated conversion of type checking boilerplate

2020-08-27 Thread Eduardo Habkost
On Tue, Aug 25, 2020 at 03:19:56PM -0400, Eduardo Habkost wrote: > git tree for this series: > https://github.com/ehabkost/qemu-hacks/tree/work/qom-macros-autoconvert > > This is an extension of the series previously submitted by > Daniel[1], including a script that will conver

Re: [PATCH v3 72/74] [automated] Remove redundant instance_size/class_size fields

2020-08-26 Thread Eduardo Habkost
On Tue, Aug 25, 2020 at 03:21:08PM -0400, Eduardo Habkost wrote: > This will remove instance_size/class_size fields from TypeInfo > variables when the value is exactly the same as the one in the > parent class. > > Generated by: > > $ ./scripts/codeconverter/converter.p

[PATCH v3 72/74] [automated] Remove redundant instance_size/class_size fields

2020-08-25 Thread Eduardo Habkost
y: Eduardo Habkost --- Changes series v2 -> v3: this is a new patch in series v3 --- Cc: "Marc-André Lureau" Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: "Cédric Le Goater" Cc: Peter Maydell Cc: Andrew Jeffery Cc: Joel Stanley Cc: Jan Kiszka Cc: Eduardo Ha

[PATCH v3 69/74] [automated] Use OBJECT_DECLARE_TYPE where possible

2020-08-25 Thread Eduardo Habkost
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé Signed-off

[PATCH v3 49/74] swim: Rename struct SWIM to Swim

2020-08-25 Thread Eduardo Habkost
RE* easier. Signed-off-by: Eduardo Habkost --- Changes series v2 -> v3: new patch added to series v3 --- Cc: Laurent Vivier Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org Signed-off-by: Eduardo Habkost --- include/hw/block/swim.h | 6 +++--- hw

[PATCH v3 30/74] ahci: Move QOM macros to header

2020-08-25 Thread Eduardo Habkost
The TYPE_* constants and the typedefs are defined in ahci.h, so we can move the type checking macros there too. This will make future conversion to OBJECT_DECLARE* easier. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: none Changes series v1 -> v

[PATCH v3 68/74] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode)

2020-08-25 Thread Eduardo Habkost
'*.[ch]') Then each case was manually reviewed, and a comment was added indicating what's unusual about those type checking macros/functions. Despite not following the usual pattern, the changes in this patch were found to be safe. Reviewed-by: Daniel P. Berrangé Signed-off-by: E

[PATCH v3 32/74] ahci: Move QOM macro to header

2020-08-25 Thread Eduardo Habkost
Move the ALLWINNER_AHCI macro close to the TYPE_ALLWINNER_AHCI define. This will make future conversion to OBJECT_DECLARE* easier. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: none Changes series v1 -> v2: new patch in series v2 Cc: John Snow Cc

[PATCH v3 16/74] throttle-groups: Move ThrottleGroup typedef to header

2020-08-25 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: none Changes v1 -> v2: none --- Cc: A

[PATCH v3 02/74] megasas: Rename QOM class cast macros

2020-08-25 Thread Eduardo Habkost
Rename the MEGASAS_DEVICE_CLASS() and MEGASAS_DEVICE_GET_CLASS() macros to be consistent with the MEGASAS() instance cast macro. This will allow us to register the type cast macros using OBJECT_DECLARE_TYPE later. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v2

Re: Suspicious QOM types without instance/class size

2020-08-24 Thread Eduardo Habkost
On Mon, Aug 24, 2020 at 08:06:42PM +0300, Roman Bolshakov wrote: > On Mon, Aug 24, 2020 at 12:45:52PM -0400, Eduardo Habkost wrote: > > On Mon, Aug 24, 2020 at 07:41:34PM +0300, Roman Bolshakov wrote: > > > On Fri, Aug 21, 2020 at 01:48:02PM -0400, Eduardo Habkost wrote: >

Re: Suspicious QOM types without instance/class size

2020-08-24 Thread Eduardo Habkost
On Mon, Aug 24, 2020 at 07:41:34PM +0300, Roman Bolshakov wrote: > On Fri, Aug 21, 2020 at 01:48:02PM -0400, Eduardo Habkost wrote: > > On Fri, Aug 21, 2020 at 01:29:38PM -0400, Eduardo Habkost wrote: > > > On Fri, Aug 21, 2020 at 01:53:52PM +0300, Roman Bolshakov wrote: >

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 11:43:35AM +0200, Cornelia Huck wrote: > On Thu, 20 Aug 2020 17:55:29 -0400 > Eduardo Habkost wrote: > > > While trying to convert TypeInfo declarations to the new > > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > > wher

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 11:40:12AM +0200, David Hildenbrand wrote: > On 20.08.20 23:55, Eduardo Habkost wrote: > > While trying to convert TypeInfo declarations to the new > > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > > where instance_size or clas

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 11:47:32AM +1000, David Gibson wrote: > On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: > > While trying to convert TypeInfo declarations to the new > > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > > where inst

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 01:29:38PM -0400, Eduardo Habkost wrote: > On Fri, Aug 21, 2020 at 01:53:52PM +0300, Roman Bolshakov wrote: > > On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: > > > While trying to convert TypeInfo declarations to the new > > > O

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 01:53:52PM +0300, Roman Bolshakov wrote: > On Thu, Aug 20, 2020 at 05:55:29PM -0400, Eduardo Habkost wrote: > > While trying to convert TypeInfo declarations to the new > > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > > where i

Re: Suspicious QOM types without instance/class size

2020-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 09:06:51AM -0700, Alistair Francis wrote: > On Thu, Aug 20, 2020 at 2:56 PM Eduardo Habkost wrote: > > > > While trying to convert TypeInfo declarations to the new > > OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases > > wher

Suspicious QOM types without instance/class size

2020-08-20 Thread Eduardo Habkost
While trying to convert TypeInfo declarations to the new OBJECT_DECLARE* macros, I've stumbled on a few suspicious cases where instance_size or class_size is not set, despite having type checker macros that use a specific type. The ones with "WARNING" are abstract types (maybe not serious if subcl

[PATCH v2 32/58] ahci: Move QOM macro to header

2020-08-19 Thread Eduardo Habkost
Move the ALLWINNER_AHCI macro close to the TYPE_ALLWINNER_AHCI define. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: John Snow Cc: qemu-block@nongnu.org Cc: qemu-de...@nongnu.org --- incl

[PATCH v2 16/58] throttle-groups: Move ThrottleGroup typedef to header

2020-08-19 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Alberto Garcia Cc: Kevin Wolf

[PATCH v2 30/58] ahci: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
The TYPE_* constants and the typedefs are defined in ahci.h, so we can move the type checking macros there too. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: John Snow Cc: qemu-bl

[PATCH v2 02/58] megasas: Rename QOM class cast macros

2020-08-19 Thread Eduardo Habkost
Rename the MEGASAS_DEVICE_CLASS() and MEGASAS_DEVICE_GET_CLASS() macros to be consistent with the MEGASAS() instance cast macro. This will allow us to register the type cast macros using OBJECT_DECLARE_TYPE later. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1

Re: [PATCH] ide: Get rid of IDEDrive struct

2020-08-05 Thread Eduardo Habkost
On Wed, Aug 05, 2020 at 09:41:25PM +0100, Peter Maydell wrote: > On Wed, 5 Aug 2020 at 20:49, Eduardo Habkost wrote: > > > > The struct had a single field (IDEDevice dev), and is only used > > in the QOM type declarations and property lists. We can simply > > use th

[PATCH] ide: Get rid of IDEDrive struct

2020-08-05 Thread Eduardo Habkost
The struct had a single field (IDEDevice dev), and is only used in the QOM type declarations and property lists. We can simply use the IDEDevice struct directly instead. Signed-off-by: Eduardo Habkost --- hw/ide/qdev.c | 25 + 1 file changed, 9 insertions(+), 16

Re: cleanups with long-term benefits

2020-08-05 Thread Eduardo Habkost
On Wed, Aug 05, 2020 at 06:23:23PM +0200, Kevin Wolf wrote: > Am 05.08.2020 um 12:08 hat Daniel P. Berrangé geschrieben: > > On Wed, Aug 05, 2020 at 11:11:55AM +0200, Cornelia Huck wrote: > > > On Wed, 5 Aug 2020 10:05:40 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Wed, Aug 05, 2020

Re: [PATCH v6] scripts/simplebench: compare write request performance

2020-07-14 Thread Eduardo Habkost
On Tue, Jul 14, 2020 at 07:05:05PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi Eduardo! > > Could you please stage this in your branch, to be pulled for 5.2 later? Queued, thanks! > > 14.07.2020 18:50, Andrey Shinkevich wrote: > > The script 'bench_write_req.py' allows comparing performance

Re: [PULL 00/12] Block patches

2020-07-09 Thread Eduardo Habkost
On Thu, Jul 09, 2020 at 05:02:06PM +0200, Kevin Wolf wrote: > Am 08.07.2020 um 00:05 hat Eduardo Habkost geschrieben: > > On Tue, Jul 07, 2020 at 05:28:21PM +0200, Philippe Mathieu-Daudé wrote: > > > On 6/26/20 12:25 PM, Stefan Hajnoczi wrote: > > > > On Thu, Ju

Re: [PULL 00/12] Block patches

2020-07-08 Thread Eduardo Habkost
On Tue, Jul 07, 2020 at 05:28:21PM +0200, Philippe Mathieu-Daudé wrote: > On 6/26/20 12:25 PM, Stefan Hajnoczi wrote: > > On Thu, Jun 25, 2020 at 02:31:14PM +0100, Peter Maydell wrote: > >> On Wed, 24 Jun 2020 at 11:02, Stefan Hajnoczi wrote: > >>> > >>> The following changes since commit > >>>

Re: [PATCH 0/2] block: propagate discard alignment from format drivers to the guest

2020-06-19 Thread Eduardo Habkost
fixed typos in description > - added machine type compatibility layer as suggested by Kevin > > Signed-off-by: Denis V. Lunev > CC: Kevin Wolf > CC: Max Reitz > CC: Eduardo Habkost > CC: Marcel Apfelbaum > CC: John Snow > CC: Paolo Bonzini > CC: Fam Zheng > > -- Eduardo

Re: ping Re: [PATCH for-5.0 v2 0/3] benchmark util

2020-02-27 Thread Eduardo Habkost
Sorry, this is due to lack of bandwidth of maintainers who can review those patches. I have one suggestion: if you make your script self-contained inside a scripts/ subdirectory, it would be simpler to merge it without detailed reviews from others. The python/ subdirectory is supposed to appear o

Re: [PULL v2 00/46] Python queue 2020-02-07

2020-02-07 Thread Eduardo Habkost
g/msg677636.html Acked-by: Eduardo Habkost > > Since 2020-02-06 (v1): > - rebased to cover new iotests #283 (merged yesterday). > > Regards, > > Phil. > > The following changes since commit 863d2ed5823f90c42dcd481687cc99cbc9c4a17c: > > Merge remote-tracking b

Re: Can we retire Python 2 now?

2019-12-20 Thread Eduardo Habkost
On Fri, Dec 20, 2019 at 05:29:30PM +0100, Markus Armbruster wrote: > Python 2 EOL is only a few days away[*]. We made configure bitch about > it in commit e5abf59eae "Deprecate Python 2 support", 2019-07-01. Any > objections to retiring it now, i.e. in 5.0? Thanks for the reminder! I'll be hone

Re: [PATCH v0 1/2] qdev-properties-system: extend set_pionter for unrealized devices

2019-11-25 Thread Eduardo Habkost
On Fri, Nov 22, 2019 at 11:36:30AM +, Denis Plotnikov wrote: > > > On 18.11.2019 21:54, Eduardo Habkost wrote: > > On Sun, Nov 10, 2019 at 10:03:09PM +0300, Denis Plotnikov wrote: > >> Some device's property can be changed if the device has been already > &g

Re: [PATCH v0 1/2] qdev-properties-system: extend set_pionter for unrealized devices

2019-11-18 Thread Eduardo Habkost
On Sun, Nov 10, 2019 at 10:03:09PM +0300, Denis Plotnikov wrote: > Some device's property can be changed if the device has been already > realized. For example, it could be "drive" property of a scsi disk device. > > So far, set_pointer could operate only on a relized device. The patch > extends i

Re: [PATCH v1 4/4] iotests: add test for virtio-scsi and virtio-blk machine type settings

2019-11-06 Thread Eduardo Habkost
On Wed, Nov 06, 2019 at 11:04:16AM +0100, Max Reitz wrote: > On 06.11.19 10:24, Stefan Hajnoczi wrote: > > On Tue, Nov 05, 2019 at 07:11:05PM +0300, Denis Plotnikov wrote: > >> It tests proper queue size settings for all available machine types. > >> > >> Signed-off-by: Denis Plotnikov > >> --- >

Re: [PATCH 00/10] image-fuzzer: Port to Python 3

2019-10-22 Thread Eduardo Habkost
On Thu, Oct 17, 2019 at 06:29:27PM -0300, Eduardo Habkost wrote: > On Thu, Oct 17, 2019 at 05:11:29PM -0400, John Snow wrote: > > > > > > On 10/16/19 3:24 PM, Eduardo Habkost wrote: > > > This series ports image-fuzzer to Python 3. > > > > > >

[PATCH] image-fuzzer: Use OSerror.strerror instead of tuple subscript

2019-10-21 Thread Eduardo Habkost
OSError can't be used like a tuple on Python 3, so change the code to use `e.sterror` instead of `e[1]`. Reported-by: John Snow Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/runner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/image-fuzzer/runner

Re: [PATCH 00/10] image-fuzzer: Port to Python 3

2019-10-17 Thread Eduardo Habkost
On Thu, Oct 17, 2019 at 05:11:29PM -0400, John Snow wrote: > > > On 10/16/19 3:24 PM, Eduardo Habkost wrote: > > This series ports image-fuzzer to Python 3. > > > > Eduardo Habkost (10): > > image-fuzzer: Open image files in binary mode > > image-f

[PATCH 09/10] image-fuzzer: Run using python3

2019-10-16 Thread Eduardo Habkost
image-fuzzer is now supposed to be ready to run using Python 3. Remove the __future__ imports and change the interpreter line to "#!/usr/bin/env python3". Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/__init__.py | 1 - tests/image-fuzzer/qcow2/layout.py | 1 - t

[PATCH 05/10] image-fuzzer: Use %r for all fiels at Field.__repr__()

2019-10-16 Thread Eduardo Habkost
This makes the formatting code simpler, and safer if we change the type of self.value from str to bytes. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/image-fuzzer/qcow2/layout.py b/tests

[PATCH 04/10] image-fuzzer: Use io.StringIO

2019-10-16 Thread Eduardo Habkost
StringIO.StringIO is not available on Python 3, but io.StringIO is available on both Python 2 and 3. io.StringIO is slightly different from the Python 2 StringIO module, though, so we need bytes coming from subprocess.Popen() to be explicitly decoded. Signed-off-by: Eduardo Habkost --- tests

[PATCH 03/10] image-fuzzer: Explicitly use integer division operator

2019-10-16 Thread Eduardo Habkost
Most of the division expressions in image-fuzzer assume integer division. Use the // operator to keep the same behavior when we move to Python 3. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/fuzz.py | 12 - tests/image-fuzzer/qcow2/layout.py | 40

[PATCH 10/10] image-fuzzer: Use errors parameter of subprocess.Popen()

2019-10-16 Thread Eduardo Habkost
Instead of manually encoding stderr and stdout output, use `errors` parameter of subprocess.Popen(). This will make process.communicate() return unicode strings instead of bytes objects. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/runner.py | 11 --- 1 file changed, 4

[PATCH 08/10] image-fuzzer: Encode file name and file format to bytes

2019-10-16 Thread Eduardo Habkost
Callers of create_image() will pass strings as arguments, but the Image class will expect bytes objects to be provided. Encode them inside create_image(). Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 07/10] image-fuzzer: Use bytes constant for field values

2019-10-16 Thread Eduardo Habkost
Field values are supposed to be bytes objects, not unicode strings. Change two constants that were declared as strings. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/image-fuzzer/qcow2

[PATCH 02/10] image-fuzzer: Write bytes instead of string to image file

2019-10-16 Thread Eduardo Habkost
This is necessary for Python 3 compatibility. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/image-fuzzer/qcow2/layout.py b/tests/image-fuzzer/qcow2/layout.py index c57418fa15..fe273d4143 100644

[PATCH 06/10] image-fuzzer: Return bytes objects on string fuzzing functions

2019-10-16 Thread Eduardo Habkost
No caller of fuzzer functions is interested in unicode string values, so replace them with bytes sequences. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/fuzz.py | 42 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/image

[PATCH 01/10] image-fuzzer: Open image files in binary mode

2019-10-16 Thread Eduardo Habkost
This probably never caused problems because on Linux there's no actual newline conversion happening, but on Python 3 the binary/text distinction is stronger and we must explicitly open the image file in binary mode. Signed-off-by: Eduardo Habkost --- tests/image-fuzzer/qcow2/layout.py | 2

[PATCH 00/10] image-fuzzer: Port to Python 3

2019-10-16 Thread Eduardo Habkost
This series ports image-fuzzer to Python 3. Eduardo Habkost (10): image-fuzzer: Open image files in binary mode image-fuzzer: Write bytes instead of string to image file image-fuzzer: Explicitly use integer division operator image-fuzzer: Use io.StringIO image-fuzzer: Use %r for all

Re: [PATCH v3 0/8] hw: Convert various reset() handler to DeviceReset

2019-10-10 Thread Eduardo Habkost
Queueing on machine-next. Thanks! On Thu, Oct 10, 2019 at 03:15:19PM +0200, Philippe Mathieu-Daudé wrote: > Only patch 3/8 is missing review: > - hw/ide/piix: Convert reset handler to DeviceReset > > Since v2: > - Fixed PIIX_IDE conversion (Li) > - Added more R-b tag. > > Since v1: > - Removed

  1   2   3   >