[PATCH v3 1/2] modules: introduces module_kconfig directive

2021-09-28 Thread Jose R. Ziviani
to use module_kconfig is by passing the Kconfig option to module_kconfig (or the *config-devices.mak without CONFIG_). Signed-off-by: Jose R. Ziviani --- hw/display/qxl.c| 1 + hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost-user

[PATCH v3 2/2] modules: generates per-target modinfo

2021-09-28 Thread Jose R. Ziviani
This patch changes the way modinfo is generated and built. Instead of one modinfo.c it generates one modinfo--softmmu.c per target. It aims a fine-tune control of modules by configuring Kconfig. Signed-off-by: Jose R. Ziviani --- meson.build | 25 +++--- scripts

[PATCH v3 0/2] modules: Improve modinfo.c support

2021-09-28 Thread Jose R. Ziviani
odule_kconfig [Gerd] - Reworded the commit message a bit to improve a better understanding [myself] v1 -> v2: - Changed the approach to this problem after suggestions made by Paolo and Gerd. Thank you! Jose R. Ziviani (2): modules: introduces module_kconfig directive modules: generates per

Re: [PATCH v2 0/2] modules: Improve modinfo.c support

2021-09-28 Thread Jose R. Ziviani
Hello, Gerd! On Tue, Sep 28, 2021 at 07:06:28AM +0200, Gerd Hoffmann wrote: > On Mon, Sep 27, 2021 at 11:11:58AM -0300, Jose R. Ziviani wrote: > > This patchset introduces the modinfo_need and changes > > modinfo-generate.py/meson.build to generate/link one modinfo per target. &

[PATCH v2 0/2] modules: Improve modinfo.c support

2021-09-27 Thread Jose R. Ziviani
cho "Error: $qemu" done popd Also run make check and check-acceptance without any failures. Todo: - accelerators can be filtered as well (this only covers the device part), then the field QemuModinfo.arch can be removed. v1 -> v2: - Changed the approach to this pro

[PATCH v2 1/2] modules: introduces module_needs directive

2021-09-27 Thread Jose R. Ziviani
problem. The correct way to use module_needs is by passing the Kconfig option (or the *config-devices.mak without CONFIG_). Signed-off-by: Jose R. Ziviani --- hw/display/qxl.c| 1 + hw/display/vhost-user-gpu-pci.c | 1 + hw/display/vhost-user-gpu.c | 1 + hw/display/vhost

[PATCH v2 2/2] modules: generates per-target modinfo

2021-09-27 Thread Jose R. Ziviani
-by: Jose R. Ziviani --- meson.build | 25 +++ scripts/modinfo-generate.py | 40 + 2 files changed, 40 insertions(+), 25 deletions(-) diff --git a/meson.build b/meson.build index 2711cbb789..9d25ebb2f9 100644 --- a/meson.build +++ b

[PATCH v2 0/2] modules: Improve modinfo.c support

2021-09-27 Thread Jose R. Ziviani
cho "Error: $qemu" done popd Also run make check and check-acceptance without any failures. Todo: - accelerators can be filtered as well (this only covers the device part), then the field QemuModinfo.arch can be removed. v1 -> v2: - Changed the approach to this pro

Re: [PATCH 1/2] meson: introduce modules_arch

2021-09-21 Thread Jose R. Ziviani
Hello!! On Mon, Sep 20, 2021 at 09:03:28PM +0200, Paolo Bonzini wrote: > On 20/09/21 15:02, Jose R. Ziviani wrote: > > But, in anyway, I'll still need to store the target architecture that > > can use such core module, like I did here in this patch. Otherwise, > > if I comp

Re: [PATCH 1/2] meson: introduce modules_arch

2021-09-21 Thread Jose R. Ziviani
Hello!! On Tue, Sep 21, 2021 at 07:25:42AM +0200, Gerd Hoffmann wrote: > Hi, > > > But, in anyway, I'll still need to store the target architecture that > > can use such core module, like I did here in this patch. Otherwise, > > if I compile different targets at the same time, I'll end up with

Re: [PATCH 1/2] meson: introduce modules_arch

2021-09-20 Thread Jose R. Ziviani
. What do you think if I simply create one modinfo.c per target, like modinfo-s390x.c, modinfo-avr.c, etc? Each will only have the data structure filled with the right modules and linked only to its own qemu-system-arch. Best regards, Jose R Ziviani > > take care, > Gerd > signature.asc Description: Digital signature

Re: [PATCH 1/2] meson: introduce modules_arch

2021-09-17 Thread Jose R. Ziviani
Hello! On Fri, Sep 17, 2021 at 09:14:04AM +0200, Gerd Hoffmann wrote: > Hi, > > > This variable keeps track of all modules enabled for a target > > architecture. This will be used in modinfo to refine the > > architectures that can really load the .so to avoid errors. > > I think this is the

[PATCH 2/2] modules: use a list of supported arch for each module

2021-09-16 Thread Jose R. Ziviani
of architectures, obtained during the build time, to specify what targets can load each module. Signed-off-by: Jose R. Ziviani --- include/qemu/module.h | 2 +- meson.build | 18 +- scripts/modinfo-collect.py | 10 ++ scripts/modinfo-generate.py | 7

[PATCH 1/2] meson: introduce modules_arch

2021-09-16 Thread Jose R. Ziviani
This variable keeps track of all modules enabled for a target architecture. This will be used in modinfo to refine the architectures that can really load the .so to avoid errors. Signed-off-by: Jose R. Ziviani --- hw/display/meson.build | 48 ++ hw/usb

[PATCH 0/2] modules: Improve modinfo.c architecture support

2021-09-16 Thread Jose R. Ziviani
I Bridge (multiseat)" ... $ ./qemu-system-avr -nodefaults -display none -accel tcg -M none -device help | head ... Misc devices: name "guest-loader", desc "Guest Loader" name "loader", desc "Generic Loader" Jose R. Ziviani (2): meson: introduce m

[PATCH] tcg/arm: Fix tcg_out_vec_op function signature

2021-09-08 Thread Jose R. Ziviani
*args, const int *const_args) ~~^~~~ ../tcg/tcg.c:120:41: note: previously declared as an array 'const TCGArg[16]' {aka 'const unsigned int[16]'} const TCGArg args[TCG_MAX_OP_ARGS], ~~^~~~ Signed-off-by: Jose R. Ziviani --- tcg/arm/tcg-target.c.inc | 3 ++- 1 file

Re: [PATCH] qemu-img: Allow target be aligned to sector size

2021-08-19 Thread Jose R. Ziviani
On Thu, Aug 19, 2021 at 05:14:30PM +0200, Hanna Reitz wrote: > On 19.08.21 16:31, Jose R. Ziviani wrote: > > Hello Hanna, > > > > On Thu, Aug 19, 2021 at 12:12:00PM +0200, Hanna Reitz wrote: > > > We cannot write to images opened with O_DIRECT unless we all

Re: [PATCH] qemu-img: Allow target be aligned to sector size

2021-08-19 Thread Jose R. Ziviani
Hello Hanna, On Thu, Aug 19, 2021 at 12:12:00PM +0200, Hanna Reitz wrote: > We cannot write to images opened with O_DIRECT unless we allow them to > be resized so they are aligned to the sector size: Since 9c60a5d1978, > bdrv_node_refresh_perm() ensures that for nodes whose length is not >

[PATCH v4] vga: don't abort when adding a duplicate isa-vga device

2021-08-17 Thread Jose R. Ziviani
y, so it's not obvious that a VGA device already exists. This patch changes this behavior by displaying a message and exiting without crashing. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/44 Signed-off-by: Jose R. Ziviani --- v3 to v4: Used object_resolve_path_type instead of qemu_ram_blo

Re: [PATCH v3] vga: don't abort when adding a duplicate isa-vga device

2021-08-17 Thread Jose R. Ziviani
On Tue, Aug 17, 2021 at 10:07:55AM +0200, Philippe Mathieu-Daudé wrote: > On 8/17/21 9:36 AM, Mark Cave-Ayland wrote: > > On 17/08/2021 08:25, Thomas Huth wrote: > > > >> On 16/08/2021 15.55, Jose R. Ziviani wrote: > >>> If users try to add an isa-vg

[PATCH v3] vga: don't abort when adding a duplicate isa-vga device

2021-08-16 Thread Jose R. Ziviani
y, so it's not obvious that a VGA device already exists. This patch changes this behavior by displaying a message and exiting without crashing. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/44 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jose R. Ziviani --- v2 to v3: Improved error

[PATCH v2] vga: don't abort when adding a duplicate isa-vga device

2021-08-16 Thread Jose R. Ziviani
y, so it's not obvious that a VGA device already exists. This patch changes this behavior by displaying a message and exiting without crashing. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/44 Signed-off-by: Jose R. Ziviani --- hw/display/vga-isa.c | 10 ++ 1 file changed, 10 insertion

[PATCH] vga: don't abort when adding a duplicate isa-vga device

2021-08-13 Thread Jose R. Ziviani
y, so it's not obvious that a VGA device already exists. This patch changes this behavior by displaying a message and ignoring that device, starting qemu normally. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/44 Signed-off-by: Jose R. Ziviani --- hw/display/vga-isa.c | 9 + 1 file

Re: [PATCH v2 1/1] modules: Improve error message when module is not found

2021-07-23 Thread Jose R. Ziviani
On Fri, Jul 23, 2021 at 05:27:25PM +0200, Claudio Fontana wrote: > On 7/23/21 4:36 PM, Jose R. Ziviani wrote: > > On Fri, Jul 23, 2021 at 04:02:26PM +0200, Claudio Fontana wrote: > >> On 7/23/21 3:50 PM, Jose R. Ziviani wrote: > >>> On Fri, Jul 23, 2021 at 11:41:19A

Re: [PATCH v2 1/1] modules: Improve error message when module is not found

2021-07-23 Thread Jose R. Ziviani
On Fri, Jul 23, 2021 at 04:02:26PM +0200, Claudio Fontana wrote: > On 7/23/21 3:50 PM, Jose R. Ziviani wrote: > > On Fri, Jul 23, 2021 at 11:41:19AM +0200, Claudio Fontana wrote: > >> On 7/23/21 12:09 AM, Jose R. Ziviani wrote: > >>> When a module is not found

Re: [PATCH v2 1/1] modules: Improve error message when module is not found

2021-07-23 Thread Jose R. Ziviani
On Fri, Jul 23, 2021 at 11:41:19AM +0200, Claudio Fontana wrote: > On 7/23/21 12:09 AM, Jose R. Ziviani wrote: > > When a module is not found, specially accelerators, QEMU displays > > a error message that not easy to understand[1]. This patch improves > > the readabili

[PATCH v2 1/1] modules: Improve error message when module is not found

2021-07-22 Thread Jose R. Ziviani
dumped) ./qemu-system-x86_64 ... [2] qemu-system-x86_64 -accel tcg accel-tcg-x86_64 module is missing, install the package or config the library path correctly. Signed-off-by: Jose R. Ziviani --- accel/accel-softmmu.c | 5 - util/module.c | 14 -- 2 files changed, 12

[PATCH v2 0/1] Improve module accelerator error message

2021-07-22 Thread Jose R. Ziviani
ing, install the package or config the library path correctly. Jose R. Ziviani (1): modules: Improve error message when module is not found accel/accel-softmmu.c | 5 - util/module.c | 14 -- 2 files changed, 12 insertions(+), 7 deletions(-) -- 2.32.0

Re: [RFC 3/3] qom: Improve error message in module_object_class_by_name()

2021-07-21 Thread Jose R. Ziviani
On Wed, Jul 21, 2021 at 10:57:37AM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 21, 2021 at 11:54:45AM +0200, Gerd Hoffmann wrote: > > > ObjectClass *module_object_class_by_name(const char *typename) > > > { > > > ObjectClass *oc; > > > @@ -1031,8 +1049,20 @@ ObjectClass

Re: [PATCH 0/1]

2021-07-21 Thread Jose R. Ziviani
On Wed, Jul 21, 2021 at 07:24:02AM +0200, Thomas Huth wrote: > On 21/07/2021 00.13, Jose R. Ziviani wrote: > > Hello! > > > > This patch gives the ability to build TCG builtin even if > > --enable-modules is selected. This is useful to have a base > > QEMU with T

[PATCH 1/2] modules: Implement new helper functions

2021-07-20 Thread Jose R. Ziviani
the module name given the typename. Signed-off-by: Jose R. Ziviani --- include/qemu/module.h | 4 +++ util/module.c | 57 +-- 2 files changed, 54 insertions(+), 7 deletions(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index

[PATCH 2/2] qom: Improve error message in module_object_class_by_name()

2021-07-20 Thread Jose R. Ziviani
is missing, install the package or config the library path correctly. ... Signed-off-by: Jose R. Ziviani --- accel/accel-softmmu.c | 5 - qom/object.c | 9 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/accel/accel-softmmu.c b/accel/accel-softmmu.c index 67276e4f52

[PATCH 0/2] Improve module accelerator error message

2021-07-20 Thread Jose R. Ziviani
/boot/vmlinuz accel-tcg-x86_64 module is missing, install the package or config the library path correctly. Jose R. Ziviani (2): modules: Implement new helper functions qom: Improve error message in module_object_class_by_name() accel/accel-softmmu.c | 5 +++- include/qemu/module.h | 4

[PATCH 1/1] modules: Option to build native TCG with --enable-modules

2021-07-20 Thread Jose R. Ziviani
Adds an option (--enable-tcg-builtin) to build TCG natively when --enable-modules argument is passed to the build system. It gives the opportunity to have this important accelerator built-in and still take advantage of the new modular system. Signed-off-by: Jose R. Ziviani --- configure

[PATCH 0/1]

2021-07-20 Thread Jose R. Ziviani
Hello! This patch gives the ability to build TCG builtin even if --enable-modules is selected. This is useful to have a base QEMU with TCG native product but still using the benefits of modules. Thank you! Jose R. Ziviani (1): modules: Option to build native TCG with --enable-modules

Re: [RFC 3/3] qom: Improve error message in module_object_class_by_name()

2021-07-19 Thread Jose R. Ziviani
On Mon, Jul 19, 2021 at 05:29:49PM +0200, Claudio Fontana wrote: > On 7/1/21 1:27 AM, Jose R. Ziviani wrote: > > module_object_class_by_name() calls module_load_qom_one if the object > > is provided by a dynamically linked library. Such library might not be > > ava

[RFC 1/3] modules: Add CONFIG_TCG_MODULAR in config_host

2021-06-30 Thread Jose R. Ziviani
CONFIG_TCG_MODULAR is a complement to CONFIG_MODULES, in order to know if TCG will be a module, even if --enable-modules option was set. Signed-off-by: Jose R. Ziviani --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 2d72b8cc06..c37a2358d4

[RFC 0/3] Improve module accelerator error message

2021-06-30 Thread Jose R. Ziviani
://patchwork.kernel.org/project/qemu-devel/list/?series=506379 Jose R. Ziviani (3): modules: Add CONFIG_TCG_MODULAR in config_host modules: Implement module_is_loaded function qom: Improve error message in module_object_class_by_name() include/qemu/module.h | 3 +++ meson.build | 3

[RFC 3/3] qom: Improve error message in module_object_class_by_name()

2021-06-30 Thread Jose R. Ziviani
or config the library path correctly. ... Signed-off-by: Jose R. Ziviani --- qom/object.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/qom/object.c b/qom/object.c index 6a01d56546..2d40245af9 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1024,6 +1024,24

[RFC 2/3] modules: Implement module_is_loaded function

2021-06-30 Thread Jose R. Ziviani
The function module_load_one() fills a hash table will all modules that were successfuly loaded. However, that table is a static variable of module_load_one(). This patch changes it and creates a function that informs whether a given module was loaded or not. Signed-off-by: Jose R. Ziviani

[RFC 2/2] modules: Fix warning in module_arch documentation

2021-06-29 Thread Jose R. Ziviani
' Signed-off-by: Jose R. Ziviani --- include/qemu/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/module.h b/include/qemu/module.h index 8bc80535a4..456e190a55 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -115,7 +115,7 @@ void

[RFC 1/2] modules: Option to build native TCG with --enable-modules

2021-06-29 Thread Jose R. Ziviani
Adds an option (--enable-tcg-builtin) to build TCG natively when --enable-modules argument is passed to the build system. It gives the opportunity to have the accelerator built-in and still take advantage of the new modular system. Signed-off-by: Jose R. Ziviani --- configure | 12

[RFC 0/2] Option to build native TCG with --enable-modules

2021-06-29 Thread Jose R. Ziviani
Hello! I'm sending this simple patchset based on a patch still on review[1] just to understand if it's something that makes sense to the community. If so, I think it could be included in Gerd's patchset. Thank you! [1] https://patchwork.kernel.org/project/qemu-devel/list/?series=506379 Jose R

Re: [PATCH v4 00/34] modules: add meta-data database

2021-06-24 Thread Jose R. Ziviani
Hello Gerd, Reviewed and tested successfully here. Thank you! Reviewed-by: Jose R. Ziviani On Thu, Jun 24, 2021 at 12:38:02PM +0200, Gerd Hoffmann wrote: > This patch series adds support for module meta-data. Today this is > either hard-coded in qemu (see qemu_load_module_fo

Re: [PATCH v3 03/24] modules: generate modinfo.c

2021-06-22 Thread Jose R. Ziviani
ue, # to be > removed when added to a target > command: [modinfo_collect, '@INPUT@']) >endif > else > @@ -2055,6 +2055,17 @@ foreach d, list : modules >endforeach > endforeach > > +if enable_modules > + modinf

Re: [PATCH v3 03/24] modules: generate modinfo.c

2021-06-22 Thread Jose R. Ziviani
Hello, Just a small change. On Fri, Jun 18, 2021 at 06:53:32AM +0200, Gerd Hoffmann wrote: > Add script to generate C source with a small > database containing the module meta-data. > > Signed-off-by: Gerd Hoffmann > --- > scripts/modinfo-generate.py | 84 +

Re: [PATCH 3/4] modules: module.h kerneldoc annotations

2021-06-22 Thread Jose R. Ziviani
Hello Gerd, On Tue, Jun 22, 2021 at 02:51:09PM +0200, Gerd Hoffmann wrote: > --- > include/qemu/module.h | 59 +-- > 1 file changed, 45 insertions(+), 14 deletions(-) This header has a copyright date from 2009. Not sure if it requires an update. > >

[PATCH] tcg/arm: Fix tcg_out_op function signature

2021-06-10 Thread Jose R. Ziviani
Commit 5e8892db93 fixed several function signatures but tcg_out_op for arm is missing. This patch fixes it as well. Signed-off-by: Jose R. Ziviani --- tcg/arm/tcg-target.c.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg

Performance issue with qcow2/raid

2021-05-27 Thread Jose R. Ziviani
is using perf, but I appreciate if you have any hints measure qcow efficiently. [1] # lspci -vv | grep -i raid 1a:00.0 RAID bus controller: Broadcom / LSI MegaRAID SAS-3 3108 [Invader] (rev 02) Kernel driver in use: megaraid_sas Kernel modules: megaraid_sas Thank you very much!

[Qemu-devel] [Bug 1655708] Re: target/ppc/int_helper.c:2806: strange expression ?

2017-01-11 Thread Jose R. Ziviani
** Changed in: qemu Assignee: (unassigned) => Jose R. Ziviani (jrziviani) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1655708 Title: target/ppc/int_helper.c:2806: strange express