Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 08:33, Fam Zheng wrote: > bdrv_flush() uses a loop like > > while (rwco.ret == NOT_DONE) { > aio_poll(aio_context, true); > } > > to wait for thread pool, which may not get notified about the scheduled > BH right away, if there is no new event that wakes up a block

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 00:13, Programmingkid wrote: > Fix real cdrom access in Mac OS X so it can be used in QEMU. > It simply removes the r from a device file's name. This > allows for a real cdrom to be accessible to the guest. > It has been successfully tested with a Windows XP guest > in qemu-system-i

Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion

2015-07-02 Thread Fam Zheng
On Thu, 07/02 09:11, Paolo Bonzini wrote: > > > On 02/07/2015 08:33, Fam Zheng wrote: > > bdrv_flush() uses a loop like > > > > while (rwco.ret == NOT_DONE) { > > aio_poll(aio_context, true); > > } > > > > to wait for thread pool, which may not get notified about the scheduled >

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 09:18, Paolo Bonzini wrote: > > > On 02/07/2015 00:13, Programmingkid wrote: >> Fix real cdrom access in Mac OS X so it can be used in QEMU. >> It simply removes the r from a device file's name. This >> allows for a real cdrom to be accessible to the guest. >> It has been successf

[Qemu-devel] [PULL for-2.4 02/11] css: mss/mcss-e vs. migration

2015-07-02 Thread Cornelia Huck
Our main channel_subsys structure is not a device (yet), but we need to setup mss/mcss-e again if the guest had enabled it before. Use a hack that should catch most configurations (assuming that the guest will have enabled at least one device in higher subchannel sets or channel subsystems if it en

[Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4

2015-07-02 Thread Cornelia Huck
The following changes since commit d2966f804d70a244f5dde395fc5d22a50ed3e74e: Merge remote-tracking branch 'remotes/vivier/tags/pull-m68k-20150629' into staging (2015-06-29 17:03:20 +0100) are available in the git repository at: git://github.com/cohuck/qemu tags/s390x-20150702

[Qemu-devel] [PULL for-2.4 05/11] s390x/css: Add a callback for when subchannel gets disabled

2015-07-02 Thread Cornelia Huck
From: Thomas Huth We need a possibility to run code when a subchannel gets disabled. This patch adds the necessary infrastructure. Signed-off-by: Thomas Huth Signed-off-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin --- hw/s390x/css.c | 12 hw/s390x/css.h | 1 + 2 files chan

[Qemu-devel] [PULL for-2.4 03/11] s390-ccw.img: Consume service interrupts

2015-07-02 Thread Cornelia Huck
From: Christian Borntraeger We have to consume the outstanding service interrupt after each service call, otherwise a correct implementation will return CC=2 on subsequent service calls. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- pc-b

[Qemu-devel] [PULL for-2.4 06/11] s390x/virtio-ccw: add virtio set-revision call

2015-07-02 Thread Cornelia Huck
From: Thomas Huth Handle the virtio-ccw revision according to what the guest sets. When revision 1 is selected, we have a virtio-1 standard device with byteswapping for the virtio rings. When a channel gets disabled, we have to revert to the legacy behavior in case the next user of the device do

[Qemu-devel] [PULL for-2.4 07/11] s390x/virtio-ccw: support virtio-1 set_vq format

2015-07-02 Thread Cornelia Huck
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin --- hw/s390x/virtio-ccw

[Qemu-devel] [PULL for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs

2015-07-02 Thread Cornelia Huck
From: David Hildenbrand Whenever we touch the access control registers, we have to make sure that the values will make it into kvm. Otherwise the change will simply be lost. When synchronizing qemu and kvm, a normal KVM_PUT_RUNTIME_STATE does not take care of these registers. Let's simply trigge

[Qemu-devel] [PULL for-2.4 01/11] virtio-ccw: complete handling of guest-initiated resets

2015-07-02 Thread Cornelia Huck
For a guest-initiated reset, we need to not only reset the virtio device, but also reset the VirtioCcwDevice into a clean state. This includes resetting the indicators, or else a guest will not be able to e.g. switch from classic interrupts to adapter interrupts. Split off this routine into a new

[Qemu-devel] [PULL for-2.4 04/11] s390-ccw.img: update

2015-07-02 Thread Cornelia Huck
Update for "s390-ccw.img: Consume service interrupts". Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw.img | Bin 13616 -> 13784 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pc-bios/s390-ccw.img b/pc-bios/s390-ccw.img index 3c6b01fc8ef792bde7f84ec4cd9676fe4ed9811f..f643

[Qemu-devel] [PULL for-2.4 11/11] s390x/migration: Introduce 2.4 machine

2015-07-02 Thread Cornelia Huck
From: Christian Borntraeger The section footer changes commit f68945d42bab ("Add a protective section footer") and commit 37fb569c0198 ("Disable section footers on older machine types") broke migration for any non-versioned machines. This pinpoints a problem of s390-ccw machines: it needs to be

Re: [Qemu-devel] [PATCH pic32 v2 2/5] Fixed random index generation for TLBWR instruction. It was not quite random and did not skip Wired entries.

2015-07-02 Thread Antony Pavlov
On Tue, 30 Jun 2015 21:12:31 -0700 Serge Vakulenko wrote: > Signed-off-by: Serge Vakulenko > --- > hw/mips/cputimer.c | 18 +- > 1 file changed, 5 insertions(+), 13 deletions(-) > > diff --git a/hw/mips/cputimer.c b/hw/mips/cputimer.c > index 4f02a9f..94a29df 100644 > --- a/hw/

[Qemu-devel] [PULL for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified

2015-07-02 Thread Cornelia Huck
From: Christian Borntraeger commit fa92e218df1d ("s390x/ipl: avoid sign extension") introduced a regression: qemu-system-s390x -drive file=image.qcow,format=qcow2 does not boot, the bios states "No virtio-blk device found!" adding bootindex=1 does boot. The reason is that the uint32_t as retur

[Qemu-devel] [PULL for-2.4 08/11] virtio-ccw: migrate ->revision

2015-07-02 Thread Cornelia Huck
We need to migrate the revision field as well. No compatibility concerns as we already introduced migration of ->config_vector in this release. Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-07-02 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 07/02/2015 02:42 AM, Dr. David Alan Gilbert wrote: > > * Wen Congyang (we...@cn.fujitsu.com) wrote: > >> On 07/01/2015 04:11 PM, Dr. David Alan Gilbert wrote: > >>> * Wen Congyang (we...@cn.fujitsu.com) wrote: > On 07/01/2015 03:01 AM, Dr. Davi

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 09:39, Laurent Vivier wrote: > This code seems to be a cut'n'paste of an Apple example (bad...): > > https://developer.apple.com/library/mac/samplecode/CDROMSample/Listings/CDROMSample_CDROMSample_c.html > > Without this interesting comment: > > Add "r" before the BSD node na

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-07-02 Thread Wen Congyang
On 07/02/2015 03:54 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> On 07/02/2015 02:42 AM, Dr. David Alan Gilbert wrote: >>> * Wen Congyang (we...@cn.fujitsu.com) wrote: On 07/01/2015 04:11 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fu

[Qemu-devel] [PATCH] qcow2: remove unnecessary check

2015-07-02 Thread Alberto Garcia
The value of 'i' is guaranteed to be >= 0 Signed-off-by: Alberto Garcia --- block/qcow2-cache.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index ed92a09..53b8afc 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -281,9 +281,6 @@ st

Re: [Qemu-devel] [PATCHv2 1/4] Cleanup leftover CONFIG_ISA_MMIO

2015-07-02 Thread Peter Maydell
On 2 July 2015 at 06:53, David Gibson wrote: > Commit 61fcb62 "isa_mmio: delete" removed the CONFIG_ISA_MMIO switch and > the isa_mmio code controlled by it. However, a few of the default-configs > still set the variable, pointlessly. This cleans these up. > > Signed-off-by: David Gibson > ---

[Qemu-devel] [PATCH for-2.4 0/9 v3] KVM: Do I/O outside BQL whenever possible

2015-07-02 Thread Paolo Bonzini
This is the rebased and updated version of the patches I posted a couple months ago (well before soft freeze :)). This version introduces a qemu_mutex_iothread_locked() primitive in order to avoid recursive locking of the BQL. The previous attempts, which used functions such as address_space_rw_u

[Qemu-devel] [PATCH 1/9] main-loop: use qemu_mutex_lock_iothread consistently

2015-07-02 Thread Paolo Bonzini
The next patch will require the BQL to be always taken with qemu_mutex_lock_iothread(), while right now this isn't the case. Outside TCG mode this is not a problem. In TCG mode, we need to be careful and avoid the "prod out of compiled code" step if already in a VCPU thread. This is easily done

[Qemu-devel] [PATCH 4/9] exec: pull qemu_flush_coalesced_mmio_buffer() into address_space_rw/ld*/st*

2015-07-02 Thread Paolo Bonzini
As memory_region_read/write_accessor will now be run also without BQL held, we need to move coalesced MMIO flushing earlier in the dispatch process. Cc: Frederic Konrad Signed-off-by: Paolo Bonzini --- exec.c | 21 + memory.c | 12 2 files changed, 21 insertio

[Qemu-devel] [PATCH 7/9] kvm: Switch to unlocked PIO

2015-07-02 Thread Paolo Bonzini
From: Jan Kiszka Do not take the BQL before dispatching PIO requests of KVM VCPUs. Instead, address_space_rw will do it if necessary. This enables completely BQL-free PIO handling in KVM mode for upcoming devices with fine-grained locking. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 2/9] main-loop: introduce qemu_mutex_iothread_locked

2015-07-02 Thread Paolo Bonzini
This function will be used to avoid recursive locking of the iothread lock whenever address_space_rw/ld*/st* are called with the BQL held, which is almost always the case. Tracking whether the iothread is owned is very cheap (just use a TLS variable) but requires some care because now the lock mus

[Qemu-devel] [PATCH 9/9] kvm: Switch to unlocked MMIO

2015-07-02 Thread Paolo Bonzini
Do not take the BQL before dispatching MMIO requests of KVM VCPUs. Instead, address_space_rw will do it if necessary. This enables completely BQL-free MMIO handling in KVM mode for upcoming devices with fine-grained locking. Signed-off-by: Paolo Bonzini --- kvm-all.c | 3 +-- 1 file changed, 1 i

[Qemu-devel] [PATCH 3/9] memory: Add global-locking property to memory regions

2015-07-02 Thread Paolo Bonzini
From: Jan Kiszka This introduces the memory region property "global_locking". It is true by default. By setting it to false, a device model can request BQL-free dispatching of region accesses to its r/w handlers. The actual BQL break-up will be provided in a separate patch. Signed-off-by: Jan Ki

[Qemu-devel] [PATCH] check_section_footers: Check the correct section_id

2015-07-02 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The section footers check was incorrectly checking the section_id in the SaveStateEntry not the LoadStateEntry. These can validly be different if the two QEMU instances have instantiated their devices in a different order. The test only cares that we're finishing

[Qemu-devel] [PATCH 8/9] acpi: mark PMTIMER as unlocked

2015-07-02 Thread Paolo Bonzini
Accessing QEMU_CLOCK_VIRTUAL is thread-safe. Signed-off-by: Paolo Bonzini --- hw/acpi/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 0f201d8..fe6215a 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -528,6 +528,7 @@ void acpi_pm_tmr_init(ACPIR

[Qemu-devel] [PATCH 6/9] kvm: First step to push iothread lock out of inner run loop

2015-07-02 Thread Paolo Bonzini
From: Jan Kiszka This opens the path to get rid of the iothread lock on vmexits in KVM mode. On x86, the in-kernel irqchips has to be used because we otherwise need to synchronize APIC and other per-cpu state accesses that could be changed concurrently. Regarding pre/post-run callbacks, s390x an

Re: [Qemu-devel] [Qemu-block] [PATCH v3 2/2] virtio-blk: Use blk_drain() to drain IO requests

2015-07-02 Thread Stefan Hajnoczi
On Wed, Jul 1, 2015 at 4:52 PM, Markus Armbruster wrote: > Stefan Hajnoczi writes: > >> On Mon, Jun 29, 2015 at 08:10:20AM +0200, Markus Armbruster wrote: >>> Alexander Yarygin writes: >>> > Markus Armbruster writes: >>> > * Ignorant answer: I was told that the bdrv_drain_all()'s comment is >>>

[Qemu-devel] [PATCH 5/9] memory: let address_space_rw/ld*/st* run outside the BQL

2015-07-02 Thread Paolo Bonzini
From: Jan Kiszka The MMIO case is further broken up in two cases: if the caller does not hold the BQL on invocation, the unlocked one takes or avoids BQL depending on the locking strategy of the target memory region and its coalesced MMIO handling. In this case, the caller should not hold _any_

Re: [Qemu-devel] [PATCH 00/16] implement vNVDIMM

2015-07-02 Thread Stefan Hajnoczi
On Thu, Jul 02, 2015 at 02:34:05PM +0800, Xiao Guangrong wrote: > On 07/02/2015 02:17 PM, Michael S. Tsirkin wrote: > >On Wed, Jul 01, 2015 at 10:50:16PM +0800, Xiao Guangrong wrote: > >> hw/acpi/aml-build.c | 32 +- > >> hw/i386/acpi-build.c|9 +- > >> hw/i386/acpi-dsdt.dsl

Re: [Qemu-devel] [PATCH 00/16] implement vNVDIMM

2015-07-02 Thread Michael S. Tsirkin
On Thu, Jul 02, 2015 at 09:31:23AM +0100, Stefan Hajnoczi wrote: > On Thu, Jul 02, 2015 at 02:34:05PM +0800, Xiao Guangrong wrote: > > On 07/02/2015 02:17 PM, Michael S. Tsirkin wrote: > > >On Wed, Jul 01, 2015 at 10:50:16PM +0800, Xiao Guangrong wrote: > > >> hw/acpi/aml-build.c | 32 +-

Re: [Qemu-devel] [PATCHv2 3/4] Allow ISA bus to be configured out

2015-07-02 Thread Michael S. Tsirkin
On Thu, Jul 02, 2015 at 03:53:46PM +1000, David Gibson wrote: > Currently, the code to handle the legacy ISA bus is always included in > qemu. However there are lots of platforms that don't include ISA legacy > devies, and quite a few that have never used ISA legacy devices at all. > > This patch

Re: [Qemu-devel] [PATCHv2 0/4] Start allowing ISA to be configured out

2015-07-02 Thread Michael S. Tsirkin
On Thu, Jul 02, 2015 at 08:19:28AM +0200, Michael S. Tsirkin wrote: > On Thu, Jul 02, 2015 at 03:53:43PM +1000, David Gibson wrote: > > At the moment isa-bus.c is compiled unconditionally for all targets. > > However, some targets have never used legacy ISA devices. Many more > > targets have at l

Re: [Qemu-devel] [PATCH] check_section_footers: Check the correct section_id

2015-07-02 Thread Christian Borntraeger
Am 02.07.2015 um 10:22 schrieb Dr. David Alan Gilbert (git): > From: "Dr. David Alan Gilbert" > > The section footers check was incorrectly checking the section_id > in the SaveStateEntry not the LoadStateEntry. These can validly be different > if the two QEMU instances have instantiated their d

Re: [Qemu-devel] [PATCH v10 7/7] qemu-iotests: s390x: fix test 130

2015-07-02 Thread tu bo
I got one issue after running checkpatch.pl below, [gavin@oc646435 qemu]$ ./scripts/checkpatch.pl home/gavin/patch/v8/0007-qemu-iotests-s390x-fix-test-130.patch // ERROR: Invalid UTF-8, patch and commit message should be encoded in UTF-8// #52: FILE: tests/qemu-iotests/130.out:12:// +(qemu)

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-07-02 Thread Alexey Kardashevskiy
On 04/02/2015 03:46 PM, David Gibson wrote: On Thu, Apr 02, 2015 at 03:28:11PM +1100, Alexey Kardashevskiy wrote: On 11/19/2014 04:48 PM, Aravinda Prasad wrote: On Tuesday 11 November 2014 08:54 AM, David Gibson wrote: [..] So, this may not still be possible depending on whether the KVM s

[Qemu-devel] [PULL 03/17] qapi: Rename 'dirty-bitmap' mode to 'incremental'

2015-07-02 Thread Stefan Hajnoczi
From: John Snow If we wish to make differential backups a feature that's easy to access, it might be pertinent to rename the "dirty-bitmap" mode to "incremental" to make it clear what /type/ of backup the dirty-bitmap is helping us perform. This is an API breaking change, but 2.4 has not yet gon

[Qemu-devel] [PULL 00/17] Block patches

2015-07-02 Thread Stefan Hajnoczi
The following changes since commit d2966f804d70a244f5dde395fc5d22a50ed3e74e: Merge remote-tracking branch 'remotes/vivier/tags/pull-m68k-20150629' into staging (2015-06-29 17:03:20 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for

[Qemu-devel] [PULL 01/17] block/iscsi: add support for request timeouts

2015-07-02 Thread Stefan Hajnoczi
From: Peter Lieven libiscsi starting with 1.15 will properly support timeout of iscsi commands. The default will remain no timeout, but this can be changed via cmdline parameters, e.g.: qemu -iscsi timeout=30 -drive file=iscsi://... If a timeout occurs a reconnect is scheduled and the timed out

[Qemu-devel] [PULL 05/17] timer: Move NANOSECONDS_PER_SECONDS to timer.h

2015-07-02 Thread Stefan Hajnoczi
From: Alberto Garcia We want to be able to reuse this define by making it common to multiple QEMU modules. This also makes it an integer since there's no need for it to be a float. Signed-off-by: Alberto Garcia Message-id: 6375912849da2ab561046dd013684535ccecca44.1434113783.git.be...@igalia.c

[Qemu-devel] [PULL 08/17] qmp: Add optional bool "unmap" to drive-mirror

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng If specified as "true", it allows discarding on target sectors where source is not allocated. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/mirror.c| 8 ++-- blockdev.c| 5 + hmp.c | 2 +- include/bloc

[Qemu-devel] [PULL 02/17] qcow2: Handle EAGAIN returned from update_refcount

2015-07-02 Thread Stefan Hajnoczi
From: Jindřich Makovička Fixes a crash during image compression Signed-off-by: Jindřich Makovička Tested-by: Richard W.M. Jones Reviewed-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/qcow2-refcount.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) di

[Qemu-devel] [PULL 15/17] block/iscsi: restore compatiblity with libiscsi 1.9.0

2015-07-02 Thread Stefan Hajnoczi
From: Peter Lieven RHEL7 and others are stuck with libiscsi 1.9.0 since there unfortunately was an ABI breakage after that release. Signed-off-by: Peter Lieven Reviewed-by: Paolo Bonzini Message-id: 1435313881-19366-1-git-send-email...@kamp.de Signed-off-by: Stefan Hajnoczi --- block/iscsi.c

[Qemu-devel] [PULL 07/17] block: Add bdrv_get_block_status_above

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng Like bdrv_is_allocated_above, this function follows the backing chain until seeing BDRV_BLOCK_ALLOCATED. Base is not included. Reimplement bdrv_is_allocated on top. [Initialized bdrv_co_get_block_status_above() ret to 0 to silence mingw64 compiler warning about the unitialized

[Qemu-devel] [PULL 04/17] blockdev: no need to drain+flush in hmp_drive_del

2015-07-02 Thread Stefan Hajnoczi
From: Paolo Bonzini bdrv_close already does that, and in fact hmp_drive_del would need another drain after the flush (which bdrv_close does). So remove the duplication. Signed-off-by: Paolo Bonzini Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-id: 1

[Qemu-devel] [PULL 17/17] block: remove redundant check before g_slist_find()

2015-07-02 Thread Stefan Hajnoczi
From: Alberto Garcia An empty GSList is represented by a NULL pointer, therefore it's a perfectly valid argument for g_slist_find() and there's no need to make any additional check. Signed-off-by: Alberto Garcia Message-id: 1435583533-5758-1-git-send-email-be...@igalia.com Signed-off-by: Stefan

[Qemu-devel] [PULL 10/17] block: Fix dirty bitmap in bdrv_co_discard

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng Unsetting dirty globally with discard is not very correct. The discard may zero out sectors (depending on can_write_zeroes_with_unmap), we should replicate this change to destination side to make sure that the guest sees the same data. Calling bdrv_reset_dirty also troubles mirro

[Qemu-devel] [PULL 13/17] qemu-iotests: Add test case for mirror with unmap

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng This checks that the discard on mirror source that effectively zeroes data is also reflected by the data of target. Signed-off-by: Fam Zheng Reviewed-by: John Snow Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/132 | 59 +

Re: [Qemu-devel] [PATCH 14/16] nvdimm: support NFIT_CMD_GET_CONFIG_SIZE function

2015-07-02 Thread Stefan Hajnoczi
On Wed, Jul 01, 2015 at 10:50:30PM +0800, Xiao Guangrong wrote: > +static uint32_t dsm_cmd_config_size(struct dsm_buffer *in, struct dsm_out > *out) > +{ > +GSList *list = get_nvdimm_built_list(); > +PCNVDIMMDevice *nvdimm = get_nvdimm_device_by_handle(list, in->handle); > +uint32_t st

[Qemu-devel] [PULL 12/17] qemu-iotests: Make block job methods common

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/041| 66 ++- tests/qemu-iotests/iotests.py | 28 ++ 2 files changed, 43 insertions(

[Qemu-devel] [PULL 09/17] mirror: Do zero write on target if sectors not allocated

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng If guest discards a source cluster, mirroring with bdrv_aio_readv is overkill. Some protocols do zero upon discard, where it's best to use bdrv_aio_write_zeroes, otherwise, bdrv_aio_discard will be enough. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/mirro

Re: [Qemu-devel] [PATCH 00/16] implement vNVDIMM

2015-07-02 Thread Stefan Hajnoczi
On Wed, Jul 01, 2015 at 10:50:16PM +0800, Xiao Guangrong wrote: > == Background == > NVDIMM (A Non-Volatile Dual In-line Memory Module) is going to be supported > on Intel's platform. They are discovered via ACPI and configured by _DSM > method of NVDIMM device in ACPI. There has some suppo

[Qemu-devel] [PULL 11/17] block: Remove bdrv_reset_dirty

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng Using this function would always be wrong because a dirty bitmap must have a specific owner that consumes the dirty bits and calls bdrv_reset_dirty_bitmap(). Remove the unused function to avoid future misuse. Reviewed-by: Eric Blake Signed-off-by: Fam Zheng Reviewed-by: John S

[Qemu-devel] [PULL 14/17] iotests: Use event_wait in wait_ready

2015-07-02 Thread Stefan Hajnoczi
From: Fam Zheng Only poll the specific type of event we are interested in, to avoid stealing events that should be consumed by someone else. Suggested-by: John Snow Signed-off-by: Fam Zheng Reviewed-by: John Snow Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/iotests.py | 9 ++---

Re: [Qemu-devel] [PATCH] arm_mptimer: Fix timer shutdown

2015-07-02 Thread Peter Maydell
On 1 July 2015 at 22:15, Dmitry Osipenko wrote: > Timer, running in periodic mode, can't be stopped or coming one-shot tick > won't be canceled because timer control code just doesn't handle timer > disabling. Fix it by checking enable bit and deleting timer if bit isn't set. > > Signed-off-by: Dm

[Qemu-devel] [PULL 06/17] timer: Use a single definition of NSEC_PER_SEC for the whole codebase

2015-07-02 Thread Stefan Hajnoczi
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: c6e55468856ba0b8f95913c4da111cc0ef266541.1434113783.git.be...@igalia.com Signed-off-by: Stefan Hajnoczi --- hw/ppc/ppc.c | 2 -- hw/ppc/spapr_rtc.c | 3 +-- hw/timer/mc146818rtc.c | 1 - hw/usb/hcd-ehci.c |

[Qemu-devel] [PULL 16/17] block/nfs: limit maximum readahead size to 1MB

2015-07-02 Thread Stefan Hajnoczi
From: Peter Lieven a malicious caller could otherwise specify a very large value via the URI and force libnfs to allocate a large amount of memory for the readahead buffer. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Message-id: 1435317241-25585-1-git-send-email...@kamp.de Signed-off

Re: [Qemu-devel] [PULL 00/26] Migration pull request

2015-07-02 Thread Peter Maydell
On 1 July 2015 at 11:39, Juan Quintela wrote: > Hi > > This series includes: > - rdma fixes by Dave > - rdma memory fix by gonglei > - vmdescription for old machine types (dave) > - fix footers for power (dave) > - migration bitmap extensions (Li) > just fixed the compilation issues for linux-us

Re: [Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4

2015-07-02 Thread Peter Maydell
ble in the git repository at: > > git://github.com/cohuck/qemu tags/s390x-20150702 > > for you to fetch changes up to 70d0e39c62e47e16410433ff39419ad5867939cd: > > s390x/migration: Introduce 2.4 machine (2015-07-01 14:23:10 +0200) > > --

Re: [Qemu-devel] [PULL 00/26] Migration pull request

2015-07-02 Thread Wen Congyang
On 07/02/2015 05:31 PM, Peter Maydell wrote: > On 1 July 2015 at 11:39, Juan Quintela wrote: >> Hi >> >> This series includes: >> - rdma fixes by Dave >> - rdma memory fix by gonglei >> - vmdescription for old machine types (dave) >> - fix footers for power (dave) >> - migration bitmap extensions

[Qemu-devel] [PATCH 09/10] hw/mips/mips_int.c: use qemu_allocate_irq to fix memory leak

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/mips/mips_int.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index d740046..e463a46 100644 --- a/hw/mips/mips_int.c +++ b/hw/mips/mips_int.c @@

[Qemu-devel] [PATCH 06/10] hw/arm/palm.c: Fix misusing qemu_allocate_irqs

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Use qemu_allocate_irq instead of qemu_allocate_irqs to fix memory leak. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/palm.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/hw/arm/palm.c b/hw/arm/palm.c ind

[Qemu-devel] [PATCH 07/10] hw/arm/spitz.c: Fix misusing qemu_allocate_irqs

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Use qemu_allocate_irq instead of qemu_allocate_irqs to fix memory leak. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/spitz.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c in

[Qemu-devel] [PATCH 05/10] hw/sh4/r2d.c: convert r2d_fpga to QOM

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Convert r2d_fpga to QOM and this fixes the memory leak caused by qemu_allocate_irqs. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/sh4/r2d.c | 80 1 file changed, 64 insertions(+), 16 deletions(-)

[Qemu-devel] [PATCH 08/10] hw/arm/tosa.c: Fix misusing qemu_allocate_irqs

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Use qemu_allocate_irq instead of qemu_allocate_irqs to fix memory leak. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/tosa.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c index 73572eb..6

[Qemu-devel] [PATCH 04/10] hw/m68k/mcf_intc.c: convert mcf_intc to QOM

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Convert mcf_intc to QOM and this fixes the memory leak caused by qemu_allocate_irqs. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/m68k/mcf5208.c | 22 hw/m68k/mcf_intc.c| 69 +++ hw/n

[Qemu-devel] [PATCH 00/10] fix memory leak

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao This patch series are going to fix the memory leak caused by qemu_allocate_irqs. Patch 1-5 convert the device to QOM and store the irqs in DeviceState. Patch 6-10 use qemu_allocate_irq instead of qemu_allocate_irqs. Shannon Zhao (10): hw/ppc/ppc4xx_devs.c: Convert ppcuic to

[Qemu-devel] [PATCH 03/10] hw/m68k/mcf5206.c: convert m5206_mbar to QOM

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Convert m5206_mbar to QOM and this fixes the memory leak caused by qemu_allocate_irqs. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/m68k/an5206.c | 2 +- hw/m68k/mcf5206.c | 75 +-- include/hw/m68k/

[Qemu-devel] [PATCH 10/10] hw/openrisc/pic_cpu.c: use qemu_allocate_irq to fix memory leak

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/openrisc/pic_cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/openrisc/pic_cpu.c b/hw/openrisc/pic_cpu.c index 2af1d60..5060214 100644 --- a/hw/openrisc/pic_cpu.c +++ b/hw/openrisc/

[Qemu-devel] [PATCH 02/10] include/hw/sparc/grlib.h: Store irqs in DeviceState

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Use qdev_init_gpio_in to allocate irqs instead of qemu_allocate_irqs. This will store the irqs in DeviceState and use qdev_get_gpio_in to get the irq. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/sparc/leon3.c | 10 ++ include/hw/sparc/grli

Re: [Qemu-devel] [PULL for-2.4 00/11] s390x patches for 2.4

2015-07-02 Thread Cornelia Huck
; > > into staging (2015-06-29 17:03:20 +0100) > > > > are available in the git repository at: > > > > git://github.com/cohuck/qemu tags/s390x-20150702 > > > > for you to fetch changes up to 70d0e39c62e47e16410433ff39419ad5867939cd: &g

[Qemu-devel] [PATCH 01/10] hw/ppc/ppc4xx_devs.c: Convert ppcuic to QOM

2015-07-02 Thread Shannon Zhao
From: Shannon Zhao Convert ppcuic to QOM and this fixes the memory leak caused by qemu_allocate_irqs. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/ppc/ppc405.h | 6 ++--- hw/ppc/ppc405_boards.c | 6 ++--- hw/ppc/ppc405_uc.c | 68 +-

Re: [Qemu-devel] [PATCH 00/16] implement vNVDIMM

2015-07-02 Thread Paolo Bonzini
On 02/07/2015 11:20, Stefan Hajnoczi wrote: > > Currently, the NVDIMM driver has been merged into upstream Linux Kernel and > > this patchset tries to enable it in virtualization field > > From a device model perspective, have you checked whether it makes sense > to integrate nvdimms into the pc

[Qemu-devel] [PULL v2 for-2.4 03/11] s390-ccw.img: Consume service interrupts

2015-07-02 Thread Cornelia Huck
From: Christian Borntraeger We have to consume the outstanding service interrupt after each service call, otherwise a correct implementation will return CC=2 on subsequent service calls. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- pc-b

[Qemu-devel] [PULL v2 for-2.4 02/11] css: mss/mcss-e vs. migration

2015-07-02 Thread Cornelia Huck
Our main channel_subsys structure is not a device (yet), but we need to setup mss/mcss-e again if the guest had enabled it before. Use a hack that should catch most configurations (assuming that the guest will have enabled at least one device in higher subchannel sets or channel subsystems if it en

[Qemu-devel] [PULL v2 for-2.4 01/11] virtio-ccw: complete handling of guest-initiated resets

2015-07-02 Thread Cornelia Huck
For a guest-initiated reset, we need to not only reset the virtio device, but also reset the VirtioCcwDevice into a clean state. This includes resetting the indicators, or else a guest will not be able to e.g. switch from classic interrupts to adapter interrupts. Split off this routine into a new

[Qemu-devel] [PULL v2 for-2.4 05/11] s390x/css: Add a callback for when subchannel gets disabled

2015-07-02 Thread Cornelia Huck
From: Thomas Huth We need a possibility to run code when a subchannel gets disabled. This patch adds the necessary infrastructure. Signed-off-by: Thomas Huth Signed-off-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin --- hw/s390x/css.c | 12 hw/s390x/css.h | 1 + 2 files chan

[Qemu-devel] [PULL v2 for-2.4 11/11] s390x/migration: Introduce 2.4 machine

2015-07-02 Thread Cornelia Huck
From: Christian Borntraeger The section footer changes commit f68945d42bab ("Add a protective section footer") and commit 37fb569c0198 ("Disable section footers on older machine types") broke migration for any non-versioned machines. This pinpoints a problem of s390-ccw machines: it needs to be

[Qemu-devel] [PULL v2 for-2.4 08/11] virtio-ccw: migrate ->revision

2015-07-02 Thread Cornelia Huck
We need to migrate the revision field as well. No compatibility concerns as we already introduced migration of ->config_vector in this release. Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw

[Qemu-devel] [PULL v2 for-2.4 00/11] s390x patches for 2.4

2015-07-02 Thread Cornelia Huck
The following changes since commit d2966f804d70a244f5dde395fc5d22a50ed3e74e: Merge remote-tracking branch 'remotes/vivier/tags/pull-m68k-20150629' into staging (2015-06-29 17:03:20 +0100) are available in the git repository at: git://github.com/cohuck/qemu tags/s390x-20150702-v

[Qemu-devel] [PULL v2 for-2.4 07/11] s390x/virtio-ccw: support virtio-1 set_vq format

2015-07-02 Thread Cornelia Huck
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin --- hw/s390x/virtio-ccw

[Qemu-devel] [PULL v2 for-2.4 04/11] s390-ccw.img: update

2015-07-02 Thread Cornelia Huck
Update for "s390-ccw.img: Consume service interrupts". Signed-off-by: Cornelia Huck --- pc-bios/s390-ccw.img | Bin 13616 -> 13784 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pc-bios/s390-ccw.img b/pc-bios/s390-ccw.img index 3c6b01fc8ef792bde7f84ec4cd9676fe4ed9811f..f643

[Qemu-devel] [PULL v2 for-2.4 06/11] s390x/virtio-ccw: add virtio set-revision call

2015-07-02 Thread Cornelia Huck
From: Thomas Huth Handle the virtio-ccw revision according to what the guest sets. When revision 1 is selected, we have a virtio-1 standard device with byteswapping for the virtio rings. When a channel gets disabled, we have to revert to the legacy behavior in case the next user of the device do

[Qemu-devel] [PULL v2 for-2.4 10/11] s390x/gdb: synchronize cpu state after modifying acrs

2015-07-02 Thread Cornelia Huck
From: David Hildenbrand Whenever we touch the access control registers, we have to make sure that the values will make it into kvm. Otherwise the change will simply be lost. When synchronizing qemu and kvm, a normal KVM_PUT_RUNTIME_STATE does not take care of these registers. Let's simply trigge

[Qemu-devel] [PULL v2 for-2.4 09/11] s390x/ipl: Fix boot if no bootindex was specified

2015-07-02 Thread Cornelia Huck
From: Christian Borntraeger commit fa92e218df1d ("s390x/ipl: avoid sign extension") introduced a regression: qemu-system-s390x -drive file=image.qcow,format=qcow2 does not boot, the bios states "No virtio-blk device found!" adding bootindex=1 does boot. The reason is that the uint32_t as retur

Re: [Qemu-devel] [PATCH RFC 4/6] xen: Print and use errno where applicable.

2015-07-02 Thread Stefano Stabellini
On Wed, 1 Jul 2015, Konrad Rzeszutek Wilk wrote: > On Wed, Jul 01, 2015 at 02:01:07PM +0100, Stefano Stabellini wrote: > > On Mon, 29 Jun 2015, Konrad Rzeszutek Wilk wrote: > > > In Xen 4.6 commit cd2f100f0f61b3f333d52d1737dd73f02daee592 > > > "libxc: Fix do_memory_op to return negative value on er

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Stefan Hajnoczi
On Wed, Jul 1, 2015 at 11:13 PM, Programmingkid wrote: > Fix real cdrom access in Mac OS X so it can be used in QEMU. > It simply removes the r from a device file's name. This > allows for a real cdrom to be accessible to the guest. > It has been successfully tested with a Windows XP guest > in qe

Re: [Qemu-devel] [PATCH v4 0/4] Extend TPM support with a QEMU-external TPM

2015-07-02 Thread Stefan Berger
On 06/23/2015 11:42 AM, Michael S. Tsirkin wrote: On Tue, Jun 23, 2015 at 11:37:02AM -0400, Stefan Berger wrote: "Michael S. Tsirkin" wrote on 06/23/2015 09:52:34 AM: From: "Michael S. Tsirkin" To: Stefan Berger Cc: qemu-devel@nongnu.org, quan...@intel.com, Stefan Berger/Watson/IBM@IBMUS Da

Re: [Qemu-devel] qapi: What does "'gen': false" actually do, and when should I use it?

2015-07-02 Thread Markus Armbruster
Paolo Bonzini writes: > On 09/06/2015 10:42, Markus Armbruster wrote: >> Part 2: When to use it? >> >> We use 'gen': false when we can't (be bothered to) specify the exact >> type of an argument or result. >> >> Bad example: netdev_add >> >> We have arguments 'type': 'str' and '*props': '*

Re: [Qemu-devel] [PATCH] arm_mptimer: Fix timer shutdown

2015-07-02 Thread Dmitry Osipenko
Hello Peter, thanks a lot for comment. 02.07.2015 12:27, Peter Maydell пишет: Thanks; this does look like a bug. This change will mean we call timer_del() even if the timer was already disabled, though, so I think it would be slightly better to rearrange the existing logic something like this:

[Qemu-devel] [PATCH v3 1/2] migration: protect migration_bitmap

2015-07-02 Thread Li Zhijian
Signed-off-by: Li Zhijian Signed-off-by: Wen Congyang Signed-off-by: Juan Quintela --- migration/ram.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 57368e1..187dbbb 100644 --- a/migration/ram.c +++ b/migrati

Re: [Qemu-devel] [PULL 00/26] Migration pull request

2015-07-02 Thread Juan Quintela
Peter Maydell wrote: > On 1 July 2015 at 11:39, Juan Quintela wrote: >> Hi >> >> This series includes: >> - rdma fixes by Dave >> - rdma memory fix by gonglei >> - vmdescription for old machine types (dave) >> - fix footers for power (dave) >> - migration bitmap extensions (Li) >> just fixed th

[Qemu-devel] [PATCH v3 0/2] avoid a hotplug operation leading migration's source side abort

2015-07-02 Thread Li Zhijian
qemu migration's source side will exit unexpectedly when we hotplug a deivce during a migration is processing. we can reproduced it easily by following step 1. do something with dirty memory requently(like memtester) in guest 2. startup a background migration with '-d' option 3. hotplug a device(de

[Qemu-devel] [PATCH v3 2/2] migration: extend migration_bitmap

2015-07-02 Thread Li Zhijian
Prevously, if we hotplug a device(e.g. device_add e1000) during migration is processing in source side, qemu will add a new ram block but migration_bitmap is not extended. In this case, migration_bitmap will overflow and lead qemu abort unexpectedly. Signed-off-by: Li Zhijian Signed-off-by: Wen C

Re: [Qemu-devel] [PATCH] raw-posix.c: remove raw device access for cdrom

2015-07-02 Thread Laurent Vivier
On 02/07/2015 13:14, Stefan Hajnoczi wrote: > On Wed, Jul 1, 2015 at 11:13 PM, Programmingkid > wrote: >> Fix real cdrom access in Mac OS X so it can be used in QEMU. >> It simply removes the r from a device file's name. This >> allows for a real cdrom to be accessible to the guest. >> It has be

  1   2   3   4   >