[PATCH for-6.2 01/12] accel: Rename TYPE_ACCEL to TYPE_ACCEL_BASE

2021-08-06 Thread Eduardo Habkost
by renaming TYPE_ACCEL to TYPE_ACCEL_BASE. Note that the actual QOM type name is still "accel", because QOM type names are user-visible and I don't want to make any user-visible change here. Signed-off-by: Eduardo Habkost --- Notes about name alternatives: I have considered using the name

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 >

[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-An

Re: [PATCH-for-6.0 v4 15/17] gitlab-ci: Add test for Xen (on CentOS 7)

2020-11-26 Thread Eduardo Habkost
never been in CentOS 8, I'm working on it, slowly. > > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > Cc: Eduardo Habkost > > Cc: Stefano Stabellini > > Cc: Anthony Perard > > Cc: Paul Durrant > > Cc: xen-devel@lists.xenproject.org > >

[PATCH v2 4/6] xen: Delete xen_available() function

2020-11-25 Thread Eduardo Habkost
The function can be replaced with accel_available("xen"). Signed-off-by: Eduardo Habkost --- Cc: Paolo Bonzini Cc: qemu-de...@nongnu.org Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: xen-devel@lists.xenproject.org Cc: Richard Henderson Cc: Claudio Fontana

[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 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 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 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 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 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 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

[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

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 diff

[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

[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 Cc: Alistair Francis

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

2020-09-03 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 57/63] xen: Rename XENBACKEND_DEVICE to XENBACKEND

2020-09-02 Thread Eduardo Habkost
Make the type checking macro name consistent with the TYPE_* constant. Signed-off-by: Eduardo Habkost --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: xen-devel@lists.xenproject.org Cc: qemu-de...@nongnu.org --- include/hw/xen/xen-legacy-backend.h | 2 +- 1 file changed, 1

[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-by: Eduardo Habkost

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
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 Habkost Cc:

[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-by: Eduardo Habkost

[PATCH v3 26/74] xen-legacy-backend: Add missing typedef XenLegacyDevice

2020-08-25 Thread Eduardo Habkost
The typedef was used in the XENBACKEND_DEVICE macro, but it was never defined. Define the typedef close to the type checking macro. Acked-by: Anthony PERARD Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v2 -> v3: none Changes series v1 -> v2: new patch in

[PATCH v2 26/58] xen-legacy-backend: Add missing typedef XenLegacyDevice

2020-08-19 Thread Eduardo Habkost
The typedef was used in the XENBACKEND_DEVICE macro, but it was never defined. Define the typedef close to the type checking macro. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: xen-de

Re: [Xen-devel] [Qemu-devel] [PATCH 3/3] machine: Use shorter format for GlobalProperty arrays

2019-01-09 Thread Eduardo Habkost
On Tue, Jan 08, 2019 at 11:20:12AM +0100, Cornelia Huck wrote: > On Tue, 8 Jan 2019 07:45:43 +0100 > Gerd Hoffmann wrote: > > > Hi, > > > > > +{ "migration", "decompress-error-check", "off" }, > > > +{ "hda-audio", "use-timer", "false" }, > > > +{ "cirrus-vga", "global-vmstate",

[Xen-devel] [PATCH 3/3] machine: Use shorter format for GlobalProperty arrays

2019-01-07 Thread Eduardo Habkost
Instead of verbose arrays with 4 lines for each entry, make each entry take only one line. This makes long arrays that couldn't fit in the screen become short and readable. Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 18 +- hw/core/machine.c | 338

[Xen-devel] [PATCH 2/3] machine: Eliminate unnecessary stringify() usage

2019-01-07 Thread Eduardo Habkost
. Signed-off-by: Eduardo Habkost --- hw/core/machine.c | 8 ++-- hw/i386/pc.c | 94 +++ hw/i386/pc_piix.c | 30 +++ hw/ppc/spapr.c| 2 +- 4 files changed, 67 insertions(+), 67 deletions(-) diff --git a/hw/core/machine.c b/hw/core

[Xen-devel] [PATCH 1/3] spapr: Eliminate SPAPR_PCI_2_7_MMIO_WIN_SIZE macro

2019-01-07 Thread Eduardo Habkost
The macro is only used in one place, where the purpose of the value is obvious. Eliminate the macro so we don't need to rely on stringify(). Signed-off-by: Eduardo Habkost --- include/hw/pci-host/spapr.h | 1 - hw/ppc/spapr.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions

[Xen-devel] [PATCH 0/3] machine: Make compat_props arrays shorter and more readable

2019-01-07 Thread Eduardo Habkost
Current declarations of compat_props arrays are very verbose, with each entry taking 4 lines of code. By omitting the field designators, we can make each array entry fit a single line of code and be more readable. Eduardo Habkost (3): spapr: Eliminate SPAPR_PCI_2_7_MMIO_WIN_SIZE macro

Re: [Xen-devel] [Qemu-devel] [PATCH for-3.2 v4 15/28] hw: apply accel compat properties without touching globals

2018-11-29 Thread Eduardo Habkost
On Wed, Nov 28, 2018 at 12:02:21AM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Nov 27, 2018 at 11:40 PM Eduardo Habkost wrote: > > > > On Tue, Nov 27, 2018 at 01:27:48PM +0400, Marc-André Lureau wrote: > > > Introduce object_apply_global_props() fu

Re: [Xen-devel] [Qemu-devel] [PATCH for-3.2 v4 15/28] hw: apply accel compat properties without touching globals

2018-11-27 Thread Eduardo Habkost
On Tue, Nov 27, 2018 at 01:27:48PM +0400, Marc-André Lureau wrote: > Introduce object_apply_global_props() function, to apply compatibility > properties from a GPtrArray. > > For accel compatibility properties, apply them during > device_post_init(), after accel_register_compat_props() has set

Re: [Xen-devel] [Qemu-devel] [PATCH for-3.2 v3 02/14] qom: make interface types abstract

2018-11-20 Thread Eduardo Habkost
On Tue, Nov 20, 2018 at 05:33:24PM +0100, Igor Mammedov wrote: > On Wed, 7 Nov 2018 16:36:40 +0400 > Marc-André Lureau wrote: > > > Interfaces don't have instance, let's make the interface type really > > abstract to avoid confusion. > > > > Signed-off-by: Marc-André Lureau > > --- > >

Re: [Xen-devel] [Qemu-devel] [PATCH for-3.2 v3 13/14] hw/i386: add pc-i440fx-3.2 & pc-q35-3.2

2018-11-07 Thread Eduardo Habkost
On Wed, Nov 07, 2018 at 07:49:54PM +0400, Marc-André Lureau wrote: > Hi > > On Wed, Nov 7, 2018 at 4:49 PM Marc-André Lureau > wrote: > > > > The following patch is going to add compatiblity parameters for > > qemu <= 3.1. > > > > I realize this may be good enough for x86 i440/q35 machines, but

Re: [Xen-devel] [RFC PATCH 16/30] q35/xen: Add Xen platform device support for Q35

2018-03-12 Thread Eduardo Habkost
On Tue, Mar 13, 2018 at 06:56:37AM +1000, Alexey G wrote: > On Mon, 12 Mar 2018 16:44:06 -0300 > Eduardo Habkost <ehabk...@redhat.com> wrote: > > >On Tue, Mar 13, 2018 at 04:34:01AM +1000, Alexey Gerasimenko wrote: > >> Current Xen/QEMU method to control Xen Platfor

Re: [Xen-devel] [RFC PATCH 16/30] q35/xen: Add Xen platform device support for Q35

2018-03-12 Thread Eduardo Habkost
On Tue, Mar 13, 2018 at 04:34:01AM +1000, Alexey Gerasimenko wrote: > Current Xen/QEMU method to control Xen Platform device on i440 is a bit > odd -- enabling/disabling Xen platform device actually modifies the QEMU > emulated machine type, namely xenfv <--> pc. > > In order to avoid multiplying

Re: [Xen-devel] [PATCH 03/11] xen: defer call to xen_restrict until just before os_setup_post

2018-03-09 Thread Eduardo Habkost
On Fri, Mar 09, 2018 at 12:07:21PM +, Ian Jackson wrote: > Ian Jackson writes ("Re: [PATCH 03/11] xen: defer call to xen_restrict until > just before os_setup_post"): > > Eduardo Habkost writes ("Re: [PATCH 03/11] xen: defer call to xen_restrict > > until jus

Re: [Xen-devel] [PATCH 03/11] xen: defer call to xen_restrict until just before os_setup_post

2018-03-09 Thread Eduardo Habkost
On Fri, Mar 09, 2018 at 11:33:35AM +, Ian Jackson wrote: > Eduardo Habkost writes ("Re: [PATCH 03/11] xen: defer call to xen_restrict > until just before os_setup_post"): > > On Thu, Mar 08, 2018 at 05:39:09PM +, Ian Jackson wrote: > > [...] &g

Re: [Xen-devel] [PATCH 03/11] xen: defer call to xen_restrict until just before os_setup_post

2018-03-08 Thread Eduardo Habkost
On Thu, Mar 08, 2018 at 05:39:09PM +, Ian Jackson wrote: [...] > diff --git a/vl.c b/vl.c > index dae986b..e6e8e1e 100644 > --- a/vl.c > +++ b/vl.c > @@ -4719,6 +4719,7 @@ int main(int argc, char **argv, char **envp) > vm_start(); > } > > +xen_setup_post(); I don't think

[Xen-devel] [PULL v2 10/19] xen: Add only xen-sysdev to dynamic sysbus device list

2018-01-19 Thread Eduardo Habkost
use.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <20171125151610.20547-6-ehabk...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Acked-by: Anthony PERARD <anthony.per...@citrix.com> Signed-off-by: Eduardo Habkost <ehabk

[Xen-devel] [PULL v2 06/19] machine: Replace has_dynamic_sysbus with list of allowed devices

2018-01-19 Thread Eduardo Habkost
mu-...@nongnu.org Cc: xen-devel@lists.xenproject.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <20171125151610.20547-2-ehabk...@redhat.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> Reviewed-by: Marc-A

[Xen-devel] [PULL 06/19] machine: Replace has_dynamic_sysbus with list of allowed devices

2018-01-17 Thread Eduardo Habkost
mu-...@nongnu.org Cc: xen-devel@lists.xenproject.org Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <20171125151610.20547-2-ehabk...@redhat.com> Reviewed-by: Greg Kurz <gr...@kaod.org> Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> Reviewed-by: Marc-A

[Xen-devel] [PULL 10/19] xen: Add only xen-sysdev to dynamic sysbus device list

2018-01-17 Thread Eduardo Habkost
use.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Message-Id: <20171125151610.20547-6-ehabk...@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Acked-by: Anthony PERARD <anthony.per...@citrix.com> Signed-off-by: Eduardo Habkost <ehabk

Re: [Xen-devel] [Qemu-devel] [PATCH V5] pci: removed the is_express field since a uniform interface was inserted

2017-12-19 Thread Eduardo Habkost
hw/usb/hcd-xhci.c > - hw/xen/xen_pt.c > > For those 3 I made sure that QEMU_PCI_CAP_EXPRESS is on in instance_init() > > Signed-off-by: Yoni Bettan <ybet...@redhat.com> Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> -- Eduardo _