Move the function closer to where it's used, to make refactor
and review simpler. While doing it, reformat the comment at the
top to follow coding style.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v3 of the series.
---
Cc: Paolo Bonzini
Cc: "Daniel P. Ber
gets the property
name as the first argument.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v3 of this series.
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
include/qom/field-property.h | 17 +
i
The function is now generic and can be used by any property that
had the Property struct allocated dynamically.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v3 of the series.
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@
Include the static-properties.h API reference in
docs/devel/qom.rst.
Signed-off-by: Eduardo Habkost
---
Changes v2 -> v3:
* Redone patch after changes in previous patches in the series
* Split into separate patches. This one only adds the file to
qom.rst and Property/PropertyInfo doc comme
Now that we don't store any additional data about the property in
AraryElementStruct, we don't need it anymore. We can just
allocate a Property struct directly.
Signed-off-by: Eduardo Habkost
---
Change v1 -> v2:
* Get rid of the struct, but not of the release function (we
stil
This will make the function more convenient to use, and allow
us to reuse it for array element properties.
I'm not adding a version of this function that doesn't copy the
struct, because this function isn't supposed to be used widely.
Signed-off-by: Eduardo Habkost
---
This is a
Support Property.set_default and PropertyInfo.description even if
PropertyInfo.create is set.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Patch redone after changes in the previous patches in the
series
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habk
Returning ObjectProperty* will be useful for new property
registration code that will add additional callbacks
to ObjectProperty after registering it.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Redone patch on top of additional changes in series v2
* Commit message reword
---
We don't need the extra field because we can find the release
function for the property directly at
ArrayElementProperty.info.release.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v3 of this series.
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Ha
All property code should be able to handle .name_template==NULL
without problems, so we don't need to set it for array elements.
This simple change will allow us to simplify the array property
registration code a lot in the next commits.
Signed-off-by: Eduardo Habkost
---
This is a patch
ned-off-by: Eduardo Habkost
---
This is a new patch added in v2 of the series
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/core/qdev-pr
s not being necessary in most cases).
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Redone patch on top of changes in previous patches in the
series
* Provide prop_allow_set_always() and prop_allow_set_never()
helpers
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: E
core QOM feature.
The array property also needs to set PropertyInfo.allow_set
manually, but this will be cleaned up later (that code will be
changed to use object_class_property_add_field() too).
Signed-off-by: Eduardo Habkost
---
Changes v2 -> v3:
* Moved earlier in the series, before array
We already get the property name as argument to the property
getter and setters, we don't need to use prop->name. This will
make it easier to remove the Property.name field in the future.
Reviewed-by: Stefan Berger
Signed-off-by: Eduardo Habkost
---
This is a new patch added in s
Add a test case to ensure array properties are behaving as
expected.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v3 of this series.
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
tests/test-qdev-global-pr
The basic property types in qdev-properties.c are not going to be
qdev-specific anymore. Rename the variables to prop_info_*.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Redone patch after moving UUID property to qdev-properties-system.c
---
Cc: Paolo Bonzini
Cc: "Daniel P.
It is similar to object_class_property_add_field_static(), but
gets a copy of a Property struct so we don't need
static variables.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v3 of this series, but v2 had a
object_class_property_add_field() function too.
This versi
We're just doing pointer math with the device pointer, we can
simply use obj instead.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties.c |
Move the property types and property macros implemented in
qdev-properties-system.c to a new qdev-properties-system.h
header.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Move UUID property type too, as it was moved to
qdev-properties-system.c in the previous patch
---
audio/audi
Move the core of the static property code to qom/field-property.c.
The actual property type implementations are still in
qdev-properties.c, they will be moved later.
Signed-off-by: Eduardo Habkost
---
Changes v2 -> v3:
* Redone patch after changes in previous patches of this series
* Reorde
There are no users of the function outside qdev-properties.c.
Make function static and rename it to get_uint16().
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core
cause the plan is to eventually get rid of the
Property.name field.
The declarations for the new functions are being added to
qdev-properties-internal.h, but they will be moved to a QOM
header later.
Signed-off-by: Eduardo Habkost
---
Changes v2 -> v3:
* Re-added array-based array registration
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
These functions will be moved to be part of QOM, so rename them.
Signed-off-by: Eduardo Habkost
---
Changes v2:
* Rename to field_prop_* instead of object_propinfo_*
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-prop-
Make the code more generic and not specific to TYPE_DEVICE.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: Cornelia Huck
Cc: Thomas Huth
Cc: Richard Henderson
Cc: David Hildenbrand
Cc: Halil
The Property.name field won't always be set, but it is very
easy to miss this detail when we see code using prop->name.
Rename the field to "name_template", to indicate it is just a
template used when creating new properties in some cases, but is
not always set.
Signed-off-b
Move the variable declaration close to the macro that uses it.
Reviewed-by: Marc-André Lureau
Reviewed-by: Stefan Berger
Signed-off-by: Eduardo Habkost
---
Cc: Stefan Berger
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/tpm/
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
mon QOM code.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Redone after changes in previous patches in the series
* Renamed functions from static_prop_* to field_prop_*
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.o
Instead of duplicating the code that sets name, info, offset,
and does type checking, make DEFINE_PROP accept a variable number
of arguments and reuse it in all DEFINE_PROP_* macros.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Redone after UUID property was moved
---
Cc: Paolo Bonz
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
This will make it easier to remove the Property.name field in the
future.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in series v2
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
include/hw/qdev-properties.h | 2 +
Replace `Property *prop` parameter with `char *name`, to reduce
dependency of getter and setter functions on the Property struct
(which will be changed in following patches).
Signed-off-by: Eduardo Habkost
---
This is a new patch added in series v2
---
Cc: Paolo Bonzini
Cc: "Daniel P. Ber
Use the DEFINE_PROP macro (which will set extra fields in the
struct) instead of initializing a Property struct manually.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in v2 of the series
---
Cc: Mark Cave-Ayland
Cc: Artyom Tarasenko
Cc: qemu-devel@nongnu.org
---
target/sparc
All other qdev property error messages use "."
instead of ".". Change set_size32() for consistency,
and to make the code not specific to TYPE_DEVICE.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
This will make it easier to remove Property.name in the future.
Signed-off-by: Eduardo Habkost
---
This is a new patch added in series v2
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties.c | 9 +
1 fi
Make the code more generic and not specific to TYPE_DEVICE.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties.c | 10 ++
1 file changed, 6
Move everything related to Property and PropertyInfo to
qdev-properties.[ch] to make it easier to refactor that code.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
error_set_from_qdev_prop_error().
Signed-off-by: Eduardo Habkost
---
This is a new patch added in series v2
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties-system.c | 57
hw
sparc_set_nwindows() is one of the very few property setters that
don't check dev->realized, and there's no reason for it to be
special. Check dev->realized like the other setters.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Mark Cave-Ayland
Cc: Arty
Make the code more generic and not specific to TYPE_DEVICE.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties-system.c | 10 +-
1 file
Make the code more generic and not specific to TYPE_DEVICE.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
include/hw/qdev-properties.h | 2 +-
hw/core/qdev-
There's no reason to keep the property list separate from the CPU
class code. Move the variable to hw/core/cpu.c and make it
static.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Eduardo Habkost
Cc: Marcel Apfelbaum
Cc: qemu-devel@nongnu.org
---
include/hw/core/
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-properties.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 12a053e732
An empty props array is unnecessary, we can just not call
device_class_set_props().
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Gerd Hoffmann
Cc: qemu-devel@nongnu.org
---
hw/audio/cs4231.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/hw/audio/cs4231.c b
Make the code more generic and not specific to TYPE_DEVICE.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
include/hw/qdev-properties.h | 2 +-
hw/core/qdev-
tracking code.
* Make allow_set callback mandatory, to avoid ambiguity
* Big cleanup of array property code. We don't need a custom
release function for array elements anymore, because we don't
need to save the property name in the Property struct anymore.
* Moved UUID property to
On Thu, Nov 12, 2020 at 09:11:48AM +0100, Paolo Bonzini wrote:
> On 11/11/20 19:39, Eduardo Habkost wrote:
> > I will submit v3 of this series with both
> > object_class_property_add_field() and
> > object_class_add_field_properties() as internal QOM APIs.
> > object
On Wed, Nov 11, 2020 at 01:38:23PM -0500, Eduardo Habkost wrote:
> Instance properties make introspection hard and are not shown by
> "-object ...,help". Convert them to class properties.
>
> Signed-off-by: Eduardo Habkost
> ---
> This was originally submitted as p
Trivial code reordering in some filter backends, to make the next
changes easier to review.
Signed-off-by: Eduardo Habkost
---
This was originally submitted as part of the series:
Subject: [PATCH 00/12] qom: Make all -object types use only class properties
Message-Id: <20201009160122.166208
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost
---
Cc: Peter Maydell
Cc: qemu-...@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/arm/vexpress.c | 11 ++-
1 file changed, 6 insertions(
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost
---
Cc: Peter Maydell
Cc: qemu-...@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/arm/virt.c | 76 +++--
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost
---
This was originally submitted as part of the series:
Subject: [PATCH 00/12] qom: Make all -object types use only class properties
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost
---
This was originally submitted as part of the series:
Subject: [PATCH 00/12] qom: Make all -object types use only class properties
On Tue, Nov 10, 2020 at 11:38:04AM +0100, Kevin Wolf wrote:
> Am 09.11.2020 um 21:28 hat Eduardo Habkost geschrieben:
[...]
> > Anyway, If we are the only ones discussing this, I will just
> > defer to your suggestions as QOM maintainer. I hope we hear from
> > others.
>
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost
---
This was originally submitted as part of the series:
Subject: [PATCH 00/12] qom: Make all -object types use only class properties
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost
---
Cc: Peter Maydell
Cc: qemu-...@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/arm/vexpress.c | 14 --
1 file changed, 8 insertions(
Instance properties make introspection hard and are not shown by
"-object ...,help". Convert them to class properties.
Signed-off-by: Eduardo Habkost
---
This was originally submitted as part of the series:
Subject: [PATCH 00/12] qom: Make all -object types use only class properties
its=on on virt-2.7 and
older.
Signed-off-by: Eduardo Habkost
---
Cc: Peter Maydell
Cc: qemu-...@nongnu.org
Cc: qemu-devel@nongnu.org
---
hw/arm/virt.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 53fcaf5e4f..37a020c149 1006
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost
---
Cc: qemu-devel@nongnu.org
---
hw/misc/tmp421.c | 30 +-
1 file changed, 13 insertions(+), 17 deletions(-)
diff --
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost
---
Changes v1 -> v2:
* Remove x86_cpu_release_bit_prop() function, as we will allocate
BitProperty only once and never free the class prope
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.
Signed-off-by: Eduardo Habkost
---
Cc: Peter Maydell
Cc: qemu-...@nongnu.org
Cc: qemu-devel@nongnu.org
---
target/arm/cpu64.c | 16 ++--
1 file changed, 6 inser
ties as class properties"
* Included patches that were originally submnitted as part of
"qom: Make all -object types use only class properties"
* All other patches are unchanged from v1
Eduardo Habkost (12):
vexpress: Register "secure" as class property
vexpress-a
On Tue, Nov 10, 2020 at 09:39:37PM +0100, Paolo Bonzini wrote:
> On 10/11/20 18:55, Eduardo Habkost wrote:
> > > I think we should not try yo implement interfaces conditionally (i.e. have
> > > TYPE_X86_ACCEL implemented only on qemu-system-{i386,x86_64} and not
> >
On Tue, Nov 10, 2020 at 12:46:48PM -0500, Eduardo Habkost wrote:
> On Tue, Nov 10, 2020 at 04:08:16PM +0100, Paolo Bonzini wrote:
> > On 10/11/20 16:03, Eduardo Habkost wrote:
> > > > Does anyone have any arguments for which solution is preferred?
> > > I'd say (
On Tue, Nov 10, 2020 at 06:38:49PM +0100, Claudio Fontana wrote:
> On 11/10/20 4:23 PM, Eduardo Habkost wrote:
> > On Tue, Nov 10, 2020 at 11:41:46AM +0100, Paolo Bonzini wrote:
> >> On 10/11/20 11:04, Daniel P. Berrangé wrote:
> >>>
> >>> ie, we sho
On Tue, Nov 10, 2020 at 05:39:08PM +0100, Paolo Bonzini wrote:
> On 09/11/20 22:25, Eduardo Habkost wrote:
> > Based-on: 20201104160021.2342108-1-ehabk...@redhat.com
> > Git branch:
> > https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-qlit-defaults
> >
> >
On Tue, Nov 10, 2020 at 05:05:27PM +0100, Paolo Bonzini wrote:
> On 10/11/20 16:23, Eduardo Habkost wrote:
> > On Tue, Nov 10, 2020 at 11:41:46AM +0100, Paolo Bonzini wrote:
> > > On 10/11/20 11:04, Daniel P. Berrangé wrote:
> > > >
> > > > ie, we sho
On Tue, Nov 10, 2020 at 04:08:16PM +0100, Paolo Bonzini wrote:
> On 10/11/20 16:03, Eduardo Habkost wrote:
> > > Does anyone have any arguments for which solution is preferred?
> > I'd say (2) is preferred, as we don't expect object_new(T) to
> > have any side e
On Tue, Nov 10, 2020 at 11:58:29AM +0100, Paolo Bonzini wrote:
> On 09/11/20 21:28, Eduardo Habkost wrote:
> > I don't know yet what's the best solution for the x86 feature
> > case. Maybe duplicating the list of feature names would be a
> > small price to pay to
On Tue, Nov 10, 2020 at 11:41:46AM +0100, Paolo Bonzini wrote:
> On 10/11/20 11:04, Daniel P. Berrangé wrote:
> >
> > ie, we should have one class hierarchy for CPU model definitions, and
> > one class hierarchy for accelerator CPU implementations.
> >
> > So at runtime we then get two object in
CCing Paolo, the Memory API maintainer.
On Tue, Nov 10, 2020 at 11:14:39AM +, Mark Cave-Ayland wrote:
> Hi all,
>
> This email follows on from my investigation of intermittent Travis-CI
> failures in make check's device-introspect test when trying to add the patch
> at https://lists.gnu.org/a
Using QLitObject lets us get rid of most of the
.set_default_value functions, and just use
object_property_set_default() directly.
Signed-off-by: Eduardo Habkost
---
include/hw/qdev-properties-system.h | 2 +-
include/qom/field-property-internal.h | 4 ---
include/qom/field-property.h
The function will be used outside qom/object.c, to simplify the
field property code that sets the property default value.
Signed-off-by: Eduardo Habkost
---
include/qom/object.h | 11 +++
qom/object.c | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a
Use QNumValue to represent QNums, so we can also support uint64_t
and double QNum values. Add new QLIT_QNUM_(INT|UINT|DOUBLE)
macros for each case.
The QLIT_QNUM() macro is being kept for compatibility with
existing code, but becomes just a wrapper for QLIT_QNUM_INT().
Signed-off-by: Eduardo
Useful function where we need to check for the qlit type before
converting it to an actual QObject.
Signed-off-by: Eduardo Habkost
---
include/qapi/qmp/qlit.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h
index f9e356d31e..acddb80831
qnum_get_double() won't change the object, the argument can be
const.
Signed-off-by: Eduardo Habkost
---
include/qapi/qmp/qnum.h | 2 +-
qobject/qnum.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/qnum.h
Render existing doc comments at docs/devel/qobject.html.
Signed-off-by: Eduardo Habkost
---
docs/devel/index.rst | 1 +
docs/devel/qobject.rst | 11 +
include/qapi/qmp/qnum.h| 4 +++-
include/qapi/qmp/qobject.h | 48 +-
qobject/qnum.c
Extract the QNum value comparison logic to a function that takes
QNumValue* as argument.
Signed-off-by: Eduardo Habkost
---
include/qapi/qmp/qnum.h | 1 +
qobject/qnum.c | 29 +++--
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/include/qapi
Provide a separate QNumValue type that can be used for QNum value
literals without the referencing counting and memory allocation
features provided by QObject.
Signed-off-by: Eduardo Habkost
---
include/qapi/qmp/qnum.h | 40 +++--
qobject/qnum.c | 78
rid of most type-specific .set_default_value
functions for QOM property types.
Eduardo Habkost (8):
qobject: Include API docs in docs/devel/qobject.html
qnum: Make qnum_get_double() get const pointer
qnum: QNumValue type for QNum value literals
qnum: qnum_value_is_equal() function
qlit
On Mon, Nov 09, 2020 at 08:27:21PM +0100, Paolo Bonzini wrote:
> On 09/11/20 19:55, Eduardo Habkost wrote:
> > On Mon, Nov 09, 2020 at 06:33:04PM +0100, Paolo Bonzini wrote:
> > > On 09/11/20 18:16, Eduardo Habkost wrote:
> > > > I mean extending the API to let cus
On Mon, Nov 09, 2020 at 06:27:54PM +0100, Claudio Fontana wrote:
> split cpu.c into:
>
> cpu.ccpuid and common x86 cpu functionality
> host-cpu.c host x86 cpu functions and "host" cpu type
> kvm-cpu-type.c KVM x86 cpu type
> hvf-cpu-type.c HVF x86 cpu type
> tcg-cpu-type.c
On Mon, Nov 09, 2020 at 06:33:04PM +0100, Paolo Bonzini wrote:
> On 09/11/20 18:16, Eduardo Habkost wrote:
> > On Mon, Nov 09, 2020 at 05:34:01PM +0100, Paolo Bonzini wrote:
> > > On 09/11/20 16:21, Eduardo Habkost wrote:
> > > > Nothing prevents us from describi
On Mon, Nov 09, 2020 at 05:34:01PM +0100, Paolo Bonzini wrote:
> On 09/11/20 16:21, Eduardo Habkost wrote:
> > On Mon, Nov 09, 2020 at 03:15:26PM +0100, Paolo Bonzini wrote:
> > > On 09/11/20 12:34, Kevin Wolf wrote:
> > > > > If all properties were like this,
On Mon, Nov 09, 2020 at 03:15:26PM +0100, Paolo Bonzini wrote:
> On 09/11/20 12:34, Kevin Wolf wrote:
> > > If all properties were like this, it would be okay. But the API in v2 is
> > > the one that is most consistent with QOM in general. Here is how this
> > > change
> > > would be a loss in te
On Fri, Nov 06, 2020 at 10:50:19AM -0500, Eduardo Habkost wrote:
> On Fri, Nov 06, 2020 at 10:45:11AM +0100, Kevin Wolf wrote:
> > Am 04.11.2020 um 16:59 hat Eduardo Habkost geschrieben:
> > > This series refactor the qdev property code so the static
> > > property sy
On Fri, Nov 06, 2020 at 10:45:11AM +0100, Kevin Wolf wrote:
> Am 04.11.2020 um 16:59 hat Eduardo Habkost geschrieben:
> > This series refactor the qdev property code so the static
> > property system can be used by any QOM type. As an example, at
> > the end of the seri
On Wed, Nov 04, 2020 at 05:36:20PM +0100, Paolo Bonzini wrote:
> On 04/11/20 17:00, Eduardo Habkost wrote:
> > Move all property types from qdev-properties.c to
> > qom/property-types.c.
> >
> > Signed-off-by: Eduardo Habkost
> > ---
> > Changes v1 -> v
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
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
LL is qdev_prop_link. This means every
link property in the code had a useless "legacy-" property being
registered.
Fix this by only registering legacy properties if a .print method
exists.
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduard
This will let the code that reads/writes the field ensure it will
never go out of bounds.
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
include/qom/field-property.h | 3 +++
include/qom/property-t
This makes the nwindows getter and setter more consistent with
the other field getters and setters (which work with any struct
field).
Signed-off-by: Eduardo Habkost
---
Cc: Mark Cave-Ayland
Cc: Artyom Tarasenko
Cc: qemu-devel@nongnu.org
---
target/sparc/cpu.c | 8
1 file changed, 4
The release function must interpret the third argument as
Property*. Change the signature of PropertyInfo.release to
indicate that.
Signed-off-by: Eduardo Habkost
---
Cc: Stefan Berger
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
i
es: de05005bf785 ("sparc: convert cpu features to qdev properties")
Signed-off-by: Eduardo Habkost
---
Cc: Mark Cave-Ayland
Cc: Artyom Tarasenko
Cc: qemu-devel@nongnu.org
---
target/sparc/cpu.h | 2 +-
target/sparc/cpu.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --
the series fixes one bug found using the new
safety mechanism. I hope it's the only one.
Eduardo Habkost (7):
sparc: Fix property/field size mismatch for iu-version
qom: Save size of struct field in Property struct
qdev: Don't register unreadable legacy properties
qom: Re
These functions will be moved to be part of QOM, so rename them.
Signed-off-by: Eduardo Habkost
---
Changes v2:
* Rename to field_prop_* instead of object_propinfo_*
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core/qdev-prop-
Move the variable declaration close to the macro that uses it.
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Stefan Berger
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/tpm/tpm_prop.h| 2 ++
There are no users of the function outside qdev-properties.c.
Make function static and rename it to get_uint16().
Reviewed-by: Marc-André Lureau
Signed-off-by: Eduardo Habkost
---
Cc: Paolo Bonzini
Cc: "Daniel P. Berrangé"
Cc: Eduardo Habkost
Cc: qemu-devel@nongnu.org
---
hw/core
701 - 800 of 11360 matches
Mail list logo