[Qemu-devel] [PATCH V3 3/6] KVM: add support for any length io eventfd

2015-11-06 Thread Jason Wang
Signed-off-by: Jason Wang --- include/sysemu/kvm.h | 8 kvm-all.c| 4 kvm-stub.c | 1 + 3 files changed, 13 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 4ac6176..b31f325 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm

[Qemu-devel] [PATCH V3 0/6] virtio 1.0 pci optimizations and fixes

2015-11-06 Thread Jason Wang
Hi all: This series tries to fix the following issues: - qemu abort when trying to adjust endianness for zero length eventfd, this prevent fast mmio eventfd from being used in ppc. Fixing by skip the endianness adjustment for zero length eventfd. - 1.0 mmio is slow since it was using datamatc

[Qemu-devel] [PATCH V3 1/6] virtio-pci: fix 1.0 virtqueue migration

2015-11-06 Thread Jason Wang
We don't migrate the followings fields for virtio-pci: uint32_t dfselect; uint32_t gfselect; uint32_t guest_features[2]; struct { uint16_t num; bool enabled; uint32_t desc[2]; uint32_t avail[2]; uint32_t used[2]; } vqs[VIRTIO_QUEUE_MAX]; This will confuse driver if migrating d

[Qemu-devel] [PATCH V3 4/6] virtio-pci: use zero length mmio eventfd for 1.0 notification cap when possible

2015-11-06 Thread Jason Wang
We use data match eventfd for 1.0 notification currently. This could be slow since software decoding is needed for mmio exit. To speed this up, we can switch to use zero length mmio eventfd for 1.0 notification since we can examine the queue index directly from the writing address. KVM kernel modul

[Qemu-devel] [PATCH V3 2/6] memory: don't try to adjust endianness for zero length eventfd

2015-11-06 Thread Jason Wang
There's no need to adjust endianness for zero length eventfd since the data wrote was actually ignored by kernel. So skip the adjust in this case to fix a possible crash when trying to use wildcard mmio eventfd in ppc. Cc: Greg Kurz Cc: Peter Maydell Cc: Paolo Bonzini Acked-by: Greg Kurz Signe

[Qemu-devel] [PATCH V3 5/6] virtio-pci: introduce pio notification capability for modern device

2015-11-06 Thread Jason Wang
We used to use mmio for notification. This could be slow on some arch (e.g on x86 without EPT). So this patch introduces pio bar and a pio notification cap for modern device. This ability is enabled through property "modern-pio-notify" for virtio pci devices and was disabled by default. Management

[Qemu-devel] [PATCH V3 6/6] virtio-pci: unbreak queue_enable read

2015-11-06 Thread Jason Wang
Guest always get zero when reading queue_enable. This violates spec. Fixing this by setting the queue_enable to true during any guest writing and setting it to zero during reset. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 7 +++ 1 file changed, 7 insertion

Re: [Qemu-devel] [PATCH v2] qemu-sockets: do not test path with access() before unlinking

2015-11-06 Thread Michael Tokarev
04.11.2015 16:48, Paolo Bonzini wrote: > Using access() is a time-of-check/time-of-use race condition. It is > okay to use them to provide better error messages, but that is pretty > much it. Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3

2015-11-06 Thread Michael Tokarev
14.10.2015 20:43, Julio Guerra wrote: > Fix the index used to read the IBAT's vector which results in IBAT0..3 instead > of IBAT4..N. > > The bug appeared by saving/restoring contexts including IBATs values. Applied to -trivial. It'd be *much* better if such changes were accepted by the maintain

Re: [Qemu-devel] [PATCH Trivial V2] hw/intc/arm_gic: Remove the definition of NUM_CPU

2015-11-06 Thread Michael Tokarev
05.11.2015 20:24, Wei Huang wrote: > arm_gic.c retrieves CPU number using either NUM_CPU(s) or s->num_cpu. > Such mixed-uses make source code inconsistent. This patch removes > NUM_CPU(s), which was defined for MPCore tweak long ago, and instead > favors s->num_cpu. The source is more consistent af

[Qemu-devel] [PATCH] ppc: Add/Re-introduce MMU model definitions needed by PR KVM

2015-11-06 Thread Bharata B Rao
Commit aa4bb5875231 (ppc: Add mmu_model defines for arch 2.03 and 2.07) removed the mmu_model definition POWERPC_MMU_2_06a which is needed by PR KVM. Reintroduce it and also add POWERPC_MMU_2_07a. This fixes QEMU crash (qemu: fatal: Unknown MMU model) during booting of PR KVM guest. Signed-off-by

Re: [Qemu-devel] [PULL 00/37] Block layer patches

2015-11-06 Thread Kevin Wolf
Am 05.11.2015 um 20:01 hat Peter Maydell geschrieben: > On 5 November 2015 at 18:17, Kevin Wolf wrote: > > The following changes since commit 8835b9df3bddf332c883c861d6a1defc12c4ebe9: > > > > Merge remote-tracking branch > > 'remotes/mdroth/tags/qga-pull-2015-11-04-tag' into staging (2015-11-05

Re: [Qemu-devel] [Qemu-block] [PATCH v10 12/14] block: add transactional properties

2015-11-06 Thread Kevin Wolf
Am 05.11.2015 um 19:52 hat John Snow geschrieben: > > > On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: > > On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: > >> > >> > >> On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: > >>> On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote: > >>

Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-06 Thread Pierre Morel
On 11/05/2015 05:32 PM, Paolo Bonzini wrote: On 05/11/2015 17:18, Pierre Morel wrote: The size of a memory area can never be negative. It follows it must be defined as an unsigned value. Let's modify the memory regions size to unsigned 128 integer and modify accordingly the 128 bit ari

Re: [Qemu-devel] [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-06 Thread Xiao Guangrong
On 11/05/2015 10:49 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 21:33:39 +0800 Xiao Guangrong wrote: On 11/05/2015 09:03 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong wrote: On 11/05/2015 05:58 PM, Igor Mammedov wrote: On Mon, 2 Nov 2015 17:13:27 +0800 X

[Qemu-devel] [PATCH V3 3/6] ide: add support for IDEBufferedRequest

2015-11-06 Thread Peter Lieven
this patch adds a new aio readv compatible function which copies all data through a bounce buffer. These buffered requests can be flagged as orphaned which means that their original callback has already been invoked and the request has just not been completed by the backend storage. The bounce buff

[Qemu-devel] [PATCH V3 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-06 Thread Peter Lieven
This series aims at avoiding a hanging main-loop if a vserver has a CDROM image mounted from a NFS share and that NFS share goes down. Typical situation is that users mount an CDROM ISO to install something and then forget to eject that CDROM afterwards. As a consequence this mounted CD is able to

[Qemu-devel] [PATCH V3 2/6] block: add blk_abort_aio_request

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/block-backend.c | 17 + include/sysemu/block-backend.h | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 19fdaae..b13dc4e 100644 --- a/block/block-backend.c +

[Qemu-devel] [PATCH V3 4/6] ide: orphan all buffered requests on DMA cancel

2015-11-06 Thread Peter Lieven
If the guests canceles a DMA request we can prematurely invoke all callbacks of buffered requests and flag all them as orphaned. Ideally this avoids the need for draining all requests. For CDROM devices this works in 100% of all cases. Signed-off-by: Peter Lieven --- hw/ide/pci.c | 19 ++

[Qemu-devel] [PATCH V3 1/6] ide/atapi: make PIO read requests async

2015-11-06 Thread Peter Lieven
PIO read requests on the ATAPI interface used to be sync blk requests. This has two significant drawbacks. First the main loop hangs util an I/O request is completed and secondly if the I/O request does not complete (e.g. due to an unresponsive storage) Qemu hangs completely. Note: Due to possible

[Qemu-devel] [PATCH V3 5/6] ide: enable buffered requests for ATAPI devices

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven --- hw/ide/atapi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 29fd131..2f6d018 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -190,8 +190,8 @@ static int cd_read_sector(IDEState *s, void *bu

[Qemu-devel] [PATCH V3 6/6] ide: enable buffered requests for PIO read requests

2015-11-06 Thread Peter Lieven
Signed-off-by: Peter Lieven --- hw/ide/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 53f9c2c..d1feae2 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -676,8 +676,8 @@ static void ide_sector_read(IDEState *s) block_acct_

Re: [Qemu-devel] [PATCH] tap-bsd: use user-specified tap device if it already exists

2015-11-06 Thread Michael Tokarev
Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable

2015-11-06 Thread Pavel Fedin
Hello! > > static void object_property_del_all(Object *obj) > > { > > -while (!QTAILQ_EMPTY(&obj->properties)) { > > -ObjectProperty *prop = QTAILQ_FIRST(&obj->properties); > > - > > -QTAILQ_REMOVE(&obj->properties, prop, node); > > +ObjectProperty *prop; > > +GHashT

Re: [Qemu-devel] [PATCH v7 25/35] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-11-06 Thread Xiao Guangrong
On 11/06/2015 04:31 PM, Xiao Guangrong wrote: On 11/05/2015 10:49 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 21:33:39 +0800 Xiao Guangrong wrote: On 11/05/2015 09:03 PM, Igor Mammedov wrote: On Thu, 5 Nov 2015 18:15:31 +0800 Xiao Guangrong wrote: On 11/05/2015 05:58 PM, Igor Mamm

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-06 Thread Dr. David Alan Gilbert
* Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > On Thu, Nov 05, 2015 at 06:10:27PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > This is the 9th cut of my version of postcopy. > > > > The userfaultfd linux kernel code is now in the upstream kernel

Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable

2015-11-06 Thread Daniel P. Berrange
On Thu, Nov 05, 2015 at 07:05:48PM +0100, Andreas Färber wrote: > Am 13.10.2015 um 14:37 schrieb Daniel P. Berrange: > > From: Pavel Fedin > > > > ARM GICv3 systems with large number of CPUs create lots of IRQ pins. Since > > every pin is represented as a property, number of these properties beco

Re: [Qemu-devel] [PATCH v4 7/7] qom: allow properties to be registered against classes

2015-11-06 Thread Daniel P. Berrange
On Thu, Nov 05, 2015 at 07:12:39PM +0100, Andreas Färber wrote: > Am 13.10.2015 um 15:18 schrieb Pavel Fedin: > >> diff --git a/include/qom/object.h b/include/qom/object.h > >> index 2a54515..38f41d3 100644 > >> --- a/include/qom/object.h > >> +++ b/include/qom/object.h > [...] > >> @@ -964,8 +975,

Re: [Qemu-devel] [PATCH v4 6/7] qom: replace object property list with GHashTable

2015-11-06 Thread Pavel Fedin
Hello! > > > -QTAILQ_FOREACH(prop, &obj->parent->properties, node) { > > > +g_hash_table_iter_init(&iter, obj->parent->properties); > > > +while (g_hash_table_iter_next(&iter, NULL, (gpointer *)&prop)) { > > > > Is this cast needed? > > Probably not, as any pointer should coerce to v

[Qemu-devel] [PULL v3 00/18] Record/replay core for 2.5-rc1

2015-11-06 Thread Paolo Bonzini
The following changes since commit 6c5f30cad290c745f910481d0e890b3f4fad1f00: Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151104' into staging (2015-11-05 10:10:57 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream-repla

[Qemu-devel] [PULL 07/18] replay: interrupts and exceptions

2015-11-06 Thread Paolo Bonzini
From: Pavel Dovgalyuk This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-b

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-11-06 Thread Xulei (Stone)
>On Wed, Nov 04, 2015 at 08:48:20AM +0800, Gonglei wrote: >> On 2015/11/3 14:58, Xulei (Stone, Euler) wrote: >> > On qemu-kvm platform, when I reset a VM through "virsh reset", and >> > coincidently >> > the VM is in process of internal rebooting at the same time. Then the VM >> > will >> > not

Re: [Qemu-devel] [PATCH v4 0/3] qemu-io: clean up cvtnum usage

2015-11-06 Thread Kevin Wolf
Am 06.11.2015 um 00:53 hat John Snow geschrieben: > cvtnum returns an int64_t, not an int, so correct the lvalue types > wherever it is used. While we're at it, make the error messages more > meaningful and hopefully less confusing. > > v4: > - Now missing ALL sweaters > > v3: > - pulled a lot

Re: [Qemu-devel] [PULL 12/22] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 01:34, Yuanhan Liu wrote: > On Thu, Nov 05, 2015 at 11:42:15AM +, Peter Maydell wrote: >> On 3 October 2015 at 17:33, Michael S. Tsirkin wrote: >> > On Fri, Oct 02, 2015 at 06:18:51PM +0200, Paolo Bonzini wrote: >> >> >> >> >> >> On 24/09/2015 15:20, Michael S. Tsirkin w

Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants

2015-11-06 Thread Markus Armbruster
Eric Blake writes: > On 11/05/2015 09:01 AM, Daniel P. Berrange wrote: >> On Thu, Nov 05, 2015 at 04:30:00PM +0100, Markus Armbruster wrote: >>> QAPI names needn't be valid C identifiers, so we mangle them with >>> c_name(). Except for enumeration constants, which we mangle with >>> camel_to_upp

Re: [Qemu-devel] [PATCH 1/2] net: netmap: Fix compilation issue

2015-11-06 Thread Markus Armbruster
Vincenzo Maffione writes: > 2015-11-05 16:01 GMT+01:00 Eric Blake : >> On 11/05/2015 07:52 AM, Vincenzo Maffione wrote: >>> No worries. >>> >>> It needs --enable-netmap (default is --disable-netmap on linux), and >>> --extra-cflags=-I/path/to/netmap/sys for netmap API headers. >>> >>> (netmap cod

Re: [Qemu-devel] Question about the source code.

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 01:27, Toni Nedialkov wrote: > Hello, I have a question pertaining the source code, wondering if I've > discovered a bug or am just simply confused. > > It's about this function in translate-all.c > > static void page_flush_tb(void) > { > int i; > > for (i = 0; i < V_

[Qemu-devel] [PATCH] mirror: Improve zero-write and discard with fragmented image

2015-11-06 Thread Fam Zheng
The "pnum < nb_sectors" condition in deciding whether to actually copy data is unnecessarily strict, and the qiov initialization is unnecessarily too, for both bdrv_aio_write_zeroes and bdrv_aio_discard branches. Reorganize mirror_iteration flow so that we: 1) Find the contiguous zero/discard

Re: [Qemu-devel] [PATCH] virtio-blk: trivial code optimization

2015-11-06 Thread Stefan Hajnoczi
On Fri, Nov 06, 2015 at 09:04:57AM +0800, arei.gong...@huawei.com wrote: > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c > index 093e475..752586d 100644 > --- a/hw/block/virtio-blk.c > +++ b/hw/block/virtio-blk.c > @@ -409,18 +409,20 @@ void virtio_blk_submit_multireq(BlockBackend *blk

Re: [Qemu-devel] Status Buildbot

2015-11-06 Thread Stefan Hajnoczi
On Tue, Nov 03, 2015 at 07:47:54AM +0100, Timo Benk wrote: > On Monday 02 November 2015 17:29:44 Stefan Hajnoczi wrote: > > On Mon, Nov 02, 2015 at 10:37:06AM +0100, Timo Benk wrote: > > > we at B1 Systems GmbH are currently hosting the buildbot infrastructure. > > > I have mailed some > > > forme

Re: [Qemu-devel] [PULL 0/5] X86 queue, 2015-11-05

2015-11-06 Thread Peter Maydell
On 5 November 2015 at 19:37, Eduardo Habkost wrote: > The following changes since commit 496c1b19facc7b850fa0c09899fcc07a0702fbfd: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2015-11-05 14:31:24 +) > > are available in the git repository at: > > gi

Re: [Qemu-devel] [PATCH 1/2] target-i386: tcg: Accept clwb instruction

2015-11-06 Thread Richard Henderson
On 11/04/2015 10:24 PM, Eduardo Habkost wrote: Accept the clwb instruction (66 0F AE /6) if its corresponding feature flag is enabled on CPUID[7]. Signed-off-by: Eduardo Habkost --- target-i386/translate.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/targ

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-06 Thread Bharata B Rao
On Fri, Nov 6, 2015 at 2:39 PM, Dr. David Alan Gilbert wrote: > * Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: >> On Thu, Nov 05, 2015 at 06:10:27PM +, Dr. David Alan Gilbert (git) wrote: >> > From: "Dr. David Alan Gilbert" >> > >> > This is the 9th cut of my version of postcopy. >> >

Re: [Qemu-devel] [PATCH 2/2] target-i386: tcg: Check right CPUID bits for clflushopt/pcommit

2015-11-06 Thread Richard Henderson
On 11/04/2015 10:24 PM, Eduardo Habkost wrote: Detect the clflushopt and pcommit instructions and check their corresponding feature flags, instead of checking CPUID_SSE and CPUID_CLFLUSH. Signed-off-by: Eduardo Habkost --- target-i386/translate.c | 28 1 file cha

Re: [Qemu-devel] anybody using MMIO tracing?

2015-11-06 Thread Stefan Hajnoczi
On Mon, Nov 02, 2015 at 09:18:03AM -0800, Hollis Blanchard wrote: > I'm trying to use the memory_region_ops_read/write tracepoints. They produce > output like this: > >memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0 >value=0x3 size=0x4 >memory_region_ops_write 165.000 pid=

Re: [Qemu-devel] anybody using MMIO tracing?

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 11:12, Stefan Hajnoczi wrote: > On Mon, Nov 02, 2015 at 09:18:03AM -0800, Hollis Blanchard wrote: >> I'm trying to use the memory_region_ops_read/write tracepoints. They produce >> output like this: >> >>memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0 >>v

Re: [Qemu-devel] [PATCH V4] block/nfs: add support for setting debug level

2015-11-06 Thread Stefan Hajnoczi
On Thu, Nov 05, 2015 at 11:25:34PM +0100, Peter Lieven wrote: > recent libnfs versions support logging debug messages. Add > support for it in qemu through an URL parameter. > > Example: > qemu -cdrom nfs://127.0.0.1/iso/my.iso?debug=2 > --- > v3->v4: revert to the initial version, but limit max

Re: [Qemu-devel] [PATCH V4] block/nfs: add support for setting debug level

2015-11-06 Thread Peter Lieven
Am 06.11.2015 um 12:23 schrieb Stefan Hajnoczi: > On Thu, Nov 05, 2015 at 11:25:34PM +0100, Peter Lieven wrote: >> recent libnfs versions support logging debug messages. Add >> support for it in qemu through an URL parameter. >> >> Example: >> qemu -cdrom nfs://127.0.0.1/iso/my.iso?debug=2 >> ---

[Qemu-devel] [PATCH] s390: deprecate the non-ccw machine in 2.5

2015-11-06 Thread Christian Borntraeger
The non-ccw machine for s390 (s390-virtio) is not very well maintained and caused several issues in the past: - aliases like virtio-blk did not work for s390 - virtio refactoring failed due to long standing bugs (e.g.see commit cb927b8a "s390-virtio: Accommodate guests using virtqueues too early"

Re: [Qemu-devel] [PATCH] configure: add missing --disable-modules option

2015-11-06 Thread Peter Maydell
On 2 November 2015 at 14:06, Stefan Hajnoczi wrote: > According to ./configure all options should have both --enable-foo and > --disable-foo: > > # Always add --enable-foo and --disable-foo command line args. > # Distributions want to ensure that several features are compiled in, and it > #

Re: [Qemu-devel] [PATCH] s390: deprecate the non-ccw machine in 2.5

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 11:28, Christian Borntraeger wrote: > The non-ccw machine for s390 (s390-virtio) is not very well maintained > and caused several issues in the past: > - aliases like virtio-blk did not work for s390 > - virtio refactoring failed due to long standing bugs (e.g.see commit >

Re: [Qemu-devel] [PATCH] s390: deprecate the non-ccw machine in 2.5

2015-11-06 Thread Christian Borntraeger
Am 06.11.2015 um 12:41 schrieb Peter Maydell: > On 6 November 2015 at 11:28, Christian Borntraeger > wrote: >> The non-ccw machine for s390 (s390-virtio) is not very well maintained >> and caused several issues in the past: >> - aliases like virtio-blk did not work for s390 >> - virtio refactoring

Re: [Qemu-devel] [PATCH] s390: deprecate the non-ccw machine in 2.5

2015-11-06 Thread Cornelia Huck
On Fri, 6 Nov 2015 11:41:04 + Peter Maydell wrote: > On 6 November 2015 at 11:28, Christian Borntraeger > wrote: > > The non-ccw machine for s390 (s390-virtio) is not very well maintained > > and caused several issues in the past: > > - aliases like virtio-blk did not work for s390 > > - vir

Re: [Qemu-devel] [PATCH v2] target-arm: Fix non-CPU breakpoint handling in arm_debug_excp_handler()

2015-11-06 Thread Peter Maydell
On 5 November 2015 at 12:26, Sergey Fedorov wrote: > Do not raise a CPU exception if no CPU breakpoint has fired, since > singlestep is also done by generating a debug internal exception. This > fixes a bug with singlestepping in gdbstub. > > Signed-off-by: Sergey Fedorov > --- > This is a v2 of

[Qemu-devel] [PATCH v2] s390: deprecate the non-ccw machine in 2.5

2015-11-06 Thread Christian Borntraeger
The non-ccw machine for s390 (s390-virtio) is not very well maintained and caused several issues in the past: - aliases like virtio-blk did not work for s390 - virtio refactoring failed due to long standing bugs (e.g.see commit cb927b8a "s390-virtio: Accommodate guests using virtqueues too early")

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-06 Thread Dr. David Alan Gilbert
* Bharata B Rao (bharata@gmail.com) wrote: > On Fri, Nov 6, 2015 at 2:39 PM, Dr. David Alan Gilbert > wrote: > > * Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > >> On Thu, Nov 05, 2015 at 06:10:27PM +, Dr. David Alan Gilbert (git) > >> wrote: > >> > From: "Dr. David Alan Gilbert" >

Re: [Qemu-devel] [PATCH v2] target-arm: Fix non-CPU breakpoint handling in arm_debug_excp_handler()

2015-11-06 Thread Sergey Fedorov
On 06.11.2015 14:57, Peter Maydell wrote: > On 5 November 2015 at 12:26, Sergey Fedorov wrote: >> Do not raise a CPU exception if no CPU breakpoint has fired, since >> singlestep is also done by generating a debug internal exception. This >> fixes a bug with singlestepping in gdbstub. >> >> Signed

Re: [Qemu-devel] [PULL v3 00/18] Record/replay core for 2.5-rc1

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 09:37, Paolo Bonzini wrote: > The following changes since commit 6c5f30cad290c745f910481d0e890b3f4fad1f00: > > Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20151104' > into staging (2015-11-05 10:10:57 +) > > are available in the git repository at:

[Qemu-devel] [PULL 10/24] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup

2015-11-06 Thread Michael Tokarev
From: Thomas Huth No need to use g_malloc0 to zero the memory if we memcpy to the whole buffer afterwards anyway. Actually, there is even a function which combines both steps, g_memdup, so let's use this function here instead. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: M

[Qemu-devel] [PULL 09/24] tests/i44fx-test: No need for zeroing memory before memset

2015-11-06 Thread Michael Tokarev
From: Thomas Huth Change a g_malloc0 into g_malloc since the following memset fills the whole buffer anyway. Signed-off-by: Thomas Huth Reviewed-by: Laszlo Ersek Signed-off-by: Michael Tokarev --- tests/i440fx-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i

[Qemu-devel] [PULL 08/24] hw/input/tsc210x: Remove superfluous memset

2015-11-06 Thread Michael Tokarev
From: Thomas Huth g_malloc0 already clears the memory, so no need for additional memsets here. And while we're at it, let's also remove the superfluous typecasts for the return values of g_malloc0 and use the type-safe g_new0 instead. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Signed-o

[Qemu-devel] [PULL 06/24] tests: ignore test-qga

2015-11-06 Thread Michael Tokarev
From: Eric Blake Commit 62c39b30 added a new test, but did not mark it for exclusion in .gitignore. Signed-off-by: Eric Blake Signed-off-by: Michael Tokarev --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index 65496aa..e96f569 1006

[Qemu-devel] [PULL 01/24] hw/acpi/aml-build: remove useless glib version check

2015-11-06 Thread Michael Tokarev
From: Marc-André Lureau 2.22 is the minimum version required Signed-off-by: Marc-André Lureau Signed-off-by: Michael Tokarev --- hw/acpi/aml-build.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 0d4b324..a00a0ab 100644 --- a/hw/acpi/aml-b

[Qemu-devel] [PULL 00/24] Trivial patches for 2015-11-06

2015-11-06 Thread Michael Tokarev
Another trivial-patches merge request. Lots of various small things all over. Please consider merging/applying. Thanks, /mjt The following changes since commit 9319738080faeb09876ce2017fcaea4937c475ee: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream-replay' into staging (20

Re: [Qemu-devel] [PATCH] target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code

2015-11-06 Thread Peter Maydell
On 2 November 2015 at 18:16, Sergey Fedorov wrote: > AArch32 translation code does not distinguish between DISAS_UPDATE and > DISAS_JUMP. Thus, we cannot use any of them without first updating PC in > CPU state. Furthermore, it is too complicated to update PC in CPU state > before PC gets updated

[Qemu-devel] [PULL 02/24] gdbstub: Fix buffer overflows in gdb_handle_packet()

2015-11-06 Thread Michael Tokarev
From: Kevin Wolf Some places in gdb_handle_packet() can get an arbitrary length (most times directly from the client) and either didn't check it at all or checked against the wrong value, potentially causing buffer overflows. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevin Wolf Signed-off-by: M

[Qemu-devel] [PULL 23/24] qemu-sockets: do not test path with access() before unlinking

2015-11-06 Thread Michael Tokarev
From: Paolo Bonzini Using access() is a time-of-check/time-of-use race condition. It is okay to use them to provide better error messages, but that is pretty much it. This is not one such case; on the other hand, access() *will* skip unlink() for a non-existent path, so ignore ENOENT return val

[Qemu-devel] [PULL 16/24] configure: remove help string for 'vnc-tls' option

2015-11-06 Thread Michael Tokarev
From: "Daniel P. Berrange" The '--enable-vnc-tls' option to configure was removed in commit 3e305e4a4752f70c0b5c3cf5b43ec957881714f7 Author: Daniel P. Berrange Date: Thu Aug 6 14:39:32 2015 +0100 ui: convert VNC server to use QCryptoTLSSession This removes the corresponding help s

[Qemu-devel] [PULL 17/24] qom/object: fix 2 comment typos

2015-11-06 Thread Michael Tokarev
From: Cao jin Also change the misleading definition of macro OBJECT_CLASS_CHECK Signed-off-by: Cao jin Signed-off-by: Michael Tokarev --- include/qom/object.h | 10 +- qom/object.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qom/object.h b/i

[Qemu-devel] [PULL 20/24] target-alpha: fix uninitialized variable

2015-11-06 Thread Michael Tokarev
From: Paolo Bonzini I am not sure why the compiler does not catch it. There is no semantic change since gen_excp returns EXIT_NORETURN, but the old code is wrong. Reported by Coverity. Signed-off-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- target-alpha/translate.c | 2 +- 1 file ch

[Qemu-devel] [PULL 11/24] hw/dma/pxa2xx: Remove superfluous memset

2015-11-06 Thread Michael Tokarev
From: Thomas Huth g_malloc0 already clears the memory, so no need for the additional memset here. And while we're at it, also convert the g_malloc0 to the preferred g_new0. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- hw/dma/pxa2xx_dma.c | 3 +-- 1 fi

Re: [Qemu-devel] [PATCH v2] s390: deprecate the non-ccw machine in 2.5

2015-11-06 Thread Cornelia Huck
On Fri, 6 Nov 2015 13:07:25 +0100 Christian Borntraeger wrote: > The non-ccw machine for s390 (s390-virtio) is not very well maintained > and caused several issues in the past: > - aliases like virtio-blk did not work for s390 > - virtio refactoring failed due to long standing bugs (e.g.see > co

Re: [Qemu-devel] [PATCH] virtio-blk: trivial code optimization

2015-11-06 Thread Paolo Bonzini
On 06/11/2015 11:35, Stefan Hajnoczi wrote: >> > if (niov + req->qiov.niov > IOV_MAX) { >> > merge = false; >> > +goto unmerge; >> > } >> > >> > /* merge would exceed maximum transfer length of backend >> > device */ >> >

[Qemu-devel] [PULL 24/24] tap-bsd: use user-specified tap device if it already exists

2015-11-06 Thread Michael Tokarev
From: Ed Maste Acked-by: Roger Pau Monné Signed-off-by: Ed Maste Signed-off-by: Michael Tokarev --- net/tap-bsd.c | 38 +- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/net/tap-bsd.c b/net/tap-bsd.c index 7028d9b..0103a97 100644 --- a/net/t

[Qemu-devel] [PULL 19/24] ivshmem-server: fix possible OVERRUN

2015-11-06 Thread Michael Tokarev
From: Gonglei >>> CID 1337991: Memory - illegal accesses (OVERRUN) >>> Decrementing "i". The value of "i" is now 65534. 218 while (i--) { 219 event_notifier_cleanup(&peer->vectors[i]); 220 } Signed-off-by: Gonglei Reviewed-by: Marc-André Lureau Signed-off-

[Qemu-devel] [PULL 03/24] hw/display/tcx: Remove superfluous OBJECT() typecasts

2015-11-06 Thread Michael Tokarev
From: Thomas Huth The tcx_initfn() function is already supplied with an Object *obj pointer, so there is no need to cast the state pointer back to an Object pointer all over the place. And while we're at it, also remove the superfluous "return;" statement in this function. Signed-off-by: Thomas

[Qemu-devel] [PULL 14/24] qxl: Use g_new() & friends where that makes obvious sense

2015-11-06 Thread Michael Tokarev
From: Markus Armbruster g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with siz

Re: [Qemu-devel] [PULL v3 00/18] Record/replay core for 2.5-rc1

2015-11-06 Thread Paolo Bonzini
On 06/11/2015 13:26, Peter Maydell wrote: > Applied, thanks. Let's hope it doesn't break too much :-) > > (Seriously, it's good to see this getting into the tree finally. > Do we have some documentation we can point to in the > release notes about how to use it?) Unfortunately, I don't think it

[Qemu-devel] [PULL 13/24] ui: Use g_new() & friends where that makes obvious sense

2015-11-06 Thread Michael Tokarev
From: Markus Armbruster g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, for two reasons. One, it catches multiplication overflowing size_t. Two, it returns T * rather than void *, which lets the compiler catch more type errors. This commit only touches allocations with siz

Re: [Qemu-devel] [PATCH 01/16] exec.c: Don't set cpu->as until cpu_address_space_init

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:43PM +, Peter Maydell wrote: > Rather than setting cpu->as unconditionally in cpu_exec_init > (and then having target-i386 override this later), don't set > it until the first call to cpu_address_space_init. > > This requires us to initialise the address space for

[Qemu-devel] [PULL 07/24] xen: fix invalid assertion

2015-11-06 Thread Michael Tokarev
From: Paolo Bonzini Asserting "true" is not that useful. Reported by Coverity. Signed-off-by: Paolo Bonzini Acked-by: Stefano Stabellini Signed-off-by: Michael Tokarev --- hw/xen/xen_pt_config_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xen/xen_pt_confi

[Qemu-devel] [PULL 12/24] bt: fix use of uninitialized variable seqlen

2015-11-06 Thread Michael Tokarev
From: Paolo Bonzini sdp_svc_match, sdp_attr_match and sdp_svc_attr_match read the last argument. The only sensible way to change the code is to make that last argument "len" instead of "seqlen" which is the length of a subsequence in the previous "if" branch. To make the structure of the code c

[Qemu-devel] [PULL 22/24] taget-ppc: Fix read access to IBAT registers higher than IBAT3

2015-11-06 Thread Michael Tokarev
From: Julio Guerra Fix the index used to read the IBAT's vector which results in IBAT0..3 instead of IBAT4..N. The bug appeared by saving/restoring contexts including IBATs values. Signed-off-by: Julio Guerra Signed-off-by: Michael Tokarev --- target-ppc/translate_init.c | 2 +- 1 file chang

[Qemu-devel] [PULL 18/24] pci-assign: do not test path with access() before opening

2015-11-06 Thread Michael Tokarev
From: Paolo Bonzini Using access() is a time-of-check/time-of-use race condition. It is okay to use them to provide better error messages, but that is pretty much it. In this case we can get the same error from fopen(), so just use strerror and errno there---which actually improves the error me

Re: [Qemu-devel] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:44PM +, Peter Maydell wrote: > Allow multiple calls to cpu_address_space_init(); each > call adds an entry to the cpu->ases array at the specified > index. It is up to the target-specific CPU code to actually use > these extra address spaces. > > Since this multip

[Qemu-devel] [PULL 05/24] fix bad indentation in pcie_cap_slot_write_config()

2015-11-06 Thread Michael Tokarev
From: Cao jin bad indentation conflicts with CODING_STYLE doc Signed-off-by: Cao jin Signed-off-by: Michael Tokarev --- hw/pci/pcie.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c index 32c65c2..0eab29d 100644 --- a/hw/pci/pcie.

[Qemu-devel] [PULL 21/24] exec: avoid unnecessary cacheline bounce on ram_list.mru_block

2015-11-06 Thread Michael Tokarev
From: Paolo Bonzini Whenever the MRU cache hits for the list of RAM blocks, qemu_get_ram_block does an unnecessary write that causes a processor cache line to bounce from one core to another. This causes a performance hit. Reported-by: Emilio G. Cota Signed-off-by: Paolo Bonzini Signed-off-by

Re: [Qemu-devel] [PATCH 03/16] tlb_set_page_with_attrs: Take argument specifying AddressSpace to use

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:45PM +, Peter Maydell wrote: > Add an argument to tlb_set_page_with_attrs which allows the target CPU code > to tell the core code which AddressSpace to use. > > The AddressSpace is specified by the index into the array of ASes which > were registered with cpu_add

Re: [Qemu-devel] [PATCH 02/16] exec.c: Allow target CPUs to define multiple AddressSpaces

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 13:21, Edgar E. Iglesias wrote: > On Thu, Nov 05, 2015 at 06:15:44PM +, Peter Maydell wrote: >> Allow multiple calls to cpu_address_space_init(); each >> call adds an entry to the cpu->ases array at the specified >> index. It is up to the target-specific CPU code to actua

Re: [Qemu-devel] [PATCH 04/16] exec.c: Add address space index to CPUIOTLBEntry

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:46PM +, Peter Maydell wrote: > Add the address space index to CPUIOTLBEntry, and use this to pass it > to iotlb_to_region(), so that we use the correct AddressSpace when > doing IO path lookups. Hi Peter, I think this works but eventually when we add support for

Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants

2015-11-06 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 11/05/2015 09:01 AM, Daniel P. Berrange wrote: >>> On Thu, Nov 05, 2015 at 04:30:00PM +0100, Markus Armbruster wrote: QAPI names needn't be valid C identifiers, so we mangle them with c_name(). Except for enumeration constants, wh

Re: [Qemu-devel] [PATCH 1/3] block: add missed aio_context_acquire around bdrv_set_aio_context

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:27:22PM +0300, Denis V. Lunev wrote: > It is required for bdrv_drain. What bug does this patch fix? Existing blk_set_aio_context() callers acquire the AioContext or are sure it's already acquired by their caller, so I don't see where the bug is. No function in block/bl

Re: [Qemu-devel] [PATCH 06/16] include/qom/cpu.h: Add new get_phys_page_asidx_debug method

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:48PM +, Peter Maydell wrote: > Add a new optional method get_phys_page_asidx_debug to CPUClass. > This is like the existing get_phys_page_debug, but also returns > the address space index to use for the access. This is necessary > for CPUs which have multiple addre

Re: [Qemu-devel] [PATCH 07/16] exec.c: Use cpu_get_phys_page_asidx_debug

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:49PM +, Peter Maydell wrote: > Use cpu_get_phys_page_asidx_debug() when doing virtual-to-physical > conversions in debug related code, so that we can obtain the right > address space index and thus select the correct AddressSpace, > rather than always using cpu->as

Re: [Qemu-devel] [PATCH 03/16] tlb_set_page_with_attrs: Take argument specifying AddressSpace to use

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 13:27, Edgar E. Iglesias wrote: > On Thu, Nov 05, 2015 at 06:15:45PM +, Peter Maydell wrote: >> Add an argument to tlb_set_page_with_attrs which allows the target CPU code >> to tell the core code which AddressSpace to use. >> >> The AddressSpace is specified by the index

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-06 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Bharata B Rao (bharata@gmail.com) wrote: > > On Fri, Nov 6, 2015 at 2:39 PM, Dr. David Alan Gilbert > > wrote: > > > * Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > > >> On Thu, Nov 05, 2015 at 06:10:27PM +, Dr. David Alan Gil

Re: [Qemu-devel] [PATCH 3/3] block: guard bdrv_drain in bdrv_close with aio_context_acquire

2015-11-06 Thread Stefan Hajnoczi
On Wed, Nov 04, 2015 at 08:27:24PM +0300, Denis V. Lunev wrote: > bdrv_close is called in to much places to properly track at the moment. bdrv_close() is called in 5 places. Let's figure out what the callers are doing wrong: block.c:bdrv_open_inherit() - internal function, guaranteed to be s

Re: [Qemu-devel] [PATCH 04/16] exec.c: Add address space index to CPUIOTLBEntry

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 13:34, Edgar E. Iglesias wrote: > On Thu, Nov 05, 2015 at 06:15:46PM +, Peter Maydell wrote: >> Add the address space index to CPUIOTLBEntry, and use this to pass it >> to iotlb_to_region(), so that we use the correct AddressSpace when >> doing IO path lookups. > > Hi Pet

Re: [Qemu-devel] [PATCH 08/16] exec.c: Have one io_mem_watch per AddressSpace

2015-11-06 Thread Edgar E. Iglesias
On Thu, Nov 05, 2015 at 06:15:50PM +, Peter Maydell wrote: > The io_mem_watch MemoryRegion's read and write callbacks pass the > accesses through to an underlying address space. Now that that > might be something other than address_space_memory, we need to > pass the correct AddressSpace in via

Re: [Qemu-devel] [PULL 00/24] Trivial patches for 2015-11-06

2015-11-06 Thread Peter Maydell
On 6 November 2015 at 12:43, Michael Tokarev wrote: > Another trivial-patches merge request. Lots of various small > things all over. Please consider merging/applying. > > Thanks, > > /mjt > > The following changes since commit 9319738080faeb09876ce2017fcaea4937c475ee: > > Merge remote-trackin

  1   2   3   >