Re: [Qemu-devel] [PATCH] scripts: add sample model file for Coverity Scan

2014-03-19 Thread Paolo Bonzini
Il 18/03/2014 19:40, Markus Armbruster ha scritto: > +void * > +g_malloc (size_t n_bytes) > +{ > +void *mem; > +__coverity_negative_sink__((ssize_t) n_bytes); > +mem = malloc(n_bytes == 0 ? 1 : n_bytes); > +if (!mem) __coverity_panic__ (); > +return mem; > +} This isn't quite

Re: [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it

2014-03-19 Thread Paolo Bonzini
Il 19/03/2014 02:40, Prasad Joshi ha scritto: Signed-off-by: Prasad Joshi --- hw/scsi/vmw_pvscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 7d344b9..e35bff7 100644 --- a/hw/scsi/vmw_pvscsi.c +++ b/hw/scsi/vmw_pvscsi.

[Qemu-devel] [PATCH RESEND v4 1/5] qom: split object_property_set_link()

2014-03-19 Thread Stefan Hajnoczi
The path resolution logic in object_property_set_link() should be a separate function. This makes the code easier to read and maintain. Signed-off-by: Stefan Hajnoczi --- qom/object.c | 59 +++ 1 file changed, 39 insertions(+), 20 deletion

[Qemu-devel] [PATCH RESEND v4 0/5] qom: link property fixes

2014-03-19 Thread Stefan Hajnoczi
[Due to a horrible accident, the subject line was chopped off while sending this series. This is a resend, I have glued the subject line back on so patch management tools can make sense of the series.] v4: * Rebase to resolve merge conflicts v3: * Split first commit for easier reviewing [afaer

[Qemu-devel] [PATCH RESEND v4 3/5] qom: make QOM link property unref optional

2014-03-19 Thread Stefan Hajnoczi
Some object_property_add_link() callers expect property deletion to unref the link property object. Other callers expect to manage the refcount themselves. The former are currently broken and therefore leak the link property object. This patch adds a flags argument to object_property_add_link()

[Qemu-devel] [PATCH RESEND v4 5/5] virtio-rng: avoid default_backend refcount leak

2014-03-19 Thread Stefan Hajnoczi
QOM child properties take a reference to the object and release it when the property is deleted. Therefore we should unref the default_backend after we have added it as a child property. Cc: KONRAD Frederic Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio-rng.c | 3 +++ 1 file changed, 3 in

[Qemu-devel] [PATCH RESEND v4 4/5] qom: add check() argument to object_property_add_link()

2014-03-19 Thread Stefan Hajnoczi
There are currently three types of object_property_add_link() callers: 1. The link property may be set at any time. 2. The link property of a DeviceState instance may only be set before realize. 3. The link property may never be set, it is read-only. Something similar can already be achieved w

Re: [Qemu-devel] virtio device error reporting best practice?

2014-03-19 Thread Markus Armbruster
Rusty Russell writes: > Dave Airlie writes: >> So I'm looking at how best to do virtio gpu device error reporting, >> and how to deal with illegal stuff, >> >> I've two levels of errors I want to support, >> >> a) unrecoverable or bad guest kernel programming errors, > > The QEMU standard approa

Re: [Qemu-devel] [PATCH for-2.0] dataplane: fix implicit IOThread refcount

2014-03-19 Thread Fam Zheng
On Tue, 03/18 17:50, Stefan Hajnoczi wrote: > When creating an IOThread implicitly (the user did not specify > x-iothread=) remember that iothread_find() does not return the > object with an incremented refcount. > > Signed-off-by: Stefan Hajnoczi > --- > hw/block/dataplane/virtio-blk.c | 2 +- >

Re: [Qemu-devel] qemu freezes while writing into coprocessor register

2014-03-19 Thread prqek
__ > Od: Peter Maydell > Komu: > Datum: 18.03.2014 23:51 > Předmět: Re: [Qemu-devel] qemu freezes while writing into coprocessor register > > CC: "QEMU Developers" >On 18 March 2014 20:42, wrote: >> Hi, >> I was sending this to the Qe

Re: [Qemu-devel] [PATCH for-2.0] dataplane: fix implicit IOThread refcount

2014-03-19 Thread Kevin Wolf
Am 18.03.2014 um 17:50 hat Stefan Hajnoczi geschrieben: > When creating an IOThread implicitly (the user did not specify > x-iothread=) remember that iothread_find() does not return the > object with an incremented refcount. > > Signed-off-by: Stefan Hajnoczi Thanks, applied to the block branch

[Qemu-devel] [PATCH v1 2/4] i386: use CpuTopoInfo instead apic_id as argument for pc_new_cpu()

2014-03-19 Thread Chen Fan
introduce x86_cpu_topo_ids_from_index() to calculate the cpu topology information, and the compat old mode mechanism moved into there. remove unused funciton x86_apicid_from_cpu_idx(). Signed-off-by: Chen Fan --- hw/i386/pc.c | 22 -- target-i386/cpu.c | 33 +++

[Qemu-devel] [PATCH v1 4/4] i386: introduce cpu QOM hierarchy tree

2014-03-19 Thread Chen Fan
add cpu-topology.h cpu-topology.c files for prebuilding cpu qom tree "/machine/node[X]/socket[Y]/core[Z]->link cpu" Signed-off-by: Chen Fan --- hw/i386/pc.c | 3 + target-i386/Makefile.objs | 2 +- target-i386/cpu-topology.c | 199 +

[Qemu-devel] [PATCH v1 3/4] topo unit-test: update Unit tests to test-x86-cpuid.c

2014-03-19 Thread Chen Fan
remove redundant x86_apicid_from_cpu_idx() tests. add tests to check x86_topo_ids_from_apic_id() and x86_topo_ids_from_apic_id() output. Signed-off-by: Chen Fan --- tests/test-x86-cpuid.c | 165 ++--- 1 file changed, 129 insertions(+), 36 deletions(-)

[Qemu-devel] [PATCH v1 0/4] prebuild cpu QOM tree /machine/node/socket/core ->link-cpu

2014-03-19 Thread Chen Fan
at present, after hotplug a discontinuous cpu id on source, then done migration, on target, it will fail to add the unoccupied cpu id which was skipped at source, this cause is on target Qemu prebuild CPU with continuous cpu_index. so after migration, the cpu infrastructure bewteen source and targ

[Qemu-devel] [PATCH v1 1/4] cpu: introduce CpuTopoInfo structure for argument simplification

2014-03-19 Thread Chen Fan
Signed-off-by: Chen Fan Reviewed-by: Eduardo Habkost --- target-i386/topology.h | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/target-i386/topology.h b/target-i386/topology.h index 07a6c5f..e9ff89c 100644 --- a/target-i386/topology.h +++ b

Re: [Qemu-devel] Qcow file does not mount

2014-03-19 Thread Kevin Wolf
Am 19.03.2014 um 07:06 hat Atlas Khan geschrieben: > I am doing a task in which I have to enter some data which is in a directory > in > qcow/qcow2 file. The thing I want to ask is that how can I do this if I have > boot looder or  guest system in a directory rather than in iso file. I try to > ma

Re: [Qemu-devel] [PATCH] scripts: add sample model file for Coverity Scan

2014-03-19 Thread Markus Armbruster
Paolo Bonzini writes: > Il 18/03/2014 19:40, Markus Armbruster ha scritto: >> > +void * >> > +g_malloc (size_t n_bytes) >> > +{ >> > +void *mem; >> > +__coverity_negative_sink__((ssize_t) n_bytes); >> > +mem = malloc(n_bytes == 0 ? 1 : n_bytes); >> > +if (!mem) __coverity_panic__

Re: [Qemu-devel] [PATCH 1/1] Stop reinit of XBZRLE.lock

2014-03-19 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert (git)" writes: > > > >> > diff --git a/arch_init.c b/arch_init.c >> > index 60c975d..16474b5 100644 >> > --- a/arch_init.c >> > +++ b/arch_init.c >> > @@ -167,10 +167,13 @@ static struct

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 1/3] target-ppc: introduce powerisa-207-server flag

2014-03-19 Thread Greg Kurz
On Fri, 7 Mar 2014 15:37:39 +1100 Alexey Kardashevskiy wrote: > This flag will be used to decide whether to emulate some bits of > H_SET_MODE hypercall because some are POWER8-only. > > While we are here, add 2.05 flag to POWER8 family too. POWER7/7+ already > have it. > > Signed-off-by: Alexe

Re: [Qemu-devel] [PATCH] target-ppc: reset SPRs on CPU reset

2014-03-19 Thread Andreas Färber
Am 19.03.2014 04:28, schrieb Alexey Kardashevskiy: > This resets SPR values to defaults on CPU reset. This should help > with little-endian guests reboot issues. > > Signed-off-by: Alexey Kardashevskiy > --- > target-ppc/cpu.h| 1 + > target-ppc/translate_init.c | 12 +++- >

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: reset SPRs on CPU reset

2014-03-19 Thread Greg Kurz
On Wed, 19 Mar 2014 14:28:02 +1100 Alexey Kardashevskiy wrote: > This resets SPR values to defaults on CPU reset. This should help > with little-endian guests reboot issues. > > Signed-off-by: Alexey Kardashevskiy > --- Yeah ! Since we only set the endianness (LPCR_ILE) when the guest kernel ca

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 2/3] spapr-hcall: fix little-endian resource handling in H_SET_MODE

2014-03-19 Thread Greg Kurz
On Fri, 7 Mar 2014 15:37:40 +1100 Alexey Kardashevskiy wrote: > This changes resource code definitions to ones used in the host kernel. > > This fixes H_SET_MODE_RESOURCE_LE (switch between big endian and > little endian) to sync registers from KVM before changing LPCR value. > > This adds a s

Re: [Qemu-devel] [PATCH 1/1] Stop reinit of XBZRLE.lock

2014-03-19 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> "Dr. David Alan Gilbert (git)" writes: > > > > > > > >> > diff --git a/arch_init.c b/arch_init.c > >> > index 60c975d..16474b5 100644 > >> > --- a/arch_ini

[Qemu-devel] [PATCH v4] net: L2TPv3 transport

2014-03-19 Thread anton . ivanov
From: Anton Ivanov This tranport allows to connect a qemu nic to a static Ethernet over L2TPv3 tunnel. The transport supports all options present in the linux kernel implementation. It allows qemu to connect to any linux host running kernel 3.3+, most routers and network devices as well as other

Re: [Qemu-devel] [PATCH] scripts: add sample model file for Coverity Scan

2014-03-19 Thread Kevin Wolf
Am 18.03.2014 um 18:03 hat Paolo Bonzini geschrieben: > This is the model file that is being used for the QEMU project's scans > on scan.coverity.com. It fixed about 30 false positives (10% of the > total) and exposed about 60 new memory leaks. > > The file is not automatically used; changes to i

Re: [Qemu-devel] How to understand the coroutine context?

2014-03-19 Thread Stefan Hajnoczi
On Tue, Mar 18, 2014 at 11:28:47PM +0100, Thomas Huth wrote: > On Tue, 18 Mar 2014 09:34:56 +0530 > Kashyap Chamarthy wrote: > > > On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote: > > > Hi, I am diving into the source code of qemu. I see the word > > > "coroutine" appears in so many places

Re: [Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-19 Thread Peter Maydell
On 19 March 2014 06:21, Stefan Weil wrote: > Am 18.03.2014 22:30, schrieb Richard Henderson: >> TCG now requires unspecified behavior rather than a potential crash, >> bring the C shift within the letter of the law. > > I know that C does not define the result of some shift / rotate > operations,

Re: [Qemu-devel] How to understand the coroutine context?

2014-03-19 Thread Thomas Huth
On Wed, 19 Mar 2014 11:05:02 +0100 Stefan Hajnoczi wrote: > On Tue, Mar 18, 2014 at 11:28:47PM +0100, Thomas Huth wrote: > > On Tue, 18 Mar 2014 09:34:56 +0530 > > Kashyap Chamarthy wrote: > > > > > On Tue, Mar 18, 2014 at 07:56:16AM +0800, Le Tan wrote: > > > > Hi, I am diving into the source

Re: [Qemu-devel] [Bug 1293975] Re: Guest is destroyed after live migration

2014-03-19 Thread Oliver Francke
Hi, was just about to open a bug-report... but... On 03/18/2014 04:33 PM, Dr. David Alan Gilbert wrote: It looks like this is fixed by: https://github.com/afaerber/qemu-cpu/commit/5a4ad843eee6ba2241828f568af6e147461b4e54 yikes, it now works ;) Thnx, Oliver. -- Oliver Francke filoo GmbH

[Qemu-devel] [PATCH RESEND v4 2/5] qom: don't make link NULL on object_property_set_link() failure

2014-03-19 Thread Stefan Hajnoczi
The error behavior of object_property_set_link() is dangerous. It sets the link property object to NULL if an error occurs. A setter function should either succeed or fail, it shouldn't leave the value NULL on failure. Signed-off-by: Stefan Hajnoczi --- qom/object.c | 29 +++---

[Qemu-devel] [PATCH 2/2] usb: mtp filesharing

2014-03-19 Thread Gerd Hoffmann
Implementation of a USB Media Transfer Device device for easy filesharing. Read-only. No access control inside qemu, it will happily export any file it is able to open to the guest, i.e. standard unix access rights for the qemu process apply. Signed-off-by: Gerd Hoffmann --- default-configs/us

[Qemu-devel] [PATCH 0/2] usb: mtp filesharing

2014-03-19 Thread Gerd Hoffmann
Hi, Lingering in my git branch for ages. Now I've finally managed to nail the "burns lots of cpu time" issue, which makes this useful enouth that I think it should go in now, even though there are limitations. cheers, Gerd Gerd Hoffmann (2): usb: add CompatibleID support to msos usb: mt

[Qemu-devel] [PATCH 1/2] usb: add CompatibleID support to msos

2014-03-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/desc-msos.c | 6 +- hw/usb/desc.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c index ed8d62c..334d1ae 100644 --- a/hw/usb/desc-msos.c +++ b/hw/usb/desc-msos.c @@ -44,7 +44,7 @@ typedef

Re: [Qemu-devel] propose a new idea for GSOC 2014

2014-03-19 Thread Stefan Hajnoczi
On Tue, Mar 18, 2014 at 9:08 PM, Daniel Smith wrote: > I would like to propose a new idea for GSOC 2014 that I want to implement > for QEMU. Since QEMU are widely used for binary analysis, dynamic binary > code instrumentation and so on. > Can we provide the framework like Pin (A Dynamic Binary In

Re: [Qemu-devel] [PATCH v2 2/5] kvm: add kvm_enable_cap_{vm,vcpu}

2014-03-19 Thread Paolo Bonzini
Il 17/03/2014 19:11, Cornelia Huck ha scritto: Provide helper functions for enabling capabilities (on a vcpu and on a vm). Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- include/sysemu/kvm.h |4 kvm-all.c| 19 ++- 2 files changed, 22 insertion

Re: [Qemu-devel] [PULL v2 for-2.0 13/24] dataplane: replace internal thread with IOThread

2014-03-19 Thread Christian Borntraeger
Hmm, now I have trouble getting the whole thing started (Dont know how I was able to start the guest from below). The problem seems to be that qdev->name is always "virtio-blk". So this code in virtio_blk_data_plane_create will always add a child called "virtio-blk", which obviously doesnt work

[Qemu-devel] [PATCH 1/1] Coverity: Fix failure path for qemu_accept in migration

2014-03-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Coverity defects 1005733 & 1005734 complain about passing a -ve value to closesocket in the error paths on incoming migration. Stash the error value and print it in the message (previously we gave no indication of the reason for the failure) Signed-off-by: Dr. Dav

Re: [Qemu-devel] How to understand the coroutine context?

2014-03-19 Thread Stefan Hajnoczi
On Wed, Mar 19, 2014 at 11:13:56AM +0100, Thomas Huth wrote: > On Wed, 19 Mar 2014 11:05:02 +0100 > Stefan Hajnoczi wrote: > > > On Tue, Mar 18, 2014 at 11:28:47PM +0100, Thomas Huth wrote: > > > On Tue, 18 Mar 2014 09:34:56 +0530 > > > Kashyap Chamarthy wrote: > > > > > > > On Tue, Mar 18, 201

Re: [Qemu-devel] [PATCH 0/2] Document MAX_CPUMASK_BITS and use it when limiting max_cpus

2014-03-19 Thread Michael S. Tsirkin
On Tue, Mar 18, 2014 at 04:29:22PM -0300, Eduardo Habkost wrote: > Small rework of patches 6/7 and 7/7 from the previous APIC-ID-limit series I > sent (which broke the build and where reverted). > > Instead of renaming MAX_CPUMASK_BITS like I did previously, just document it > and use it on the (m

[Qemu-devel] About Disk I/O and DMA emulation in qemu-kvm

2014-03-19 Thread Le Tan
Hi, I am now diving into the disk I/O in kvm. But I find that things are a little messy about this and I am stuck here. I configure the virtual machine with a virtual IDE disk and DMA support. I need to get every disk I/O issued by the virtual machine. I know that there are struct IDEDevie, struct

Re: [Qemu-devel] [PATCH 1/1] Coverity: Fix failure path for qemu_accept in migration

2014-03-19 Thread Peter Maydell
On 19 March 2014 11:13, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Coverity defects 1005733 & 1005734 complain about passing a -ve value > to closesocket in the error paths on incoming migration. > > Stash the error value and print it in the message (previously we ga

[Qemu-devel] [PATCHv2] vl.c: Fix memory leak in qemu_register_machine

2014-03-19 Thread Christian Borntraeger
since commit 261747f176f6 (vl: Use MachineClass instead of global QEMUMachine list) valgrind complains about the following: ==54082== 57 bytes in 3 blocks are definitely lost in loss record 365 of 729 ==54082==at 0x4031AFE: malloc (vg_replace_malloc.c:292) ==54082==by 0x4145569: g_malloc (

Re: [Qemu-devel] [PATCH 1/1] Coverity: Fix failure path for qemu_accept in migration

2014-03-19 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 19 March 2014 11:13, Dr. David Alan Gilbert (git) > wrote: > > From: "Dr. David Alan Gilbert" > > > > Coverity defects 1005733 & 1005734 complain about passing a -ve value > > to closesocket in the error paths on incoming migration. > > > > S

Re: [Qemu-devel] [PATCH v1 0/4] prebuild cpu QOM tree /machine/node/socket/core ->link-cpu

2014-03-19 Thread Eric Blake
On 03/19/2014 02:53 AM, Chen Fan wrote: > at present, after hotplug a discontinuous cpu id on source, then done > migration, > on target, it will fail to add the unoccupied cpu id which was skipped at > source, > this cause is on target Qemu prebuild CPU with continuous cpu_index. so after > migr

Re: [Qemu-devel] [PATCH 1/1] Coverity: Fix failure path for qemu_accept in migration

2014-03-19 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Peter Maydell (peter.mayd...@linaro.org) wrote: >> On 19 March 2014 11:13, Dr. David Alan Gilbert (git) >> wrote: >> > From: "Dr. David Alan Gilbert" >> > >> > Coverity defects 1005733 & 1005734 complain about passing a -ve value >> > to closesocket in the e

[Qemu-devel] [PULL 6/6] target-arm: A64: Add saturating accumulate ops (USQADD/SUQADD)

2014-03-19 Thread Peter Maydell
From: Alex Bennée Add the saturating accumulate operations USQADD and SUQADD to the A64 instruction set. This completes coverage of A64 Neon. These operations (which are unsigned + signed -> signed and signed + unsigned -> unsigned) don't exist in the A32/T32 instruction set, so require a complet

Re: [Qemu-devel] [PATCH 1/1] Stop reinit of XBZRLE.lock

2014-03-19 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert" writes: >> >> > * Markus Armbruster (arm...@redhat.com) wrote: >> >> "Dr. David Alan Gilbert (git)" writes: >> > >> > >> > >> >> > diff --git a/arch_init.c b/arch_init.c >> >> > index

Re: [Qemu-devel] [PATCHv2] vl.c: Fix memory leak in qemu_register_machine

2014-03-19 Thread Andreas Färber
Am 19.03.2014 12:24, schrieb Christian Borntraeger: > since commit 261747f176f6 (vl: Use MachineClass instead of global > QEMUMachine list) valgrind complains about the following: > > ==54082== 57 bytes in 3 blocks are definitely lost in loss record 365 of > 729 > ==54082==at 0x4031AFE: malloc

[Qemu-devel] [PULL 4/6] pl011: fix incorrect logic to set the RXFF flag

2014-03-19 Thread Peter Maydell
From: Rob Herring The receive fifo full bit should be set when 1 character is received and the fifo is disabled or when 16 characters are in the fifo. Signed-off-by: Rob Herring Reviewed-by: Peter Maydell Message-id: 1395166721-15716-4-git-send-email-robherri...@gmail.com Signed-off-by: Peter

[Qemu-devel] [PULL 3/6] pl011: fix UARTRSR accesses corrupting the UARTCR value

2014-03-19 Thread Peter Maydell
From: Rob Herring Offset 4 is UARTRSR/UARTECR, not the UARTCR. The UARTCR would be corrupted if the UARTRSR is ever written. Fix by implementing a correct model of the UARTRSR/UARTECR register. Reads of this register simply reflect the error bits in data register. Only breaks can be triggered in

[Qemu-devel] [PULL 2/6] pl011: reset the fifo when enabled or disabled

2014-03-19 Thread Peter Maydell
From: Rob Herring Intermittent issues have been seen where no serial input occurs. It appears the pl011 gets in a state where the rx interrupt never fires because the rx interrupt only asserts when crossing the fifo trigger level. The fifo state appears to get out of sync when the pl011 is re-con

[Qemu-devel] [PULL 0/6] target-arm queue

2014-03-19 Thread Peter Maydell
ommit 059b3527f0229f4d60fd77a317503d42abd5e50f: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-2' into staging (2014-03-18 16:39:29 +) are available in the git repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20140319 for you to fetc

[Qemu-devel] [PULL 1/6] ahci: fix sysbus support

2014-03-19 Thread Peter Maydell
From: Rob Herring Non-PCI AHCI support is broken due to assertion failures when trying to convert AHCIState to a PCIDevice pointer as AHCIState can have different container structs. Fix this by using the non-asserting object cast and checking the returned pointer is not NULL. The AddressSpace po

[Qemu-devel] [PULL 5/6] target-arm: A64: Add saturating int ops (SQNEG/SQABS)

2014-03-19 Thread Peter Maydell
From: Alex Bennée This mostly re-uses the existing NEON helpers with an additional two for the 64 bit case. I also took the opportunity to add TCG_CALL_NO_RWG options to the helpers as they don't modify globals (saturation flags are in the CPU Environment). Signed-off-by: Alex Bennée Signed-off

Re: [Qemu-devel] [PULL v2 for-2.0 13/24] dataplane: replace internal thread with IOThread

2014-03-19 Thread Paolo Bonzini
Il 19/03/2014 12:02, Christian Borntraeger ha scritto: Error *local_err = NULL; s->internal_iothread = true; object_add(TYPE_IOTHREAD, vdev->name, NULL, NULL, &local_err); This should instead use object_new and object_property_add_child to add an "internal-iothread" ch

Re: [Qemu-devel] [PATCH v4] net: L2TPv3 transport

2014-03-19 Thread Eric Blake
On 03/19/2014 03:31 AM, anton.iva...@kot-begemot.co.uk wrote: > From: Anton Ivanov > > This tranport allows to connect a qemu nic to a static Ethernet s/tranport/transport/ > over L2TPv3 tunnel. The transport supports all options present > in the linux kernel implementation. It allows qemu to c

Re: [Qemu-devel] [PATCH 1/1] Coverity: Fix failure path for qemu_accept in migration

2014-03-19 Thread Paolo Bonzini
Il 19/03/2014 12:34, Dr. David Alan Gilbert ha scritto: > > +fprintf(stderr, "could not accept migration connection (%d)\n", err); > > Bit unfriendly not to convert the errno to a string. I could reroll it with a strerror. Since you are at it, please use error_report too. Paolo

Re: [Qemu-devel] [PATCH] scripts: add sample model file for Coverity Scan

2014-03-19 Thread Paolo Bonzini
Il 19/03/2014 10:08, Markus Armbruster ha scritto: It probably would make static analysis a bit less powerful or will return more false positives. The NULL return for realloc (in the "free" case) already causes some. So I'm undecided between a more correct model and a more selective one (with a

Re: [Qemu-devel] [PATCH v4] net: L2TPv3 transport

2014-03-19 Thread Anton Ivanov (antivano)
On 19/03/14 12:39, Eric Blake wrote: > On 03/19/2014 03:31 AM, anton.iva...@kot-begemot.co.uk wrote: >> From: Anton Ivanov >> >> This tranport allows to connect a qemu nic to a static Ethernet > s/tranport/transport/ Guilty as charged :) > >> over L2TPv3 tunnel. The transport supports all option

Re: [Qemu-devel] [PATCH v2 0/5] s390: Support for Hotplug of Standby Memory

2014-03-19 Thread Matthew Rosato
On 03/10/2014 10:39 AM, Matthew Rosato wrote: > On 02/24/2014 04:30 PM, Matthew Rosato wrote: >> This patchset adds support in s390 for a pool of standby memory, >> which can be set online/offline by the guest (ie, via chmem). >> New options, maxmem and slots, are added to the QEMU command line >>

Re: [Qemu-devel] [PATCH v4] net: L2TPv3 transport

2014-03-19 Thread Andreas Färber
Am 19.03.2014 13:47, schrieb Anton Ivanov (antivano): > On 19/03/14 12:39, Eric Blake wrote: >> On 03/19/2014 03:31 AM, anton.iva...@kot-begemot.co.uk wrote: >>> From: Anton Ivanov >>> >>> This tranport allows to connect a qemu nic to a static Ethernet >> s/tranport/transport/ > > Guilty as charg

[Qemu-devel] Qemu User Mode emulation for Java programs

2014-03-19 Thread Prathmesh Kallurkar
Hi, I am using QEMU emulator for tracing the execution of an user program. We have added a helper function which prints the IP of all the executed instructions. We have tested the working of this tool for two variants of prime-number program - one in C and another in Java. We tried 4 different inp

[Qemu-devel] [PATCH v2] target-ppc: reset SPRs on CPU reset

2014-03-19 Thread Alexey Kardashevskiy
This resets SPR values to defaults on CPU reset. This should help with little-endian guests reboot issues. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * used ARRAY_SIZE --- target-ppc/cpu.h| 1 + target-ppc/translate_init.c | 12 +++- 2 files changed, 12 insertions(

[Qemu-devel] [PULL 1/8] block: Add error handling to bdrv_invalidate_cache()

2014-03-19 Thread Kevin Wolf
If it returns an error, the migrated VM will not be started, but qemu exits with an error message. Signed-off-by: Kevin Wolf Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Reviewed-by: Benoit Canet --- block.c | 28 ++-- block/qcow2.c

[Qemu-devel] [PULL 0/8] Block patches for 2.0.0-rc1

2014-03-19 Thread Kevin Wolf
The following changes since commit 059b3527f0229f4d60fd77a317503d42abd5e50f: Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-2' into staging (2014-03-18 16:39:29 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch ch

[Qemu-devel] [PULL 3/8] qemu-io: Extended "--cmd" description in usage text

2014-03-19 Thread Kevin Wolf
From: Maria Kustova It's not clear from the usage description that "--cmd" option accepts its argument as a string, so any special symbols have to be quoted from the shell. Updates in usage text: - Specified parameter format for "--cmd" option. - Added an instruction how to get help for "--cmd

[Qemu-devel] [PULL 8/8] dataplane: fix implicit IOThread refcount

2014-03-19 Thread Kevin Wolf
From: Stefan Hajnoczi When creating an IOThread implicitly (the user did not specify x-iothread=) remember that iothread_find() does not return the object with an incremented refcount. Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- hw/block/dataplane/virt

[Qemu-devel] [PULL 2/8] qemu-io-cmds: Fixed typo in example for writev.

2014-03-19 Thread Kevin Wolf
From: Maria Kustova Signed-off-by: Maria Kustova Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- qemu-io-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index fb1db53..60c1ceb 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.

[Qemu-devel] [PULL 4/8] qcow2: Correct comment for realloc_refcount_block()

2014-03-19 Thread Kevin Wolf
From: Max Reitz Contrary to the comment describing this function's behavior, it does not return 0 on success, but rather the offset of the newly allocated cluster. This patch adjusts the comment accordingly to reflect the actual behavior. Signed-off-by: Max Reitz Reviewed-by: Laszlo Ersek Sign

[Qemu-devel] [PULL 6/8] block/nfs: bump libnfs requirement to 1.9.3

2014-03-19 Thread Kevin Wolf
From: Peter Lieven libnfs prior to 1.9.3 contains a bug that will report wrong transfer sizes if the file offset grows beyond 4GB and RPC responses are received out of order. this error is not detectable and fixable in qemu. additionally 1.9.3 introduces support for handling short read/writes in

[Qemu-devel] [PULL 5/8] qcow2: Fix fail path in realloc_refcount_block()

2014-03-19 Thread Kevin Wolf
From: Max Reitz If qcow2_alloc_clusters() fails, new_offset and ret will both be negative after the fail label, thus passing the first if condition and subsequently resulting in a call of qcow2_free_clusters() with an invalid (negative) offset parameter. Fix this by introducing a new label "fail_

Re: [Qemu-devel] [PATCHv2] vl.c: Fix memory leak in qemu_register_machine

2014-03-19 Thread Michael S. Tsirkin
On Wed, Mar 19, 2014 at 12:24:27PM +0100, Christian Borntraeger wrote: > since commit 261747f176f6 (vl: Use MachineClass instead of global > QEMUMachine list) valgrind complains about the following: > > ==54082== 57 bytes in 3 blocks are definitely lost in loss record 365 of > 729 > ==54082==a

[Qemu-devel] [PULL 7/8] block/nfs: report errors from libnfs

2014-03-19 Thread Kevin Wolf
From: Peter Lieven if an NFS operation fails we should report what libnfs knows about the failure. It is likely more than just an error code. Signed-off-by: Peter Lieven Signed-off-by: Kevin Wolf --- block/nfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/nfs.c b/block/nfs.c

Re: [Qemu-devel] [PULL 0/6] target-arm queue

2014-03-19 Thread Peter Maydell
On 19 March 2014 12:05, Peter Maydell wrote: > Last target-arm pull before rc1. I don't know of any further outstanding > ARM related issues which would need to be fixed for 2.0 so barring any > late-breaking bug reports I think this should be it until release. Applied, thanks. -- PMM

[Qemu-devel] [PATCH v2 1/1] Coverity: Fix failure path for qemu_accept in migration

2014-03-19 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Coverity defects 1005733 & 1005734 complain about passing a negative value to closesocket in the error paths on incoming migration. Stash the error value and print it in the message (previously we gave no indication of the reason for the failure) Use error_report

Re: [Qemu-devel] [PATCH V2 for-2.0] vl.c: Fix OpenBSD compilation issue due to namespace collisions

2014-03-19 Thread Andreas Färber
Am 18.03.2014 16:26, schrieb Marcel Apfelbaum: > Machine rewriting added MACHINE macro which is > already in use by other OpenBSD library. > Since qemu/sockets.h exposes the OpenBSD namespace, > the minimalistic approach is to add it as the first QEMU include. > > Reported-by: Brad Smith > Signed

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-19 Thread Benoît Canet
The Monday 17 Mar 2014 à 21:24:37 (-0400), Jeff Cody wrote : > This creates some common functions for bash language qemu-iotests > to control, and communicate with, a running QEMU process. > > 4 functions are introduced: > > 1. _launch_qemu() > This launches the QEMU process(es), and

Re: [Qemu-devel] [PATCH 2/4] block: qemu-iotests - update 085 to use common.qemu

2014-03-19 Thread Benoît Canet
The Monday 17 Mar 2014 à 21:24:38 (-0400), Jeff Cody wrote : > The new functionality of common.qemu implements the QEMU control > and communication functionality that was originally in test 085. > > This removes that now-duplicate functionality, and uses the > common.qemu functions. > > Signed-of

Re: [Qemu-devel] [PATCH 3/4] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-03-19 Thread Benoît Canet
The Monday 17 Mar 2014 à 21:24:39 (-0400), Jeff Cody wrote : > The _rm_test_img() function in common.rc did not quote the image > file, which left droppings in the scratch directory (and performed > a potentially unsafe rm -f). > > This adds the necessary quotes. > > Signed-off-by: Jeff Cody > -

Re: [Qemu-devel] [PATCH 4/4] block: qemu-iotests: make test 019 and 086 work with spaced pathnames

2014-03-19 Thread Benoît Canet
The Monday 17 Mar 2014 à 21:24:40 (-0400), Jeff Cody wrote : > Both tests 019 and 086 need proper quotations to work with pathnames > that contain spaces. > > Signed-off-by: Jeff Cody > --- > tests/qemu-iotests/019 | 2 +- > tests/qemu-iotests/086 | 8 > 2 files changed, 5 insertions(+)

Re: [Qemu-devel] [PATCH 2/2] acpi: fix endian-ness for table ids

2014-03-19 Thread Marcel Apfelbaum
On Tue, 2014-03-18 at 19:07 +0100, Laszlo Ersek wrote: > On 03/18/14 15:48, Michael S. Tsirkin wrote: > > when using signature for table ID, we forgot to byte-swap it. > > signatures are really ASCII strings, let's treat them as such. > > While at it, get rid of most of _SIGNATURE macros. > > > >

Re: [Qemu-devel] [PATCH] scripts: add sample model file for Coverity Scan

2014-03-19 Thread Paolo Bonzini
Il 19/03/2014 13:46, Paolo Bonzini ha scritto: Il 19/03/2014 10:08, Markus Armbruster ha scritto: It probably would make static analysis a bit less powerful or will return more false positives. The NULL return for realloc (in the "free" case) already causes some. So I'm undecided between a mor

[Qemu-devel] [PATCH] qcow2.c: Check if backing file name length is valid

2014-03-19 Thread Deepak Kathayat
Signed-off-by: Deepak Kathayat --- The len variable is a signed integer whereas the backing file name length in the image header is unsigned. Therefore, it may overflow. Furthermore, backing file name length cannot be zero. These two cases must be handled explicitly. block/qcow2.c |5

[Qemu-devel] [PULL for-2.0 5/7] signal: added a wrapper for sigprocmask function

2014-03-19 Thread riku . voipio
From: Alex Barcelo Create a wrapper for signal mask changes initiated by the guest; (this includes syscalls and also the sigreturns from signal.c) this will give us a place to put code which prevents the guest from changing the handling of signals used by QEMU itself internally. The wrapper is c

[Qemu-devel] [PULL for-2.0 0/7] linux-user patches

2014-03-19 Thread riku . voipio
From: Riku Voipio The following changes since commit 6fffa26244737f8fd8641a21fee29bd6aa9fdff5: Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-15' into staging (2014-03-15 18:22:11 +) are available in the git repository at: git://git.linaro.org/people/riku.voipi

[Qemu-devel] [PULL for-2.0 4/7] linux-user: Don't reserve space for commpage for AArch64

2014-03-19 Thread riku . voipio
From: Peter Maydell AArch64 Linux, unlike AArch32, doesn't use a commpage. This means we should not be reserving room in the guest address space for one. Fixes LP:1287195. Reported-by: Amanieu d'Antras Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/elfload.c | 5 -

[Qemu-devel] [PULL for-2.0 6/7] linux-user: Don't allow guest to block SIGSEGV

2014-03-19 Thread riku . voipio
From: Peter Maydell Don't allow the linux-user guest to block SIGSEGV -- QEMU needs this signal to detect accesses to pages which it has marked read-only because it has cached translated code from them. We implement this by making the do_sigprocmask() wrapper suppress SIGSEGV when doing the host

[Qemu-devel] [PULL for-2.0 7/7] linux-user: Implement capget, capset

2014-03-19 Thread riku . voipio
From: Peter Maydell Implement the capget and capset syscalls. This is useful because simple programs like 'ls' try to use it in AArch64, and otherwise we emit a lot of noise about it being unimplemented. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 7

[Qemu-devel] [PATCH] target-ppc: Fix overallocation of opcode tables

2014-03-19 Thread Stuart Brady
create_new_table() should allocate 0x20 opc_handler_t pointers, but actually allocates 0x20 opc_handler_t structs. Fix this. Signed-off-by: Stuart Brady --- translate_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate

Re: [Qemu-devel] [PULL 0/8] Block patches for 2.0.0-rc1

2014-03-19 Thread Peter Maydell
On 19 March 2014 13:11, Kevin Wolf wrote: > The following changes since commit 059b3527f0229f4d60fd77a317503d42abd5e50f: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-2' into staging > (2014-03-18 16:39:29 +) > > are available in the git repository at: > > > git://repo.or

[Qemu-devel] [PATCH] target-ppc: improve "info registers" by printing SPRs

2014-03-19 Thread Alexey Kardashevskiy
This adds printing of all SPR registers registered for a CPU. This removes "SPR_" prefix from SPR name to reduce the output. Signed-off-by: Alexey Kardashevskiy --- Now it should look like below. Before the user had to attach with gdb to read SPRs. (qemu) info registers NIP 0100

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-19 Thread Jeff Cody
On Wed, Mar 19, 2014 at 02:39:25PM +0100, Benoît Canet wrote: > The Monday 17 Mar 2014 à 21:24:37 (-0400), Jeff Cody wrote : > > This creates some common functions for bash language qemu-iotests > > to control, and communicate with, a running QEMU process. > > > > 4 functions are introduced: > >

[Qemu-devel] [PULL for-2.0 1/7] linux-user/signal.c: Correct error path for AArch64 do_rt_sigreturn

2014-03-19 Thread riku . voipio
From: Peter Maydell The error path in AArch64 do_rt_sigreturn() which fails before attempting lock_user_struct() was doing an unlock_user_struct() on an uninitialized variable. Initialize frame to NULL so we can use the same error-exit path in all cases (unlock of NULL is permitted and does nothi

[Qemu-devel] [PULL for-2.0 3/7] linux-user: implement F_[GS]ETOWN_EX

2014-03-19 Thread riku . voipio
From: Andreas Schwab F_GETOWN is replaced by F_GETOWN_EX inside the glibc fcntl wrapper Signed-off-by: Andreas Schwab Signed-off-by: Riku Voipio --- linux-user/syscall.c | 36 linux-user/syscall_defs.h | 7 +++ 2 files changed, 43 insertions(+)

[Qemu-devel] [PULL for-2.0 2/7] linux-user: Don't return uninitialized value for atomic_barrier syscall

2014-03-19 Thread riku . voipio
From: Peter Maydell QEMU's implementation of the m68k atomic_barrier syscall, like the kernel's, is just a no-op. However we still need to return a result code from it. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [Qemu-devel] [PATCH] target-ppc: Fix h_enter to loop correctly

2014-03-19 Thread Aneesh Kumar K.V
Hi, I guess this should get into 2.0 ? "Aneesh Kumar K.V" writes: > From: "Aneesh Kumar K.V" > > We wanted to loop till index is 8. On 8 we return with H_PTEG_FULL. If we are > successful in loading hpte with any other index, we continue with that > index value. > > Reported-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-19 Thread Eric Blake
On 03/19/2014 08:19 AM, Jeff Cody wrote: >>> +then >>> +_timed_wait_for ${h} "${@: -1}" >> >> You have done shift before this. Aren't ${*} the remaining strings to wait >> for ? >> > > I could probably get rid of the 2nd shift, although I would have to > adjust the conditional below.

Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-03-19 Thread Eric Blake
On 03/19/2014 08:28 AM, Eric Blake wrote: > $ dash -c 'set 1 2 3; echo ${@: -1}' > dash: 1: Bad substitution > > If you want the last argument, you'll have to do something hideous like: > > eval \${$#} > > Short of using eval, there is no portable way to get at the last > positional argument in

Re: [Qemu-devel] [PULL for-2.0 0/7] linux-user patches

2014-03-19 Thread Peter Maydell
On 19 March 2014 14:02, wrote: > From: Riku Voipio > > The following changes since commit 6fffa26244737f8fd8641a21fee29bd6aa9fdff5: > > Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-03-15' > into staging (2014-03-15 18:22:11 +) > > are available in the git repository

  1   2   3   >