[PATCH v2 01/44] cs4231: Get rid of empty property array

2020-11-04 Thread Eduardo Habkost
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/hw

[PATCH v2 02/44] cpu: Move cpu_common_props to hw/core/cpu.c

2020-11-04 Thread Eduardo Habkost
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/cpu.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 change -

[PATCH v2 04/44] qdev: Check dev->realized at set_size()

2020-11-04 Thread Eduardo Habkost
This setter is one of the very few property setters that don't check dev->realized, and there's no reason to make size properties different from the rest. Add the missing check. Fixes: e8cd45c78f53 ("qdev: Add SIZE type to qdev properties") Reviewed-by: Marc-André Lureau Signed-off-by: Eduardo H

[PATCH v2 14/44] qdev: Move softmmu properties to qdev-properties-system.h

2020-11-04 Thread Eduardo Habkost
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/audio.h

[PATCH v2 06/44] qdev: Don't use dev->id on set_size32() error message

2020-11-04 Thread Eduardo Habkost
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é" Cc: Eduardo Habkost Cc: qemu-deve

[PATCH v2 10/44] qdev: Make qdev_find_global_prop() get Object* argument

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 --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties-system.c

[PATCH v2 05/44] sparc: Check dev->realized at sparc_set_nwindows()

2020-11-04 Thread Eduardo Habkost
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: Artyom Tarasenko Cc:

[PATCH v2 16/44] sparc: Use DEFINE_PROP for nwindows property

2020-11-04 Thread Eduardo Habkost
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/cp

[PATCH v2 13/44] qdev: Move UUID property to qdev-properties-system.c

2020-11-04 Thread Eduardo Habkost
Only softmmu code uses DEFINE_PROP_UUID, and it currently depends on error_set_from_qdev_prop_error(). Move it to qdev-properties-system.c to get out of our way when refactoring the qdev property system. We can eventually move it back to the core property system later, after removing usage of err

[PATCH v2 07/44] qdev: Make PropertyInfo.print method get Object* argument

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 --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- include/hw/qdev-properties.h | 2 +- hw/core/qdev-properties-system.c

[PATCH v2 11/44] qdev: Make check_prop_still_unset() get Object* argument

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 --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- hw/core/qdev-properties-system.c | 10 +- 1 file changed, 5 inser

[PATCH v2 20/44] qdev: Add name argument to PropertyInfo.create method

2020-11-04 Thread Eduardo Habkost
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 +- hw/core/qde

[PATCH v2 15/44] qdev: Reuse DEFINE_PROP in all DEFINE_PROP_* macros

2020-11-04 Thread Eduardo Habkost
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 Bonzini

[PATCH v2 08/44] qdev: Make bit_prop_set() get Object* argument

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 --- 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 insertions(+

[PATCH v2 30/44] qdev: Get rid of ArrayElementProperty struct

2020-11-04 Thread Eduardo Habkost
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 --- This is a new patch added in v2 of the series --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: E

[PATCH v2 12/44] qdev: Make error_set_from_qdev_prop_error() get Object* argument

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 --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: Cornelia Huck Cc: Thomas Huth Cc: Richard Henderson Cc: David Hildenbrand Cc: Halil Pasic Cc: C

[PATCH v2 29/44] qdev: Remove ArrayElementProperty.propname field

2020-11-04 Thread Eduardo Habkost
Now that we don't save the property name in Property.name anymore, we don't need the to keep the property name string alive after the property was registered. We can remove the ArrayElementProperty.propname field, and free the string immediately after registering the property. Signed-off-by: Edua

[PATCH v2 17/44] qdev: Get just property name at error_set_from_qdev_prop_error()

2020-11-04 Thread Eduardo Habkost
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. Berrangé"

[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: Paul Dur

[PATCH v2 21/44] qdev: Wrap getters and setters in separate helpers

2020-11-04 Thread Eduardo Habkost
We'll add extra code to the qdev property getters and setters, so add wrapper functions where additional actions can be performed. The new functions have a "field_prop_" prefix instead of "qdev_" because the code will eventually be moved outside qdev-properties.c, to common QOM code. Signed-off-b

[PATCH v2 40/44] qdev: Move core field property code to QOM

2020-11-04 Thread Eduardo Habkost
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 v1 -> v2: * Rename static-property.* to field-property.* --- Cc: Paolo Bonzini Cc: "Da

[PATCH v2 18/44] qdev: Avoid using prop->name unnecessarily

2020-11-04 Thread Eduardo Habkost
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. Signed-off-by: Eduardo Habkost --- This is a new patch added in series v2 --- Cc: Stefan Berger Cc: Paolo B

[PATCH v2 23/44] qdev: Make PropertyInfo.create return ObjectProperty*

2020-11-04 Thread Eduardo Habkost
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 --- Cc: Paol

[PATCH v2 39/44] qdev: PROP_* macros

2020-11-04 Thread Eduardo Habkost
The new helper macros are just wrappers to DEFINE_PROP_* that can be used directly as arguments to object_class_property_add_field(). Signed-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-dev

[PATCH v2 28/44] qdev: Avoid unnecessary DeviceState* variable at set_prop_arraylen()

2020-11-04 Thread Eduardo Habkost
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 | 5 ++--- 1 file cha

[PATCH v2 42/44] qom: Include static property API reference in documentation

2020-11-04 Thread Eduardo Habkost
Add new doc comments and reformat the existing ones, and include the static-properties.h API reference in docs/devel/qom.rst. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Redone patch after changes in previous patches in the series --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Ed

[PATCH v2 32/44] qom: Add allow_set callback to ObjectProperty

2020-11-04 Thread Eduardo Habkost
Add a ObjectProperty.allow_set callback, that can be set by QOM property registration functions. Note that this doesn't replace the check callback at object*_property_add_link() (yet), because currently the link property check callback needs to get the property value as argument (despite this not

[PATCH v2 19/44] qdev: Add name parameter to qdev_class_add_property()

2020-11-04 Thread Eduardo Habkost
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 file changed, 5

[PATCH v2 31/44] qdev: Reuse object_property_add_field() when adding array elements

2020-11-04 Thread Eduardo Habkost
Now that we can call object_property_add() with exactly the same arguments as object_property_add_field(), we can just reuse the function. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Now we don't need to hack ObjectProperty.release anymore, patch became trivial --- Cc: Paolo Bonzini

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

[PATCH v2 44/44] machine: Register most properties as field properties

2020-11-04 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Redone using object_class_add_property_field() + PROP_* macros instead of DEFINE_PROP_* array, as suggested by Paolo --- Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: qemu-devel@nongnu.org --- hw/core/machine.c | 256 +++---

[PATCH v2 27/44] qdev: Don't set qdev_prop_name for array elements

2020-11-04 Thread Eduardo Habkost
qdev_prop_name is supposed to be used only by qdev property registration code, we don't need to set it for array element properties. Signed-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-deve

[PATCH v2 38/44] qdev: Rename qdev_prop_* to prop_info_*

2020-11-04 Thread Eduardo Habkost
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. Berrangé"

[PATCH v2 26/44] qdev: Rename Property.name to Property.qdev_prop_name

2020-11-04 Thread Eduardo Habkost
The Property.name field won't always be set and we need to be 100% sure its usage will be restricted to qdev/TYPE_DEVICE code. Renaming the field is a good way to ensure that and make its purpose more clear. Signed-off-by: Eduardo Habkost --- This is a new patch added in v2 of the series --- Cc:

[PATCH v2 33/44] qdev: Make qdev_prop_allow_set() a ObjectProperty.allow_set callback

2020-11-04 Thread Eduardo Habkost
Add a new allow_set parameter to object*_property_add_field(), and pass qdev_prop_allow_set as argument in the qdev registration code. This removes the last remaining line of code inside the core field property code that's specific to TYPE_DEVICE, and will allow us to make field properties a core

[PATCH v2 24/44] qdev: Make qdev_class_add_property() more flexible

2020-11-04 Thread Eduardo Habkost
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 Habkost Cc: qemu-de

[PATCH v2 43/44] tests: Use field properties at check-qom-proplist test case

2020-11-04 Thread Eduardo Habkost
Use field properties for the bool and string properties used at check-qom-proplist. Signed-off-by: Eduardo Habkost --- Changes v2: * Redone patch using PROP_* instead of DEFINE_PROP_* --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- include/qom/

Re: [PATCH v4 1/5] target/riscv: Add a virtualised MMU Mode

2020-11-04 Thread Richard Henderson
On 11/3/20 8:43 PM, Alistair Francis wrote: > -#define NB_MMU_MODES 4 > +/* > + * The current MMU Modes are: > + * - U mode 0b000 > + * - S mode 0b001 > + * - M mode 0b011 > + * - U mode HLV/HLVX/HSV 0b100 > + * - S mode HLV/HLVX/HSV 0b101 > + * - M mode HLV/HLVX/HSV 0b111 > + */ > +#define N

[PATCH v2 41/44] qdev: Move base property types to qom/property-types.c

2020-11-04 Thread Eduardo Habkost
Move all property types from qdev-properties.c to qom/property-types.c. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rebased after changes in previous patches in the series --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Cc: qemu-devel@nongnu.org --- include/hw/qd

[PATCH v2 25/44] qdev: Separate generic and device-specific property registration

2020-11-04 Thread Eduardo Habkost
qdev_class_add_property() and qdev_property_add_static() will have code that's specific for device types. object_class_property_add_field() and object_property_add_static() will be generic and part of the QOM field property API. Note that the new functions have a `name` parameter because the plan

[PATCH v2 34/44] qdev: Make qdev_propinfo_get_uint16() static

2020-11-04 Thread Eduardo Habkost
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/qdev-prop-i

[PATCH v2 37/44] qdev: Move qdev_prop_tpm declaration to tpm_prop.h

2020-11-04 Thread Eduardo Habkost
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 ++ include/hw/qde

[PATCH v2 35/44] qdev: Rename qdev_propinfo_* to field_prop_*

2020-11-04 Thread Eduardo Habkost
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-internal.h

Re: [PATCH v4 4/5] target/riscv: Remove the hyp load and store functions

2020-11-04 Thread Richard Henderson
On 11/3/20 8:43 PM, Alistair Francis wrote: > +#ifndef CONFIG_USER_ONLY > +static void check_access(DisasContext *ctx) { Newline before {. Otherwise, Reviewed-by: Richard Henderson r~

Re: [qemu-web PATCH] Add virtio-fs in OSv overview blog post

2020-11-04 Thread Fotis Xenakis
From: Thomas Huth Sent: Wednesday, November 4, 2020 11:47 To: Fotis Xenakis ; qemu-devel@nongnu.org Cc: virtio...@redhat.com Subject: Re: [qemu-web PATCH] Add virtio-fs in OSv overview blog post On 04/11/2020 01.42, Fotis Xenakis wrote: > This post briefly goes over the main points of virtio-f

locking option doesn't work as expected

2020-11-04 Thread Masayoshi Mizuma
Hello, It seems that locking option doesn't work as expected. When I run qemu as following options, then I got an error and failed to boot the guest: qemu-system-x86_64 \ -machine pc \ -enable-kvm \ -cpu host \ -smp 1 -m 4G \ -nographic \ -serial telnet::1235,server,nowa

Re: [PATCH v2 41/44] qdev: Move base property types to qom/property-types.c

2020-11-04 Thread Paolo Bonzini
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 -> v2: * Rebased after changes in previous patches in the series --- Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost

Re: [PATCH v2 00/44] Make qdev static property API usable by any QOM type

2020-11-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201104160021.2342108-1-ehabk...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201104160021.2342108-1-ehabk...@redhat.com Subject: [PATCH v2 00/44] Make qdev static

[PATCH v2] Prefer 'on' | 'off' over 'yes' | 'no' for bool options

2020-11-04 Thread Daniel P . Berrangé
Update some docs and test cases to use 'on' | 'off' as the preferred value for bool options. Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Daniel P. Berrangé --- docs/system/vnc-security.rst | 10 +- include/authz/listfile.h | 2 +- qemu-options.hx

Re: [PATCH] ssi: Fix bad printf format specifiers

2020-11-04 Thread Alistair Francis
On Wed, Nov 4, 2020 at 2:23 AM AlexChen wrote: > > We should use printf format specifier "%u" instead of "%d" for > argument of type "unsigned int". > > Reported-by: Euler Robot > Signed-off-by: Alex Chen Reviewed-by: Alistair Francis Alistair > --- > hw/ssi/imx_spi.c| 2 +- > hw/ssi/xi

[qemu-web PATCH v2] Add virtio-fs in OSv overview blog post

2020-11-04 Thread Fotis Xenakis
This post briefly goes over the main points of virtio-fs and OSv, a unikernel running under QEMU/KVM and taking advantage of its virtio-fs implementation. Changes since v1: - Fixed wording and links, as suggested by Thomas Huth. - Added a short example of virtio-fs usage in OSv. Signed-off-by: Fo

Re: VFIO Migration

2020-11-04 Thread Stefan Hajnoczi
On Wed, Nov 04, 2020 at 02:50:58AM -0500, Michael S. Tsirkin wrote: > On Mon, Nov 02, 2020 at 11:11:53AM +, Stefan Hajnoczi wrote: > > Device States > > - > > The details of the device state representation are not covered in this > > document > > but the general requirements are di

Re: VFIO Migration

2020-11-04 Thread Stefan Hajnoczi
On Wed, Nov 04, 2020 at 10:14:23AM +, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Tue, Nov 03, 2020 at 06:49:51PM +, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > On Tue, Nov 03, 2020 at 12:17:09PM +,

Re: VFIO Migration

2020-11-04 Thread Stefan Hajnoczi
On Wed, Nov 04, 2020 at 09:07:45AM +0100, Gerd Hoffmann wrote: > > > > The hardware interface together with the device state representation is > > > > called > > > > a *device model*. Device models can be assigned URIs such as > > > > https://qemu.org/devices/e1000e to uniquely identify them. > >

Re: locking option doesn't work as expected

2020-11-04 Thread Daniel P . Berrangé
On Wed, Nov 04, 2020 at 11:35:56AM -0500, Masayoshi Mizuma wrote: > Hello, > > It seems that locking option doesn't work as expected. > When I run qemu as following options, then I got an error and failed to > boot the guest: > > qemu-system-x86_64 \ > -machine pc \ > -enable-kvm \ >

Re: [PULL 0/8] Usb 20201104 patches

2020-11-04 Thread Peter Maydell
On Wed, 4 Nov 2020 at 12:17, Gerd Hoffmann wrote: > > The following changes since commit 3d6e32347a3b57dac7f469a07c5f520e69bd070a: > > Update version for v5.2.0-rc0 release (2020-11-03 21:11:57 +) > > are available in the Git repository at: > > git://git.kraxel.or

[PATCH v2] docs: add some notes on the sbsa-ref machine

2020-11-04 Thread Alex Bennée
We should at least document what this machine is about. Reviewed-by: Graeme Gregory Cc: Leif Lindholm Cc: Shashi Mallela Signed-off-by: Alex Bennée --- v2 - reworded command line bit as per Leif - s/cortex-a57 cpus/AArch64 CPUs/ - dropped the trailing .'s --- docs/system/arm/sbsa.rst

Re: Ramping up Continuous Fuzzing of Virtual Devices in QEMU

2020-11-04 Thread Alexander Bulekov
On 201104 1546, Peter Maydell wrote: > On Wed, 4 Nov 2020 at 15:26, Alexander Bulekov wrote: > > If I understand correctly, this is analogous to what happens with > > Coverity reports. Access to Coverity is closed (not sure if there is a > > process to apply for access). It also seems that there i

Re: [RFC PATCH] docs: add some notes on the sbsa-ref machine

2020-11-04 Thread Alex Bennée
Leif Lindholm writes: > On Tue, Nov 03, 2020 at 10:47:10 +, Alex Bennée wrote: >> We should at least document what this machine is about. > > Thanks! > (comments below) > >> Cc: Graeme Gregory >> Cc: Leif Lindholm >> Cc: Hongbo Zhang >> Cc: Shashi Mallela >> Signed-off-by: Alex Bennée

[PATCH 1/2] qapi/block-core: Improve MapEntry documentation

2020-11-04 Thread Max Reitz
MapEntry and BlockDeviceMapEntry are kind of the same thing, and the latter is not used, so we want to remove it. However, the documentation it provides for some fields is better than that of MapEntry, so steal some of it for the latter. (And adjust them a bit in the process, because I feel like

[PATCH 0/2] block: Remove unused BlockDeviceMapEntry

2020-11-04 Thread Max Reitz
Hi, Markus has revived a rather old patch to remove an unused QAPI structure: https://lists.nongnu.org/archive/html/qemu-block/2020-10/msg01902.html He quoted a response of mine to the original patch, where I noted that removing this structure is OK because it is superseded by another structure

[PATCH 2/2] block: Remove unused BlockDeviceMapEntry

2020-11-04 Thread Max Reitz
From: Markus Armbruster BlockDeviceMapEntry has never been used. It was added in commit facd6e2 "so that it is published through the introspection mechanism." What exactly introspecting types that aren't used for anything could accomplish isn't clear. What "introspection mechanism" to use is al

Re: Migrating to the gitlab issue tracker

2020-11-04 Thread Laszlo Ersek
On 11/02/20 15:26, Daniel P. Berrangé wrote: > On Mon, Nov 02, 2020 at 02:57:49PM +0100, Laszlo Ersek wrote: >> On 10/30/20 10:16, Stefan Hajnoczi wrote: >>> On Thu, Oct 29, 2020 at 12:01:27PM -0400, John Snow wrote: In experimenting with my mirror on gitlab though, I was unable to find a >>>

[PULL v2 00/20] Misc patches for QEMU 5.2-rc1

2020-11-04 Thread Paolo Bonzini
The following changes since commit 83851c7c60c90e9fb6a23ff48076387a77bc33cd: Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2020-10-27-v3-tag' into staging (2020-11-03 12:47:58 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL v2 20/20] qapi, qemu-options: make all parsing visitors parse boolean options the same

2020-11-04 Thread Paolo Bonzini
OptsVisitor, StringInputVisitor and the keyval visitor have three different ideas of how a human could write the value of a boolean option. Pay homage to the backwards-compatibility gods and make the new common helper accept all four sets (on/off, true/false, y/n and yes/no), but remove case-insen

Re: Migrating to the gitlab issue tracker

2020-11-04 Thread Laszlo Ersek
On 11/02/20 15:42, Eric Blake wrote: > On 11/2/20 8:26 AM, Daniel P. Berrangé wrote: >> On Mon, Nov 02, 2020 at 02:57:49PM +0100, Laszlo Ersek wrote: >>> On 10/30/20 10:16, Stefan Hajnoczi wrote: On Thu, Oct 29, 2020 at 12:01:27PM -0400, John Snow wrote: > In experimenting with my mirror o

Re: [PATCH v2 11/20] qapi: backup: add x-max-chunk and x-max-workers parameters

2020-11-04 Thread Max Reitz
On 22.10.20 22:35, Vladimir Sementsov-Ogievskiy wrote: > 22.07.2020 15:22, Max Reitz wrote: >> On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: >>> Add new parameters to configure future backup features. The patch >>> doesn't introduce aio backup requests (so we actually have only one >>> wor

Re: [PATCH v2] block: Remove unused BlockDeviceMapEntry

2020-11-04 Thread Max Reitz
On 30.10.20 07:24, Markus Armbruster wrote: > BlockDeviceMapEntry has never been used. It was added in commit > facd6e2 "so that it is published through the introspection mechanism." > What exactly introspecting types that aren't used for anything could > accomplish isn't clear. What "introspecti

executing user code to test qemu driver

2020-11-04 Thread Shaked Matzner
Hey all, So I've created a small test to check ioctl calls of my pci with dma driver, under a shared directory (which is mounted to the qemu-x86-64 instance). I've just tried to compile it with gcc (gcc test_dma.c -o test_dma_exec) I've tried to execute it from the qemu but it said it could not fo

Re: Migrating to the gitlab issue tracker

2020-11-04 Thread Daniel P . Berrangé
On Wed, Nov 04, 2020 at 06:03:26PM +0100, Laszlo Ersek wrote: > On 11/02/20 15:26, Daniel P. Berrangé wrote: > > On Mon, Nov 02, 2020 at 02:57:49PM +0100, Laszlo Ersek wrote: > >> On 10/30/20 10:16, Stefan Hajnoczi wrote: > >>> On Thu, Oct 29, 2020 at 12:01:27PM -0400, John Snow wrote: > In ex

[PATCH 0/7] qom: Field properties type safety

2020-11-04 Thread Eduardo Habkost
Based-on: 20201104160021.2342108-1-ehabk...@redhat.com Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-size-validation This adds additional validation to field properties, to ensure the field property usage and implementation agree about the struct field size. The first patch in

[PATCH 1/7] sparc: Fix property/field size mismatch for iu-version

2020-11-04 Thread Eduardo Habkost
The "iu-version" property is declared as uint64_t but points to a target_ulong struct field. On the sparc 32-bit target, This makes every write of iu-version corrupt the 4 bytes after sparc_def_t.iu_version (where the fpu_version field is located). Change the type of the iu_version struct field t

[PATCH 7/7] sparc: Use FIELD_PTR at nwindows getter/setter

2020-11-04 Thread Eduardo Habkost
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 i

[PATCH 5/7] qom: Replace void* parameter with Property* on PropertyInfo.release

2020-11-04 Thread Eduardo Habkost
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 --- include/qom/f

[PATCH 2/7] qom: Save size of struct field in Property struct

2020-11-04 Thread Eduardo Habkost
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-types.h | 1 + q

Re: [PATCH-for-5.2 v3 1/4] s390x: fix build for --without-default-devices

2020-11-04 Thread Cornelia Huck
On Wed, 4 Nov 2020 12:57:03 +0100 Philippe Mathieu-Daudé wrote: > From: Cornelia Huck > > s390-pci-vfio.c calls into the vfio code, so we need it to be > built conditionally on vfio (which implies CONFIG_LINUX). > > Reported-by: Philippe Mathieu-Daudé > Fixes: cd7498d07fbb ("s390x/pci: Add r

[PATCH 3/7] qdev: Don't register unreadable legacy properties

2020-11-04 Thread Eduardo Habkost
The existing code at qdev_class_add_legacy_property() will register a property if both .print and .get are NULL, which is useless as it will register a property that can't be read or written. The only PropertyInfo struct in the whole tree that has both .print and .get set to NULL is qdev_prop_link

Re: [PATCH v2 08/20] block/block-copy: add block_copy_cancel

2020-11-04 Thread Max Reitz
On 22.10.20 22:50, Vladimir Sementsov-Ogievskiy wrote: > 22.07.2020 14:28, Max Reitz wrote: >> On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: >>> Add function to cancel running async block-copy call. It will be used >>> in backup. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> ---

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

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

Re: [PATCH v2 18/44] qdev: Avoid using prop->name unnecessarily

2020-11-04 Thread Stefan Berger
On 11/4/20 10:59 AM, Eduardo Habkost wrote: 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. Signed-off-by: Eduardo Habkost Reviewed-by: Stefan Berger

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

2020-11-04 Thread Stefan Berger
On 11/4/20 10:59 AM, Eduardo Habkost wrote: 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 lat

[PATCH 0/5] SCSI: fix transfer limits for SCSI passthrough

2020-11-04 Thread Maxim Levitsky
This patch series attempts to provide a solution to the problem of the transfer limits of the raw file driver (host_device/file-posix), some of which I already tried to fix in the past. I included 2 patches from Tom Yan which fix two issues with reading the limits correctly from the */dev/sg* char

Re: [PATCH v2 13/20] iotests: 129: prepare for backup over block-copy

2020-11-04 Thread Max Reitz
On 22.10.20 23:10, Vladimir Sementsov-Ogievskiy wrote: > 23.07.2020 11:03, Max Reitz wrote: >> On 01.06.20 20:11, Vladimir Sementsov-Ogievskiy wrote: >>> After introducing parallel async copy requests instead of plain >>> cluster-by-cluster copying loop, backup job may finish earlier than >>> final

[PATCH 2/5] file-posix: add sg_get_max_segments that actually works with sg

2020-11-04 Thread Maxim Levitsky
From: Tom Yan sg devices have different major/minor than their corresponding block devices. Using sysfs to get max segments never really worked for them. Fortunately the sg driver provides an ioctl to get sg_tablesize, which is apparently equivalent to max segments. Signed-off-by: Tom Yan Sign

[PATCH 3/5] block: add max_ioctl_transfer to BlockLimits

2020-11-04 Thread Maxim Levitsky
Maximum transfer size when accessing a kernel block device is only relevant when using SCSI passthrough (SG_IO ioctl) since only in this case the requests are passed directly to underlying hardware with no pre-processing. Same is true when using /dev/sg* character devices (which only support SG_IO)

[PATCH 4/5] block: use blk_get_max_ioctl_transfer for SCSI passthrough

2020-11-04 Thread Maxim Levitsky
Switch file-posix to expose only the max_ioctl_transfer limit. Let the iscsi driver work as it did before since it is bound by the transfer limit in both regular read/write and in SCSI passthrough case. Switch the scsi-disk and scsi-block drivers to read the SG max transfer limits using the new b

[PATCH 5/5] block/scsi: correctly emulate the VPD block limits page

2020-11-04 Thread Maxim Levitsky
When the device doesn't support the VPD block limits page, we emulate it even for SCSI passthrough. As a part of the emulation we need to add it to the 'Supported VPD Pages' The code that does this adds it to the page, but it doesn't increase the length of the data to be copied to the guest, thus

Re: [PATCH v2] target/s390x: fix execution with icount

2020-11-04 Thread Cornelia Huck
On Mon, 02 Nov 2020 12:26:59 +0300 Pavel Dovgalyuk wrote: > This patch adds some gen_io_start() calls to allow execution > of s390x targets in icount mode with -smp 1. > It enables deterministic timers and record/replay features. > > Signed-off-by: Pavel Dovgalyuk > > --- > > v2: > - added I

Re: VFIO Migration

2020-11-04 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Nov 04, 2020 at 10:14:23AM +, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Tue, Nov 03, 2020 at 06:49:51PM +, Dr. David Alan Gilbert wrote: > > > > * Stefan Hajnoczi (stefa...@redhat.com) w

Re: [PULL 0/3] Ui 20201104 patches

2020-11-04 Thread Peter Maydell
On Wed, 4 Nov 2020 at 13:55, Gerd Hoffmann wrote: > > The following changes since commit 3d6e32347a3b57dac7f469a07c5f520e69bd070a: > > Update version for v5.2.0-rc0 release (2020-11-03 21:11:57 +) > > are available in the Git repository at: > > git://git.kraxel.o

[PATCH 1/5] file-posix: split hdev_refresh_limits from raw_refresh_limits

2020-11-04 Thread Maxim Levitsky
From: Tom Yan We can and should get max transfer length and max segments for all host devices / cdroms (on Linux). Also use MIN_NON_ZERO instead when we clamp max transfer length against max segments. Signed-off-by: Tom Yan Signed-off-by: Maxim Levitsky --- block/file-posix.c | 61 ++

Re: [PATCH v2 17/20] backup: move to block-copy

2020-11-04 Thread Max Reitz
On 26.10.20 16:18, Vladimir Sementsov-Ogievskiy wrote: > 23.07.2020 12:47, Max Reitz wrote: >>> +static void coroutine_fn backup_set_speed(BlockJob *job, int64_t speed) >>> +{ >>> +    BackupBlockJob *s = container_of(job, BackupBlockJob, common); >>> + >>> +    if (s->bcs) { >>> +    /* In blo

Re: [PATCH 0/5] SCSI: fix transfer limits for SCSI passthrough

2020-11-04 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201104173217.417538-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201104173217.417538-1-mlevi...@redhat.com Subject: [PATCH 0/5] SCSI: fix transfer limi

Re: [PATCH-for-5.2 v3 2/4] hw/9pfs: Fix Kconfig dependency problem between 9pfs and Xen

2020-11-04 Thread Greg Kurz
On Wed, 04 Nov 2020 13:18:09 +0100 Christian Schoenebeck wrote: > On Mittwoch, 4. November 2020 12:57:04 CET Philippe Mathieu-Daudé wrote: > > Commit b2c00bce54c ("meson: convert hw/9pfs, cleanup") introduced > > CONFIG_9PFS (probably a wrong conflict resolution). This config is > > not used anyw

Re: [PATCH] hw/arm/Kconfig: ARM_V7M depends on PTIMER

2020-11-04 Thread Peter Maydell
On Wed, 4 Nov 2020 at 10:35, Philippe Mathieu-Daudé wrote: > > On 11/4/20 11:33 AM, Andrew Jones wrote: > > commit 32bd322a0134 ("hw/timer/armv7m_systick: Rewrite to use ptimers") > > changed armv7m_systick to build on ptimers. Make sure we have ptimers > > in the build when building armv7m_systic

Re: [PATCH RFC] memory: pause all vCPUs for the duration of memory transactions

2020-11-04 Thread Laszlo Ersek
On 11/03/20 14:07, Vitaly Kuznetsov wrote: > Peter Xu writes: > >> Vitaly, >> >> On Mon, Oct 26, 2020 at 09:49:16AM +0100, Vitaly Kuznetsov wrote: >>> Currently, KVM doesn't provide an API to make atomic updates to memmap when >>> the change touches more than one memory slot, e.g. in case we'd li

Re: [PATCH] ssi: Fix bad printf format specifiers

2020-11-04 Thread Peter Maydell
On Wed, 4 Nov 2020 at 16:33, Alistair Francis wrote: > > On Wed, Nov 4, 2020 at 2:23 AM AlexChen wrote: > > > > We should use printf format specifier "%u" instead of "%d" for > > argument of type "unsigned int". > > > > Reported-by: Euler Robot > > Signed-off-by: Alex Chen > > Reviewed-by: Alis

Re: [PATCH 1/3] target/arm: add spaces around operator

2020-11-04 Thread Peter Maydell
On Tue, 3 Nov 2020 at 11:47, Xinhao Zhang wrote: > > Fix code style. Operator needs spaces both sides. Thanks; I have applied this series to target-arm.next. For future patch submissions, please could you include a cover letter if you're submitting a series with more than one patch in it? (Singl

<    1   2   3   4   5   >