[Qemu-devel] [PATCH 1/7] target/sparc: Factor out the body of sparc_cpu_unassigned_access()

2019-08-01 Thread Peter Maydell
Currently the SPARC target uses the old-style do_unassigned_access hook. We want to switch it over to do_transaction_failed, but to do this we must first remove all the direct calls in ldst_helper.c to cpu_unassigned_access(). Factor out the body of the hook function's code into a new

Re: [Qemu-devel] [RFC PATCH 4/5] hw/i386: Generate apicid based on cpu_type

2019-08-01 Thread Eduardo Habkost
Thanks for the patches. I still haven't looked closely at all patches in the series, but patches 1-3 seem good on the first look. A few comments on this one: On Wed, Jul 31, 2019 at 11:20:50PM +, Moger, Babu wrote: > Check the cpu_type before calling the apicid functions > from topology.h.

Re: [Qemu-devel] [RFC PATCH 4/5] hw/i386: Generate apicid based on cpu_type

2019-08-01 Thread Moger, Babu
Hi Eduardo, Thanks for the quick comments. I will look into your comments closely and will let you know if I have questions. > -Original Message- > From: Eduardo Habkost > Sent: Thursday, August 1, 2019 2:29 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; m...@redhat.com;

Re: [Qemu-devel] [PATCH 1/7] target/sparc: Factor out the body of sparc_cpu_unassigned_access()

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > Currently the SPARC target uses the old-style do_unassigned_access > hook. We want to switch it over to do_transaction_failed, but to do > this we must first remove all the direct calls in ldst_helper.c to > cpu_unassigned_access(). Factor out the body

[Qemu-devel] [PATCH 3/7] target/sparc: Check for transaction failures in MXCC stream ASI accesses

2019-08-01 Thread Peter Maydell
Currently the ld/st_asi helper functions make calls to the ld*_phys() and st*_phys() functions for those ASIs which imply direct accesses to physical addresses. These implicitly rely on the unassigned_access hook to cause them to generate an MMU fault if the access fails. Switch to using the

Re: [Qemu-devel] [PATCH 3/3] iotests: Test migration with all kinds of filter nodes

2019-08-01 Thread Max Reitz
On 01.08.19 17:17, Kevin Wolf wrote: > This test case is motivated by commit 2b23f28639 ('block/copy-on-read: > Fix permissions for inactive node'). Instead of just testing > copy-on-read on migration, let's stack all sorts of filter nodes on top > of each other and try if the resulting VM can

Re: [Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running

2019-08-01 Thread Michael S. Tsirkin
On Thu, Aug 01, 2019 at 05:25:04PM +0200, Markus Armbruster wrote: > Ning Bo writes: > > > Report vsock running event so that the upper application can > > control boot sequence. > > see https://github.com/kata-containers/runtime/pull/1918 > > Please provide a more complete summary of the use

Re: [Qemu-devel] [RFC] HACKING: Document 'struct' keyword usage

2019-08-01 Thread Paolo Bonzini
On 01/08/19 20:50, Eduardo Habkost wrote: > On Wed, Jul 31, 2019 at 10:35:31AM +0200, Thomas Huth wrote: >> On 30/07/2019 23.07, Eduardo Habkost wrote: >>> Sometimes we use the 'struct' keyword to help us reduce >>> dependencies between header files. Document that practice. >>> >>> Signed-off-by:

Re: [Qemu-devel] [PATCH 2/7] target/sparc: Check for transaction failures in MMU passthrough ASIs

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > Currently the ld/st_asi helper functions make calls to the > ld*_phys() and st*_phys() functions for those ASIs which > imply direct accesses to physical addresses. These implicitly > rely on the unassigned_access hook to cause them to generate > an MMU

Re: [Qemu-devel] [PATCH 5/7] target/sparc: Handle bus errors in mmu_probe()

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > +/* > + * TODO: MMU probe operations are supposed to set the fault > + * status registers, but we don't do this. > + */ Well, the todo should be using sparc_cpu_tlb_fill with probe=true, since this function appears to be otherwise

Re: [Qemu-devel] [PATCH v4 23/54] tcg: let plugins instrument virtual memory accesses

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > To capture all memory accesses we need hook into all the various > helper functions that are involved in memory operations as well as the > injected inline helper calls. A later commit will allow us to resolve > the actual guest

[Qemu-devel] [PATCH 4/7] target/sparc: Correctly handle bus errors in page table walks

2019-08-01 Thread Peter Maydell
Currently we use the ldl_phys() function to read page table entries. With the unassigned_access hook in place, if these hit an unassigned area of memory then the hook will cause us to wrongly generate an exception with a fault address matching the address of the page table entry. Change to using

[Qemu-devel] [PATCH 2/7] target/sparc: Check for transaction failures in MMU passthrough ASIs

2019-08-01 Thread Peter Maydell
Currently the ld/st_asi helper functions make calls to the ld*_phys() and st*_phys() functions for those ASIs which imply direct accesses to physical addresses. These implicitly rely on the unassigned_access hook to cause them to generate an MMU fault if the access fails. Switch to using the

Re: [Qemu-devel] [RFC] HACKING: Document 'struct' keyword usage

2019-08-01 Thread Eduardo Habkost
On Wed, Jul 31, 2019 at 10:35:31AM +0200, Thomas Huth wrote: > On 30/07/2019 23.07, Eduardo Habkost wrote: > > Sometimes we use the 'struct' keyword to help us reduce > > dependencies between header files. Document that practice. > > > > Signed-off-by: Eduardo Habkost > > --- > > I wonder if

Re: [Qemu-devel] [PATCH 7/7] target/sparc: Switch to do_transaction_failed() hook

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > Switch the SPARC target from the old unassigned_access hook to the > new do_transaction_failed hook. > > This will cause the "if transaction failed" code paths added in > the previous commits to become active if the access is to an > unassigned address.

[Qemu-devel] [PATCH 7/7] target/sparc: Switch to do_transaction_failed() hook

2019-08-01 Thread Peter Maydell
Switch the SPARC target from the old unassigned_access hook to the new do_transaction_failed hook. This will cause the "if transaction failed" code paths added in the previous commits to become active if the access is to an unassigned address. In particular we'll now handle bus errors during page

Re: [Qemu-devel] [PATCH v4 43/54] plugin: add API symbols to qemu-plugins.symbols

2019-08-01 Thread Richard Henderson
On 7/31/19 9:07 AM, Alex Bennée wrote: > +# > +# See if --dynamic-list is supported by the linker > + > +cat > $TMPTXT < +{ > + foo; > +}; > +EOF > + > +cat > $TMPC < +#include > +void foo(void); > + > +void foo(void) > +{ > + printf("foo\n"); > +} > + >

[Qemu-devel] [Bug 1838703] [NEW] Makefile BUG in edk2 firmware install 4.1.0-rc3

2019-08-01 Thread Toolybird
Public bug reported: DESTDIR installs end up with wrong paths in JSON files installed to $prefix/share/qemu/firmware. For example, the file: 50-edk2-x86_64-secure.json ends up incorrectly with: "filename": "/build/qemu/pkg/qemu/usr/share/qemu/edk2-x86_64-secure- code.fd", instead of the

[Qemu-devel] [PATCH 0/7] target/sparc: Convert to do_transaction_failed hook

2019-08-01 Thread Peter Maydell
This patchset converts the SPARC target away from the old broken do_unassigned_access hook to the new (added in 2017...) do_transaction_failed hook. In the process it fixes a number of bugs in corner cases. The SPARC ld/st-with-ASI helper functions are odd in that they make use of the

[Qemu-devel] [PATCH 5/7] target/sparc: Handle bus errors in mmu_probe()

2019-08-01 Thread Peter Maydell
Convert the mmu_probe() function to using address_space_ldl() rather than ldl_phys(), so we can explicitly detect memory transaction failures. This makes no practical difference at the moment, because ldl_phys() will return 0 on a transaction failure, and we treat transaction failures and 0 PDEs

[Qemu-devel] [PATCH 6/7] target/sparc: Remove unused ldl_phys from dump_mmu()

2019-08-01 Thread Peter Maydell
The dump_mmu() function does a ldl_phys() at the start, but then never uses the value it loads at all. Remove the unused code. Signed-off-by: Peter Maydell --- target/sparc/mmu_helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/sparc/mmu_helper.c

[Qemu-devel] [PATCH v2] make check-unit: use after free in test-opts-visitor

2019-08-01 Thread Andrey Shinkevich
In struct OptsVisitor, repeated_opts member points to a list in the unprocessed_opts hash table after the list has been destroyed. A subsequent call to visit_type_int() references the deleted list. It results in use-after-free issue. Also, the Visitor object call back functions are supposed to set

Re: [Qemu-devel] [PATCH v3 1/9] block: add .bdrv_need_rw_file_child_during_reopen_rw handler

2019-08-01 Thread Max Reitz
On 01.08.19 16:02, Vladimir Sementsov-Ogievskiy wrote: > 31.07.2019 15:09, Max Reitz wrote: [...] >> So -- without having tried, of course -- I think a better design would >> be to look for bs->file->bs in the ReopenQueue, recursively all of its >> children, and move all of those entries into a

Re: [Qemu-devel] [PATCH v4 30/54] translator: add translator_ld{ub, sw, uw, l, q}

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > +#ifdef CONFIG_USER_ONLY > + > +#define DO_LOAD(type, name, shift) \ > +set_helper_retaddr(1); \ > +ret = name ## _p(g2h(pc)); \ > +clear_helper_retaddr(); > + > +#else > + > +#define

Re: [Qemu-devel] [PATCH v4 31/54] target/arm: fetch code with translator_ld

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > Now the arm_ld*_code functions are only used at translate time we can > just pass down to translator_ld functions. > > Signed-off-by: Emilio G. Cota > [AJB: convert from plugin_insn_append to translator_ld] > Signed-off-by:

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Michael S. Tsirkin
On Thu, Aug 01, 2019 at 01:58:35AM +0200, Paolo Bonzini wrote: > On 30/07/19 18:06, Laszlo Ersek wrote: > > On 07/29/19 14:57, Sergio Lopez wrote: > >> Implement the modern (v2) personality, according to the VirtIO 1.0 > >> specification. > >> > >> Support for v2 among guests is not as widespread

Re: [Qemu-devel] [PATCH v3] blockjob: drain all job nodes in block_job_drain

2019-08-01 Thread Max Reitz
On 30.07.19 21:11, John Snow wrote: > > > On 7/24/19 5:40 AM, Vladimir Sementsov-Ogievskiy wrote: >> Instead of draining additional nodes in each job code, let's do it in >> common block_job_drain, draining just all job's children. >> BlockJobDriver.drain becomes unused, so, drop it at all. >>

Re: [Qemu-devel] [PATCH v4 53/54] include/exec: wrap cpu_ldst.h in CONFIG_TCG

2019-08-01 Thread Richard Henderson
On 7/31/19 9:07 AM, Alex Bennée wrote: > This gets around a build problem with --disable-tcg. > > Signed-off-by: Alex Bennée > --- > include/exec/exec-all.h | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 4/7] target/sparc: Correctly handle bus errors in page table walks

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > Currently we use the ldl_phys() function to read page table entries. > With the unassigned_access hook in place, if these hit an unassigned > area of memory then the hook will cause us to wrongly generate > an exception with a fault address matching the

Re: [Qemu-devel] [PATCH 6/7] target/sparc: Remove unused ldl_phys from dump_mmu()

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > The dump_mmu() function does a ldl_phys() at the start, but > then never uses the value it loads at all. Remove the > unused code. > > Signed-off-by: Peter Maydell > --- > target/sparc/mmu_helper.c | 4 +--- > 1 file changed, 1 insertion(+), 3

Re: [Qemu-devel] [PATCH] make check-unit: use after free in test-opts-visitor

2019-08-01 Thread Andrey Shinkevich
On 01/08/2019 10:13, Markus Armbruster wrote: > Andrey Shinkevich writes: > >> In struct OptsVisitor, repeated_opts member points to a list in the >> unprocessed_opts hash table after the list has been destroyed. A >> subsequent call to visit_type_int() references the deleted list. It >>

Re: [Qemu-devel] [PATCH v4 24/54] plugins: implement helpers for resolving hwaddr

2019-08-01 Thread Richard Henderson
On 8/1/19 7:14 AM, Aaron Lindsay OS via Qemu-devel wrote: > On Jul 31 17:06, Alex Bennée wrote: >> We need to keep a local per-cpu copy of the data as other threads may >> be running. We use a automatically growing array and re-use the space >> for subsequent queries. > > [...] > >> +bool

Re: [Qemu-devel] [PATCH v4 29/54] plugin-gen: add plugin_insn_append

2019-08-01 Thread Richard Henderson
On 7/31/19 9:06 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > By adding it to plugin-gen's header file, we can export is as > an inline, since tcg.h is included in the header (we need tcg_ctx). > > Signed-off-by: Emilio G. Cota > [AJB: use g_byte_array] > Signed-off-by: Alex Bennée > >

Re: [Qemu-devel] [PATCH v4 42/54] translator: inject instrumentation from plugins

2019-08-01 Thread Richard Henderson
On 7/31/19 9:07 AM, Alex Bennée wrote: > From: "Emilio G. Cota" > > Signed-off-by: Emilio G. Cota > Signed-off-by: Alex Bennée > > --- > v4 > - note we can't inject instrumentation if ! DISAS_NEXT > --- > accel/tcg/translator.c | 20 > 1 file changed, 20 insertions(+)

Re: [Qemu-devel] [PATCH 3/7] target/sparc: Check for transaction failures in MXCC stream ASI accesses

2019-08-01 Thread Richard Henderson
On 8/1/19 11:30 AM, Peter Maydell wrote: > Currently the ld/st_asi helper functions make calls to the > ld*_phys() and st*_phys() functions for those ASIs which > imply direct accesses to physical addresses. These implicitly > rely on the unassigned_access hook to cause them to generate > an MMU

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Damien Hedde
On 7/31/19 12:17 PM, Christophe de Dinechin wrote: > > Peter Maydell writes: > >> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: >>> >>> On Tue, 30 Jul 2019 14:44:21 +0100 >>> Peter Maydell wrote: >>> On Tue, 30 Jul 2019 at 14:42, Cornelia Huck wrote: > I'm having a hard time

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] spapr: quantify error messages regarding capability settings

2019-08-01 Thread Greg Kurz
On Thu, 1 Aug 2019 13:38:19 +1000 Daniel Black wrote: > Its not immediately obvious how cap-X=Y setting need to be applied > to the command line so, for spapr capability error messages, this > has been clarified to: > > ..[try] appending -machine cap-X=Y > > The wrong value messages have

Re: [Qemu-devel] [PATCH v5] net: tap: replace snprintf with g_strdup_printf calls

2019-08-01 Thread P J P
+-- On Wed, 31 Jul 2019, Markus Armbruster wrote --+ | However, the code is still rather ugly, and I'd be tempted to use the | opportunity to clean up some more. Untested sketch: Patch v3 did a similar change -> https://lists.gnu.org/archive/html/qemu-devel/2019-07/msg00578.html Thank you.

Re: [Qemu-devel] [PATCH v2 7/8] hw/misc: Add a config switch for the "unimplemented" device

2019-08-01 Thread Thomas Huth
On 31/07/2019 17.59, Philippe Mathieu-Daudé wrote: > On Wed, Jul 31, 2019 at 5:55 PM Philippe Mathieu-Daudé > wrote: >> On 7/31/19 1:50 PM, Thomas Huth wrote: >>> On 31/07/2019 13.47, Philippe Mathieu-Daudé wrote: On 7/31/19 9:56 AM, Thomas Huth wrote: > The device is only used by some

[Qemu-devel] [Bug 1838312] Re: Qemu virt-manager Segmentation fault

2019-08-01 Thread Thomas Huth
** No longer affects: qemu -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1838312 Title: Qemu virt-manager Segmentation fault Status in virt-manager package in Ubuntu: Incomplete Bug

Re: [Qemu-devel] [PATCH 5/5] virtiofsd: prevent races with lo_dirp_put()

2019-08-01 Thread Stefan Hajnoczi
On Wed, Jul 31, 2019 at 06:44:52PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > Introduce lo_dirp_put() so that FUSE_RELEASEDIR does not cause > > use-after-free races with other threads that are accessing lo_dirp. > > > > Also make lo_releasedir()

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Christophe de Dinechin
> On 1 Aug 2019, at 11:19, Damien Hedde wrote: > > > On 7/31/19 12:17 PM, Christophe de Dinechin wrote: >> >> Peter Maydell writes: >> >>> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: On Tue, 30 Jul 2019 14:44:21 +0100 Peter Maydell wrote: > On Tue, 30 Jul

Re: [Qemu-devel] [PATCH v3 01/33] Create Resettable QOM interface

2019-08-01 Thread Damien Hedde
On 7/31/19 7:46 AM, David Gibson wrote: > On Tue, Jul 30, 2019 at 04:08:59PM +0200, Damien Hedde wrote: >> >> On 7/30/19 3:59 PM, Peter Maydell wrote: >>> On Tue, 30 Jul 2019 at 14:56, Cornelia Huck wrote: On Tue, 30 Jul 2019 14:44:21 +0100 Peter Maydell wrote: > On

[Qemu-devel] [PATCH for-4.1] target/arm: Avoid bogus NSACR traps on M-profile without Security Extension

2019-08-01 Thread Peter Maydell
In Arm v8.0 M-profile CPUs without the Security Extension and also in v7M CPUs, there is no NSACR register. However, the code we have to handle the FPU does not always check whether the ARM_FEATURE_M_SECURITY bit is set before testing whether env->v7m.nsacr permits access to the FPU. This means

Re: [Qemu-devel] [PATCH 1/5] virtiofsd: take lo->mutex around lo_add_fd_mapping()

2019-08-01 Thread Stefan Hajnoczi
On Wed, Jul 31, 2019 at 07:45:38PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > The lo_add_fd_mapping() function assumes lo->mutex is held, so we should > > acquire it. > > > > Signed-off-by: Stefan Hajnoczi > > Thanks, applied > > Would it make

[Qemu-devel] [Bug 1838475] Re: qemu-system-arm exits when cortex-m4 floating point used and irq occurs

2019-08-01 Thread Peter Maydell
I think this patch should fix this bug: https://patchew.org/QEMU/20190801105742.20036-1-peter.mayd...@linaro.org/ ** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH 4/5] virtiofsd: drop lo_dirp->fd field

2019-08-01 Thread Stefan Hajnoczi
On Wed, Jul 31, 2019 at 06:27:16PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > fdopendir(3) takes ownership of the file descriptor. The presence of > > the lo_dirp->fd field could lead to someone incorrectly adding a > > close(d->fd) cleanup call in

[Qemu-devel] [RFC PATCH] numa: add auto_enable_numa to fix broken check in spapr

2019-08-01 Thread Tao Xu
Introduce MachineClass::auto_enable_numa for one implicit NUMA node, and enable it to fix broken check in spapr_validate_node_memory(), when spapr_populate_memory() creates a implicit node and info then use nb_numa_nodes which is 0. Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH] migration: always initial RAMBlock.bmap to 1 for new migration

2019-08-01 Thread Ivan Ren
>>- * Here we didn't set RAMBlock.bmap simply because it is already >>- * set in ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] in >>- * ram_block_add, and that's where we'll sync the dirty bitmaps. >>- * Here setting RAMBlock.bmap would be fine too

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Cornelia Huck
On Wed, 31 Jul 2019 15:06:11 -0400 "Michael S. Tsirkin" wrote: > On Wed, Jul 31, 2019 at 03:55:51PM +0200, Cornelia Huck wrote: > > On Tue, 30 Jul 2019 16:18:52 -0400 > > "Michael S. Tsirkin" wrote: > > > Make sure your guests > > > are all up to date in preparation to the day when legacy will

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-08-01 Thread Linus Walleij
Hi Geert! Thanks for this very interesting patch! On Fri, Jul 5, 2019 at 6:05 PM Geert Uytterhoeven wrote: > GPIO controllers are exported to userspace using /dev/gpiochip* > character devices. Access control to these devices is provided by > standard UNIX file system permissions, on an

Re: [Qemu-devel] [PATCH] migration: always initial ram_counters for a new migration

2019-08-01 Thread Ivan Ren
>> s->iteration_start_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); >>+/* >>+ * Update s->iteration_initial_bytes to match s->iteration_start_time. >>+ */ >>+s->iteration_initial_bytes = migration_total_bytes(s); > >Is this one necessary? We have sent out nothing yet. Yes,

Re: [Qemu-devel] [PATCH v2] docs/nvdimm: add example on persistent backend setup

2019-08-01 Thread Stefan Hajnoczi
On Thu, Aug 1, 2019 at 1:41 AM Wei Yang wrote: > Persistent backend setup requires some knowledge about nvdimm and ndctl > tool. Some users report they may struggle to gather these knowledge and > have difficulty to setup it properly. > > Here we provide two examples for persistent backend and

Re: [Qemu-devel] [PATCH] make check-unit: use after free in test-opts-visitor

2019-08-01 Thread Markus Armbruster
Andrey Shinkevich writes: > In struct OptsVisitor, repeated_opts member points to a list in the > unprocessed_opts hash table after the list has been destroyed. A > subsequent call to visit_type_int() references the deleted list. It > results in use-after-free issue. Also, the Visitor object

Re: [Qemu-devel] [PATCH-for-4.2 v8 3/9] hw/acpi: Add ACPI Generic Event Device Support

2019-08-01 Thread Shameerali Kolothum Thodi
Hi Igor, > -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+shameerali.kolothum.thodi=huawei.com@nongn > u.org] On Behalf Of Igor Mammedov > Sent: 30 July 2019 16:25 > To: Shameerali Kolothum Thodi > Cc: peter.mayd...@linaro.org; sa...@linux.intel.com; >

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Sergio Lopez
Laszlo Ersek writes: > On 07/29/19 14:57, Sergio Lopez wrote: >> Implement the modern (v2) personality, according to the VirtIO 1.0 >> specification. >> >> Support for v2 among guests is not as widespread as it'd be >> desirable. While the Linux driver has had it for a while, support is >>

[Qemu-devel] [PATCH v9 11/17] qemu-io: adds option to use aio engine

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- qemu-io.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index f64eca6940..0abb4af134 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -130,7 +130,8 @@ static void open_help(void) " -C, -- use

[Qemu-devel] [PATCH v9 15/17] tests/qemu-iotests: use AIOMODE with various tests

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/028 | 3 ++- tests/qemu-iotests/058 | 2 +- tests/qemu-iotests/089 | 4 ++-- tests/qemu-iotests/091 | 7 --- tests/qemu-iotests/109 | 3 ++- tests/qemu-iotests/147 | 5 +++-- tests/qemu-iotests/181 | 10

[Qemu-devel] [PATCH v9 12/17] qemu-img: adds option to use aio engine for benchmarking

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 11 ++- qemu-img.texi| 5 - 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 1c93e6d185..77b5a8dda8 100644 --- a/qemu-img-cmds.hx +++

[Qemu-devel] [PATCH v9 13/17] qemu-nbd: adds option for aio engines

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Acked-by: Eric Blake --- qemu-nbd.c| 12 qemu-nbd.texi | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index a8cb39e510..7bb479f3c0 100644 --- a/qemu-nbd.c +++

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] spapr: quantify error messages regarding capability settings

2019-08-01 Thread Daniel Black
On Thu, 1 Aug 2019 12:41:59 +0200 Greg Kurz wrote: > On Thu, 1 Aug 2019 13:38:19 +1000 > Daniel Black wrote: > > > Its not immediately obvious how cap-X=Y setting need to be applied > > to the command line so, for spapr capability error messages, this > > has been clarified to: > > ... > >

[Qemu-devel] [PATCH] hmp/info_migration: formatting migration capability output

2019-08-01 Thread Wei Yang
Current we put all migration capability in one line, which make it hard to read them and someone them are missed due to terminal width. This patch formats it to print 4 in one line, which looks like this now: capabilities: xbzrle: off rdma-pin-all: offauto-converge:

Re: [Qemu-devel] [PATCH v2 for-4.1 0/2] backup: Copy only dirty areas

2019-08-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190801173900.23851-1-mre...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make

[Qemu-devel] [PATCH v9 02/17] qapi/block-core: add option for io_uring

2019-08-01 Thread Aarushi Mehta
Only enumerates option for devices that support it. Since QAPI schema supports io_uring, which is the actual name of the Linux API, it is preferred over io-uring. Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- qapi/block-core.json | 4 +++- 1 file changed, 3 insertions(+), 1

[Qemu-devel] [PATCH v9 00/17] Add support for io_uring

2019-08-01 Thread Aarushi Mehta
This patch series adds support for the newly developed io_uring Linux AIO interface. Linux io_uring is faster than Linux's AIO asynchronous I/O code, offers efficient buffered asynchronous I/O support, the ability to do I/O without performing a system call via polled I/O, and other efficiency

[Qemu-devel] [PATCH v9 03/17] block/block: add BDRV flag for io_uring

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- include/block/block.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/block.h b/include/block/block.h index 50a07c1c33..e29baa172c 100644 --- a/include/block/block.h +++

Re: [Qemu-devel] [PATCH 1/2] rdmacm-mux: fix strcpy string warning

2019-08-01 Thread Yuval Shaia
On Tue, Jul 16, 2019 at 02:07:18PM +0400, Marc-André Lureau wrote: > ../contrib/rdmacm-mux/main.c: In function ‘parse_args’: > ../contrib/rdmacm-mux/main.c:118:13: error: ‘strncpy’ specified bound 3835 > equals destination size [-Werror=stringop-truncation] > 118 |

[Qemu-devel] [PATCH v9 01/17] configure: permit use of io_uring

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- configure | 27 +++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index 714e7fb6a1..493dbc2ec5 100755 --- a/configure +++ b/configure @@ -371,6 +371,7 @@

[Qemu-devel] [PATCH v9 16/17] block/io_uring: adds fd registration

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- block/io_uring.c | 107 - block/trace-events | 1 + 2 files changed, 107 insertions(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index 86f32e18a1..1553cd2e58 100644 --- a/block/io_uring.c +++

[Qemu-devel] [PATCH v9 17/17] block/io_uring: enable kernel submission polling

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta --- block/io_uring.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index 1553cd2e58..2a1d79704a 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -288,6 +288,17 @@ static int

[Qemu-devel] [PATCH v9 14/17] tests/qemu-iotests: enable testing with aio options

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- tests/qemu-iotests/check | 15 ++- tests/qemu-iotests/common.rc | 14 ++ tests/qemu-iotests/iotests.py | 9 - 3 files changed, 36 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [RFC] virtio-mmio: implement modern (v2) personality (virtio-1)

2019-08-01 Thread Laszlo Ersek
On 08/01/19 01:58, Paolo Bonzini wrote: > On 30/07/19 18:06, Laszlo Ersek wrote: >> On 07/29/19 14:57, Sergio Lopez wrote: >>> Implement the modern (v2) personality, according to the VirtIO 1.0 >>> specification. >>> >>> Support for v2 among guests is not as widespread as it'd be >>> desirable.

Re: [Qemu-devel] [PATCH] migration: always initial ram_counters for a new migration

2019-08-01 Thread Wei Yang
On Thu, Aug 01, 2019 at 04:10:34PM +0800, Ivan Ren wrote: >>> s->iteration_start_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); >>>+/* >>>+ * Update s->iteration_initial_bytes to match >s->iteration_start_time. >>>+ */ >>>+s->iteration_initial_bytes = migration_total_bytes(s);

[Qemu-devel] [PATCH v9 07/17] blockdev: adds bdrv_parse_aio to use io_uring

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block.c | 22 ++ blockdev.c| 12 include/block/block.h | 1 + 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index cbd8da5f3b..401831e28d

[Qemu-devel] [PATCH v9 04/17] block/io_uring: implements interfaces for io_uring

2019-08-01 Thread Aarushi Mehta
Aborts when sqe fails to be set as sqes cannot be returned to the ring. Adds slow path for short reads for older kernels Signed-off-by: Aarushi Mehta Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 7 + block/Makefile.objs | 3 +

[Qemu-devel] [PATCH v9 08/17] block/file-posix.c: extend to use io_uring

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Reviewed-by: Maxim Levitsky --- block/file-posix.c | 99 -- 1 file changed, 79 insertions(+), 20 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 4479cc7ab4..4aa42f826f

[Qemu-devel] [PATCH v9 05/17] stubs: add stubs for io_uring interface

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- MAINTAINERS | 1 + stubs/Makefile.objs | 1 + stubs/io_uring.c| 32 3 files changed, 34 insertions(+) create mode 100644 stubs/io_uring.c diff --git a/MAINTAINERS b/MAINTAINERS index

[Qemu-devel] [PATCH v9 06/17] util/async: add aio interfaces for io_uring

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- util/async.c | 36 1 file changed, 36 insertions(+) diff --git a/util/async.c b/util/async.c index 8d2105729c..2e0a5e20ac 100644 --- a/util/async.c +++ b/util/async.c @@ -276,6 +276,14 @@

[Qemu-devel] [PATCH v9 10/17] block/io_uring: adds userspace completion polling

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block/io_uring.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/block/io_uring.c b/block/io_uring.c index c8e6526747..86f32e18a1 100644 --- a/block/io_uring.c +++ b/block/io_uring.c @@ -238,6

[Qemu-devel] [PATCH v9 09/17] block: add trace events for io_uring

2019-08-01 Thread Aarushi Mehta
Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi --- block/io_uring.c | 22 +++--- block/trace-events | 12 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/block/io_uring.c b/block/io_uring.c index 902b106954..c8e6526747 100644 ---

Re: [Qemu-devel] [PATCH] migration: always initial RAMBlock.bmap to 1 for new migration

2019-08-01 Thread Wei Yang
On Thu, Aug 01, 2019 at 03:58:54PM +0800, Ivan Ren wrote: >>>- * Here we didn't set RAMBlock.bmap simply because it is >already >>>- * set in ram_list.dirty_memory[DIRTY_MEMORY_MIGRATION] in >>>- * ram_block_add, and that's where we'll sync the dirty >bitmaps.

Re: [Qemu-devel] [PATCH V5 0/6] Packed virtqueue for virtrio

2019-08-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190802040606.22573-1-jasow...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH V5 1/6] virtio: basic structure for packed ring

2019-08-01 Thread Jason Wang
From: Wei Xu Define packed ring structure according to Qemu nomenclature, field data(wrap counter, etc) are also included. Signed-off-by: Wei Xu Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/virtio/virtio.c

[Qemu-devel] [PATCH V5 5/6] vhost_net: enable packed ring support

2019-08-01 Thread Jason Wang
Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index a6b719035c..5b97997035 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -49,6 +49,7 @@ static const int kernel_feature_bits[] = {

[Qemu-devel] [PATCH V5 0/6] Packed virtqueue for virtrio

2019-08-01 Thread Jason Wang
Hi: This is an updated version of packed virtqueue support based on Wei's V4. Tested with, virtio-blk, virito-net (with vhost_net), virtio-scsi, scp during migration etc. Please review. Changes from V4: - using SET/GET_VRING_BASE to set/get last_used_idx/wrap_counter - fix

Re: [Qemu-devel] [PATCH] hmp/info_migration: formatting migration capability output

2019-08-01 Thread Markus Armbruster
Subject doesn't quite conform to conventions. Suggest hmp: Improve how "info migrate" formats capabilities Wei Yang writes: > Current we put all migration capability in one line, which make it hard > to read them and someone them are missed due to terminal width. > > This patch formats it

Re: [Qemu-devel] [PATCH] hmp/info_migration: formatting migration capability output

2019-08-01 Thread Wei Yang
On Fri, Aug 02, 2019 at 07:24:34AM +0200, Markus Armbruster wrote: >Subject doesn't quite conform to conventions. Suggest > >hmp: Improve how "info migrate" formats capabilities Thanks > >Wei Yang writes: > >> Current we put all migration capability in one line, which make it hard >> to

[Qemu-devel] [PATCH V5 3/6] virtio: basic packed virtqueue support

2019-08-01 Thread Jason Wang
This patch implements basic support for the packed virtqueue. Compare the split virtqueue which has three rings, packed virtqueue only have one which is supposed to have better cache utilization and more hardware friendly. Please refer virtio specification for more information. Signed-off-by:

[Qemu-devel] [PATCH V5 4/6] virtio: event suppression support for packed ring

2019-08-01 Thread Jason Wang
This patch implements event suppression through device/driver area. Please refer virtio specification for more information. Signed-off-by: Wei Xu Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 142 ++--- 1 file changed, 133 insertions(+), 9

[Qemu-devel] [PATCH V5 2/6] virtio: device/driverr area size calculation refactor for split ring

2019-08-01 Thread Jason Wang
From: Wei Xu There is slight size difference between split/packed rings. This is the refactor of split ring as well as a helper to expanding device and driver area size calculation for packed ring. Signed-off-by: Wei Xu Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 16 ++--

[Qemu-devel] [PATCH V5 6/6] virtio: add property to enable packed virtqueue

2019-08-01 Thread Jason Wang
Signed-off-by: Jason Wang --- include/hw/virtio/virtio.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 226c94078f..3a4ed3ab34 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -285,7

Re: [Qemu-devel] [PATCH] migration: always initial ram_counters for a new migration

2019-08-01 Thread Ivan Ren
s->iteration_start_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); +/* + * Update s->iteration_initial_bytes to match >>s->iteration_start_time. + */ +s->iteration_initial_bytes = migration_total_bytes(s); >>> >>>Is this one necessary? We have sent out

Re: [Qemu-devel] [Bug 1838658] [NEW] qemu 4.0.0 broken by glib update

2019-08-01 Thread Markus Armbruster
Patrick Welche writes: > Public bug reported: > > In brief, an install CD will successfully boot with qemu 4.0.0 built with > glib 2.58.3, but freeze during boot with qemu 4.0.0 built with glib 2.60.0. I > tracked it down to glib's GHashTable improvements. qemu is happy with a glib > built

Re: [Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-08-01 Thread Max Reitz
On 30.07.19 20:40, John Snow wrote: > > > On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >> We have detect_zeroes option, so at least for blockdev-backup user >> should define it if zero-detection is needed. For drive-backup leave >> detection enabled by default but do it through

Re: [Qemu-devel] [PATCH 1/3] block/backup: deal with zero detection

2019-08-01 Thread Max Reitz
On 30.07.19 18:32, Vladimir Sementsov-Ogievskiy wrote: > We have detect_zeroes option, so at least for blockdev-backup user > should define it if zero-detection is needed. For drive-backup leave > detection enabled by default but do it through existing option instead > of open-coding. > >

Re: [Qemu-devel] [PATCH] vhost-vsock: report QMP event when set running

2019-08-01 Thread Eric Blake
On 8/1/19 2:28 AM, Ning Bo wrote: > Report vsock running event so that the upper application can > control boot sequence. > see https://github.com/kata-containers/runtime/pull/1918 > > Signed-off-by: Ning Bo > --- Since this is an update to an earlier version you posted, it is helpful to

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Max Reitz
On 30.07.19 18:32, Vladimir Sementsov-Ogievskiy wrote: > write flags are constant, let's store it in BackupBlockJob instead of > recalculating. It also makes two boolean fields to be unused, so, > drop them. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/backup.c | 24

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Max Reitz
On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: > 30.07.2019 21:28, John Snow wrote: >> >> >> On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: >>> write flags are constant, let's store it in BackupBlockJob instead of >>> recalculating. It also makes two boolean fields to be unused,

Re: [Qemu-devel] [PATCH 3/3] block/backup: refactor write_flags

2019-08-01 Thread Vladimir Sementsov-Ogievskiy
01.08.2019 14:28, Max Reitz wrote: > On 31.07.19 18:01, Vladimir Sementsov-Ogievskiy wrote: >> 30.07.2019 21:28, John Snow wrote: >>> >>> >>> On 7/30/19 12:32 PM, Vladimir Sementsov-Ogievskiy wrote: write flags are constant, let's store it in BackupBlockJob instead of recalculating. It

Re: [Qemu-devel] [PATCH 3/5] virtiofsd: rename inode->refcount to inode->nlookup

2019-08-01 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > This reference counter plays a specific role in the FUSE protocol. It's > not a generic object reference counter and the FUSE kernel code calls it > "nlookup". > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Dr. David Alan Gilbert > --- >

  1   2   3   >