Re: [Qemu-devel] [PATCH v9] Add optionrom compatible with fw_cfg DMA version

2016-05-27 Thread Richard W.M. Jones
On Fri, May 27, 2016 at 04:50:14PM -0700, Stefan Hajnoczi wrote: > On Mon, May 23, 2016 at 07:11:32PM +0100, Richard W.M. Jones wrote: > > v8 -> v9: > > > > - Add a workaround for GCC < 4.9. > > > > - Add linuxbios_dma.bin to Makefile. > > > > - Change Marc Mari's email address to new one. >

Re: [Qemu-devel] [PATCH v9] Add optionrom compatible with fw_cfg DMA version

2016-05-27 Thread Stefan Hajnoczi
On Mon, May 23, 2016 at 07:11:32PM +0100, Richard W.M. Jones wrote: > v8 -> v9: > > - Add a workaround for GCC < 4.9. > > - Add linuxbios_dma.bin to Makefile. > > - Change Marc Mari's email address to new one. > > - Tested on RHEL 7.2 (gcc-4.8.5-4.el7.x86_64). > > Rich. > Thanks, applied

Re: [Qemu-devel] [RFC PATCH v4 0/3] Add Mediated device support[was: Add vGPU support]

2016-05-27 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Friday, May 27, 2016 10:55 PM > > On Fri, 27 May 2016 11:02:46 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Wednesday, May 25, 2016 9:44 PM > > > > > > On Wed, 25 May

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/4] Drop virtio-{blk, scsi} op blockers

2016-05-27 Thread Stefan Hajnoczi
On Mon, May 23, 2016 at 10:19:34AM +0800, Fam Zheng wrote: > v2: Switch to bdrv_lookup_bs on target_bs. [Kevin] > Rebase onto master. > Add Michael's ack-by in virtio patches. > > We are ready to get rid of dataplane's op blockers altogether. Most operations > are already unblocked in virt

Re: [Qemu-devel] [RFC] virtio-blk: simple multithreaded MQ implementation for bdrv_raw

2016-05-27 Thread Stefan Hajnoczi
On Fri, May 27, 2016 at 01:55:04PM +0200, Roman Pen wrote: > Hello, all. > > This is RFC because mostly this patch is a quick attempt to get true > multithreaded multiqueue support for a block device with native AIO. > The goal is to squeeze everything possible on lockless IO path from > MQ block

Re: [Qemu-devel] [PATCH 0/9] virtio-blk: multiqueue support

2016-05-27 Thread Stefan Hajnoczi
On Tue, May 24, 2016 at 02:51:04PM +0200, Christian Borntraeger wrote: > On 05/21/2016 01:40 AM, Stefan Hajnoczi wrote: > > The virtio_blk guest driver has supported multiple virtqueues since Linux > > 3.17. > > This patch series adds multiple virtqueues to QEMU's virtio-blk emulated > > device. >

Re: [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqueue

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 21, 2016 at 05:37:27PM +0200, Paolo Bonzini wrote: > > > On 21/05/2016 01:40, Stefan Hajnoczi wrote: > > while (req) { > > qemu_put_sbyte(f, 1); > > Could you just put an extra 32-bit queue id here if num_queues > 1? A > guest with num_queues > 1 cannot be started on p

Re: [Qemu-devel] [PATCH 5/9] virtio-blk: multiqueue batch notify

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 21, 2016 at 06:02:52PM +0200, Paolo Bonzini wrote: > > > On 21/05/2016 01:40, Stefan Hajnoczi wrote: > > +while ((i = find_next_bit(s->batch_notify_vqs, nvqs, i)) < nvqs) { > > +VirtQueue *vq = virtio_get_queue(vdev, i); > > + > > +bitmap_clear(s->batch_notify_vqs,

Re: [Qemu-devel] [PATCH] tests: avoid coroutine pool test crash

2016-05-27 Thread Stefan Hajnoczi
On Fri, May 20, 2016 at 11:00:31AM -0700, Stefan Hajnoczi wrote: > Skip the test_co_queue test case if the coroutine pool is not enabled. > The test case does not work without the pool because it touches memory > belonging to a freed coroutine (on purpose). > > Reported-by: Eduardo Habkost > Sign

Re: [Qemu-devel] [PATCH] linux-user: provide frame information in x86-64 safe_syscall

2016-05-27 Thread Richard Henderson
On 05/27/2016 09:34 AM, Peter Maydell wrote: On 27 May 2016 at 17:21, Richard Henderson wrote: On 05/27/2016 08:06 AM, Peter Maydell wrote: @@ -31,6 +32,8 @@ safe_syscall_base: * does not list any ABI differences regarding stack alignment.) */ push%rbp +

Re: [Qemu-devel] [PATCH v6 04/15] include/processor.h: define cpu_relax()

2016-05-27 Thread Emilio G. Cota
On Fri, May 27, 2016 at 23:53:01 +0300, Sergey Fedorov wrote: > On 25/05/16 04:13, Emilio G. Cota wrote: > > Taken from the linux kernel. > > > > Reviewed-by: Richard Henderson > > Reviewed-by: Alex Bennée > > Signed-off-by: Emilio G. Cota > > --- > > include/qemu/processor.h | 30 +

Re: [Qemu-devel] [PATCH v6 04/15] include/processor.h: define cpu_relax()

2016-05-27 Thread Sergey Fedorov
On 25/05/16 04:13, Emilio G. Cota wrote: > Taken from the linux kernel. > > Reviewed-by: Richard Henderson > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota > --- > include/qemu/processor.h | 30 ++ > 1 file changed, 30 insertions(+) > create mode 100644 in

Re: [Qemu-devel] [PATCH v3 2/2] trace: [all] Add "guest_mem_before" event

2016-05-27 Thread Stefan Hajnoczi
On Wed, May 18, 2016 at 08:45:35PM +0200, Lluís Vilanova wrote: > Richard Henderson writes: > > > On 05/18/2016 03:47 AM, Lluís Vilanova wrote: > >> Signed-off-by: Lluís Vilanova > >> --- > >> include/exec/cpu_ldst_template.h | 25 > >> include/exec/cpu_ldst_useronly_te

Re: [Qemu-devel] [PATCH 0/3] trace: enable tracing in qemu-io/qemu-nbd

2016-05-27 Thread Denis V. Lunev
On 05/27/2016 11:39 PM, Stefan Hajnoczi wrote: On Tue, May 17, 2016 at 11:20:28AM +0300, Denis V. Lunev wrote: Actually this is a rework of the original patch, set as a part of write-zeroes patchset. Moving it out to process via trace tree. Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC:

Re: [Qemu-devel] [PATCH 0/3] trace: enable tracing in qemu-io/qemu-nbd

2016-05-27 Thread Stefan Hajnoczi
On Tue, May 17, 2016 at 11:20:28AM +0300, Denis V. Lunev wrote: > Actually this is a rework of the original patch, set as a part of write-zeroes > patchset. Moving it out to process via trace tree. > > Signed-off-by: Denis V. Lunev > CC: Paolo Bonzini > CC: Stefan Hajnoczi > CC: Kevin Wolf >

Re: [Qemu-devel] [PATCH 8/9] target-i386: Use "-" instead of "_" on all feature names

2016-05-27 Thread Eduardo Habkost
On Tue, May 24, 2016 at 03:22:27PM +0200, Igor Mammedov wrote: > On Tue, 24 May 2016 09:34:05 -0300 > Eduardo Habkost wrote: > > > On Tue, May 24, 2016 at 02:17:03PM +0200, Igor Mammedov wrote: > > > On Fri, 6 May 2016 15:11:31 -0300 > > > Eduardo Habkost wrote: [...] > > > > -/* Convert all '_

Re: [Qemu-devel] [libvirt] [PATCH 7/9] qmp: Add runnability information to query-cpu-definitions

2016-05-27 Thread Eduardo Habkost
Just noticed that I hadn't replied to this yet. Sorry for the long delay! On Thu, May 12, 2016 at 09:46:25AM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: [...] > > ## > > # @CpuDefinitionInfo: > > # > > # Virtual CPU definition. > > # > > # @name: the name of the CPU definition > > #

Re: [Qemu-devel] [PATCH v6 03/15] seqlock: rename write_lock/unlock to write_begin/end

2016-05-27 Thread Sergey Fedorov
On 25/05/16 04:13, Emilio G. Cota wrote: > It is a more appropriate name, now that the mutex embedded > in the seqlock is gone. > > Reviewed-by: Alex Bennée > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Sergey Fedorov > --- > cpus.c | 28 ++

Re: [Qemu-devel] [PATCH v6 02/15] seqlock: remove optional mutex

2016-05-27 Thread Sergey Fedorov
On 25/05/16 04:13, Emilio G. Cota wrote: > This option is unused; besides, it bloats the struct when not needed. > Let's just let writers define their own locks elsewhere. > > Reviewed-by: Alex Bennée > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Sergey Fedorov

Re: [Qemu-devel] [PATCH v6 01/15] compiler.h: add QEMU_ALIGNED() to enforce struct alignment

2016-05-27 Thread Sergey Fedorov
On 25/05/16 04:13, Emilio G. Cota wrote: > Reviewed-by: Richard Henderson > Reviewed-by: Alex Bennée > Signed-off-by: Emilio G. Cota Reviewed-by: Sergey Fedorov > --- > include/qemu/compiler.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/qemu/compiler.h b/include/qemu/c

Re: [Qemu-devel] [PATCH v3] target-i386: implement CPUID[0xB] (Extended Topology Enumeration)

2016-05-27 Thread Eduardo Habkost
On Thu, May 12, 2016 at 07:24:26PM +0200, Radim Krčmář wrote: > I looked at a dozen Intel CPU that have this CPUID and all of them > always had Core offset as 1 (a wasted bit when hyperthreading is > disabled) and Package offset at least 4 (wasted bits at <= 4 cores). > > QEMU uses more compact ID

[Qemu-devel] [PATCH] pc: Add 2.7 machine

2016-05-27 Thread Eduardo Habkost
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- This is blocking some patches from getting included (e.g. the CPUID[0xB] patch from Radim), so I'm submitting Igor's RFC as [PATCH]. I will add it to my x86-next queue so I can qu

Re: [Qemu-devel] [RFC v2 11/11] tcg: enable thread-per-vCPU

2016-05-27 Thread Sergey Fedorov
On 27/05/16 18:25, Paolo Bonzini wrote: > > On 27/05/2016 17:07, Sergey Fedorov wrote: >> 1. Make 'cpu->thread_kicked' access atomic >> 2. Remove global 'exit_request' and use per-CPU 'exit_request' >> 3. Change how 'current_cpu' is set >> 4. Reorganize round-robin CPU TCG threa

Re: [Qemu-devel] [PATCH 09/10] block: fix backup in vmdk format image

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 14, 2016 at 03:45:57PM +0300, Denis V. Lunev wrote: > From: Pavel Butsykin > > The vmdk format has the extents and bs->file can be equal to the first > extension. Before start of the backup we do detach the old context on the > target drive at the bdrv_attach_aio_context. For the vmdk

Re: [Qemu-devel] [PATCH 07/10] blockdev-backup: added support for data compression

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 14, 2016 at 03:45:55PM +0300, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > Signed-off-by: Pavel Butsykin > Sig

Re: [Qemu-devel] [PATCH 04/10] qcow: add qcow_co_write_compressed

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 14, 2016 at 03:45:52PM +0300, Denis V. Lunev wrote: > +qemu_co_mutex_lock(&s->lock); > +cluster_offset = get_cluster_offset(bs, sector_num << 9, 2, out_len, 0, > 0); > +qemu_co_mutex_unlock(&s->lock); > +if (cluster_offset == 0) { > +ret = -EIO; > +goto

Re: [Qemu-devel] [PATCH 06/10] drive-backup: added support for data compression

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 14, 2016 at 03:45:54PM +0300, Denis V. Lunev wrote: > From: Pavel Butsykin > > The idea is simple - backup is "written-once" data. It is written block > by block and it is large enough. It would be nice to save storage > space and compress it. > > The patch adds a flag to the qmp/hmp

Re: [Qemu-devel] [PATCH] linux-user: provide frame information in x86-64 safe_syscall

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 16:06, Peter Maydell wrote: > return_ERESTARTSYS: > /* code path when we didn't execute the syscall */ > +.cfi_restore_state > mov $-TARGET_ERESTARTSYS, %rax > pop %rbp > +.cfi_def_cfa_offset 8 > +.cfi_restore ebp These

Re: [Qemu-devel] [PATCH 03/10] vmdk: add vmdk_co_write_compressed

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 14, 2016 at 03:45:51PM +0300, Denis V. Lunev wrote: > From: Pavel Butsykin > > Added implementation of the vmdk_co_write_compressed function that > will allow us to safely use compressed writes for the vmdk from running > VMs. > > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis

Re: [Qemu-devel] [PATCH 02/10] qcow2: add qcow2_co_write_compressed

2016-05-27 Thread Stefan Hajnoczi
On Sat, May 14, 2016 at 03:45:50PM +0300, Denis V. Lunev wrote: > +qemu_co_mutex_lock(&s->lock); > +cluster_offset = \ > +qcow2_alloc_compressed_cluster_offset(bs, sector_num << 9, out_len); The backslash isn't necessary for wrapping lines in C. This kind of thing is only necessar

[Qemu-devel] [PATCH v13 3/8] hw/ptimer: Update .delta on period/freq change

2016-05-27 Thread Dmitry Osipenko
Delta value must be updated on period/freq change, otherwise running timer would be restarted (counter reloaded with old delta). Only m68k/mcf520x and arm/arm_timer devices are currently doing freq change correctly, i.e. stopping the timer. Perform delta update to fix affected devices and eliminate

[Qemu-devel] [PATCH v13 1/8] hw/ptimer: Fix issues caused by the adjusted timer limit value

2016-05-27 Thread Dmitry Osipenko
Multiple issues here related to the timer with a adjusted .limit value: 1) ptimer_get_count() returns incorrect counter value for the disabled timer after loading the counter with a small value, because adjusted limit value is used instead of the original. For instance: 1) ptimer_stop(t)

[Qemu-devel] [PATCH v13 2/8] hw/ptimer: Perform counter wrap around if timer already expired

2016-05-27 Thread Dmitry Osipenko
ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer would return counter = 0, which might be undesirable in case of polled timer. Do counter wrap around for periodic timer to keep it distributed. In order to achieve more accurate emulation behaviour of cert

[Qemu-devel] [PATCH v13 4/8] hw/ptimer: Support "on the fly" timer mode switch

2016-05-27 Thread Dmitry Osipenko
Allow switching between periodic <-> oneshot modes while timer is running. Signed-off-by: Dmitry Osipenko Reviewed-by: Peter Crosthwaite --- hw/core/ptimer.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 76ebe9b..d0b2

[Qemu-devel] [PATCH v13 6/8] hw/ptimer: Support running with counter = 0 by introducing new policy feature

2016-05-27 Thread Dmitry Osipenko
Currently ptimer prints error message and clears enable flag for an arming timer that has delta = load = 0. That actually is a valid case for most of the timers, like instant IRQ trigger for oneshot timer or continuous in periodic mode. There are different possible policies of how particular timer

[Qemu-devel] [PATCH v13 8/8] arm_mptimer: Convert to use ptimer

2016-05-27 Thread Dmitry Osipenko
Current ARM MPTimer implementation uses QEMUTimer for the actual timer, this implementation isn't complete and mostly tries to duplicate of what generic ptimer is already doing fine. Conversion to ptimer brings the following benefits and fixes: - Simple timer pausing implementation

[Qemu-devel] [PATCH v13 7/8] hw/ptimer: Fix counter - 1 returned by ptimer_get_count for the active timer

2016-05-27 Thread Dmitry Osipenko
Due to rounding down performed by ptimer_get_count, it returns counter - 1 for the active timer. That's incorrect because counter should decrement only after period been expired, not before. I.e. if running timer has been loaded with value X, then timer counter should stay with X until period expir

[Qemu-devel] [PATCH v13 0/8] PTimer fixes/features and ARM MPTimer conversion

2016-05-27 Thread Dmitry Osipenko
Hello, Current QEMU ARM MPTimer device model provides only a certain subset of the emulation behavior, so this patch series is supposed to add missing parts by converting the MPTimer to use generic ptimer helper. It fixes some important ptimer bugs and provides new features that are required for t

[Qemu-devel] [PATCH v13 5/8] hw/ptimer: Introduce ptimer_get_limit

2016-05-27 Thread Dmitry Osipenko
Currently ptimer users are used to store copy of the limit value, because ptimer doesn't provide facility to retrieve the limit. Let's provide it. Signed-off-by: Dmitry Osipenko Reviewed-by: Peter Crosthwaite --- hw/core/ptimer.c| 5 + include/hw/ptimer.h | 1 + 2 files changed, 6 inser

Re: [Qemu-devel] [PULL v3 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 17:11, Paolo Bonzini wrote: > The following changes since commit 2c56d06bafd8933d2a9c6e0aeb5d45f7c1fb5616: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-05-26 14:29:30 +0100) > > are available in the git repository at: > > git://gith

Re: [Qemu-devel] [PATCH] linux-user: provide frame information in x86-64 safe_syscall

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 17:21, Richard Henderson wrote: > On 05/27/2016 08:06 AM, Peter Maydell wrote: >> >> @@ -31,6 +32,8 @@ safe_syscall_base: >> * does not list any ABI differences regarding stack alignment.) >> */ >> push%rbp >> +.cfi_def_cfa_offset 16 >> +

Re: [Qemu-devel] [RFC PATCH v2 0/2] spapr: Memory hot-unplug support

2016-05-27 Thread Michael Roth
Quoting Thomas Huth (2016-05-27 10:48:45) > Hi Bharata, > > On 15.03.2016 05:38, Bharata B Rao wrote: > > This patchset adds memory hot removal support for PowerPC sPAPR. > > This new version switches to using the proposed "count-indexed" type of > > hotplug identifier which allows to hot remove

Re: [Qemu-devel] [PATCH] linux-user: provide frame information in x86-64 safe_syscall

2016-05-27 Thread Richard Henderson
On 05/27/2016 08:06 AM, Peter Maydell wrote: @@ -31,6 +32,8 @@ safe_syscall_base: * does not list any ABI differences regarding stack alignment.) */ push%rbp +.cfi_def_cfa_offset 16 +.cfi_offset rbp,-16 While this is correct, there are two other

[Qemu-devel] [PULL v3 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Paolo Bonzini
The following changes since commit 2c56d06bafd8933d2a9c6e0aeb5d45f7c1fb5616: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-05-26 14:29:30 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

[Qemu-devel] [PULL 23/31] scsi-disk: introduce dma_readv and dma_writev

2016-05-27 Thread Paolo Bonzini
These are replacements for blk_aio_readv and blk_aio_writev that allow customization of the data path. They reuse the DMA helpers' DMAIOFunc callback type, so that the same function can be used in either the QEMUSGList or the bounce-buffered case. This customization will be needed in the next pat

Re: [Qemu-devel] [PATCH v8 11/12] vfio: register aer resume notification handler for aer resume

2016-05-27 Thread Alex Williamson
On Fri, 27 May 2016 10:12:11 +0800 Zhou Jie wrote: > From: Chen Fan > > For supporting aer recovery, host and guest would run the same aer > recovery code, that would do the secondary bus reset if the error > is fatal, the aer recovery process: > 1. error_detected > 2. reset_link (if fatal)

[Qemu-devel] [PATCH v4 1/2] exec: [tcg] Track which vCPU is performing translation and execution

2016-05-27 Thread Lluís Vilanova
Information is tracked inside the TCGContext structure, and later used by tracing events with the 'tcg' and 'vcpu' properties. The 'cpu' field is used to check tracing of translation-time events ("*_trans"). The 'tcg_env' field is used to pass it to execution-time events ("*_exec"). Signed-off-by

[Qemu-devel] [PATCH v4 2/2] trace: [all] Add "guest_mem_before" event

2016-05-27 Thread Lluís Vilanova
The event is described in "trace-events". Note that the "MO_AMASK" flag is not traced, since it does not seem to affect the visible semantics of instructions. Signed-off-by: Lluís Vilanova --- include/exec/cpu_ldst_template.h | 25 include/exec/cpu_ldst_useronly_templ

[Qemu-devel] [PATCH v4 0/2] trace: Add event for vCPU memory accesses

2016-05-27 Thread Lluís Vilanova
This series adds an event to track information related to memory accesses performed by the guest CPUs ("guest_mem_before"). A future series might extend this to contain the physical address and memory value (e.g., "guest_mem_after"). Signed-off-by: Lluís Vilanova --- Changes in v4 -

Re: [Qemu-devel] [PATCH v4 1/1] Introduce "xen-load-devices-state"

2016-05-27 Thread Amit Shah
Dave, can you take a look? Thanks, On (Mon) 11 Apr 2016 [11:56:02], Changlong Xie wrote: > From: Wen Congyang > > Introduce a "xen-load-devices-state" QAPI command that can be used to > load the state of all devices, but not the RAM or the block devices of > the VM. > > We only have hmp comman

Re: [Qemu-devel] [RFC PATCH v2 0/2] spapr: Memory hot-unplug support

2016-05-27 Thread Thomas Huth
Hi Bharata, On 15.03.2016 05:38, Bharata B Rao wrote: > This patchset adds memory hot removal support for PowerPC sPAPR. > This new version switches to using the proposed "count-indexed" type of > hotplug identifier which allows to hot remove a number of LMBs starting > with a given DRC index. >

Re: [Qemu-devel] [PULL v2 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 17:30, Peter Maydell wrote: > This version fails on the "retypedefing a typedef" clang warning: > > /home/petmay01/linaro/qemu-for-merges/hw/scsi/scsi-disk.c:73:3: error: > redefinition of typedef 'SCSIDiskClass' is a C11 feature > [-Werror,-Wtypedef-redefinition] > } SCSIDiskClass

Re: [Qemu-devel] [RFC PATCH v4 2/3] VFIO driver for mediated PCI device

2016-05-27 Thread Alex Williamson
On Fri, 27 May 2016 10:03:31 + "Tian, Kevin" wrote: > > From: Kirti Wankhede > > Sent: Wednesday, May 25, 2016 9:05 PM > > > > > > >> +{ > > >> +int ret = -EINVAL; > > >> +struct phy_device *phy_dev = mdevice->phy_dev; > > >> + > > >> +if (dev_is_pci(phy_dev->dev)

Re: [Qemu-devel] [PULL v2 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 15:09, Paolo Bonzini wrote: > The following changes since commit 2c56d06bafd8933d2a9c6e0aeb5d45f7c1fb5616: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-05-26 14:29:30 +0100) > > are available in the git repository at: > > git://gith

Re: [Qemu-devel] [RFC v2 11/11] tcg: enable thread-per-vCPU

2016-05-27 Thread Sergey Fedorov
On 27/05/16 17:55, Paolo Bonzini wrote: > > On 27/05/2016 15:57, Sergey Fedorov wrote: >> 1. Make 'cpu->thread_kicked' access atomic >> 2. Remove global 'exit_request' and use per-CPU 'exit_request' >> 3. Change how 'current_cpu' is set >> 4. Reorganize round-robin CPU TCG thread function >> 5

Re: [Qemu-devel] [RFC v2 11/11] tcg: enable thread-per-vCPU

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 17:07, Sergey Fedorov wrote: >>> >> 1. Make 'cpu->thread_kicked' access atomic >>> >> 2. Remove global 'exit_request' and use per-CPU 'exit_request' >>> >> 3. Change how 'current_cpu' is set >>> >> 4. Reorganize round-robin CPU TCG thread function >>> >> 5. Enable 'mmap_lock' f

[Qemu-devel] [PATCH v2 19/19] linux-user: Avoid possible misalignment in target_to_host_siginfo()

2016-05-27 Thread Peter Maydell
Reimplement target_to_host_siginfo() to use __get_user(), which handles possibly misaligned source guest structures correctly. Signed-off-by: Peter Maydell --- linux-user/signal.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/linux-user/signal.c b/linux

Re: [Qemu-devel] [PATCH 2/2] macio: switch over to new byte-aligned DMA helpers

2016-05-27 Thread Mark Cave-Ayland
On 27/05/16 16:02, John Snow wrote: > On 05/27/2016 04:48 AM, Mark Cave-Ayland wrote: >> Now that the DMA helpers are byte-aligned they can be called directly from >> the macio routines rather than emulating byte-aligned accesses via multiple >> block-level accesses. >> >> Signed-off-by: Mark Cave

[Qemu-devel] [PATCH v2 15/19] linux-user: Use safe_syscall for kill, tkill and tgkill syscalls

2016-05-27 Thread Peter Maydell
Use the safe_syscall wrapper for the kill, tkill and tgkill syscalls. Without this, if a thread sent a SIGKILL to itself it could kill the thread before we had a chance to process a signal that arrived just before the SIGKILL, and that signal would get lost. We drop all the ifdeffery for tkill and

[Qemu-devel] [PATCH v2 07/19] linux-user: Fix race between multiple signals

2016-05-27 Thread Peter Maydell
If multiple host signals are received in quick succession they would be queued in TaskState then delivered to the guest in spite of signals being supposed to be blocked by the guest signal handler's sa_mask. Fix this by decoupling the guest signal mask from the host signal mask, so we can have prot

[Qemu-devel] [PATCH v2 04/19] linux-user: Factor out uses of do_sigprocmask() from sigreturn code

2016-05-27 Thread Peter Maydell
All the architecture specific handlers for sigreturn include calls to do_sigprocmask(SIGSETMASK, &set, NULL) to set the signal mask from the uc_sigmask in the context being restored. Factor these out into calls to a set_sigmask() function. The next patch will want to add code which is not run when

[Qemu-devel] [PATCH v2 05/19] linux-user: Define macro for size of host kernel sigset_t

2016-05-27 Thread Peter Maydell
Some host syscalls take an argument specifying the size of a host kernel's sigset_t (which isn't necessarily the same as that of the host libc's type of that name). Instead of hardcoding _NSIG / 8 where we do this, define and use a SIGSET_T_SIZE macro. Signed-off-by: Peter Maydell --- linux-user

[Qemu-devel] [PATCH] linux-user: provide frame information in x86-64 safe_syscall

2016-05-27 Thread Peter Maydell
Use cfi directives in the x86-64 safe_syscall to allow gdb to get backtraces right from within it. (In particular this will be quite a common situation if the user interrupts QEMU while it's in a blocked safe-syscall: at the point of the syscall insn RBP is in use for something else, and so gdb can

[Qemu-devel] [PATCH v2 08/19] linux-user: Remove redundant default action check in queue_signal()

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin Both queue_signal() and process_pending_signals() did check for default actions of signals, this is redundant and also causes fatal and stopping signals to incorrectly cause guest system calls to be interrupted. The code in queue_signal() is removed. Signed-off-by: Timot

[Qemu-devel] [PATCH v2 09/19] linux-user: Remove redundant gdb_queuesig()

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-22-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- gdbstub.c | 13 - include/exec/gdbstub.h | 1 - 2 files changed,

[Qemu-devel] [PATCH v2 06/19] linux-user: Use safe_syscall for sigsuspend syscalls

2016-05-27 Thread Peter Maydell
Use the safe_syscall wrapper for sigsuspend syscalls. This means that we will definitely deliver a signal that arrives before we do the sigsuspend call, rather than blocking first and delivering afterwards. Signed-off-by: Peter Maydell --- linux-user/syscall.c | 5 +++-- 1 file changed, 3 insert

Re: [Qemu-devel] [PATCH 2/2] macio: switch over to new byte-aligned DMA helpers

2016-05-27 Thread John Snow
On 05/27/2016 04:48 AM, Mark Cave-Ayland wrote: > Now that the DMA helpers are byte-aligned they can be called directly from > the macio routines rather than emulating byte-aligned accesses via multiple > block-level accesses. > > Signed-off-by: Mark Cave-Ayland > --- > hw/ide/macio.c | 213

[Qemu-devel] [PATCH v2 17/19] linux-user: Use both si_code and si_signo when converting siginfo_t

2016-05-27 Thread Peter Maydell
The siginfo_t struct includes a union. The correct way to identify which fields of the union are relevant is complicated, because we have to use a combination of the si_code and si_signo to figure out which of the union's members are valid. (Within the host kernel it is always possible to tell, bu

[Qemu-devel] [PATCH v2 03/19] linux-user: Fix stray tab-indent

2016-05-27 Thread Peter Maydell
Fix a stray tab-indented linux in linux-user/signal.c. Signed-off-by: Peter Maydell --- linux-user/signal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 5f98c71..5069c3f 100644 --- a/linux-user/signal.c +++ b/linux-user/sig

Re: [Qemu-devel] [RFC PATCH v4 0/3] Add Mediated device support[was: Add vGPU support]

2016-05-27 Thread Alex Williamson
On Fri, 27 May 2016 11:02:46 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Wednesday, May 25, 2016 9:44 PM > > > > On Wed, 25 May 2016 07:13:58 + > > "Tian, Kevin" wrote: > > > > > > From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >

[Qemu-devel] [PATCH v2 02/19] linux-user: Move handle_pending_signal() to avoid need for declaration

2016-05-27 Thread Peter Maydell
Move the handle_pending_signal() function above process_pending_signals() to avoid the need for a forward declaration. (Whitespace only change.) Signed-off-by: Peter Maydell --- linux-user/signal.c | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(

[Qemu-devel] [PATCH v2 12/19] linux-user: Block signals during sigaction() handling

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin Block signals while emulating sigaction. This is a non-interruptible syscall, and using block_signals() avoids races where the host signal handler is invoked and tries to examine the signal handler data structures while we are updating them. Signed-off-by: Timothy Edward

[Qemu-devel] [PATCH v2 10/19] linux-user: Remove real-time signal queuing

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin As host signals are now blocked whenever guest signals are blocked, the queue of realtime signals is now in Linux. The QEMU queue is now redundant and can be removed. (We already did not queue non-RT signals, and none of the calls to queue_signal() except the one in host_s

[Qemu-devel] [PATCH v2 11/19] linux-user: Queue synchronous signals separately

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin If a synchronous signal and an asynchronous signal arrive near simultaneously, and the signal number of the asynchronous signal is lower than that of the synchronous signal the the handler for the asynchronous would be called first, and then the handler for the synchronous

[Qemu-devel] [PATCH v2 01/19] linux-user: Factor out handle_signal code from process_pending_signals()

2016-05-27 Thread Peter Maydell
Factor out the code to handle a single signal from the process_pending_signals() function. The use of goto for flow control is OK currently, but would get significantly uglier if extended to allow running the handle_signal code multiple times. Signed-off-by: Peter Maydell --- linux-user/signal.c

Re: [Qemu-devel] [RFC v2 11/11] tcg: enable thread-per-vCPU

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 15:57, Sergey Fedorov wrote: > 1. Make 'cpu->thread_kicked' access atomic > 2. Remove global 'exit_request' and use per-CPU 'exit_request' > 3. Change how 'current_cpu' is set > 4. Reorganize round-robin CPU TCG thread function > 5. Enable 'mmap_lock' for system mode emulation

[Qemu-devel] [PATCH v2 13/19] linux-user: pause() should not pause if signal pending

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin Fix races between signal handling and the pause syscall by reimplementing it using block_signals() and sigsuspend(). (Using safe_syscall(pause) would also work, except that the pause syscall doesn't exist on all architectures.) Signed-off-by: Timothy Edward Baldwin Messa

[Qemu-devel] [PATCH v2 14/19] linux-user: Restart exit() if signal pending

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin Without this a signal could vanish on thread exit. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-26-git-send-email-t.e.baldwi...@members.leeds.ac.uk Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- linux-user/syscall.c | 8 ++-- 1 f

[Qemu-devel] [PATCH v2 16/19] linux-user: Restart fork() if signals pending

2016-05-27 Thread Peter Maydell
From: Timothy E Baldwin If there is a signal pending during fork() the signal handler will erroneously be called in both the parent and child, so handle any pending signals first. Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-20-git-send-email-t.e.baldwi...@members.leeds.ac

[Qemu-devel] [PATCH v2 18/19] linux-user: Avoid possible misalignment in host_to_target_siginfo()

2016-05-27 Thread Peter Maydell
host_to_target_siginfo() is implemented by a combination of host_to_target_siginfo_noswap() followed by tswap_siginfo(). The first of these two functions assumes that the target_siginfo_t it is writing to is correctly aligned, but the pointer passed into host_to_target_siginfo() is directly from th

[Qemu-devel] [PATCH v2 00/19] linux-user: fix various signal race conditions

2016-05-27 Thread Peter Maydell
This patchset overhauls the linux-user signal handling code to fix a number of race conditions. It is essentially a v2 of Timothy Baldwin's original patchset, though I have addressed code review issues, refactored it a little, fixed the occasional minor bug and added some patches of my own for oth

[Qemu-devel] [PATCH v6 11/15] docker: Add mingw test

2016-05-27 Thread Fam Zheng
Reviewed-by: Alex Bennée Signed-off-by: Fam Zheng --- tests/docker/test-mingw | 34 ++ 1 file changed, 34 insertions(+) create mode 100755 tests/docker/test-mingw diff --git a/tests/docker/test-mingw b/tests/docker/test-mingw new file mode 100755 index 000..

Re: [Qemu-devel] [PATCH v2 10/12] tcg/tci: Add support for fence

2016-05-27 Thread Pranith Kumar
Hi Sergey, Sergey Fedorov writes: > On 27/05/16 04:00, Richard Henderson wrote: >> diff --git a/tci.c b/tci.c >> index b488c0d..53b3f71 100644 >> --- a/tci.c >> +++ b/tci.c >> @@ -1236,6 +1236,9 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t >> *tb_ptr) >> tcg_abort()

Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Richard W.M. Jones
On Fri, May 27, 2016 at 04:06:07PM +0200, Paolo Bonzini wrote: > > > On 27/05/2016 15:38, Richard W.M. Jones wrote: > > One way to solve this (which works for me) is as below. There are > > some other approaches, eg. using -fno-leading-underscore, or using a > > conditional macro to mangle the n

Re: [Qemu-devel] [RFC v2 11/11] tcg: enable thread-per-vCPU

2016-05-27 Thread Sergey Fedorov
On 05/04/16 18:32, Alex Bennée wrote: > From: KONRAD Frederic > > This allows the user to switch on multi-thread behaviour and spawn a > thread per-vCPU. For a simple test like: > > ./arm/run ./arm/locking-test.flat -smp 4 -tcg mttcg=on > > Will now use 4 vCPU threads and have an expected FAIL (

Re: [Qemu-devel] [PATCH v2 01/12] Introduce TCGOpcode for fence instruction

2016-05-27 Thread Pranith Kumar
Sergey Fedorov writes: > On 27/05/16 04:00, Richard Henderson wrote: >> diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h >> index 6d0410c..b772d90 100644 >> --- a/tcg/tcg-opc.h >> +++ b/tcg/tcg-opc.h >> @@ -42,6 +42,8 @@ DEF(br, 0, 0, 1, TCG_OPF_BB_END) >> # define IMPL64 TCG_OPF_64BIT >> #endif >>

Re: [Qemu-devel] [PATCH v2 10/12] tcg/tci: Add support for fence

2016-05-27 Thread Pranith Kumar
On Fri, May 27, 2016 at 10:20 AM, Sergey Fedorov wrote: +case INDEX_op_fence: +smp_mb(); +break; default: TODO(); break; >>> A bit of bike-shedding. While there's no common ISA term for "memory >>> bar

[Qemu-devel] [PULL 01/31] Add optionrom compatible with fw_cfg DMA version

2016-05-27 Thread Paolo Bonzini
From: Marc Marí This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí Signed-off-by: Richard W.M. Jones Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com> [Add -fno-toplevel-reorder and fix Win32 compilation. - Paolo] Signed-off-by: Paolo Bonzini --- .gitignore

[Qemu-devel] [PULL v2 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Paolo Bonzini
The following changes since commit 2c56d06bafd8933d2a9c6e0aeb5d45f7c1fb5616: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-05-26 14:29:30 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch

Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 15:38, Richard W.M. Jones wrote: > One way to solve this (which works for me) is as below. There are > some other approaches, eg. using -fno-leading-underscore, or using a > conditional macro to mangle the name. However I have no idea if there > is some preferred way. > > Rich. >

Re: [Qemu-devel] [PATCH v2 10/12] tcg/tci: Add support for fence

2016-05-27 Thread Sergey Fedorov
On 27/05/16 17:17, Pranith Kumar wrote: > Hi Sergey, > > Sergey Fedorov writes: > >> On 27/05/16 04:00, Richard Henderson wrote: >>> diff --git a/tci.c b/tci.c >>> index b488c0d..53b3f71 100644 >>> --- a/tci.c >>> +++ b/tci.c >>> @@ -1236,6 +1236,9 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, u

Re: [Qemu-devel] [PULL 01/31] Add optionrom compatible with fw_cfg DMA version

2016-05-27 Thread Richard W.M. Jones
On Fri, May 27, 2016 at 04:09:32PM +0200, Paolo Bonzini wrote: > From: Marc Marí > > This optionrom is based on linuxboot.S. > > Signed-off-by: Marc Marí > Signed-off-by: Richard W.M. Jones > Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com> > [Add -fno-toplevel-reorder and fix

Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 14:38, Richard W.M. Jones wrote: > On Fri, May 27, 2016 at 02:04:52PM +0100, Peter Maydell wrote: >> With V=1: >> >> i686-w64-mingw32-ld -m i386pe -Ttext 0 -e _start -s -o >> linuxboot_dma.img linuxboot_dma.o >> linuxboot_dma.o:linuxboot_dma.c:(.text+0x57): undefined reference to

[Qemu-devel] [PATCH v6 12/15] docker: Add travis tool

2016-05-27 Thread Fam Zheng
The script is not prefixed with test- so it won't run with "make docker-test", because it can take too long. Run it with "make docker-travis@ubuntu". Reviewed-by: Alex Bennée Signed-off-by: Fam Zheng --- tests/docker/travis| 21 + tests/docker/travis.py | 48 +++

[Qemu-devel] [PATCH v6 14/15] docker: Add EXTRA_CONFIGURE_OPTS

2016-05-27 Thread Fam Zheng
Whatever passed in this variable will be appended to all configure commands. Signed-off-by: Fam Zheng Reviewed-by: Alex Bennée --- tests/docker/Makefile.include | 3 +++ tests/docker/common.rc| 1 + 2 files changed, 4 insertions(+) diff --git a/tests/docker/Makefile.include b/tests/doc

Re: [Qemu-devel] [PULL v2 00/38] linux-user pull request

2016-05-27 Thread Peter Maydell
available in the git repository at: > > git://git.linaro.org/people/riku.voipio/qemu.git > tags/pull-linux-user-20160527 > > for you to fetch changes up to 49e55cbacf4ad08f831b9f3f9cb0f3082883a3a1: > > linux-user,t

[Qemu-devel] [PATCH v6 07/15] docker: Add common.rc

2016-05-27 Thread Fam Zheng
"requires" checks the "FEATURE" environment for specified prerequisits, and skip the execution of test if not found. "build_qemu" is the central routine to compile QEMU for tests to call. Reviewed-by: Alex Bennée Signed-off-by: Fam Zheng --- tests/docker/common.rc | 31

[Qemu-devel] [PATCH v6 15/15] MAINTAINERS: Add tests/docker

2016-05-27 Thread Fam Zheng
Reviewed-by: Alex Bennée Signed-off-by: Fam Zheng --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3c949d5..091272e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1615,3 +1615,10 @@ Build system architecture M: Daniel P. Berrange S: Od

Re: [Qemu-devel] [PATCH v3] linux-user: Fix qemu-binfmt-conf.h to store config across reboot

2016-05-27 Thread Alexander Graf
On 05/25/2016 05:51 PM, Laurent Vivier wrote: Le 25/02/2016 à 17:28, Laurent Vivier a écrit : Please, Alex, Michael: We need your ack/review. Someone? :) It's definitely an improvement over today's situation. Reviewed-by: Alexander Graf Alex

[Qemu-devel] [PATCH v6 13/15] docs: Add text for tests/docker in build-system.txt

2016-05-27 Thread Fam Zheng
Reviewed-by: Alex Bennée Signed-off-by: Fam Zheng --- docs/build-system.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/build-system.txt b/docs/build-system.txt index 5ea..2af1e66 100644 --- a/docs/build-system.txt +++ b/docs/build-system.txt @@ -438,6 +438,11 @@ top level

  1   2   3   >