Re: [Qemu-devel] [PATCH v2 1/1] block-backend: allow flush on devices with open tray

2016-09-06 Thread Markus Armbruster
John Snow writes: > On 09/05/2016 05:15 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 09/02/2016 01:44 AM, Markus Armbruster wrote: John Snow writes: > If a device still has an attached BDS because the medium has not yet > been removed, we will be unable to migra

Re: [Qemu-devel] [PATCH v7 0/4] Add Mediated device support

2016-09-06 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, September 07, 2016 1:41 AM > > On Sat, 3 Sep 2016 22:04:56 +0530 > Kirti Wankhede wrote: > > > On 9/3/2016 3:18 AM, Paolo Bonzini wrote: > > > > > > > > > On 02/09/2016 20:33, Kirti Wankhede wrote: > > >> We could ev

Re: [Qemu-devel] [RFC v2 0/4] adding mdev bus and vfio support

2016-09-06 Thread Jike Song
On 09/07/2016 11:38 AM, Neo Jia wrote: > On Wed, Sep 07, 2016 at 10:22:26AM +0800, Jike Song wrote: >> On 09/02/2016 11:03 PM, Alex Williamson wrote: >>> On Fri, 2 Sep 2016 16:16:08 +0800 >>> Jike Song wrote: >>> This patchset is based on NVidia's "Add Mediated device support" series,

Re: [Qemu-devel] [RFC v4 16/28] tcg: drop global lock during TCG code execution

2016-09-06 Thread Richard Henderson
On 09/06/2016 10:43 PM, Paolo Bonzini wrote: On 07/09/2016 06:03, Richard Henderson wrote: +if (mr->global_locking) { +qemu_mutex_lock_iothread(); +locked = true; +} memory_region_dispatch_read(mr, physaddr, &val, 1 << SHIFT, iotl

Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 02:34:19PM +0800, Peter Xu wrote: > On Wed, Sep 07, 2016 at 03:44:19PM +1000, David Gibson wrote: > > > For "CHANGE", it sounds like a unmap() + a map(). However I'd say > > > "ADDITION" is nowhere better... > > > > Right.. this brings up a good point. > > > > Changing a m

Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}

2016-09-06 Thread Fam Zheng
On Wed, 09/07 14:06, Peter Xu wrote: > v4 changes: > - remove two standard headers since they are included in osdep.h > already [Fam] > - make sure it passes build on all platforms (no --target-list > specified during configure) Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag

2016-09-06 Thread Peter Xu
On Wed, Sep 07, 2016 at 03:44:19PM +1000, David Gibson wrote: > > For "CHANGE", it sounds like a unmap() + a map(). However I'd say > > "ADDITION" is nowhere better... > > Right.. this brings up a good point. > > Changing a mapping (i.e. overwriting an existing mapping with a > different one) wou

Re: [Qemu-devel] [PATCH RFC] docs: add PCIe devices placement guidelines

2016-09-06 Thread Gerd Hoffmann
Hi, > >> ports, if that's allowed). For example: > >> > >> - 1-32 ports needed: use root ports only > >> > >> - 33-64 ports needed: use 31 root ports, and one switch with 2-32 > >> downstream ports I expect you rarely need any switches. You can go multifunction with the pcie root ports. Whic

Re: [Qemu-devel] [PATCH 1/1] mirror: fix improperly filled copy_bitmap for mirror block job

2016-09-06 Thread Jeff Cody
On Tue, Sep 06, 2016 at 06:11:19PM +0300, Denis V. Lunev wrote: > bdrv_is_allocated_above() returns true in the case if qcow2 even for > completely zeroed areas as BDRV_BLOCK_ALLOCATED flag is set in both > cases. Hi Denis, Not just qcow2. BDRV_BLOCK_ALLOCATED for a layer means the content of th

[Qemu-devel] [PATCH v4 4/4] error-report: leverage error_report_abort()

2016-09-06 Thread Peter Xu
Two cases that can leverage error_report_abort(): Case 1: error_report(...); abort(); Case 2: error_setg(&error_abort, ...); This patch converts these cases to use error_report_abort(). Script error_report_abort.cocci is added to automate the convertion. Signed-off-by: Peter Xu --- b

[Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}

2016-09-06 Thread Peter Xu
v4 changes: - remove two standard headers since they are included in osdep.h already [Fam] - make sure it passes build on all platforms (no --target-list specified during configure) v3 changes: - implement error_report_fatal using function [Markus] - provide error_report_abort as well in seper

[Qemu-devel] [PATCH v4 2/4] error-report: provide error_report_abort()

2016-09-06 Thread Peter Xu
A twin for error_report_fatal(), for programming errors. Signed-off-by: Peter Xu --- include/qemu/error-report.h | 1 + util/qemu-error.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h index eb8260e..51a6f31

Re: [Qemu-devel] [PATCH v3 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 01:32:22PM +0800, Peter Xu wrote: > IOMMU Notifier list is used for notifying IO address mapping changes. > Currently VFIO is the only user. > > However it is possible that future consumer like vhost would like to > only listen to part of its notifications (e.g., cache inva

[Qemu-devel] [PATCH v4 1/4] error-report: provide error_report_fatal()

2016-09-06 Thread Peter Xu
There are many places in current QEMU codes that needs to print some error and then quit QEMU. Provide a new function for it. Signed-off-by: Peter Xu --- include/qemu/error-report.h | 1 + util/qemu-error.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/include/qemu

Re: [Qemu-devel] [PATCH v3 2/3] memory: generalize iommu_ops.notify_started to notifier_add

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 01:32:23PM +0800, Peter Xu wrote: > Considering that we may have multiple IOMMU notifier consumers in the > future, converting iommu_ops.notify_{started|stopped} into some more > general form. Now we can trap all notifier registerations and > deregistrations, rather than onl

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 03:27:46PM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2016-09-07 at 11:59 +1000, David Gibson wrote: > > > > That does suggest an alternative approach though.  You could remove > > XScomDevice entirely from QOM existence, and just expose the xscom > > address space glob

Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 06:31:42PM +0800, Peter Xu wrote: > On Tue, Sep 06, 2016 at 10:19:14AM +0200, Paolo Bonzini wrote: > > > > > > On 06/09/2016 10:17, Peter Xu wrote: > > > After knowing the possibility that the two consumers might be > > > mixturely used in the future (as David has mentione

Re: [Qemu-devel] [RFC v4 16/28] tcg: drop global lock during TCG code execution

2016-09-06 Thread Paolo Bonzini
On 07/09/2016 06:03, Richard Henderson wrote: > >> +if (mr->global_locking) { >> +qemu_mutex_lock_iothread(); >> +locked = true; >> +} >> memory_region_dispatch_read(mr, physaddr, &val, 1 << SHIFT, >> iotlbentry->attrs); >> +if (l

Re: [Qemu-devel] [RFC v4 14/28] tcg: add kick timer for single-threaded vCPU emulation

2016-09-06 Thread Paolo Bonzini
On 07/09/2016 05:25, Richard Henderson wrote: >> >> +/* Set to kick if we have to do more than one vCPU */ >> +if (CPU_NEXT(first_cpu)) { >> +kick_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, kick_tcg_thread, >> + &kick_timer); > > I'm not especially

Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 10:17:42AM +0530, Nikunj A Dadhania wrote: > David Gibson writes: > > > [ Unknown signature status ] > > On Fri, Sep 02, 2016 at 12:02:55PM +0530, Nikunj A Dadhania wrote: > >> Signed-off-by: Nikunj A Dadhania > > > > This really needs a comment indicating that this imple

[Qemu-devel] [PATCH v3 3/3] intel_iommu: allow invalidation typed notifiers

2016-09-06 Thread Peter Xu
Intel vIOMMU is still lacking of a complete IOMMU notifier mechanism. Before that is achieved, let's open a door for vhost DMAR support, which only requires device-IOTLB based cache invalidations. Meanwhile, converting hw_error() to error_report() and exit(), to make the error messages clean and o

[Qemu-devel] [PATCH v3 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-06 Thread Peter Xu
IOMMU Notifier list is used for notifying IO address mapping changes. Currently VFIO is the only user. However it is possible that future consumer like vhost would like to only listen to part of its notifications (e.g., cache invalidations). This patch introduced IOMMUNotifier and IOMMUNotfierCap

[Qemu-devel] [PATCH v3 2/3] memory: generalize iommu_ops.notify_started to notifier_add

2016-09-06 Thread Peter Xu
Considering that we may have multiple IOMMU notifier consumers in the future, converting iommu_ops.notify_{started|stopped} into some more general form. Now we can trap all notifier registerations and deregistrations, rather than only the first ones. Power was leveraging the notifier_{started|stop

[Qemu-devel] [PATCH v3 0/3] Introduce IOMMUNotifier struct

2016-09-06 Thread Peter Xu
V3: - use QLIST instead of embedding Notifier into IOMMUNotifier [Paolo] - fix a build error for ppc64-softmmu The idea originates from one of Alex's reply: https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg00254.html But after further discussions, it seems that only adding a simple typ

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread Benjamin Herrenschmidt
On Wed, 2016-09-07 at 11:59 +1000, David Gibson wrote: > > That does suggest an alternative approach though.  You could remove > XScomDevice entirely from QOM existence, and just expose the xscom > address space globally, much like address_space_memory.  The > individual devices could just registe

Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation

2016-09-06 Thread Benjamin Herrenschmidt
On Wed, 2016-09-07 at 10:17 +0530, Nikunj A Dadhania wrote: > > David Gibson writes: > > > > > [ Unknown signature status ] > > On Fri, Sep 02, 2016 at 12:02:55PM +0530, Nikunj A Dadhania wrote: > > > > > > > > > Signed-off-by: Nikunj A Dadhania > > > > This really needs a comment indicating

[Qemu-devel] [PATCH v5 0/2] targte-i386: Add virtual L3 cache support

2016-09-06 Thread Longpeng(Mike)
This patchset add virtual L3 cache support. For KVM's linux guest, this will reduces amouts of IPIs under some workloads. In our experiments(vm:1*socket,8*cores,2*threads workload:SAP-HANA-PB-testsuite), this reduces 85% guest's resched-IPIs, and the performance improves 7.2%~33.1%. --- Chandes

[Qemu-devel] [PATCH v5 1/2] pc: Add 2.8 machine

2016-09-06 Thread Longpeng(Mike)
This will used by the next patch. Signed-off-by: Longpeng(Mike) --- hw/i386/pc_piix.c| 16 +--- hw/i386/pc_q35.c | 13 +++-- include/hw/i386/pc.h | 3 +++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index a07d

[Qemu-devel] [PATCH v5 2/2] target-i386: present virtual L3 cache info for vcpus

2016-09-06 Thread Longpeng(Mike)
Some software algorithms are based on the hardware's cache info, for example, for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger a resched IPI and told cpu2 to do the wakeup if they don't share low level cache. Oppositely, cpu1 will access cpu2's runqueue directly if t

Re: [Qemu-devel] [PATCH v2 1/3] memory: introduce IOMMUNotifier and its caps

2016-09-06 Thread Peter Xu
On Tue, Sep 06, 2016 at 04:29:52PM +0200, Paolo Bonzini wrote: > Since you're walking the notifier list manually anyway, I think it's > simpler to get rid of Notifier completely. Otherwise, this looks pretty > good! Yes that should be cleaner. Will fix. Thanks! -- peterx

Re: [Qemu-devel] [PATCH RFC 0/4] Enable MTTCG on PowerPC

2016-09-06 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Fri, Sep 02, 2016 at 05:19:21PM +1000, Benjamin Herrenschmidt wrote: >> On Fri, 2016-09-02 at 12:02 +0530, Nikunj A Dadhania wrote: >> > The series is a first attempt at enabling Multi-Threaded TCG on PowerPC. >> > Changes that were needed

Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation

2016-09-06 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Fri, Sep 02, 2016 at 12:02:55PM +0530, Nikunj A Dadhania wrote: >> Signed-off-by: Nikunj A Dadhania > > This really needs a comment indicating that this implementation isn't > strictly correct (although probably good enough in practice).

[Qemu-devel] [PATCH] scsi: pvscsi: limit process IO loop to maximum page count

2016-09-06 Thread P J P
From: Prasad J Pandit Vmware Paravirtual SCSI emulator while processing IO requests could run into an infinite loop if 'pvscsi_ring_pop_req_descr' always returned positive value. Limit IO loop to the maximum page count. Reported-by: Li Qiang Signed-off-by: Prasad J Pandit --- hw/scsi/vmw_pvsc

Re: [Qemu-devel] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads

2016-09-06 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Fri, Sep 02, 2016 at 12:02:54PM +0530, Nikunj A Dadhania wrote: >> Signed-off-by: Nikunj A Dadhania >> --- >> target-ppc/kvm.c | 2 +- >> target-ppc/kvm_ppc.h | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --g

Re: [Qemu-devel] [PATCH 0/3] memory: add IOMMU notifier type

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 02:26:44PM +0800, Jason Wang wrote: > > > On 2016年09月06日 13:49, Peter Xu wrote: > > On Tue, Sep 06, 2016 at 03:06:17PM +1000, David Gibson wrote: > > > On Mon, Sep 05, 2016 at 03:21:18PM +0800, Peter Xu wrote: > > > > In the thread: > > > > > > > >https://lists.gnu.or

Re: [Qemu-devel] [RFC v4 21/28] tcg: enable tb_lock() for SoftMMU

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: tb_lock() has long been used for linux-user mode to protect code generation. By enabling it now we prepare for MTTCG and ensure all code generation is serialised by this lock. The other major structure that needs protecting is the l1_map and its PageDesc

Re: [Qemu-devel] [RFC v4 20/28] cpus: tweak sleeping and safe_work rules for MTTCG

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: Once TCG gains the ability to sleep individual threads we need to make sure they don't sleep when safe work is pending as all threads need to go through the process_queued_work function. Also if we have multiple threads wait_for_safe_work can now sleep w

Re: [Qemu-devel] [RFC v4 18/28] tcg: remove global exit_request

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: There are now only two uses of the global exit_request left. The first ensures we exit the run_loop when we first start to process pending work and in the kick handler. This is just as easily done by setting the first_cpu->exit_request flag. The second

Re: [Qemu-devel] [PATCH RFC 3/4] target-ppc: use atomic_cmpxchg for ld/st reservation

2016-09-06 Thread David Gibson
On Fri, Sep 02, 2016 at 12:02:55PM +0530, Nikunj A Dadhania wrote: > Signed-off-by: Nikunj A Dadhania This really needs a comment indicating that this implementation isn't strictly correct (although probably good enough in practice). Specifically a racing store which happens to store the same val

Re: [Qemu-devel] [PATCH RFC 2/4] target-ppc: with MTTCG report more threads

2016-09-06 Thread David Gibson
On Fri, Sep 02, 2016 at 12:02:54PM +0530, Nikunj A Dadhania wrote: > Signed-off-by: Nikunj A Dadhania > --- > target-ppc/kvm.c | 2 +- > target-ppc/kvm_ppc.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > index dcb68b9..20eb4

Re: [Qemu-devel] [PATCH RFC 0/4] Enable MTTCG on PowerPC

2016-09-06 Thread David Gibson
On Fri, Sep 02, 2016 at 05:19:21PM +1000, Benjamin Herrenschmidt wrote: > On Fri, 2016-09-02 at 12:02 +0530, Nikunj A Dadhania wrote: > > The series is a first attempt at enabling Multi-Threaded TCG on PowerPC. > > Changes that were needed to enable PowerPC are pretty simple; > > > > Patch 01: Tak

Re: [Qemu-devel] [RFC v4 17/28] cpus: re-factor out handle_icount_deadline

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: In preparation for adding a MTTCG thread we re-factor out a bit of what will be common code to handle the QEMU_CLOCK_VIRTUAL expiration. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [RFC v4 16/28] tcg: drop global lock during TCG code execution

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: +if (mr->global_locking) { +qemu_mutex_lock_iothread(); +locked = true; +} memory_region_dispatch_read(mr, physaddr, &val, 1 << SHIFT, iotlbentry->attrs); +if (locked) { +qemu_mute

Re: [Qemu-devel] [RFC v2 0/4] adding mdev bus and vfio support

2016-09-06 Thread Neo Jia
On Wed, Sep 07, 2016 at 10:22:26AM +0800, Jike Song wrote: > On 09/02/2016 11:03 PM, Alex Williamson wrote: > > On Fri, 2 Sep 2016 16:16:08 +0800 > > Jike Song wrote: > > > >> This patchset is based on NVidia's "Add Mediated device support" series, > >> version 6: > >> > >>http://www.spinic

Re: [Qemu-devel] [RFC v4 15/28] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: ..and make the definition local to cpus. In preparation for MTTCG the concept of a global tcg_current_cpu will no longer make sense. However we still need to keep track of it in the single-threaded case to be able to exit quickly when required. qemu_cpu

Re: [Qemu-devel] [RFC v4 14/28] tcg: add kick timer for single-threaded vCPU emulation

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: Currently we rely on the side effect of the main loop grabbing the iothread_mutex to give any long running basic block chains a kick to ensure the next vCPU is scheduled. As this code is being re-factored and rationalised we now do it explicitly here. S

Re: [Qemu-devel] [PATCH] iscsi: Fix divide-by-zero regression on raw SG devices

2016-09-06 Thread Holger Schranz
Hi Eric, I will test this patch within tomorrow. Is this o.k. for you? Beste regards Holger Am 06.09.2016 um 21:04 schrieb Eric Blake: When qemu uses iscsi devices in sg mode, iscsilun->block_size is left at 0. Prior to commits cf081fca and similar, when block limits were tracked in sectors,

Re: [Qemu-devel] [RFC v4 13/28] tcg: add options for enabling MTTCG

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: From: KONRAD Frederic We know there will be cases where MTTCG won't work until additional work is done in the front/back ends to support. It will however be useful to be able to turn it on. As a result MTTCG will default to off unless the combination

Re: [Qemu-devel] [RFC v4 11/28] tcg: move tcg_exec_all and helpers above thread fn

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: This is a pure mechanical change in preparation for up-coming re-factoring. Instead of a forward declaration for tcg_exec_all it and the associated helper functions are moved in front of the call from qemu_tcg_cpu_thread_fn. Signed-off-by: Alex Bennée

Re: [Qemu-devel] [RFC v4 09/28] tcg: protect TBContext with tb_lock.

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: Missing? Or just remove it. r~

Re: [Qemu-devel] [RFC v4 08/28] translate-all: Add assert_(memory|tb)_lock annotations

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: This adds calls to the assert_(memory|tb)_lock for all public APIs which are documented as needing them held for linux-user mode. The asserts are NOPs for system-mode although these will be converted when MTTCG is enabled. Signed-off-by: Alex Bennée

Re: [Qemu-devel] [RFC v4 07/28] linux-user/elfload: ensure mmap_lock() held while setting up

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: Future patches will enforce the holding of mmap_lock() when we are manipulating internal memory structures. Technically it doesn't matter in the case of elfload as we haven't started executing yet. However it is easier to grab the lock when required than

Re: [Qemu-devel] [RFC v4 06/28] tcg: comment on which functions have to be called with tb_lock held

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: From: Paolo Bonzini softmmu requires more functions to be thread-safe, because translation blocks can be invalidated from e.g. notdirty callbacks. Probably the same holds for user-mode emulation, it's just that no one has ever tried to produce a coher

Re: [Qemu-devel] [PULL 00/66] ppc-for-2.8 queue 20160906

2016-09-06 Thread Benjamin Herrenschmidt
On Wed, 2016-09-07 at 07:52 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-09-06 at 23:09 +0200, Thomas Huth wrote: > > > > The bad commit is: "ppc: Speed up load/store multiple" > > > > There are two "#if defined(HOST_WORDS_BIGENDIAN)" sections in this > > patch > > which are both bad: The

Re: [Qemu-devel] [RFC v2 0/4] adding mdev bus and vfio support

2016-09-06 Thread Jike Song
On 09/02/2016 11:03 PM, Alex Williamson wrote: > On Fri, 2 Sep 2016 16:16:08 +0800 > Jike Song wrote: > >> This patchset is based on NVidia's "Add Mediated device support" series, >> version 6: >> >> http://www.spinics.net/lists/kvm/msg136472.html > > > Hi Jike, > > I'm thrilled by your

Re: [Qemu-devel] [RFC v4 04/28] cpu-exec: include cpu_index in CPU_LOG_EXEC messages

2016-09-06 Thread Richard Henderson
On 08/11/2016 08:24 AM, Alex Bennée wrote: Even more important when debugging MTTCG is seeing which vCPU is currently executing. Signed-off-by: Alex Bennée --- cpu-exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options

2016-09-06 Thread Fam Zheng
On Tue, 09/06 18:18, Kevin Wolf wrote: > Am 08.08.2016 um 15:13 hat Fam Zheng geschrieben: > > To allow overriding the default locking behavior when opening the image. > > > > Signed-off-by: Fam Zheng > > --- > > qapi/block-core.json | 19 ++- > > 1 file changed, 18 insertions(+)

Re: [Qemu-devel] [PATCH v7 03/20] block: Add and parse "lock-mode" option for image locking

2016-09-06 Thread Fam Zheng
On Tue, 09/06 18:33, Kevin Wolf wrote: > > +lock_mode = qemu_opt_get(opts, BDRV_OPT_LOCK_MODE) ? : "off"; > > Am I missing some other place that overrides this or does it make the > default "off" rather than "auto"? It is in patch 19, once all tests are fixed (this patch cannot be reordered a

Re: [Qemu-devel] [PATCH v3 6/8] docker: make sure debootstrap is at least 1.0.67

2016-09-06 Thread Fam Zheng
On Tue, 09/06 22:05, Sascha Silbe wrote: > debootstrap prior to 1.0.67 generated an empty sources.list during > foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout > if the installed debootstrap version is too old. > > [1] https://bugs.debian.org/732255 > > Signed-off-by: Sascha

Re: [Qemu-devel] [PATCH v2 5/7] ppc/pnv: add a PnvCore object

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 08:14:37AM +0200, Cédric Le Goater wrote: > On 09/05/2016 06:02 AM, David Gibson wrote: > > On Wed, Aug 31, 2016 at 06:34:13PM +0200, Cédric Le Goater wrote: > >> This is largy inspired by sPAPRCPUCore with some simplification, no > >> hotplug for instance. But the differenc

Re: [Qemu-devel] [PATCH v2 6/7] ppc/pnv: add a XScomDevice to PnvCore

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 03:54:10PM +0200, Cédric Le Goater wrote: > On 09/05/2016 06:19 AM, David Gibson wrote: > > On Wed, Aug 31, 2016 at 06:34:14PM +0200, Cédric Le Goater wrote: > >> Now that we are using real HW ids for the cores in PowerNV chips, we > >> can route the XSCOM accesses to them.

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 07:45:49AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-09-06 at 16:42 +0200, Cédric Le Goater wrote: > > > Alternatively.. it might be simpler to just drop the SCOM as a > > > separate device.  I think you could just hang the scom bus directly > > > off the chip obje

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 04:42:01PM +0200, Cédric Le Goater wrote: > On 09/05/2016 05:39 AM, David Gibson wrote: > > On Wed, Aug 31, 2016 at 06:34:11PM +0200, Cédric Le Goater wrote: > >> From: Benjamin Herrenschmidt > >> > >> XSCOM is an interface to a sideband bus provided by the POWER8 chip > >>

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 04:42:58PM +0200, Cédric Le Goater wrote: > On 09/06/2016 02:48 AM, David Gibson wrote: > > On Mon, Sep 05, 2016 at 05:11:53PM +1000, Benjamin Herrenschmidt wrote: > >> On Mon, 2016-09-05 at 13:39 +1000, David Gibson wrote: > +static XScomDevice *xscom_find_target(XScom

Re: [Qemu-devel] [PATCH v2 7/7] monitor: fix crash for platforms without a CPU 0

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 08:28:48AM +0200, Cédric Le Goater wrote: > On 09/05/2016 06:27 AM, David Gibson wrote: > > On Wed, Aug 31, 2016 at 06:34:15PM +0200, Cédric Le Goater wrote: > >> On PowerNV, CPU ids start at 0x8 or 0x20, we don't have a CPU 0 > >> anymore. So let's use the first_cpu index t

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread David Gibson
On Wed, Sep 07, 2016 at 07:47:16AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2016-09-06 at 16:42 +0200, Cédric Le Goater wrote: > > > > The change does seem too invasive. I can give it a try in next > > version. > > > > When a memory region is triggered, the impacted device will have > > to

Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-06 Thread Eric Blake
On 09/06/2016 08:53 PM, Fam Zheng wrote: >>> >>> Too many blank lines? Otherwise looks good. >> >> You caught me sneaking in a PEP-8 compliance fix. ;) > > Ah, no problem. I just didn't know. > >> >> Is qemu using a custom code style for Python sources? If so, is it >> documented somewhere? > >

Re: [Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-09-06 Thread Fam Zheng
On Tue, 09/06 20:31, Sascha Silbe wrote: > Dear Fam, > > Fam Zheng writes: > > > On Wed, 08/24 20:30, Sascha Silbe wrote: > [tests/docker/docker.py] > >> @@ -25,6 +25,10 @@ from tarfile import TarFile, TarInfo > >> from StringIO import StringIO > >> from shutil import copy, rmtree > >> > >>

Re: [Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt

2016-09-06 Thread Dou Liyang
Hi, Eduardo At 09/07/2016 04:05 AM, Eduardo Habkost wrote: On Tue, Aug 23, 2016 at 01:17:01PM +0800, Dou Liyang wrote: Hi Alexandre, At 08/22/2016 04:56 PM, Alexandre DERUMIER wrote: Hello, I'm looking to implement cpu hotplug, and I have a question about cpu flags currently I have somethi

Re: [Qemu-devel] [PULL 00/66] ppc-for-2.8 queue 20160906

2016-09-06 Thread David Gibson
On Tue, Sep 06, 2016 at 11:26:34PM +0200, Thomas Huth wrote: > On 06.09.2016 22:55, Thomas Huth wrote: > > On 06.09.2016 22:23, Paolo Bonzini wrote: > >> > >> > >> On 06/09/2016 21:35, Thomas Huth wrote: > >>> D'oh! I'll have a look... > >>> > > I also see warnings on non-KVM hosts during 'make

Re: [Qemu-devel] [PATCH] tests/acpi: speedup acpi tests

2016-09-06 Thread Michael S. Tsirkin
On Tue, Sep 06, 2016 at 10:22:26PM +0200, Paolo Bonzini wrote: > > > On 06/09/2016 21:21, Michael S. Tsirkin wrote: > > On Tue, Sep 06, 2016 at 09:11:16PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 06/09/2016 17:51, Michael S. Tsirkin wrote: > Just use "-machine accel=kvm:tcg" and let QEM

Re: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy

2016-09-06 Thread Zhang Chen
On 09/06/2016 04:02 PM, Jason Wang wrote: On 2016年09月05日 17:37, Zhang Chen wrote: COLO-proxy is a part of COLO project. COLO project is composed of COLO-frame, COLO-proxy and block-replication. It is used to compare the network package to help COLO decide whether to do checkpoint. With COLO-

[Qemu-devel] [PATCH] hmp: Improve 'info mtree' with optional parm for mapinfo

2016-09-06 Thread Thorsten Kohfeldt
From: Thorsten Kohfeldt Date: Wed, 31 Aug 2016 22:43:14 +0200 Subject: [PATCH] hmp: Improve 'info mtree' with optional parm for mapinfo Motivation When 'tuning' 'quirks' for VFIO imported devices, it is not easy to directly grasp the implications of the priorisation algorithms in place for the '

Re: [Qemu-devel] [PATCH] eepro100: Frame Reception

2016-09-06 Thread Mateus Krepsky Ludwich
Ping. http://patchwork.ozlabs.org/patch/662355/ On Tue, Aug 23, 2016 at 1:46 PM, Mateus Krepsky Ludwich wrote: > Changed E100 device so it updates EOF, F, and Actual Count fields of Receive > Frame Descriptor (RFD). > Assuming RFD.actual_count equals to size. > > Signed-off-by: Mateus Krepsky L

[Qemu-devel] [PATCH v3 2/8] docker: avoid dependency on 'realpath' package

2016-09-06 Thread Sascha Silbe
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: Sascha Silbe --- Too bad there isn't a POSIX equiv

[Qemu-devel] [PATCH v3 4/8] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset

2016-09-06 Thread Sascha Silbe
The debian-bootstrap image doesn't choose a default architecture and distribution version, instead the user has to set both DEB_ARCH and DEB_TYPE in the environment. Print a reasonably helpful message if either of them isn't set instead of complaining about "qemu-" being missing or erroring out bec

[Qemu-devel] [PATCH v3 3/8] docker: debian-bootstrap.pre: print error messages to stderr

2016-09-06 Thread Sascha Silbe
Send error messages where they belong so they're seen even if stdout is redirected to /dev/null. Signed-off-by: Sascha Silbe --- v2→v3: - new patch tests/docker/dockerfiles/debian-bootstrap.pre | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/docker/dockerfile

[Qemu-devel] [PATCH v3 8/8] docker: silence debootstrap when --quiet is given

2016-09-06 Thread Sascha Silbe
If we silence docker when --quiet is given, we should also silence the .pre script (i.e. debootstrap). Only discards stdout, so some diagnostics (e.g. from git clone) are still printed. Most of the verbose output is gone however and this way we still have a chance to see error messages. Signed-of

[Qemu-devel] [PATCH v3 5/8] docker: print warning if EXECUTABLE is not set when building debootstrap image

2016-09-06 Thread Sascha Silbe
Building the debian-debootstrap image will usually fail if EXECUTABLE isn't set (when using the Makefile). Warn the user in this case so they know why it's failing. Signed-off-by: Sascha Silbe --- tests/docker/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/docker/M

Re: [Qemu-devel] [PATCH v4 2/3] tests: make pc_alloc_init/init_flags/uninit generic

2016-09-06 Thread Thomas Huth
On 06.09.2016 15:17, Laurent Vivier wrote: > And add support for ppc64. > > Signed-off-by: Laurent Vivier > --- > v2: > - remove useless parenthesis, inline > > tests/Makefile.include | 3 ++- > tests/libqos/libqos.h | 2 +- > tests/libqos/malloc-ppc64.c | 38 ++

Re: [Qemu-devel] [PATCH v4 3/3] tests: add RTAS command in the protocol

2016-09-06 Thread Greg Kurz
On Tue, 6 Sep 2016 15:17:57 +0200 Laurent Vivier wrote: > Add a first test to validate the protocol: > > - rtas/get-time-of-day compares the time > from the guest with the time from the host. > > Signed-off-by: Laurent Vivier > --- > v4: > - use qemu_strtoXXX() instead strtoXX() > > v3: >

[Qemu-devel] [PATCH v3 6/8] docker: make sure debootstrap is at least 1.0.67

2016-09-06 Thread Sascha Silbe
debootstrap prior to 1.0.67 generated an empty sources.list during foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout if the installed debootstrap version is too old. [1] https://bugs.debian.org/732255 Signed-off-by: Sascha Silbe --- v2→v3: - fix unbalanced white space aroun

[Qemu-devel] [PATCH v3 7/8] docker: build debootstrap after cloning

2016-09-06 Thread Sascha Silbe
When using the git version of debootstrap (because no usable version of debootstrap was installed on the host), we need to run 'make' so that devices.tar.gz gets built. Otherwise the first debootstrap stage will fail without printing any error message. Signed-off-by: Sascha Silbe --- tests/docke

Re: [Qemu-devel] [PULL 00/66] ppc-for-2.8 queue 20160906

2016-09-06 Thread Thomas Huth
n the git repository at: >> >> git://github.com/dgibson/qemu.git tags/ppc-for-2.8-20160906 >> >> for you to fetch changes up to 2ccbe3e29adb7c016bc5525d38d2a6e938c481af: >> >> tests: Check serial

Re: [Qemu-devel] [PATCH 1/9] tests: cris: force inlining

2016-09-06 Thread Edgar E. Iglesias
On Mon, Sep 05, 2016 at 01:54:04PM +0200, Rabin Vincent wrote: > From: Rabin Vincent > > The CRIS tests expect that functions marked inline are always inline. > With newer versions of GCC, building them results warnings like the > following and spurious failures when they are run. > > In file in

Re: [Qemu-devel] [PULL 00/66] ppc-for-2.8 queue 20160906

2016-09-06 Thread Benjamin Herrenschmidt
On Tue, 2016-09-06 at 23:09 +0200, Thomas Huth wrote: > The bad commit is: "ppc: Speed up load/store multiple" > > There are two "#if defined(HOST_WORDS_BIGENDIAN)" sections in this patch > which are both bad: The memcpy tries to copy 32-bit values into 64-bit > registers, which of course does not

Re: [Qemu-devel] [PATCH 5/9] target-cris: sync CC state at load/stores.

2016-09-06 Thread Edgar E. Iglesias
On Mon, Sep 05, 2016 at 12:02:14PM -0700, Richard Henderson wrote: > On 09/05/2016 04:54 AM, Rabin Vincent wrote: > >From: "Edgar E. Iglesias" > > > >Icount may choose to abort and recompile a TB at any load/store. We > >need to sync the CC state at these insns. > > > >Signed-off-by: Edgar E. Igl

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread Benjamin Herrenschmidt
On Wed, 2016-09-07 at 07:47 +1000, Benjamin Herrenschmidt wrote: > d be an extra op in the xscom device model I guess.  > > No. If you split the XSCOM bus from the MMIO -> XSCOM bridge (the > ADU) > then the conversion only happens in the former. You don't directly > route the MMIOs over ! You int

Re: [Qemu-devel] [PATCH] tests/acpi: speedup acpi tests

2016-09-06 Thread Michael S. Tsirkin
On Tue, Sep 06, 2016 at 09:11:16PM +0200, Paolo Bonzini wrote: > > > On 06/09/2016 17:51, Michael S. Tsirkin wrote: > > > Just use "-machine accel=kvm:tcg" and let QEMU do the hard work. :) > > > > > > Paolo > > > > Sounds good, but we really need to skip it when gsi > > capability is not there

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread Benjamin Herrenschmidt
On Tue, 2016-09-06 at 16:42 +0200, Cédric Le Goater wrote: > > Alternatively.. it might be simpler to just drop the SCOM as a > > separate device.  I think you could just hang the scom bus directly > > off the chip object.  IIUC the scom is basically the only chip- > level > > control mechanism, so

Re: [Qemu-devel] [PATCH v2 3/7] ppc/pnv: Add XSCOM infrastructure

2016-09-06 Thread Benjamin Herrenschmidt
On Tue, 2016-09-06 at 16:42 +0200, Cédric Le Goater wrote: > > The change does seem too invasive. I can give it a try in next > version. > > When a memory region is triggered, the impacted device will have > to convert the address with xscom_to_pcb_addr(). There is some  > dependency on the chip

Re: [Qemu-devel] [PATCH v4 2/3] tests: make pc_alloc_init/init_flags/uninit generic

2016-09-06 Thread Greg Kurz
On Tue, 6 Sep 2016 15:17:56 +0200 Laurent Vivier wrote: > And add support for ppc64. > > Signed-off-by: Laurent Vivier > --- > v2: > - remove useless parenthesis, inline > This works indeed but I'm just feeling curious about the QOSOps type introduced by the following commit: commit 90e5add

Re: [Qemu-devel] [PATCH v2 1/1] block-backend: allow flush on devices with open tray

2016-09-06 Thread John Snow
On 09/05/2016 05:15 AM, Markus Armbruster wrote: John Snow writes: On 09/02/2016 01:44 AM, Markus Armbruster wrote: John Snow writes: If a device still has an attached BDS because the medium has not yet been removed, we will be unable to migrate to a new host because blk_flush will retur

Re: [Qemu-devel] [virtio-dev][RFC v3] virtio-sdm: new device specification

2016-09-06 Thread Edgar E. Iglesias
Hi, Sorry for the delay. I have a few questions. I don't fully understand the purpose of this. Could you elaborate a little on that? You need a real IPI signal to drive this I guess, so it's a little bit of a chicken and egg problem. A useful feature I can see is multiplexing a single underlyin

Re: [Qemu-devel] [PATCH RFC v2 05/22] block/pcache: add aio requests into cache

2016-09-06 Thread Pavel Butsykin
On 01.09.2016 18:28, Kevin Wolf wrote: Am 29.08.2016 um 19:10 hat Pavel Butsykin geschrieben: For storing requests use an rbtree, here are add basic operations on the rbtree to work with cache nodes. Signed-off-by: Pavel Butsykin --- block/pcache.c | 190

Re: [Qemu-devel] [PULL 00/66] ppc-for-2.8 queue 20160906

2016-09-06 Thread Paolo Bonzini
On 06/09/2016 21:35, Thomas Huth wrote: > D'oh! I'll have a look... > >> > I also see warnings on non-KVM hosts during 'make check' which seem >> > to be produced by this new test: >> > >> > TEST: tests/boot-serial-test... (pid=2836) >> > /i386/boot-serial/isapc: >> > warning: TCG doesn't sup

Re: [Qemu-devel] [PATCH] tests/acpi: speedup acpi tests

2016-09-06 Thread Paolo Bonzini
On 06/09/2016 21:21, Michael S. Tsirkin wrote: > On Tue, Sep 06, 2016 at 09:11:16PM +0200, Paolo Bonzini wrote: >> >> >> On 06/09/2016 17:51, Michael S. Tsirkin wrote: Just use "-machine accel=kvm:tcg" and let QEMU do the hard work. :) Paolo >>> >>> Sounds good, but we really need

Re: [Qemu-devel] [PATCH v7 0/4] Add Mediated device support

2016-09-06 Thread Alex Williamson
On Wed, 7 Sep 2016 01:05:11 +0530 Kirti Wankhede wrote: > On 9/6/2016 11:10 PM, Alex Williamson wrote: > > On Sat, 3 Sep 2016 22:04:56 +0530 > > Kirti Wankhede wrote: > > > >> On 9/3/2016 3:18 AM, Paolo Bonzini wrote: > >>> > >>> > >>> On 02/09/2016 20:33, Kirti Wankhede wrote: >

Re: [Qemu-devel] [PULL 00/66] ppc-for-2.8 queue 20160906

2016-09-06 Thread Thomas Huth
On 06.09.2016 22:55, Thomas Huth wrote: > On 06.09.2016 22:23, Paolo Bonzini wrote: >> >> >> On 06/09/2016 21:35, Thomas Huth wrote: >>> D'oh! I'll have a look... >>> > I also see warnings on non-KVM hosts during 'make check' which seem > to be produced by this new test: > > TEST: t

[Qemu-devel] [PATCH V4] tests/acpi: speedup acpi tests

2016-09-06 Thread Marcel Apfelbaum
Use kvm acceleration if available. Disable kernel-irqchip and use qemu64 cpu for both kvm and tcg cases. Using kvm acceleration saves about a second and disabling kernel-irqchip has no visible performance impact. Acked-by: Michael S. Tsirkin Signed-off-by: Marcel Apfelbaum --- v3->v4: - Add c

  1   2   3   4   5   >