Re: [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER

2022-08-04 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Jul 28, 2022 at 10:46:35AM +0100, Peter Maydell wrote: >> On Wed, 27 Jul 2022 at 20:03, Kevin Wolf wrote: >> > >> > Am 18.07.2022 um 11:49 hat Markus Armbruster geschrieben: >> > > An OTP device isn't really a

Re: [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER

2022-08-04 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 28 Jul 2022 at 15:50, Markus Armbruster wrote: >> Kevin Wolf writes: >> > >> > But if you have more than one device, it becomes hard to predict which >> > device gets which backend - it depends on the initialisation order

Re: [PATCH 8/9] scripts/qapi-gen: add -i option

2022-08-03 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Aug 2, 2022 at 5:28 PM Markus Armbruster wrote: > >> Marc-André Lureau writes: >> >> > Hi >> > >> > >> > On Tue, Jun 21, 2022 at 6:14 PM Markus Armbruster >> > wrote: [...] &g

Re: [PATCH 8/9] scripts/qapi-gen: add -i option

2022-08-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > > On Tue, Jun 21, 2022 at 6:14 PM Markus Armbruster wrote: >> >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Replace hard-coded "qemu/osdep.h" in

Re: [PATCH v2 06/15] qapi: move QEMU-specific dispatch code in monitor

2022-08-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Aug 2, 2022 at 3:04 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Make QMP-dispatch code free from QEMU-specific OOB dispatch/asy

Re: [PATCH v2 06/15] qapi: move QEMU-specific dispatch code in monitor

2022-08-02 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Make QMP-dispatch code free from QEMU-specific OOB dispatch/async > coroutine handling. This will allow to move the base code to > qemu-common, and clear other users from potential mis-ususe (QGA doesn't > have OOB or coroutine).

Re: [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER

2022-07-28 Thread Markus Armbruster
Kevin Wolf writes: > Am 28.07.2022 um 11:46 hat Peter Maydell geschrieben: >> On Wed, 27 Jul 2022 at 20:03, Kevin Wolf wrote: >> > >> > Am 18.07.2022 um 11:49 hat Markus Armbruster geschrieben: >> > > An OTP device isn't really a parallel flash, and neithe

Re: [PATCH v2 05/15] stubs: remove needless error_vprintf_unless_qmp()

2022-07-19 Thread Markus Armbruster
urn error_vprintf(fmt, ap); > -} Easy enough to add back should we ever need it. Reviewed-by: Markus Armbruster

Re: [PATCH v2 04/15] error-report: introduce overridable error_is_detailed()

2022-07-19 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Remove the direct dependency from error-report to monitor code. > This will allow to move error-report to a subproject. > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

Re: [RFC v4 0/9] Add support for zoned device

2022-07-18 Thread Markus Armbruster
Sam Li writes: > Markus Armbruster 于2022年7月12日周二 13:47写道: >> >> Sam Li writes: >> >> > This patch series adds support for zoned device to virtio-blk emulation. >> > Zoned >> > Storage can support sequential writes, which reduces write amplific

Re: [PATCH v5 7/8] hw/arm: Set drive property for at24c eeprom

2022-07-18 Thread Markus Armbruster
Hao Wu writes: > This patch allows the user to attach an external drive as a property > for an onboard at24c eeprom device. What's the contents of the EEPROM before the patch? I guess the patch lets users replace that contents. Why would a user want to do that? >

Re: [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER

2022-07-18 Thread Markus Armbruster
ked-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Reviewed-by: Alistair Francis Message-id: 2029102549.217755-1-th...@redhat.com Signed-off-by: Alistair Francis An OTP device isn't really a parallel flash, and neither are eFuses. More fast-and-lose use of IF_PFLA

Re: [RFC v4 0/9] Add support for zoned device

2022-07-11 Thread Markus Armbruster
Sam Li writes: > This patch series adds support for zoned device to virtio-blk emulation. Zoned > Storage can support sequential writes, which reduces write amplification in > SSD, > leading to higher write throughput and increased capacity. Forgive me if this has already been discussed, or is

Re: [PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-07-08 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Jul 7, 2022 at 4:25 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Not needed outside monitor.c. Remove the needle

Re: [PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-07-07 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Not needed outside monitor.c. Remove the needless stub. > > Signed-off-by: Marc-André Lureau > --- > include/monitor/monitor.h | 1 - > monitor/monitor.c | 3 ++- > stubs/error-printf.c | 5 - > 3 files changed,

Re: [PATCH 6/9] error-report: add a callback to overwrite error_vprintf

2022-07-07 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > error_vprintf() is implemented in monitor.c, which overrides the > default implementation from stubs/, while avoiding a direct dependency > to the monitor from error-report.c. > > However, the stub solution isn't working when

Re: [PATCH 5/9] error-report: introduce ErrorReportDetailedFunc

2022-07-07 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Remove monitor dependency from error printing code, by allowing programs > to set a callback for when to use "detailed" reporting or not. > > Signed-off-by: Marc-André Lureau > --- > include/qemu/error-report.h | 4 +++-

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Markus Armbruster
Yongji Xie writes: > On Wed, Jun 29, 2022 at 7:39 PM Markus Armbruster wrote: >> >> Yongji Xie writes: >> >> > On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster >> > wrote: >> >> >> >> Xie Yongji writes: >> >> >&

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Markus Armbruster
Yongji Xie writes: > On Wed, Jun 29, 2022 at 5:41 PM Markus Armbruster wrote: >> >> Xie Yongji writes: >> >> > Coverity pointed out (CID 1490222, 1490227) that we called >> > ioctl somewhere without checking the return value. This >> > patch f

Re: [PATCH 4/4] libvduse: Check the return value of some ioctls

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > Coverity pointed out (CID 1490222, 1490227) that we called > ioctl somewhere without checking the return value. This > patch fixes these issues. > > Fixes: Coverity CID 1490222, 1490227 > Signed-off-by: Xie Yongji > --- > subprojects/libvduse/libvduse.c | 10 -- >

Re: [PATCH 2/4] libvduse: Replace strcpy() with strncpy()

2022-06-29 Thread Markus Armbruster
invalid(). But anyway, > let's replace strcpy() with strncpy() to fix the coverity > complaint. Mention why you can't use something nicer from GLib? > Fixes: Coverity CID 1490224 > Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster

Re: [PATCH 3/4] libvduse: Pass positive value to strerror()

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > The value passed to strerror() should be positive. > So let's fix it. > > Fixes: Coverity CID 1490226, 1490223 > Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster

Re: [PATCH 1/4] libvduse: Fix the incorrect function name

2022-06-29 Thread Markus Armbruster
Xie Yongji writes: > In vduse_name_is_valid(), we actually check whether > the name is invalid or not. So let's change the > function name to vduse_name_is_invalid() to match > the behavior. > > Signed-off-by: Xie Yongji Reviewed-by: Markus Armbruster

Re: [PULL v2 10/20] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-06-26 Thread Markus Armbruster
Kevin Wolf writes: > From: Xie Yongji > > VDUSE [1] is a linux framework that makes it possible to implement > software-emulated vDPA devices in userspace. This adds a library > as a subproject to help implementing VDUSE backends in QEMU. > > [1]

Re: [PATCH 9/9] scripts/qapi: add required system includes to visitor

2022-06-23 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > The generated visitor code includes abort() & assert(), we shouldn't > rely on the global "-i" headers to include the necessary system headers. Suggest ", even though the default qemu/osdep.h always does. > > Signed-off-by:

Re: [PATCH 8/9] scripts/qapi-gen: add -i option

2022-06-21 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Replace hard-coded "qemu/osdep.h" include with a qapi-gen option to > specify the headers to include. This will allow to substitute QEMU > osdep.h with glib.h for example, for projects with different > global headers. > > For

Re: [PATCH 3/9] error-report: introduce "detailed" variable

2022-06-20 Thread Markus Armbruster
error_printf("%s ", timestr); > g_free(timestr); > } > > /* Only prepend guest name if -msg guest-name and -name guest=... are > set */ > -if (error_with_guestname && error_guest_name && !monitor_cur()) { > +if (error_with_guestname && error_guest_name && detailed) { > error_printf("%s ", error_guest_name); > } Reviewed-by: Markus Armbruster

Re: [PATCH 4/9] error-report: simplify print_loc()

2022-06-20 Thread Markus Armbruster
t; sep = " "; > } > switch (cur_loc->kind) { > @@ -209,7 +209,7 @@ static void vreport(report_type type, const char *fmt, > va_list ap) > error_printf("%s ", error_guest_name); > } > > -print_loc(); > +print_loc(detailed ? g_get_prgname() : NULL); > > switch (type) { > case REPORT_TYPE_ERROR: Reviewed-by: Markus Armbruster

Re: [PATCH 2/9] error-report: misc comment fix

2022-06-20 Thread Markus Armbruster
for print_loc(). */ > g_set_prgname(p ? p + 1 : argv0); > > /* Missed in commit beeb175c0d "util/qemu-error: Rename error_print_loc() to be more generic". Reviewed-by: Markus Armbruster

Re: [PATCH v2 03/15] tests: make libqmp buildable for win32

2022-05-15 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, May 5, 2022 at 2:52 PM Markus Armbruster wrote: >> >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Signed-off-by: Marc-André Lureau >> > Rev

Re: [PATCH v2 0/8] qapi: Primarily whitespace tweaks

2022-05-15 Thread Markus Armbruster
Andrea Bolognani writes: > If patch 8/8 is accepted, 7/8 should be squashed into it to reduce > churn. Done & queued. Thanks!

Re: [PATCH v2 8/8] qapi: Stop using whitespace for alignment in comments

2022-05-15 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On Tue, May 03, 2022 at 09:37:37AM +0200, Andrea Bolognani wrote: >>> Perfectly aligned things look pretty, but keeping them that >>> way as the schema evolves requires churn, and in some cases >>> new

Re: [PATCH v2 8/8] qapi: Stop using whitespace for alignment in comments

2022-05-12 Thread Markus Armbruster
Eric Blake writes: > On Tue, May 03, 2022 at 09:37:37AM +0200, Andrea Bolognani wrote: >> Perfectly aligned things look pretty, but keeping them that >> way as the schema evolves requires churn, and in some cases >> newly-added lines are not aligned properly. >> >> Overall, trying to align

Re: [PATCH v2 15/15] test/qga: use g_auto wherever sensible

2022-05-05 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, May 5, 2022 at 3:47 PM Markus Armbruster wrote: >> >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Signed-off-by: Marc-An

Re: [PATCH v2] hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA

2022-05-05 Thread Markus Armbruster
Peter Maydell writes: > The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo) > don't support DMA. The core floppy controller code expects this to > be indicated by setting FDCtrl::dma_chann to -1. This used to be > done in the device instance_init functions sysbus_fdc_initfn() and

Re: [PATCH v2 15/15] test/qga: use g_auto wherever sensible

2022-05-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > tests/unit/test-qga.c | 125 +++--- > 1 file changed, 45 insertions(+), 80 deletions(-) > > diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c

Re: [PATCH v2 09/15] qga: replace qemu_open_old() with qemu_open_cloexec()

2022-05-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > qemu_open_old() uses qemu_open_internal() which handles special > "/dev/fdset/" path for monitor fd sets, set CLOEXEC, and uses Error > reporting (and some O_DIRECT special error casing). > > The monitor fdset handling is

Re: [PATCH v2 08/15] qga: throw an Error in ga_channel_open()

2022-05-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Allow for a single point of error reporting, and further refactoring. This sounds like there is no behavioral change intended. But it looks like there is change; see below. > Signed-off-by: Marc-André Lureau > --- >

Re: [PATCH v2 07/15] qga: use qemu_open_cloexec() for safe_open_or_create()

2022-05-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > The function takes care of setting CLOEXEC, and reporting error. > > Signed-off-by: Marc-André Lureau > --- > qga/commands-posix.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git

Re: [PATCH v2 05/15] qga: flatten safe_open_or_create()

2022-05-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > There is a bit too much branching in the function, this can be > simplified a bit, and have a common exit point thanks to ERRP_PROPAGATE. Do you mean ERRP_GUARD()? I'm not sure the commit reduces "branching", but it certainly

Re: [PATCH v2 03/15] tests: make libqmp buildable for win32

2022-05-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Reviewed-by: Thomas Huth > --- > tests/qtest/libqmp.h | 2 ++ > tests/qtest/libqmp.c | 35 +-- > 2 files changed, 31 insertions(+), 6 deletions(-) > > diff

Re: [PATCH v2 04/15] include: adjust header guards after renaming

2022-05-05 Thread Markus Armbruster
-#define QEMU_COMMON_H > +#ifndef QEMU_HELP_TEXTS_H > +#define QEMU_HELP_TEXTS_H > > /* Copyright string for -version arguments, About dialogs, etc */ > #define QEMU_COPYRIGHT "Copyright (c) 2003-2022 " \ Reviewed-by: Markus Armbruster Time for a re-run of scripts/clean-header-guards.pl.

Re: [PATCH v11 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-04 Thread Markus Armbruster
re implementations to enable/disable this feature. > > On non-Linux builds this parameter is compiled-out. > > Signed-off-by: Leonardo Bras > Reviewed-by: Peter Xu > Reviewed-by: Daniel P. Berrangé > Reviewed-by: Juan Quintela > Acked-by: Markus Armbr

Re: [PATCH v9 3/7] migration: Add zero-copy-send parameter for QMP/HMP for Linux

2022-05-04 Thread Markus Armbruster
rpose of dirty bitmap migration. > Such > # aliases may for example be the corresponding names > on the With that, QAPI schema Acked-by: Markus Armbruster [...]

Re: [PATCH v2 6/8] qapi: Drop unnecessary whitespace in comments

2022-05-03 Thread Markus Armbruster
ent, but folks might disagree" (a few examples marked below for illustration). Well, folks, if you disagree, speak up! I don't: Reviewed-by: Markus Armbruster > --- > qapi/block-core.json | 24 > qapi/block-export.json | 2 +- > qapi/block.

Re: [PATCH 0/7] qapi: Primarily whitespace tweaks

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > On Mon, May 02, 2022 at 02:43:52PM +0200, Markus Armbruster wrote: >> PATCH 1-5 queued, because no-brainers :) > > Thanks! > > How do you want me to handle respinning 6/7 and 7/7? Send out the > entire series again with those two patches tweak

Re: [PATCH 6/7] qapi: Drop unnecessary horizontal spacing in comments

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > On Mon, May 02, 2022 at 10:50:07AM +0200, Markus Armbruster wrote: >> Andrea Bolognani writes: >> > -# @writeback: true if writeback mode is enabled >> > -# @direct: true if the host page cache is bypassed (O_DIRECT) >> > -#

Re: [PATCH 0/7] qapi: Primarily whitespace tweaks

2022-05-02 Thread Markus Armbruster
PATCH 1-5 queued, because no-brainers :)

Re: [PATCH 6/7] qapi: Drop unnecessary horizontal spacing in comments

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > Care was taken not to break vertical alignment. > > Signed-off-by: Andrea Bolognani > --- > qapi/block-core.json | 62 +- > qapi/block-export.json | 2 +- > qapi/block.json| 2 +- > qapi/char.json | 2 +- >

Re: [PATCH 5/7] qapi: Drop unnecessary empty lines outside of comments

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > Signed-off-by: Andrea Bolognani Blank lines ones between doc comment and definition are clearly unwanted. Blank lines between two things *might* be intentional visual separators. I'm not sure we should care. Reviewed-by: Markus Armbruster

Re: [PATCH 3/7] qapi: Add missing separators between sections

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > Signed-off-by: Andrea Bolognani Suggest to mention this is just for source readability, and the generated documentation doesn't change. Reviewed-by: Markus Armbruster

Re: [PATCH 4/7] qapi: Drop unnecessary empty lines in comments

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > Signed-off-by: Andrea Bolognani Reviewed-by: Markus Armbruster

Re: [PATCH 2/7] qapi: Fix comment indentation

2022-05-02 Thread Markus Armbruster
Andrea Bolognani writes: > It should start on the very first column. > > Signed-off-by: Andrea Bolognani Reviewed-by: Markus Armbruster

Re: [PATCH 1/7] qapi: Drop stray trailing symbol

2022-05-02 Thread Markus Armbruster
te.json > +++ b/qapi/run-state.json > @@ -348,7 +348,7 @@ > # > # @poweroff: Shutdown the VM and exit > # > -# @pause: pause the VM# > +# @pause: pause the VM > # > # Since: 6.0 > ## Reviewed-by: Markus Armbruster

Re: [PATCH v5 0/3] util/thread-pool: Expose minimun and maximum size

2022-04-24 Thread Markus Armbruster
-pool-max=1 > > Note that all patches are bisect friendly and pass all the tests. > > [1] > https://patchwork.ozlabs.org/project/qemu-devel/patch/20220202175234.656711-1-nsaen...@redhat.com/ > > @Stefan I kept your Signed-off-by, since the changes trivial/not > thread-pool rela

Re: [PATCH v5 2/3] util/main-loop: Introduce the main loop into QOM

2022-04-24 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > 'event-loop-base' provides basic property handling for all 'AioContext' > based event loops. So let's define a new 'MainLoopClass' that inherits > from it. This will permit tweaking the main loop's properties through > qapi as well as through the command line

Re: [PATCH v4 3/3] util/event-loop-base: Introduce options to set the thread pool size

2022-04-22 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > On Fri, 2022-04-22 at 13:15 +0200, Markus Armbruster wrote: >> Nicolas Saenz Julienne writes: >> >> > The thread pool regulates itself: when idle, it kills threads until >> > empty, when in demand, it creates new threads until

Re: [PATCH v4 2/3] util/main-loop: Introduce the main loop into QOM

2022-04-22 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > 'event-loop-base' provides basic property handling for all 'AioContext' > based event loops. So let's define a new 'MainLoopClass' that inherits > from it. This will permit tweaking the main loop's properties through > qapi as well as through the command line

Re: [PATCH v4 3/3] util/event-loop-base: Introduce options to set the thread pool size

2022-04-22 Thread Markus Armbruster
Nicolas Saenz Julienne writes: > The thread pool regulates itself: when idle, it kills threads until > empty, when in demand, it creates new threads until full. This behaviour > doesn't play well with latency sensitive workloads where the price of > creating a new thread is too high. For

Re: [PATCH] iotests/108: Fix when missing user_allow_other

2022-04-21 Thread Markus Armbruster
_other here, though, so we can just pass > allow-other=off to fix that. > > Reported-by: Markus Armbruster > Signed-off-by: Hanna Reitz Tested-by: Markus Armbruster Thanks!

Re: [PATCH 32/32] Remove qemu-common.h include from most units

2022-04-06 Thread Markus Armbruster
First of all: thank you so much for completing the "empty out qemu-common.h" job! This is what's left: #ifndef QEMU_COMMON_H #define QEMU_COMMON_H /* Copyright string for -version arguments, About dialogs, etc */ #define QEMU_COPYRIGHT "Copyright (c) 2003-2022 " \

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-31 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Mar 15, 2022 at 03:50:26PM +0100, Kevin Wolf wrote: [...] >> ...using C++ in coroutine code means that all of the block layer would >> suddenly become C++ and would be most affected by this effect. I'm not >> sure if that's something I would like to see, at

Re: [PATCH experiment 00/16] C++20 coroutine backend

2022-03-31 Thread Markus Armbruster
Hanna Reitz writes: > On 17.03.22 16:11, Paolo Bonzini wrote: >> On 3/16/22 13:32, Stefan Hajnoczi wrote: >>> You can define rules and a way to enforce a subset of C++, but I think >>> over time the code will be C++. A policy that is complicated discourages >>> contributors. >>> >>> For these

Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-16 Thread Markus Armbruster
Murilo Opsfelder Araújo writes: > Hi, Philippe. > > On Monday, March 14, 2022 10:47:11 AM -03 Philippe Mathieu-Daudé wrote: >> On 11/3/22 23:16, Murilo Opsfelder Araujo wrote: >> > Building QEMU on Fedora 37 (Rawhide Prerelease) ppc64le failed with the >> > following error: >> > >> > $

Re: [PATCH v3 2/3] util/main-loop: Introduce the main loop into QOM

2022-03-16 Thread Markus Armbruster
'if': 'CONFIG_LINUX' }, >'iothread': 'IothreadProperties', > + 'main-loop': 'MainLoopProperties', >'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties', > 'if': 'CONFIG_LINUX' }, >'memory-backend-file':'MemoryBackendFileProperties', QAPI schema Acked-by: Markus Armbruster

Re: [PATCH 22/27] error-report: replace error progname with glib functions

2022-03-16 Thread Markus Armbruster
I'd prefer error: Use GLib to remember the program name marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 15/3/22 14:59, Markus Armbruster wrote: >> Alex Bennée writes: >> >>> Markus Armbruster writes: >>> >>>> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >>>> for two reasons. On

[PATCH v2 0/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
scan/model.c dropped [Eric] * PATCH 3: Change to semihosting/config.c dropped [Alex] * Commit messages tweaked Markus Armbruster (3): scripts/coccinelle: New use-g_new-etc.cocci 9pfs: Use g_new() & friends where that makes obvious sense Use g_new() & friends where that

[PATCH v2 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
: Greg Kurz Cc: Christian Schoenebeck Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Christian Schoenebeck Reviewed-by: Alex Bennée Reviewed-by: Greg Kurz --- hw/9pfs/9p-proxy.c | 2 +- hw/9pfs/9p-synth.c | 4 ++-- hw/9pfs/9p.c

[PATCH v2 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
sizeof(T). Patch created mechanically with: $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \ --macro-file scripts/cocci-macro-file.h FILES... Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Reviewed

[PATCH v2 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-15 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- scripts/coccinelle/use-g_new-

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Eric Blake writes: > On Mon, Mar 14, 2022 at 05:01:08PM +0100, Markus Armbruster wrote: >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather th

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void *, which lets the compiler c

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-15 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void *, which lets the compiler c

Re: [PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 14 Mar 2022 at 16:01, Markus Armbruster wrote: >> >> g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, >> for two reasons. One, it catches multiplication overflowing size_t. >> Two, it returns T * rather than void

[PATCH 1/3] scripts/coccinelle: New use-g_new-etc.cocci

2022-03-14 Thread Markus Armbruster
This is the semantic patch from commit b45c03f585 "arm: Use g_new() & friends where that makes obvious sense". Signed-off-by: Markus Armbruster --- scripts/coccinelle/use-g_new-etc.cocci | 75 ++ 1 file changed, 75 insertions(+) create mode 100644 scripts/

[PATCH 2/3] 9pfs: Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/9pfs/9p-proxy.c | 2 +- hw/9pfs/9p-synth.c | 4 ++-- hw/9pfs/9p.c | 8 hw/9pfs/codir.c | 6 +++--- tests/qtest/virtio-9p-test.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git

[PATCH 3/3] Use g_new() & friends where that makes obvious sense

2022-03-14 Thread Markus Armbruster
sizeof(T). Patch created mechanically with: $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \ --macro-file scripts/cocci-macro-file.h FILES... Signed-off-by: Markus Armbruster --- include/qemu/timer.h | 2 +- accel/kvm/kvm-all.c

[PATCH 0/3] Use g_new() & friends where that makes obvious

2022-03-14 Thread Markus Armbruster
icts by dropping conflicting hunks, with "git-pull -s recursive -X ours". Or drop entire files with conflicts. If you want me to split off certain parts, please tell me exactly what you want split off, and I'll gladly do the splitting. I don't mind the splitting part, I do mind the *think

Re: [PATCH experiment 06/16] use g_new0 instead of g_malloc0

2022-03-14 Thread Markus Armbruster
Paolo Bonzini writes: > Casting to/from void* must be explicit in C++. g_new0 takes care of that. > > Signed-off-by: Paolo Bonzini > --- > include/qemu/timer.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qemu/timer.h b/include/qemu/timer.h > index

Re: [PATCH v2] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-14 Thread Markus Armbruster
dict’ declared here > 227 | QDict *subqdict; > |^~~~ > cc1: all warnings being treated as errors > > Fix build failure by expanding the ternary operation. > Tested with `make check-unit` (the check-block-qdict test passed). >

Re: [PATCH] block-qdict: Fix -Werror=maybe-uninitialized build failure

2022-03-11 Thread Markus Armbruster
dict’ declared here > 227 | QDict *subqdict; > |^~~~ > cc1: all warnings being treated as errors > > Fix build failure by initializing the QDict variable with NULL. > > Signed-off-by: Murilo Opsfelder Araujo > Cc: Kevin Wolf &

Re: [PATCH 2/3] util/main-loop: Introduce the main loop into QOM

2022-02-21 Thread Markus Armbruster
; > [1] For example: > -object main-loop,id=main-loop,poll-max-ns= QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-16 Thread Markus Armbruster
Eric Blake writes: > According to the NBD spec, a server advertising > NBD_FLAG_CAN_MULTI_CONN promises that multiple client connections will > not see any cache inconsistencies: when properly separated by a single > flush, actions performed by one client will be visible to another > client,

Re: [PATCH] ui/cocoa: Do not alert even without block devices

2022-02-14 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 13/2/22 03:14, Akihiko Odaki wrote: >> Signed-off-by: Akihiko Odaki >> --- >> ui/cocoa.m | 5 - >> 1 file changed, 5 deletions(-) >> diff --git a/ui/cocoa.m b/ui/cocoa.m >> index ac18e14ce01..271a2676026 100644 >> --- a/ui/cocoa.m >> +++ b/ui/cocoa.m

Re: [PATCH v12 5/8] qmp: decode feature & status bits in virtio-status

2022-02-11 Thread Markus Armbruster
MRG_RXBUF", > "HOST_UFO", > +#"HOST_ECN", "HOST_TSO4", "HOST_TSO4", > +#"GUEST_UFO", "GUEST_ECN", "GUEST_TSO6", > +# "GUEST_TSO4", "MAC", "CTRL_GUEST_OFFLOADS", > +#"GUEST_CSUM", "CSUM"] > +#}, > #"use-guest-notifier-mask": true, > #"vm-running": true, > #"queue-sel": 2, > @@ -288,3 +345,62 @@ >'data': { 'path': 'str' }, >'returns': 'VirtioStatus', >'features': [ 'unstable' ] } > + > +## > +# @VirtioDeviceStatus: > +# > +# A structure defined to list the configuration statuses of a virtio > +# device > +# > +# @statuses: List of decoded configuration statuses of the virtio > +#device > +# > +# @unknown-statuses: Virtio device statuses bitmap that have not been decoded > +# > +# Since: 7.0 > +## > + > +{ 'struct': 'VirtioDeviceStatus', > + 'data': { 'statuses': [ 'str' ], > +'*unknown-statuses': 'uint8' } } > + > +## > +# @VhostDeviceProtocols: > +# > +# A structure defined to list the vhost user protocol features of a > +# Vhost User device > +# > +# @protocols: List of decoded vhost user protocol features of a vhost > +# user device > +# > +# @unknown-protocols: Vhost user device protocol features bitmap that > +# have not been decoded > +# > +# Since: 7.0 > +## > + > +{ 'struct': 'VhostDeviceProtocols', > + 'data': { 'protocols': [ 'str' ], > +'*unknown-protocols': 'uint64' } } > + > +## > +# @VirtioDeviceFeatures: > +# > +# The common fields that apply to most Virtio devices. Some devices > +# may not have their own device-specific features (e.g. virtio-rng). > +# > +# @transports: List of transport features of the virtio device > +# > +# @dev-features: List of device-specific features (if the device has > +#unique features) > +# > +# @unknown-dev-features: Virtio device features bitmap that have not > +#been decoded > +# > +# Since: 7.0 > +## > + > +{ 'struct': 'VirtioDeviceFeatures', > + 'data': { 'transports': [ 'str' ], > +'*dev-features': [ 'str' ], > +'*unknown-dev-features': 'uint64' } } I think I'd factor out the common pair of members (list of strings, list of integers). This is not a demand. QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-11 Thread Markus Armbruster
#"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +# 3. Introspect on virtio-scsi's VirtQueue 2 at head > +# > +# -> { "execute": "x-query-virtio-queue-element", > +# "arguments": { "path": > "/machine/peripheral-anon/device[2]/virtio-backend", > +# "queue": 2 } > +#} > +# <- { "return": { > +#"index": 19, > +#"name": "virtio-scsi", > +#"descs": [ > +# { "flags": ["used", "indirect", "write"], "len": 4099327944, > +# "addr": 12055409292258155293 } > +#], > +#"avail": { > +# "idx": 1147, > +# "flags": 0, > +# "ring": 19 > +#}, > +#"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-queue-element', > + 'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' }, > + 'returns': 'VirtioQueueElement', > + 'features': [ 'unstable' ] } Preferably with my doc tweak, QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v11 7/8] qmp: add QMP command x-query-virtio-queue-element

2022-02-11 Thread Markus Armbruster
"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +# 3. Introspect on virtio-scsi's VirtQueue 2 at head > +# > +# -> { "execute": "x-query-virtio-queue-element", > +# "arguments": { "path": > "/machine/peripheral-anon/device[2]/virtio-backend", > +# "queue": 2 } > +#} > +# <- { "return": { > +#"index": 19, > +#"name": "virtio-scsi", > +#"descs": [ > +# { "flags": ["used", "indirect", "write"], "len": 4099327944, > +# "addr": 12055409292258155293 } > +#], > +#"avail": { > +# "idx": 1147, > +# "flags": 0, > +# "ring": 19 > +#}, > +#"used": { > +# "idx": 280, > +# "flags": 0 > +#} > +#} > +# > +## > + > +{ 'command': 'x-query-virtio-queue-element', > + 'data': { 'path': 'str', 'queue': 'uint16', '*index': 'uint16' }, > + 'returns': 'VirtioQueueElement', > + 'features': [ 'unstable' ] } Preferably with my doc tweak, QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 4/8] qmp: add QMP command x-query-virtio-status

2022-02-11 Thread Markus Armbruster
kend, protocol, acked, and features). > Also will decode status bits of a VirtIODevice. > > [Jonah: Similar to previous patch, added a check to @virtio_device_find > to ensure synchronicity between @virtio_list and the devices in the QOM > composition tree.] > > Signed-off-by: J

Re: [PATCH v11 6/8] qmp: add QMP commands for virtio/vhost queue-status

2022-02-11 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > These new commands show the internal status of a VirtIODevice's > VirtQueue and a vhost device's vhost_virtqueue (if active). > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v12 3/8] qmp: add QMP command x-query-virtio

2022-02-11 Thread Markus Armbruster
is much more convenient > in listing realized virtio devices.] Thanks for explaining this. Whether the convenience is worth the extra code is for the virtio maintainer to decide. > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v11 4/8] qmp: add QMP command x-query-virtio-status

2022-02-10 Thread Markus Armbruster
kend, protocol, acked, and features). > Also will decode status bits of a VirtIODevice. > > [Jonah: Similar to previous patch, added a check to @virtio_device_find > to ensure synchronicity between @virtio_list and the devices in the QOM > composition tree.] > > Signed-off-by: J

Re: [PATCH v11 3/8] qmp: add QMP command x-query-virtio

2022-02-10 Thread Markus Armbruster
is much more convenient > in listing realized virtio devices.] Thanks for explaining this. Whether the convenience is worth the extra code is for the virtio maintainer to decide. > > Signed-off-by: Jonah Palmer QAPI schema Acked-by: Markus Armbruster

Re: downstream extensions

2022-02-09 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Hi all! > > We declare a kind of __com.redhat_drive-mirror syntax for downstream > extensions of QAPI. > > That's inconvenient: > > Assume I want to merge now my keep-dirty option for Qcow2 driver "[PATCH v2 > 0/2] qcow2: add keep-dirty open option" to

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-24 Thread Markus Armbruster
Hanna Reitz writes: > On 21.01.22 15:26, Markus Armbruster wrote: >> Hanna Reitz writes: >> >>> On 21.01.22 11:27, Markus Armbruster wrote: >>>> Hanna Reitz writes: >>>>> The problem I face is that currently there is no ergonomic way to

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-21 Thread Markus Armbruster
Hanna Reitz writes: > On 21.01.22 11:27, Markus Armbruster wrote: >> Hanna Reitz writes: >>> The problem I face is that currently there is no ergonomic way to wait >>> until the QSD is up and running (besides looping until the PID file >>> exists),

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-21 Thread Markus Armbruster
Hanna Reitz writes: > On 21.01.22 07:10, Markus Armbruster wrote: >> Hanna Reitz writes: >> >>> On 20.01.22 17:00, Markus Armbruster wrote: >>>> Kevin Wolf writes: >>>> >>>>> Am 19.01.2022 um 14:44 hat Hanna Reitz geschrieben: &

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-21 Thread Markus Armbruster
Hanna Reitz writes: > On 20.01.22 17:00, Markus Armbruster wrote: >> Kevin Wolf writes: >> >>> Am 19.01.2022 um 14:44 hat Hanna Reitz geschrieben: >>>> On 19.01.22 13:58, Markus Armbruster wrote: >>>>> Hanna Reitz writes: >>>>>

Re: [PATCH 1/3] qsd: Add pre-init argument parsing pass

2022-01-20 Thread Markus Armbruster
Kevin Wolf writes: > Am 19.01.2022 um 14:44 hat Hanna Reitz geschrieben: >> On 19.01.22 13:58, Markus Armbruster wrote: >> > Hanna Reitz writes: >> > >> > > We want to add a --daemonize argument to QSD's command line. >> > >> > Wh

<    3   4   5   6   7   8   9   10   11   12   >