Re: [Qemu-devel] [PATCH 0/3] spapr: introduce a new sPAPRIrq backend

2018-09-11 Thread Greg Kurz
On Tue, 11 Sep 2018 11:52:46 +1000 David Gibson wrote: > On Mon, Sep 10, 2018 at 07:24:47PM +0200, Cédric Le Goater wrote: > > On 09/10/2018 05:02 PM, Greg Kurz wrote: > > > On Mon, 10 Sep 2018 13:02:19 +0200 > > > Cédric Le Goater wrote: > > > > > >> Hello, > > >> > > >> This series adds a

Re: [Qemu-devel] [PATCH v2 1/2] spapr: introduce a spapr_irq class 'nr_msis' attribute

2018-09-11 Thread Greg Kurz
On Tue, 11 Sep 2018 07:55:02 +0200 Cédric Le Goater wrote: > The number of MSI interrupts a sPAPR machine can allocate is in direct > relation with the number of interrupts of the sPAPRIrq backend. Define > statically this value at the sPAPRIrq class level and use it for the > "ibm,pe-total-#msi"

Re: [Qemu-devel] [PATCH] replay: wake up vCPU when replaying

2018-09-11 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 09/07/2018 13:24, Pavel Dovgalyuk wrote: > > static void qemu_tcg_rr_wait_io_event(CPUState *cpu) > > { > > while (all_cpu_threads_idle()) { > > stop_tcg_kick_timer(); > > qemu_cond_wait(cpu->halt_cond, &qemu_global_mutex);

Re: [Qemu-devel] [PATCH v2 2/2] spapr: increase the size of the IRQ number space

2018-09-11 Thread Greg Kurz
On Tue, 11 Sep 2018 07:55:03 +0200 Cédric Le Goater wrote: > The new layout using static IRQ number does not leave much space to > the dynamic MSI range, only 0x100 IRQ numbers. Increase the total > number of IRQS for newer machines and introduce a legacy XICS backend > for pre-3.1 machines to ma

Re: [Qemu-devel] [PATCH 01/14] blockjob: Wake up BDS when job becomes idle

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > In the context of draining a BDS, the .drained_poll callback of block > jobs is called. If this returns true (i.e. there is still some activity > pending), the drain operation may call aio_poll() with blocking=true to > wait for completion. > > As soon as t

Re: [Qemu-devel] [PATCH v2 1/2] spapr: introduce a spapr_irq class 'nr_msis' attribute

2018-09-11 Thread Cédric Le Goater
On 09/11/2018 09:34 AM, Greg Kurz wrote: > On Tue, 11 Sep 2018 07:55:02 +0200 > Cédric Le Goater wrote: > >> The number of MSI interrupts a sPAPR machine can allocate is in direct >> relation with the number of interrupts of the sPAPRIrq backend. Define >> statically this value at the sPAPRIrq cl

Re: [Qemu-devel] [PATCH 03/14] test-blockjob: Acquire AioContext around job_finish_sync()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > All callers in QEMU proper hold the AioContext lock when calling > job_finish_sync(). test-blockjob should do the same. I think s/job_finish_sync/job_cancel_sync/ in the subject is more accurate? Reviewed-by: Fam Zheng > > Signed-off-by: Kevin Wolf > -

Re: [Qemu-devel] [PATCH 02/14] test-bdrv-drain: Drain with block jobs in an I/O thread

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > This extends the existing drain test with a block job to include > variants where the block job runs in a different AioContext. > > Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 05/14] test-bdrv-drain: Test AIO_WAIT_WHILE() in completion callback

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > This is a regression test for a deadlock that occurred in block job > completion callbacks (via job_defer_to_main_loop) because the AioContext > lock was taken twice: once in job_finish_sync() and then again in > job_defer_to_main_loop_bh(). This would cause

Re: [Qemu-devel] [PATCH 04/14] job: Use AIO_WAIT_WHILE() in job_finish_sync()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > job_finish_sync() needs to release the AioContext lock of the job before > calling aio_poll(). Otherwise, callbacks called by aio_poll() would > possibly take the lock a second time and run into a deadlock with a > nested AIO_WAIT_WHILE() call. > > Also, jo

Re: [Qemu-devel] [Qemu-block] [PATCH v2] qcow2: Release dirty entries with cache-clean-interval

2018-09-11 Thread Alberto Garcia
On Mon 10 Sep 2018 09:22:01 PM CEST, John Snow wrote: > On 08/09/2018 09:44 AM, Alberto Garcia wrote: >> The cache-clean-interval option is used to periodically release unused >> entries from the L2 and refcount caches. Dirty cache entries are left >> untouched, even if they are otherwise valid can

Re: [Qemu-devel] [PATCH 07/14] aio-wait: Increase num_waiters even in home thread

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > Even if AIO_WAIT_WHILE() is called in the home context of the > AioContext, we still want to allow the condition to change depending on > other threads as long as they kick the AioWait. Specfically block jobs > can be running in an I/O thread and should then

Re: [Qemu-devel] [PATCH 08/14] block-backend: Add .drained_poll callback

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > A bdrv_drain operation must ensure that all parents are quiesced, this > includes BlockBackends. Otherwise, callbacks called by requests that are > completed on the BDS layer, but not quite yet on the BlockBackend layer > could still create new requests. >

Re: [Qemu-devel] [PATCH 09/14] block-backend: Fix potential double blk_delete()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > blk_unref() first decreases the refcount of the BlockBackend and calls > blk_delete() if the refcount reaches zero. Requests can still be in > flight at this point, they are only drained during blk_delete(): > > At this point, arbitrary callbacks can run. I

Re: [Qemu-devel] [PATCH 06/14] block: Add missing locking in bdrv_co_drain_bh_cb()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > bdrv_do_drained_begin/end() assume that they are called with the > AioContext lock of bs held. If we call drain functions from a coroutine > with the AioContext lock held, we yield and schedule a BH to move out of > coroutine context. This means that the loc

Re: [Qemu-devel] [PATCH 10/14] block-backend: Decrease in_flight only after callback

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > Request callbacks can do pretty much anything, including operations that > will yield from the coroutine (such as draining the backend). In that > case, a decreased in_flight would be visible to other code and could > lead to a drain completing while the cal

Re: [Qemu-devel] [PATCH 11/14] mirror: Fix potential use-after-free in active commit

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > When starting an active commit job, other callbacks can run before > mirror_start_job() calls bdrv_ref() where needed and cause the nodes to > go away. Add another pair of bdrv_ref/unref() around it to protect > against this case. > > Signed-off-by: Kevin W

Re: [Qemu-devel] [PATCH 12/14] blockjob: Lie better in child_job_drained_poll()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > Block jobs claim in .drained_poll() that they are in a quiescent state > as soon as job->deferred_to_main_loop is true. This is obviously wrong, > they still have a completion BH to run. We only get away with this > because commit 91af091f923 added an uncond

Re: [Qemu-devel] [PATCH 13/14] block: Remove aio_poll() in bdrv_drain_poll variants

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > bdrv_drain_poll_top_level() was buggy because it didn't release the > AioContext lock of the node to be drained before calling aio_poll(). > This way, callbacks called by aio_poll() would possibly take the lock a > second time and run into a deadlock with a

Re: [Qemu-devel] [PATCH 14/14] test-bdrv-drain: Test nested poll in bdrv_drain_poll_top_level()

2018-09-11 Thread Fam Zheng
On Fri, 09/07 18:15, Kevin Wolf wrote: > This is a regression test for a deadlock that could occur in callbacks > called from the aio_poll() in bdrv_drain_poll_top_level(). The > AioContext lock wasn't released and therefore would be taken a second > time in the callback. This would cause a possibl

Re: [Qemu-devel] [PATCH for-3.1 v10 04/31] block: Add BDS.auto_backing_file

2018-09-11 Thread Alberto Garcia
On Thu 09 Aug 2018 11:35:01 PM CEST, Max Reitz wrote: > @@ -295,11 +296,13 @@ static int qcow_open(BlockDriverState *bs, QDict > *options, int flags, > goto fail; > } > ret = bdrv_pread(bs->file, header.backing_file_offset, > - bs->backing_file, len

Re: [Qemu-devel] [Bug 1791796] [NEW] unimplemented thread syscalls in nios2 user-mode emulation

2018-09-11 Thread Alex Bennée
Sandra Loosemore <1791...@bugs.launchpad.net> writes: > Public bug reported: > > This bug is reported against the 3.0 release. > > I noticed that the GCC test gcc.dg/torture/tls/tls-test.c is failing > when run in user-mode qemu for nios2 target. The problem appears to be > that the thread-rela

Re: [Qemu-devel] [PATCH v4 00/29] vhost-user for input & GPU

2018-09-11 Thread Gerd Hoffmann
> > > $ ./vhost-user-gpu --virgl -s vgpu.sock & > > > $ qemu... > > >-chardev socket,id=chr,path=vgpu.sock > > >-object vhost-user-backend,id=vug,chardev=chr > > >-device vhost-user-vga,vhost-user=vug > > > > That's a bit incovenient for qemu command line users. But who runs > > qemu

[Qemu-devel] [Bug 1404278] Re: tap connections not working on windows host

2018-09-11 Thread timsoft
hi jan, would you care to elaberate for the benefit of everyone "out there". -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1404278 Title: tap connections not working on windows host Status in QEMU

Re: [Qemu-devel] [PATCH v2 0/4] tests: VM build in OpenBSD 6.3

2018-09-11 Thread Gerd Hoffmann
On Thu, Sep 06, 2018 at 01:43:36PM +0800, Fam Zheng wrote: > In this new version: > > - Include the virtio fix by Paolo so that it's easier to test this series. > - Improve the slirp patch on input validation and buffer overflow. > [Thomas] > - Use OpenBSD 6.3 image; Use guestfwd and

Re: [Qemu-devel] [PATCH v2 0/4] tests: VM build in OpenBSD 6.3

2018-09-11 Thread Fam Zheng
On Tue, 09/11 11:00, Gerd Hoffmann wrote: > On Thu, Sep 06, 2018 at 01:43:36PM +0800, Fam Zheng wrote: > > In this new version: > > > > - Include the virtio fix by Paolo so that it's easier to test this > > series. > > - Improve the slirp patch on input validation and buffer overflow. >

Re: [Qemu-devel] [PATCH for-3.1 v10 00/31] block: Fix some filename generation issues

2018-09-11 Thread Kevin Wolf
Am 10.09.2018 um 18:51 hat Max Reitz geschrieben: > On 10.09.18 17:18, Kevin Wolf wrote: > > Am 09.08.2018 um 23:34 hat Max Reitz geschrieben: > >> Once more, I’ll spare both me and you another iteration of the cover > >> letter, so see here: > >> > >> http://lists.nongnu.org/archive/html/qemu-bloc

Re: [Qemu-devel] [PATCH v4 00/29] vhost-user for input & GPU

2018-09-11 Thread Marc-André Lureau
Hi On Tue, Sep 11, 2018 at 12:59 PM Gerd Hoffmann wrote: > > > > > $ ./vhost-user-gpu --virgl -s vgpu.sock & > > > > $ qemu... > > > >-chardev socket,id=chr,path=vgpu.sock > > > >-object vhost-user-backend,id=vug,chardev=chr > > > >-device vhost-user-vga,vhost-user=vug > > > > > > T

Re: [Qemu-devel] [PATCH 06/14] block: Add missing locking in bdrv_co_drain_bh_cb()

2018-09-11 Thread Kevin Wolf
Am 11.09.2018 um 10:23 hat Fam Zheng geschrieben: > On Fri, 09/07 18:15, Kevin Wolf wrote: > > bdrv_do_drained_begin/end() assume that they are called with the > > AioContext lock of bs held. If we call drain functions from a coroutine > > with the AioContext lock held, we yield and schedule a BH t

Re: [Qemu-devel] [PATCH 11/14] mirror: Fix potential use-after-free in active commit

2018-09-11 Thread Kevin Wolf
Am 11.09.2018 um 10:31 hat Fam Zheng geschrieben: > On Fri, 09/07 18:15, Kevin Wolf wrote: > > When starting an active commit job, other callbacks can run before > > mirror_start_job() calls bdrv_ref() where needed and cause the nodes to > > go away. Add another pair of bdrv_ref/unref() around it t

Re: [Qemu-devel] [PATCH 1/2] target/mips: Increase the 'supported instructions' flags holder size

2018-09-11 Thread Aleksandar Markovic
> From: Philippe Mathieu-Daudé on behalf of > Philippe Mathieu-Daudé > Sent: Sunday, September 9, 2018 3:34 AM > > Subject: [PATCH 1/2] target/mips: Increase the 'supported instructions' flags > holder size > > Currently this holder is limited to at most 32 flags on > a 32-bit architecture, whi

Re: [Qemu-devel] [PATCH 06/14] block: Add missing locking in bdrv_co_drain_bh_cb()

2018-09-11 Thread Sergio Lopez
On Tue, Sep 11, 2018 at 11:17:20AM +0200, Kevin Wolf wrote: > Am 11.09.2018 um 10:23 hat Fam Zheng geschrieben: > > On Fri, 09/07 18:15, Kevin Wolf wrote: > > > bdrv_do_drained_begin/end() assume that they are called with the > > > AioContext lock of bs held. If we call drain functions from a corou

Re: [Qemu-devel] [Bug 1791796] [NEW] unimplemented thread syscalls in nios2 user-mode emulation

2018-09-11 Thread Thomas Huth
On 2018-09-11 10:49, Alex Bennée wrote: > > Sandra Loosemore <1791...@bugs.launchpad.net> writes: > >> Public bug reported: >> >> This bug is reported against the 3.0 release. >> >> I noticed that the GCC test gcc.dg/torture/tls/tls-test.c is failing >> when run in user-mode qemu for nios2 target

Re: [Qemu-devel] [3/4] cpus: protect TimerState writes with a spinlock

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 08:00, Pavel Dovgalyuk wrote: > Thanks, that works. Here is the updated diff (stubs were added). > Will you apply it? Yes, thanks for the quick test! Paolo

Re: [Qemu-devel] [PATCH v3] target/mips: Support R5900 GCC programs in user mode

2018-09-11 Thread Aleksandar Markovic
> > - organize the changes in the form of patch series > > What kind of granularity do you have in mind? The patch is quite small with > 79 insertions and 1 deletion in total. For patch organization, you may find these links useful: https://wiki.qemu.org/Contribute/SubmitAPatch and https://wi

Re: [Qemu-devel] [Bug 1791796] [NEW] unimplemented thread syscalls in nios2 user-mode emulation

2018-09-11 Thread Alex Bennée
Thomas Huth writes: > On 2018-09-11 10:49, Alex Bennée wrote: >> >> Sandra Loosemore <1791...@bugs.launchpad.net> writes: >> >>> Public bug reported: >>> >>> This bug is reported against the 3.0 release. >>> >>> I noticed that the GCC test gcc.dg/torture/tls/tls-test.c is failing >>> when run i

Re: [Qemu-devel] [PATCH 2/2] target/mips: Add entries for the Toshiba's R3900 and R5900 cores

2018-09-11 Thread Aleksandar Markovic
> From: Philippe Mathieu-Daudé on behalf of > Philippe > Mathieu-Daudé > Sent: Sunday, September 9, 2018 3:34 AM > To: Fredrik Noring; Aleksandar Markovic > Cc: Philippe Mathieu-Daudé; qemu-devel@nongnu.org; Richard Henderson; > Aurelien Jarno > Subject: [PATCH 2/2] target/mips: Add entries for

Re: [Qemu-devel] [PATCH] ps2: prevent changing irq state on save and load

2018-09-11 Thread Pavel Dovgalyuk
Paolo, have you forgot about this? Pavel Dovgalyuk > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, May 11, 2018 12:14 PM > To: Pavel Dovgalyuk; qemu-devel@nongnu.org > Cc: arei.gong...@huawei.com; m...@redhat.com; ciro.santi...@gmail.com; > maria.k

Re: [Qemu-devel] [PATCH 06/14] block: Add missing locking in bdrv_co_drain_bh_cb()

2018-09-11 Thread Kevin Wolf
Am 11.09.2018 um 11:28 hat Sergio Lopez geschrieben: > On Tue, Sep 11, 2018 at 11:17:20AM +0200, Kevin Wolf wrote: > > Am 11.09.2018 um 10:23 hat Fam Zheng geschrieben: > > > On Fri, 09/07 18:15, Kevin Wolf wrote: > > > > bdrv_do_drained_begin/end() assume that they are called with the > > > > AioC

Re: [Qemu-devel] [PATCH v4 00/29] vhost-user for input & GPU

2018-09-11 Thread Gerd Hoffmann
On Tue, Sep 11, 2018 at 01:16:22PM +0400, Marc-André Lureau wrote: > Hi > > On Tue, Sep 11, 2018 at 12:59 PM Gerd Hoffmann wrote: > > > > > > > $ ./vhost-user-gpu --virgl -s vgpu.sock & > > > > > $ qemu... > > > > >-chardev socket,id=chr,path=vgpu.sock > > > > >-object vhost-user-backen

Re: [Qemu-devel] [PATCH] replay: wake up vCPU when replaying

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 09:37, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 09/07/2018 13:24, Pavel Dovgalyuk wrote: >>> static void qemu_tcg_rr_wait_io_event(CPUState *cpu) >>> { >>> while (all_cpu_threads_idle()) { >>> stop_tcg_kick_timer(); >>> qemu_

Re: [Qemu-devel] [PATCH] ps2: prevent changing irq state on save and load

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 12:18, Pavel Dovgalyuk wrote: > Paolo, have you forgot about this? > > Pavel Dovgalyuk Yes, though Gerd might be a better match for the patch. Paolo

Re: [Qemu-devel] [PATCH 1/6] qsp: drop atomics when using the seqlock

2018-09-11 Thread Paolo Bonzini
On 10/09/2018 17:44, Emilio G. Cota wrote: > On Mon, Sep 10, 2018 at 01:32:15 +0200, Paolo Bonzini wrote: >> On 03/09/2018 19:18, Emilio G. Cota wrote: >>> Using atomics here is a mistake since they're not guaranteed >>> to compile. >> >> But isn't it technically a C11 data race if you don't use at

Re: [Qemu-devel] [PATCH 5/6] target/i386/translate: use thread-local storage in !user-mode

2018-09-11 Thread Paolo Bonzini
On 10/09/2018 14:30, Emilio G. Cota wrote: >> I'm confused - as we can have multi-threaded user space don't the same >> requirements apply? > In user-mode, code generation is serialized by mmap_lock. > Making these per-thread would just waste TLS space. It's stupid question time! How can the TLS

Re: [Qemu-devel] [PATCH 2/6] test-rcu-list: avoid torn accesses to n_reclaims and n_nodes_removed

2018-09-11 Thread Paolo Bonzini
On 04/09/2018 22:56, Murilo Opsfelder Araujo wrote: >>> +static inline void count_add(Count *c, long long val) >>> +{ >>> +#ifdef CONFIG_ATOMIC64 >>> +atomic_set__nocheck(&c->val, c->val + val); >>> +#else >>> +seqlock_write_begin(&c->sequence); >>> +c->val += val; >>> +seqlock_writ

Re: [Qemu-devel] [PATCH] ps2: prevent changing irq state on save and load

2018-09-11 Thread Gerd Hoffmann
On Tue, Sep 11, 2018 at 01:10:56PM +0200, Paolo Bonzini wrote: > On 11/09/2018 12:18, Pavel Dovgalyuk wrote: > > Paolo, have you forgot about this? > > > > Pavel Dovgalyuk > > Yes, though Gerd might be a better match for the patch. Dropped it from my patch mailbox after seeing your 'queued' mess

Re: [Qemu-devel] [PATCH] ps2: prevent changing irq state on save and load

2018-09-11 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 11/09/2018 13:25, Gerd Hoffmann wrote: > > On Tue, Sep 11, 2018 at 01:10:56PM +0200, Paolo Bonzini wrote: > >> On 11/09/2018 12:18, Pavel Dovgalyuk wrote: > >>> Paolo, have you forgot about this? > >>> > >>> Pavel Dovgalyuk > >> > >> Yes, thou

[Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Add a check for memory-less NUMA nodes

2018-09-11 Thread Shannon Zhao
From: Shannon Zhao Like commit 16b4226(hw/acpi-build: Add a check for memory-less NUMA node ), it also needs to check memory length for NUMA nodes on ARM. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/

Re: [Qemu-devel] [PATCH 0/6] i386 + x86_64 mttcg

2018-09-11 Thread Paolo Bonzini
On 03/09/2018 19:18, Emilio G. Cota wrote: > I sent ~20 days ago a series that allowed me to boot x86_64 with mttcg: > https://patchwork.kernel.org/cover/10564977/ > > Thanks to Paolo's work (already merged), we don't need to hold > the BQL when calling cpu_get_ticks, which makes the MTTCG conve

Re: [Qemu-devel] [PATCH] ps2: prevent changing irq state on save and load

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 13:25, Gerd Hoffmann wrote: > On Tue, Sep 11, 2018 at 01:10:56PM +0200, Paolo Bonzini wrote: >> On 11/09/2018 12:18, Pavel Dovgalyuk wrote: >>> Paolo, have you forgot about this? >>> >>> Pavel Dovgalyuk >> >> Yes, though Gerd might be a better match for the patch. > > Dropped it from

[Qemu-devel] [PATCH v3] target/ppc: add external PID support

2018-09-11 Thread Roman Kapl
External PID is a mechanism present on BookE 2.06 that enables application to store/load data from different address spaces. There are special version of some instructions, which operate on alternate address space, which is described in the EPLC/EPSC regiser. This implementation uses two additiona

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-11 Thread Paolo Bonzini
On 10/09/2018 16:56, Fam Zheng wrote: > We have this unwanted call stack: > > > ... > > #13 0x5586602b7793 in virtio_scsi_handle_cmd_vq > > #14 0x5586602b8d66 in virtio_scsi_data_plane_handle_cmd > > #15 0x5586602ddab7 in virtio_queue_notify_aio_vq > > #16 0x5586602dfc9f

Re: [Qemu-devel] [PATCH 1/2] target/mips: Increase the 'supported instructions' flags holder size

2018-09-11 Thread Philippe Mathieu-Daudé
On 9/11/18 6:33 AM, Aleksandar Markovic wrote: >> From: Philippe Mathieu-Daudé on behalf of >> Philippe Mathieu-Daudé >> Sent: Sunday, September 9, 2018 3:34 AM >> >> Subject: [PATCH 1/2] target/mips: Increase the 'supported instructions' >> flags holder size >> >> Currently this holder is limi

Re: [Qemu-devel] [PATCH 2/2] target/mips: Add entries for the Toshiba's R3900 and R5900 cores

2018-09-11 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 9/11/18 7:18 AM, Aleksandar Markovic wrote: >> From: Philippe Mathieu-Daudé on behalf of >> Philippe > Mathieu-Daudé >> Sent: Sunday, September 9, 2018 3:34 AM >> To: Fredrik Noring; Aleksandar Markovic >> Cc: Philippe Mathieu-Daudé; qemu-devel@nongnu.org; Richard Henderson;

Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/qdev-core: Fix description of instance_init

2018-09-11 Thread Philippe Mathieu-Daudé
On 9/10/18 5:09 AM, Thomas Huth wrote: > The part of the documentation of DeviceClass that talks about instance_init > is partly wrong: instance_init() functions must not abort or exit, since > the function is also called during introspection of the device already. > So if a device calls exit() dur

[Qemu-devel] [PATCH] linux-user: don't short-circuit read with zero length

2018-09-11 Thread Andreas Schwab
A zero-length read still needs to do the usual checks, thus it may return errors like EBADF. Signed-off-by: Andreas Schwab --- linux-user/syscall.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 643b8833de

Re: [Qemu-devel] [PATCH v2 01/12] cacheinfo: add i/d cache_linesize_log

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > @@ -173,5 +176,7 @@ static void __attribute__((constructor)) > init_cache_info(void) > fallback_cache_info(&isize, &dsize); > > qemu_icache_linesize = isize; > +qemu_icache_linesize_log = 31 - clz32(isize); > qemu_dcache_linesize

[Qemu-devel] [PATCH v1 1/1] qemu-img: add new function to remove bitmap in image

2018-09-11 Thread Ma Haocong
Signed-off-by: Ma Haocong --- qemu-img-cmds.hx | 6 +++ qemu-img.c | 119 +++ 2 files changed, 125 insertions(+) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 1526f327a5..cc397b64e4 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-

[Qemu-devel] [PATCH v1 0/1] qemu-img: add new function to remove bitmap in image

2018-09-11 Thread Ma Haocong
Hello, In our scene, we need to delete dirty-bitmap created by using qmp command 'block-dirty-bitmap-add'. we can use qmp command 'block-dirty-bitmap-remove' to remove bitmap. Then I think that we should add a new function in qemu-img to do the same work. The command format is: qemu-img removeb

[Qemu-devel] [PATCH] block: Don't call update_flags_from_options() if the options are wrong

2018-09-11 Thread Alberto Garcia
If qemu_opts_absorb_qdict() fails and we carry on and call update_flags_from_options() then that can result on a failed assertion: $ qemu-io -c 'reopen -o read-only=foo' hd.qcow2 block.c:1101: update_flags_from_options: Assertion `qemu_opt_find(opts, BDRV_OPT_CACHE_DIRECT)' failed. Abort

Re: [Qemu-devel] [PATCH v4 0/9] Add limited MXU instruction support

2018-09-11 Thread Janeczek, Craig via Qemu-devel
I plan on getting back to this development effort next week. -Original Message- From: Aleksandar Markovic Sent: Wednesday, September 5, 2018 9:36 AM To: Janeczek, Craig ; qemu-devel@nongnu.org Cc: aurel...@aurel32.net Subject: Re: [PATCH v4 0/9] Add limited MXU instruction support > Fro

Re: [Qemu-devel] [PATCH v2 02/12] util: add atomic64

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > +#define GEN_READ(name, type)\ > +type name(const type *ptr) \ > +{ \ > +QemuSpin *lock = addr_to_lock(ptr); \ > +type ret;

Re: [Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions

2018-09-11 Thread Paolo Bonzini
On 07/09/2018 14:56, Mark Cave-Ayland wrote: > As part of an upcoming 40p patchset I have a requirement to change the PCI > configuration of the LSI SCSI. However since commits a64aa5785d "hw: > Deprecate -drive > if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit > creation

Re: [Qemu-devel] [PATCH] dump: fix Windows dump memory run mapping

2018-09-11 Thread Paolo Bonzini
On 29/08/2018 20:30, Viktor Prutyanov wrote: > We should map and use guest memory run by parts if it can't be mapped as > a whole. > After this patch, continuos guest physical memory blocks which are not > continuos in host virtual address space will be processed correctly. > > Signed-off-by: Vikt

Re: [Qemu-devel] [PATCH v2 07/12] cpus: initialize timers_state.vm_clock_lock

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > We forgot to initialize the spinlock introduced in 94377115b2 > ("cpus: protect TimerState writes with a spinlock", 2018-08-23). > Fix it. > > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota > --- > cpus.c | 1 + > 1 file changed, 1 inser

Re: [Qemu-devel] [PATCH v3 1/2] lsi53c895a: add optional external IRQ via qdev

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 08:38, Fam Zheng wrote: > On Tue, 09/11 11:27, David Gibson wrote: >> On Mon, Sep 10, 2018 at 09:46:30PM +0100, Mark Cave-Ayland wrote: >>> On some early machines the on-board PCI devices IRQs are wired directly to >>> the interrupt controller instead of via the PCI host bridge. >>> >

[Qemu-devel] [Bug 1791947] [NEW] isochronous usb device forwarding with windows 10 and xhci freezes

2018-09-11 Thread Florian Kaiser
Public bug reported: When I try to forward isochronous usb devices (webcam, HID-Audio) via usbredir into the VM, the devices work for a few minutes then the device stops working and stays that way until a VM reboot or a windows driver reload. It does not matter if I use qemu-xhci or nec-xhci. I

Re: [Qemu-devel] [PATCH v2 00/12] i386 + x86_64 mttcg

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 01:27, Emilio G. Cota wrote: > v1: https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg00237.html > > Changes since v1: > > - Add Alex's R-b tags > - Introduce atomic64 to just use a spinlock when doing atomic_set/read > on i64's and u64's if !CONFIG_ATOMIC64, just like the k

Re: [Qemu-devel] [PATCH v2 12/12] configure: enable mttcg for i386 and x86_64

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > Signed-off-by: Emilio G. Cota > --- > configure | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH] hostmem-memfd: add checks before adding hostmem-memfd & properties

2018-09-11 Thread Paolo Bonzini
On 06/09/2018 18:14, Marc-André Lureau wrote: > Run some memfd-related checks before registering hostmem-memfd & > various properties. This will help libvirt to figure out what the host > is supposed to be capable of. > > qemu_memfd_check() is changed to a less optimized version, since it is > use

Re: [Qemu-devel] [PATCH v2 01/12] cacheinfo: add i/d cache_linesize_log

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 14:16, Richard Henderson wrote: > On 09/10/2018 04:27 PM, Emilio G. Cota wrote: >> @@ -173,5 +176,7 @@ static void __attribute__((constructor)) >> init_cache_info(void) >> fallback_cache_info(&isize, &dsize); >> >> qemu_icache_linesize = isize; >> +qemu_icache_linesiz

Re: [Qemu-devel] [PATCH v2 11/12] target/i386/translate: use thread-local storage in !user-mode

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > Needed for MTTCG. > > Note that in user-mode, code generation is serialized by > mmap_lock, so making these variables per-thread would > just waste TLS space. > > Acked-by: Alex Bennée > Signed-off-by: Emilio G. Cota > --- This is ok for now, but

Re: [Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu_update_icount

2018-09-11 Thread Paolo Bonzini
On 11/09/2018 14:53, Richard Henderson wrote: >> >> -#ifndef CONFIG_ATOMIC64 >> seqlock_write_lock(&timers_state.vm_clock_seqlock, >> &timers_state.vm_clock_lock); >> -#endif >> atomic_set__nocheck(&timers_state.qemu_icount, >> timers_sta

Re: [Qemu-devel] [PATCH v2 00/12] Various qemu command line options help improvements

2018-09-11 Thread Paolo Bonzini
On 07/09/2018 09:59, Marc-André Lureau wrote: > Hi, > > This is a compilation of patches I have to improve command line help > support. The "qemu-option" patches have already been sent earlier, I > modified the first to fix an issue reported by Markus. The other > patches add support for -object h

[Qemu-devel] [Bug 1791947] Re: isochronous usb device forwarding with windows 10 and xhci freezes

2018-09-11 Thread Florian Kaiser
** Description changed: - When I try to forward isochronous usb devices (webcam, HID-Audio) into the VM the devices work for a few minutes then the device stops working and stays that way until a VM reboot or a windows driver reload. + When I try to forward isochronous usb devices (webcam, HID-A

Re: [Qemu-devel] [PATCH v2 08/12] cpus: always call seqlock_write in cpu_update_icount

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > > -#ifndef CONFIG_ATOMIC64 > seqlock_write_lock(&timers_state.vm_clock_seqlock, > &timers_state.vm_clock_lock); > -#endif > atomic_set__nocheck(&timers_state.qemu_icount, > timers_state.qemu

Re: [Qemu-devel] [PATCH 0/3] util: add qemu_write_pidfile()

2018-09-11 Thread Paolo Bonzini
On 31/08/2018 16:53, Marc-André Lureau wrote: > Hi, > > Here are a few PID file related patches extracted from "[PATCH v4 > 00/29] vhost-user for input & GPU" series, with suggestions from > Daniel Berrangé. > > thanks > > Marc-André Lureau (3): > util: add qemu_write_pidfile() > util: use f

Re: [Qemu-devel] [PATCH v2 06/12] atomic: fix comment s/x64_64/x86_64/

2018-09-11 Thread Richard Henderson
On 09/10/2018 04:27 PM, Emilio G. Cota wrote: > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota > --- > include/qemu/atomic.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH] kvm: x86: Fix kvm_arch_fixup_msi_route for remap-less case

2018-09-11 Thread Paolo Bonzini
On 27/08/2018 10:47, Jan Kiszka wrote: > The AMD IOMMU does not (yet) support interrupt remapping. But > kvm_arch_fixup_msi_route assumes that all implementations do and crashes > when the AMD IOMMU is used in KVM mode. > > Fixes: 8b5ed7dffa1f ("intel_iommu: add support for split irqchip") > Repor

Re: [Qemu-devel] [PATCH v3] configure: preserve various environment variables in config.status

2018-09-11 Thread Paolo Bonzini
On 04/09/2018 14:36, Daniel P. Berrangé wrote: > The config.status script is auto-generated by configure upon > completion. The intention is that config.status can be later invoked by > the developer directly, or by make indirectly, to re-detect the same > environment that configure originally used

Re: [Qemu-devel] [PATCH qemu v2] hw/char/sh_serial: Add timeout handling to unbreak serial input

2018-09-11 Thread Paolo Bonzini
On 05/09/2018 15:11, Geert Uytterhoeven wrote: > As of commit 18e8cf159177100e ("serial: sh-sci: increase RX FIFO trigger > defaults for (H)SCIF") in Linux v4.11-rc1, the serial console on the > QEMU SH4 target is broken: it delays serial input until enough data has > been received. > > Since afor

Re: [Qemu-devel] [PATCH] PC Chipset: Improve serial divisor calculation

2018-09-11 Thread Paolo Bonzini
On 01/09/2018 01:37, Guenter Roeck wrote: > The patch results in an unexpected DLL register value. Here is the > surrounding code from drivers/tty/serial/pxa.c: > > serial_out(up, UART_DLL, quot & 0xff); /* LS of divisor */ > > /* >* work around Errata #75 according t

Re: [Qemu-devel] [PATCH v2 1/3] util: add qemu_write_pidfile()

2018-09-11 Thread Paolo Bonzini
On 07/09/2018 16:03, Eric Blake wrote: > On 09/07/2018 07:13 AM, Marc-André Lureau wrote: >> There are variants of qemu_create_pidfile() in qemu-pr-helper and >> qemu-ga. Let's have a common implementation in libqemuutil. >> > > Unrelated to this patch, but a question that this raises: should > 'q

Re: [Qemu-devel] [PATCH v2 3/3] Delete PID file on exit

2018-09-11 Thread Paolo Bonzini
On 07/09/2018 14:13, Marc-André Lureau wrote: > Register an exit notifier to remove the PID file. By the time atexit() > is called, qemu_write_pidfile() guarantees QEMU owns the PID file, > thus we could safely remove it when exiting. > > Signed-off-by: Marc-André Lureau Queued this one, too. P

Re: [Qemu-devel] [PATCH v2 4/5] test-char: fix random socket test failure

2018-09-11 Thread Paolo Bonzini
On 23/08/2018 16:31, Marc-André Lureau wrote: > Peter reported a test failure on FreeBSD with the new reconnect test: > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} > gtester -k --verbose -m=quick tests/test-char > TEST: tests/test-char... (pid=16190) > /char/null:

Re: [Qemu-devel] [PATCH v1 1/1] qemu-img: add new function to remove bitmap in image

2018-09-11 Thread Eric Blake
On 9/11/18 3:37 AM, Ma Haocong wrote: Signed-off-by: Ma Haocong --- qemu-img-cmds.hx | 6 +++ qemu-img.c | 119 +++ 2 files changed, 125 insertions(+) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 1526f327a5..cc397b64e4 10

Re: [Qemu-devel] [PATCH v1 0/1] qemu-img: add new function to remove bitmap in image

2018-09-11 Thread Eric Blake
On 9/11/18 3:37 AM, Ma Haocong wrote: Hello, In our scene, we need to delete dirty-bitmap created by using qmp command 'block-dirty-bitmap-add'. we can use qmp command 'block-dirty-bitmap-remove' to remove bitmap. Then I think that we should add a new function in qemu-img to do the same work. T

[Qemu-devel] [RFC PATCH 2/4] docker: add buildroot-nios2-cross image

2018-09-11 Thread Alex Bennée
Build a buildroot toolchain for the nios2 target. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 4 tests/docker/dockerfiles/buildroot-nios2-cross.docker | 10 ++ 2 files changed, 14 insertions(+) create mode 100644 tests/docker/dockerfiles/

[Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-11 Thread Alex Bennée
This is to work around the limitations of the buildroot qemu_nios2_10m50_defconfig which sets the base kernel version for glibc. Signed-off-by: Alex Bennée --- linux-user/nios2/target_syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/nios2/target_syscall.h

[Qemu-devel] [RFC PATCH 4/4] tests/tcg: add nios2 architecture (NEEDS FIXES)

2018-09-11 Thread Alex Bennée
Now we have a docker image with a nios2 compiler we can add the bits to build our TCG tests. Current failures: testmmap - fails in check_file_fixed_eof_mmaps due to inversion of offset linux-test - unimplemented lseek (probably others as well) Signed-off-by: Alex Bennée --- tests/tcg/nios2/

[Qemu-devel] [RFC PATCH 0/4] Add Nios II cross-compiler and enable tests/tcg

2018-09-11 Thread Alex Bennée
Hi, tl;dr Nios II linux-user seems pretty broken Following up on some mailing list queries about the state of Nios II Thomas pointed out that buildroot could build cross-compilers for the architecture. As a quick experiment I've enabled a docker based buildroot and turned on tests/tcg for it. Th

Re: [Qemu-devel] [PATCH v1 1/1] qemu-img: add new function to remove bitmap in image

2018-09-11 Thread Eric Blake
On 9/11/18 8:56 AM, Eric Blake wrote: +    bitmap = bdrv_find_dirty_bitmap(bs, bitmapname); + +    /* + * Dirty bitmap may not be load if the 'IN_USE' flag is set (e.g. the + * qemu thread is corrupted and the 'IN_USE' flag is not be cleared), + * so the result of bdrv_find_dirty_

[Qemu-devel] [RFC PATCH 1/4] docker: add debian-buildroot-base

2018-09-11 Thread Alex Bennée
We can build some more cross-compilers using buildroot. This base system contains simply the minimum number of tools required for buildroot to work. We also download and unpack the buildroot source tree as that will be common for all system deriving from it. Signed-off-by: Alex Bennée --- tests/

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi/virtio-blk: Disable poll handlers when stopping vq handler

2018-09-11 Thread Fam Zheng
On Tue, 09/11 13:32, Paolo Bonzini wrote: > On 10/09/2018 16:56, Fam Zheng wrote: > > We have this unwanted call stack: > > > > > ... > > > #13 0x5586602b7793 in virtio_scsi_handle_cmd_vq > > > #14 0x5586602b8d66 in virtio_scsi_data_plane_handle_cmd > > > #15 0x5586602ddab7 in

Re: [Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-11 Thread Laurent Vivier
Le 11/09/2018 à 16:06, Alex Bennée a écrit : > This is to work around the limitations of the buildroot > qemu_nios2_10m50_defconfig which sets the base kernel version for > glibc. > > Signed-off-by: Alex Bennée > --- > linux-user/nios2/target_syscall.h | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v10 6/6] tpm: add ACPI memory clear interface

2018-09-11 Thread Laszlo Ersek
+Alex, due to mention of 21e00fa55f3fd On 09/10/18 15:03, Marc-André Lureau wrote: > Hi > > On Mon, Sep 10, 2018 at 2:44 PM Dr. David Alan Gilbert > wrote: >> (I didn't know about guest_phys_block* and would have probably just used >> qemu_ram_foreach_block ) >> > > guest_phys_block*() seems to

Re: [Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-11 Thread Marek Vasut
On 09/11/2018 04:14 PM, Laurent Vivier wrote: > Le 11/09/2018 à 16:06, Alex Bennée a écrit : >> This is to work around the limitations of the buildroot >> qemu_nios2_10m50_defconfig which sets the base kernel version for >> glibc. >> >> Signed-off-by: Alex Bennée >> --- >> linux-user/nios2/target

Re: [Qemu-devel] [PATCH] configure: Support --enable-capstone=internal

2018-09-11 Thread Richard Henderson
On 09/05/2018 08:19 AM, Eduardo Habkost wrote: > Currently there's no way to make configure not try to use the > system-provided capstone library using pkgconfig. Certainly there is. > > Add support to --enable-capstone=internal option to make QEMU not > use the system-provided library automatic

[Qemu-devel] [Bug 1791796] Re: [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-11 Thread Alex Bennée
Laurent Vivier writes: > Le 11/09/2018 à 16:06, Alex Bennée a écrit: >> This is to work around the limitations of the buildroot >> qemu_nios2_10m50_defconfig which sets the base kernel version for >> glibc. >> >> Signed-off-by: Alex Bennée >> --- >> linux-user/nios2/target_syscall.h | 2 +- >>

Re: [Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK]

2018-09-11 Thread Laurent Vivier
Le 11/09/2018 à 16:40, Alex Bennée a écrit : > > Laurent Vivier writes: > >> Le 11/09/2018 à 16:06, Alex Bennée a écrit: >>> This is to work around the limitations of the buildroot >>> qemu_nios2_10m50_defconfig which sets the base kernel version for >>> glibc. >>> >>> Signed-off-by: Alex Bennée

  1   2   >