Re: [Qemu-devel] patch: add -kbddelay option

2014-05-26 Thread Markus Armbruster
Dave Mielke writes: > [quoted lines by Dave Mielke on 2014/05/26 at 08:59 -0400] > > I'm sorry for quoting myself, but I'm doing it for context since I have a > question: > >>This patch, attached as qemu-kbddelay-1.patch, is a rework of the former >>curses >>UI patch so that the delay applies to

Re: [Qemu-devel] [RFC PATCH] trace: Replace error with warning if event is not defined

2014-05-26 Thread Markus Armbruster
Copying Stefan. scripts/get_maintainer.pl would've told you so :) Alexey Kardashevskiy writes: > At the moment QEMU exits if trace point is not defined which makes > a developer life harder if he has to switch between branches with > different traces implemented. > > This replaces error+exit wi

Re: [Qemu-devel] [RFC PATCH] trace: Replace error with warning if event is not defined

2014-05-26 Thread Alexey Kardashevskiy
On 05/21/2014 06:16 PM, Alexey Kardashevskiy wrote: > At the moment QEMU exits if trace point is not defined which makes > a developer life harder if he has to switch between branches with > different traces implemented. > > This replaces error+exit wit WARNING if the tracepoint does not exist or

Re: [Qemu-devel] [Qemu-trivial] patch: add delay= suboption to -display curses

2014-05-26 Thread Gerd Hoffmann
On Mo, 2014-05-26 at 11:19 -0400, Dave Mielke wrote: > [quoted lines by Gerd Hoffmann on 2014/05/26 at 15:38 +0200] > > >Tried to make the curses ui a bit more clever? You could try caching > >the modifier state, then send only the changes. That gets the number of > >events down to 6 max (4 to u

[Qemu-devel] [PATCH v3 4/9] spapr_pci: spapr_iommu: Make DMA window a subregion

2014-05-26 Thread Alexey Kardashevskiy
Currently the default DMA window is represented by a single MemoryRegion. However there can be more than just one window so we need a "root" memory region to be separated from the actual DMA window(s). This introduces a "root" IOMMU memory region and adds a subregion for the default DMA 32bit wind

[Qemu-devel] [PATCH v3 6/9] spapr_iommu: Convert old qdev_init_nofail() to object_property_set_bool

2014-05-26 Thread Alexey Kardashevskiy
qdev_init_nofail() was replaced by object_property_set_bool("realized") all over the QEMU so do we. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c index 5b7c141..677f985

[Qemu-devel] [PATCH v3 0/9] spapr_pci: Prepare for VFIO

2014-05-26 Thread Alexey Kardashevskiy
This patchset prepares QEMU for VFIO support on SPAPR. It also does preparations for Dynamic DMA window feature which allows to create DMA windows with 16MB IOMMU pages which will allow to map the entire guest RAM for DMA at almost no cost. The only change is in "spapr_iommu: Introduce page_shift

[Qemu-devel] [PATCH v3 8/9] spapr_iommu: Introduce page_shift in sPAPRTCETable

2014-05-26 Thread Alexey Kardashevskiy
At the moment only 4K pages are supported by sPAPRTCETable. Since sPAPR spec allows other page sizes and we are going to implement them, we need page size to be configrable. This adds @page_shift into sPAPRTCETable and replaces SPAPR_TCE_PAGE_SHIFT with it where it is possible. Signed-off-by: Ale

[Qemu-devel] [PATCH v3 9/9] spapr_iommu: Introduce bus_offset in sPAPRTCETable

2014-05-26 Thread Alexey Kardashevskiy
This adds @bus_offset into sPAPRTCETable to tell where TCE table starts from. It is set to 0 for emulated devices. Dynamic DMA windows will use other offset. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_iommu.c | 13 + hw/ppc/spapr_pci.c | 5 +++-- hw/ppc/spapr_vio.c

[Qemu-devel] [PATCH v3 1/9] spapr: Enable dynamic change of the supported hypercalls list

2014-05-26 Thread Alexey Kardashevskiy
At the moment the "ibm,hypertas-functions" list is fixed. However some calls should be listed there if they are supported by QEMU or the host kernel. This enables hyperrtas_prop to grow on stack by adding a SPAPR_HYPERRTAS_ADD macro. "qemu,hypertas-functions" is converted as well. The first user

[Qemu-devel] [PATCH v3 3/9] spapr_pci: Introduce a finish_realize() callback

2014-05-26 Thread Alexey Kardashevskiy
The spapr-pci PHB initializes IOMMU for emulated devices only. The upcoming VFIO support will do it different. However both emulated and VFIO PHB types share most of the initialization code. For the type specific things a new finish_realize() callback is introduced. This introduces sPAPRPHBClass d

[Qemu-devel] [PATCH v3 2/9] spapr_iommu: Enable multiple TCE requests

2014-05-26 Thread Alexey Kardashevskiy
Currently only single TCE entry per request is supported (H_PUT_TCE). However PAPR+ specification allows multiple entry requests such as H_PUT_TCE_INDIRECT and H_STUFF_TCE. Having less transitions to the host kernel via ioctls, support of these calls can accelerate IOMMU operations. This implement

[Qemu-devel] [PATCH v3 7/9] spapr_iommu: Get rid of window_size in sPAPRTCETable

2014-05-26 Thread Alexey Kardashevskiy
This removes window_size as it is basically a copy of nb_table shifted by SPAPR_TCE_PAGE_SHIFT. As new dynamic DMA windows are going to support windows as big as the entire RAM and this number will be bigger that 32 capacity, we will have to do something about @window_size anyway and removal seems

[Qemu-devel] [PATCH v3 5/9] spapr_pci: Allow multiple TCE tables per PHB

2014-05-26 Thread Alexey Kardashevskiy
At the moment sPAPRPHBState contains a @tcet pointer to the only TCE table. However sPAPR spec allows having more than one DMA window. Since the TCE object is already a child of SPAPR PHB object, there is no need to keep an additional pointer to it in sPAPRPHBState so remove it. This changes the

Re: [Qemu-devel] [PATCH v2 8/8] spapr_pci: Use XICS interrupt allocator and do not cache interrupts in PHB

2014-05-26 Thread Alexey Kardashevskiy
On 05/23/2014 12:25 AM, Alexey Kardashevskiy wrote: > On 05/22/2014 08:57 PM, Alexander Graf wrote: >> >> On 22.05.14 12:53, Alexey Kardashevskiy wrote: >>> On 05/22/2014 05:16 PM, Alexander Graf wrote:> > Am 22.05.2014 um 08:53 schrieb Alexey Kardashevskiy : > >> On 05/21/2014 10:42 PM

Re: [Qemu-devel] [bug] busy-loop in send_all()

2014-05-26 Thread Amit Shah
Hi, Also CCing Gerd. On (Fri) 23 May 2014 [13:55:40], Stefan Hajnoczi wrote: > On Thu, May 15, 2014 at 11:23:54AM -0600, Chris Friesen wrote: > > I've run into a situation that seems like a bug. I'm using qemu 1.4.2 (with > > additional patches) from within openstack. > > > > I'm using virtio-s

Re: [Qemu-devel] [RFC v1 06/25] memory: MemoryRegion: Add container and addr props

2014-05-26 Thread Peter Crosthwaite
On Fri, May 16, 2014 at 11:53 AM, Peter Crosthwaite wrote: > Expose the already existing .parent and .addr fields as QOM properties. > Setting the address will cause the memory subregion adding to happen if > it has not already. If the memory region is already contained, then > change it's address

[Qemu-devel] [PATCH] tci: Convert to new ldst opcodes

2014-05-26 Thread Richard Henderson
Use the qemu/bswap.h interface for user-only memory accesses. Otherwise the conversion is straight-forward, and takes care of the last backend. Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c | 76 +--- tcg/tci/tcg-target.h | 2 +- tci.c| 322

Re: [Qemu-devel] [PATCH 5/5] usb: improve ehci/uhci test

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 4:57 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann > Subject: [Qemu-devel] [PATC

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Richard Henderson
On 05/26/2014 07:32 PM, Petar Jovanovic wrote: > > > From: Richard Henderson [rth7...@gmail.com] on behalf of Richard Henderson > [r...@twiddle.net] > Sent: Tuesday, May 27, 2014 3:35 AM > To: Petar Jovanovic; Petar Jovanovic; qemu-devel@nongnu.org > Cc: a

Re: [Qemu-devel] [PATCH 2/5] usb: move uhci register defines to header file

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 4:57 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann > Subject: [Qemu-devel] [PATC

Re: [Qemu-devel] [PATCH 4/5] usb: move ehci register defines to header file

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 4:57 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann > Subject: [Qemu-devel] [PATC

Re: [Qemu-devel] [PATCH 3/5] usb: add uhci port status reserved bit

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 4:57 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann > Subject: [Qemu-devel] [PAT

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Petar Jovanovic
From: Richard Henderson [rth7...@gmail.com] on behalf of Richard Henderson [r...@twiddle.net] Sent: Tuesday, May 27, 2014 3:35 AM To: Petar Jovanovic; Petar Jovanovic; qemu-devel@nongnu.org Cc: aurel...@aurel32.net; James Hogan Subject: Re: [v2 PATCH] targ

Re: [Qemu-devel] [PATCH] xhci: make port reset trace point more verbose

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 5:26 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann > Subject: [Qemu-devel] [PATC

Re: [Qemu-devel] [PATCH] console: kill MAX_CONSOLES, alloc consoles dynamically

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 5:26 PM > To: qemu-devel@nongnu.org > Cc: Gerd Hoffmann; Anthony Liguori > Subject:

Re: [Qemu-devel] [PATCH] usb: add usb_pick_speed

2014-05-26 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Gerd Hoffmann > Sent: Monday, May 26, 2014 4:58 PM > To: qemu-devel@nongnu.org > Cc: hdego...@redhat.com; Gerd Hoffmann > Subjec

[Qemu-devel] [PATCH 5/8] qemu-bridge-helper: Fix fd leak in main()

2014-05-26 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- qemu-bridge-helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c index 6a0974e..dce5abc 100644 --- a/qemu-bridge-helper.c +++ b/qemu-bridge-helper.c @@ -436,7 +436,12 @@ int main(i

Re: [Qemu-devel] [PATCH] tests: check empty qmp output visitor

2014-05-26 Thread Amos Kong
On Tue, May 20, 2014 at 07:19:49PM -0500, Michael Roth wrote: > Quoting Marcel Apfelbaum (2014-05-20 10:07:59) > > Checks the output visitor behaviour for NULL values. > > > > Signed-off-by: Marcel Apfelbaum > > --- > > Notes: > > - I didn't add Michael's Sob because I tweaked the test a little

Re: [Qemu-devel] [PATCH 7/8] dump: Fix use-after-free in create_kdump_vmcore()

2014-05-26 Thread qiaonuohan
On 05/27/2014 09:40 AM, arei.gong...@huawei.com wrote: From: Gonglei Spotted by Coverity: (7) Event closed_arg: "write_dump_pages(DumpState *)" closes "s->fd". [details] Also see events: [pass_closed_arg] 1490ret = write_dump_pages(s); (8) Event cond_false: Condition "ret< 0", taki

[Qemu-devel] [PATCH 4/8] qcow2-cluster: Fix memory leak in copy_sectors

2014-05-26 Thread arei.gonglei
From: Gonglei Spotted by Coverity: (3) Event alloc_fn: Storage is returned from allocation function "qemu_blockalign(BlockDriverState *, size_t)". [details] (4) Event var_assign: Assigning: "iov.iov_base" = storage returned from "qemu_blockalign(bs, iov.iov_len)". Also see events: [leaked_s

[Qemu-devel] [PATCH 8/8] audio: Fix using freed pointer in wav_fini_out()

2014-05-26 Thread arei.gonglei
From: Gonglei Spotted by Coverity: (8) Event freed_arg: "fclose(FILE *)" frees "wav->f". (9) Event cond_true: Condition "fclose(wav->f)", taking true branch Also see events: [pass_freed_arg] 212 if (fclose (wav->f)) { (10) Event pass_freed_arg: Passing freed pointer "wav->f" as an

Re: [Qemu-devel] patch: add -kbddelay option

2014-05-26 Thread Dave Mielke
[quoted lines by Dave Mielke on 2014/05/26 at 08:59 -0400] I'm sorry for quoting myself, but I'm doing it for context since I have a question: >This patch, attached as qemu-kbddelay-1.patch, is a rework of the former curses >UI patch so that the delay applies to key events in general. A new optio

[Qemu-devel] [PATCH 1/8] vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16, 24, 32}

2014-05-26 Thread arei.gonglei
From: Gonglei Spotted by Coverity: (1) Event assignment: Assigning: "pixels" = "0". (2) Event cond_true: Condition "y < h", taking true branch (3) Event cond_false: Condition "x < w", taking false branch (4) Event loop_end: Reached end of loop (5) Event divide_by_zero: In expression "(stats

[Qemu-devel] [PATCH 6/8] smbus: Fix unreachable code in smb_transaction()

2014-05-26 Thread arei.gonglei
From: Gonglei Spotted by Coverity: (1) Event unreachable: This code cannot be reached: "abort();". 112 abort(); Signed-off-by: Gonglei --- hw/i2c/pm_smbus.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i2c/pm_smbus.c b/hw/i2c/pm_smbus.c index fedb5fb..da09eb0 100644 --- a/h

[Qemu-devel] [PATCH 3/8] json-parser: fix two coverity defects

2014-05-26 Thread arei.gonglei
From: Gonglei Pointer "token" returned by "parser_context_pop_token(ctxt)" is never used. Signed-off-by: ChenLiang Signed-off-by: Gonglei --- qobject/json-parser.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qobject/json-parser.c b/qobject/json-parser.c index e46

[Qemu-devel] [PATCH 0/8] Fix some errors spotted by Coverity

2014-05-26 Thread arei.gonglei
From: Gonglei Fix some errors spotted by Coverity. Gonglei (8): vnc-enc-tight: Fix divide-by-zero in tight_detect_smooth_image{16,24,32} vga: Fix divide-by-zero in vga_update_text json-parser: fix two coverity defects qcow2-cluster: Fix memory leak in copy_sectors qemu-bridge-helpe

[Qemu-devel] [PATCH 2/8] vga: Fix divide-by-zero in vga_update_text

2014-05-26 Thread arei.gonglei
From: Gonglei potted by Coverity: (20) Event cond_true: Condition "cursor_visible", taking true branch (21) Event cond_true: Condition "cursor_offset < size", taking true branch (22) Event cond_true: Condition "cursor_offset >= 0", taking true branch 2097if (cursor_visible && cursor_offs

[Qemu-devel] [PATCH 7/8] dump: Fix use-after-free in create_kdump_vmcore()

2014-05-26 Thread arei.gonglei
From: Gonglei Spotted by Coverity: (7) Event closed_arg: "write_dump_pages(DumpState *)" closes "s->fd". [details] Also see events: [pass_closed_arg] 1490ret = write_dump_pages(s); (8) Event cond_false: Condition "ret < 0", taking false branch 1491if (ret < 0) { 1492

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Richard Henderson
On 05/26/2014 06:21 PM, Petar Jovanovic wrote: > Because we do not know the content of CP0_HWREna. We can know the same way we know the content of CP0_Config3. r~

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Petar Jovanovic
From: Richard Henderson [rth7...@gmail.com] on behalf of Richard Henderson [r...@twiddle.net] Sent: Tuesday, May 27, 2014 12:53 AM To: Petar Jovanovic; qemu-devel@nongnu.org Cc: Petar Jovanovic; aurel...@aurel32.net; James Hogan Subject: Re: [v2 PATCH] tar

[Qemu-devel] [PATCH qom v1 1/1] qom: object: remove parent pointer when unparenting

2014-05-26 Thread Peter Crosthwaite
Certain parts of the QOM framework test this pointer to determine if an object is parented. Nuke it when the object is unparented to allow for reuse of an object after unparenting. Signed-off-by: Peter Crosthwaite --- qom/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/object.c

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-26 Thread Alexander Graf
On 27.05.14 02:23, Alexey Kardashevskiy wrote: On 05/27/2014 06:09 AM, Alexander Graf wrote: On 26.05.14 17:45, Alexey Kardashevskiy wrote: On 05/22/2014 04:08 AM, Tom Musta wrote: On 5/21/2014 1:20 AM, Alexey Kardashevskiy wrote: This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-26 Thread Alexey Kardashevskiy
On 05/27/2014 06:09 AM, Alexander Graf wrote: > > On 26.05.14 17:45, Alexey Kardashevskiy wrote: >> On 05/22/2014 04:08 AM, Tom Musta wrote: >>> On 5/21/2014 1:20 AM, Alexey Kardashevskiy wrote: This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU/ EBBHR/EBBRR/BESCR/TFHAR/TFIAR/

[Qemu-devel] [PATCH] macio: Fix timer endianness

2014-05-26 Thread Alexander Graf
The timer registers on our KeyLargo macio emulation are read as byte reversed from the big endian guest, so we better expose them endian reversed as well. This fixes initial hickups of booting Mac OS X with -M mac99 for me. Signed-off-by: Alexander Graf --- hw/misc/macio/macio.c | 2 +- 1 file

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Richard Henderson
On 05/26/2014 10:28 AM, Petar Jovanovic wrote: > void helper_mtc0_hwrena(CPUMIPSState *env, target_ulong arg1) > { > -env->CP0_HWREna = arg1 & 0x000F; > +uint32_t mask = 0x000F; > + > +if (env->CP0_Config3 & (1 << CP0C3_ULRI)) { > +mask |= 0x2000; > +} > + > +

Re: [Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Andreas Färber
Am 26.05.2014 19:28, schrieb Petar Jovanovic: > From: Petar Jovanovic > > From MIPS documentation (Volume III): > > UserLocal Register (CP0 Register 4, Select 2) > Compliance Level: Recommended. > > The UserLocal register is a read-write register that is not interpreted by > the hardware and co

Re: [Qemu-devel] BUG: commit 50a2c6e breaks KVM/ARM (reset/init vcpu order)

2014-05-26 Thread Alexander Graf
On 26.05.14 14:36, Andreas Färber wrote: Am 26.05.2014 12:31, schrieb Alexander Graf: On 26.05.14 12:20, Andreas Färber wrote: Am 26.05.2014 11:57, schrieb Alexander Graf: Any reason we're so incredibly inconsistent in what we do during realize with reset? I would really prefer to ensure we'r

Re: [Qemu-devel] [PATCH] macio ide: Do remainder access asynchronously

2014-05-26 Thread Alexander Graf
On 26.05.14 15:56, Mark Cave-Ayland wrote: On 26/05/14 09:32, Alexander Graf wrote: The macio IDE controller has some pretty nasty magic in its implementation to allow for unaligned sector accesses. We used to handle these accesses synchronously inside the IO callback handler. However, the b

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-26 Thread Alexander Graf
On 26.05.14 17:50, Alexey Kardashevskiy wrote: On 05/21/2014 08:47 PM, Alexander Graf wrote: On 21.05.14 08:20, Alexey Kardashevskiy wrote: This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU/ EBBHR/EBBRR/BESCR/TFHAR/TFIAR/TEXASR/TEXASRU SPRs. This adds MMCR2/FSCR/MMCRS SPRs. Signe

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-26 Thread Alexander Graf
On 26.05.14 17:45, Alexey Kardashevskiy wrote: On 05/22/2014 04:08 AM, Tom Musta wrote: On 5/21/2014 1:20 AM, Alexey Kardashevskiy wrote: This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU/ EBBHR/EBBRR/BESCR/TFHAR/TFIAR/TEXASR/TEXASRU SPRs. This adds MMCR2/FSCR/MMCRS SPRs. Signed-

[Qemu-devel] [PATCH 02/14] block/vvfat: Plug memory leak in enable_write_target()

2014-05-26 Thread Markus Armbruster
I figure the leak originated in bdrv_create2(), and was duplicated into callers when commit 91a073ak dropped that function. Looks like the other places have since been fixed. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block/vvfat.c | 1 + 1 file changed, 1 insertion(+) diff --g

[Qemu-devel] [PATCH 06/14] qemu-io: Plug memory leak in open command

2014-05-26 Thread Markus Armbruster
Introduced in commit b543c5c. Spotted by Coverity. Signed-off-by: Markus Armbruster --- qemu-io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-io.c b/qemu-io.c index ef3fef6..ffbad25 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -175,6 +175,7 @@ static int open_f(BlockDriverState *bs, i

[Qemu-devel] [PATCH 03/14] qcow2: Plug memory leak on qcow2_invalidate_cache() error paths

2014-05-26 Thread Markus Armbruster
Introduced in commit 5a8a30d. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block/qcow2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index a4b97e8..a54d2ba 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1308,6 +1308,7 @@ s

[Qemu-devel] [PATCH 04/14] block: Plug memory leak on brv_open_image() error path

2014-05-26 Thread Markus Armbruster
Introduced in commit da557a. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block.c b/block.c index 40c5e1a..1996f84 100644 --- a/block.c +++ b/block.c @@ -1196,6 +1196,7 @@ int bdrv_open_image(BlockDriverState **pbs, const

Re: [Qemu-devel] [PATCH V2 0/4] machine: QemuOpts per machine

2014-05-26 Thread Michael Roth
Quoting Andreas Färber (2014-05-26 11:42:45) > Am 26.05.2014 14:48, schrieb Michael S. Tsirkin: > > On Mon, May 26, 2014 at 03:40:54PM +0300, Marcel Apfelbaum wrote: > >> V1 -> V2: > >> - Rebased on qom-next queue. > >> - Patch 1/4: > >>- Since there are a lot of discussions on the correct >

[Qemu-devel] [PATCH 10/14] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR

2014-05-26 Thread Markus Armbruster
Introduced in commit a8d8ecb. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block/qapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qapi.c b/block/qapi.c index 75f44f1..97e1641 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -475,6 +475,7 @@ static void dump_qobject(f

[Qemu-devel] [PATCH 01/14] qemu-img: Plug memory leak on block option help error path

2014-05-26 Thread Markus Armbruster
Introduced in commit a283cb6; mostly harmless. Spotted by Coverity. Signed-off-by: Markus Armbruster --- qemu-img.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu-img.c b/qemu-img.c index 1ad899e..62ea27e 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -287,6 +287,7 @@ static int print_bl

[Qemu-devel] [PATCH 14/14] qemu-img: Plug memory leak in convert command

2014-05-26 Thread Markus Armbruster
Introduced in commit 661a0f7. Spotted by Coverity. Signed-off-by: Markus Armbruster --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 62ea27e..d118da5 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -1455,7 +1455,7 @@ static int img_con

[Qemu-devel] [PATCH 13/14] block/sheepdog: Plug memory leak in sd_snapshot_create()

2014-05-26 Thread Markus Armbruster
Has always been leaky. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block/sheepdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 2c3fb01..9a9a307 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -2149,6 +2

[Qemu-devel] [PATCH 09/14] blockdev: Plug memory leak in drive_init()

2014-05-26 Thread Markus Armbruster
Introduced in commit f298d07. Spotted by Coverity. Signed-off-by: Markus Armbruster --- blockdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockdev.c b/blockdev.c index 6460c70..7ec7d79 100644 --- a/blockdev.c +++ b/blockdev.c @@ -941,6 +941,7 @@ DriveInfo *drive_init(QemuOpts *al

[Qemu-devel] [PATCH 12/14] block/vvfat: Plug memory leak in read_directory()

2014-05-26 Thread Markus Armbruster
Has always been leaky. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block/vvfat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index 2c82a5c..389704a 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -787,7 +787,9 @@ static in

[Qemu-devel] [PATCH 07/14] qemu-io: Don't print NULL when open without non-option arg fails

2014-05-26 Thread Markus Armbruster
Reproducer: "open -o a=b". Broken in commit fd0fee3. Signed-off-by: Markus Armbruster --- qemu-io.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index ffbad25..0daf413 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -61,7 +61,8 @@ static int openfile(

[Qemu-devel] [PATCH 08/14] blockdev: Plug memory leak in blockdev_init()

2014-05-26 Thread Markus Armbruster
blockdev_init() leaks bs_opts when qemu_opts_create() fails, i.e. when the ID is bad. Missed in commit ec9c10d. Signed-off-by: Markus Armbruster --- blockdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 1cbcc1c..6460c70 100644 --- a/bl

[Qemu-devel] [PATCH 05/14] qemu-io: Support multiple -o in open command

2014-05-26 Thread Markus Armbruster
Instead of ignoring all option values but the last one, multiple -o options now have the same meaning as having a single option with all settings in the order of their respective -o options. Same as commit 2dc8328 for qemu-img convert, except here we do it with QemuOpts rather than QEMUOptionParam

[Qemu-devel] [PATCH 11/14] block/vvfat: Plug memory leak in check_directory_consistency()

2014-05-26 Thread Markus Armbruster
On error path. Introduced in commit a046433a. Spotted by Coverity. Signed-off-by: Markus Armbruster --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index 6a0d246..2c82a5c 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -1864

[Qemu-devel] [PATCH 00/14] block: Plug assorted memory leaks

2014-05-26 Thread Markus Armbruster
Most of them are probably harmless. Copying qemu-stable anyway, just in case. Also fix two qemu-io bugs I found while investigating its leaks. Markus Armbruster (14): qemu-img: Plug memory leak on block option help error path block/vvfat: Plug memory leak in enable_write_target() qcow2: Pl

[Qemu-devel] [v2 PATCH] target-mips: implement UserLocal Register

2014-05-26 Thread Petar Jovanovic
From: Petar Jovanovic >From MIPS documentation (Volume III): UserLocal Register (CP0 Register 4, Select 2) Compliance Level: Recommended. The UserLocal register is a read-write register that is not interpreted by the hardware and conditionally readable via the RDHWR instruction. This register

Re: [Qemu-devel] BUG: commit 50a2c6e breaks KVM/ARM (reset/init vcpu order)

2014-05-26 Thread Richard Henderson
On 05/26/2014 03:20 AM, Andreas Färber wrote: > Alpha is the main blocker for unifying CPU reset iirc. It does not > implement reset at all and thus is not calling it. The struct was not > designed for zero'ing things, so there's a mix of data fields and > pointers without clear separation to allow

[Qemu-devel] OpenIndiana x86 with tcg hangs/timeouts

2014-05-26 Thread Sai Prajeeth
Hi list, Many services timeout in OpenIndiana (151a8 Server Build 32 bit x86) during boot when i use the tcg accelerator. This is pushing the boot time of the OS to more than 45 mins depending on the number of CPUs activated. I did the tests with qemu-system-i386 -smp sockets=4,cores=1,threads=1

Re: [Qemu-devel] [PATCH V2 0/4] machine: QemuOpts per machine

2014-05-26 Thread Andreas Färber
Am 26.05.2014 14:48, schrieb Michael S. Tsirkin: > On Mon, May 26, 2014 at 03:40:54PM +0300, Marcel Apfelbaum wrote: >> V1 -> V2: >> - Rebased on qom-next queue. >> - Patch 1/4: >>- Since there are a lot of discussions on the correct >> way to do the fix, added a FIXME comment to find a

Re: [Qemu-devel] [PATCH V2 4/4] hw/machine: qemu machine opts as properties to QemuMachineState

2014-05-26 Thread Andreas Färber
Am 26.05.2014 14:40, schrieb Marcel Apfelbaum: > Make machine's QemuOpts QOM properties of machine. The properties > are automatically filled in. This opens the possiblity to create > opts per machine rather than global. > > Signed-off-by: Marcel Apfelbaum > --- > hw/core/machine.c | 256 > ++

Re: [Qemu-devel] [PATCH v4] block: replace fprintf(stderr, ...) with error_report()

2014-05-26 Thread Markus Armbruster
Kevin Wolf writes: > Am 26.05.2014 um 17:02 hat Markus Armbruster geschrieben: >> Stefan Hajnoczi writes: >> >> > On Mon, May 26, 2014 at 09:44:03AM +0800, Le Tan wrote: >> >> Replace fprintf(stderr,...) with error_report() in files block/*, block.c, >> >> block-migration.c and blockdev.c. The

[Qemu-devel] Q35 virtio disk unplug 'memory.c:1403: memory_region_del_eventfd: Assertion `i != mr->ioeventfd_nb' failed.'

2014-05-26 Thread Etienne Martineau
Hi, When using virtio disk plug/unplug with Q35 machine I see two problems. Note that when using the same sequence with default 440FX I see no issues. A) 'pcie.0' does not support hotplugging' I can workaround this problem if I manually specify "-readconfig /usr/share/qemu-153/Q35-chipset.cf

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-26 Thread Alexey Kardashevskiy
On 05/21/2014 08:47 PM, Alexander Graf wrote: > > On 21.05.14 08:20, Alexey Kardashevskiy wrote: >> This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU/ >> EBBHR/EBBRR/BESCR/TFHAR/TFIAR/TEXASR/TEXASRU SPRs. >> >> This adds MMCR2/FSCR/MMCRS SPRs. >> >> Signed-off-by: Alexey Kardashevskiy

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Add POWER8 SPRs

2014-05-26 Thread Alexey Kardashevskiy
On 05/22/2014 04:08 AM, Tom Musta wrote: > On 5/21/2014 1:20 AM, Alexey Kardashevskiy wrote: >> This adds helper which adds TAR/BESCRS/BESCRSU/BESCRR/BESCRRU/ >> EBBHR/EBBRR/BESCR/TFHAR/TFIAR/TEXASR/TEXASRU SPRs. >> >> This adds MMCR2/FSCR/MMCRS SPRs. >> >> Signed-off-by: Alexey Kardashevskiy >> -

Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal Register

2014-05-26 Thread Petar Jovanovic
From: James Hogan [ja...@albanarts.com] on behalf of James Hogan Sent: Thursday, May 22, 2014 2:19 AM To: qemu-devel@nongnu.org Cc: Petar Jovanovic; Petar Jovanovic; aurel...@aurel32.net Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal

Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal Register

2014-05-26 Thread Petar Jovanovic
From: James Hogan [ja...@albanarts.com] Sent: Thursday, May 22, 2014 2:03 AM To: qemu-devel@nongnu.org Cc: Petar Jovanovic; Petar Jovanovic; aurel...@aurel32.net Subject: Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal Register > I think you

Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal Register

2014-05-26 Thread Petar Jovanovic
From: Richard Henderson [rth7...@gmail.com] on behalf of Richard Henderson [r...@twiddle.net] Sent: Saturday, May 17, 2014 8:11 PM To: Petar Jovanovic; qemu-devel@nongnu.org Cc: Petar Jovanovic; aurel...@aurel32.net Subject: Re: [Qemu-devel] [PATCH 2/2] ta

Re: [Qemu-devel] [Qemu-trivial] patch: add delay= suboption to -display curses

2014-05-26 Thread Dave Mielke
[quoted lines by Gerd Hoffmann on 2014/05/26 at 15:38 +0200] >Tried to make the curses ui a bit more clever? You could try caching >the modifier state, then send only the changes. That gets the number of >events down to 6 max (4 to update modifier state, 2 for the actual key). Yes, except that,

Re: [Qemu-devel] [PATCH v4] block: replace fprintf(stderr, ...) with error_report()

2014-05-26 Thread Kevin Wolf
Am 26.05.2014 um 17:02 hat Markus Armbruster geschrieben: > Stefan Hajnoczi writes: > > > On Mon, May 26, 2014 at 09:44:03AM +0800, Le Tan wrote: > >> Replace fprintf(stderr,...) with error_report() in files block/*, block.c, > >> block-migration.c and blockdev.c. The trailing "\n"s of the @fmt a

Re: [Qemu-devel] [PATCH v4] block: replace fprintf(stderr, ...) with error_report()

2014-05-26 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Mon, May 26, 2014 at 09:44:03AM +0800, Le Tan wrote: >> Replace fprintf(stderr,...) with error_report() in files block/*, block.c, >> block-migration.c and blockdev.c. The trailing "\n"s of the @fmt argument >> have been removed because @fmt of error_report() should n

[Qemu-devel] [Bug 1308341] Re: Multiple CPUs causes blue screen on Windows guest (14.04 regression)

2014-05-26 Thread Gordon Kaltofen
Hallo to all, this is my first post here. I have exactly the same problem occurred after Distribution Update Ubuntu Server x64 from 12.04.4 to 14.04. 1. I have Windows 7 32/64-Bit and Windows 2008 Server 64-Bit VMs, all show the same error with two dedicated cores (no pinning). In combination wit

Re: [Qemu-devel] [PATCH] macio ide: Do remainder access asynchronously

2014-05-26 Thread Mark Cave-Ayland
On 26/05/14 09:32, Alexander Graf wrote: The macio IDE controller has some pretty nasty magic in its implementation to allow for unaligned sector accesses. We used to handle these accesses synchronously inside the IO callback handler. However, the block infrastructure changed below our feet and

Re: [Qemu-devel] [PATCH v4 ] trace: Multi-backend tracing

2014-05-26 Thread Stefan Hajnoczi
On Tue, May 13, 2014 at 08:04:13PM +0200, Lluís Vilanova wrote: > Adds support to compile QEMU with multiple tracing backends at the same time. > > For example, you can compile QEMU with: > > $ ./configure --enable-trace-backends=ftrace,dtrace > > Where 'ftrace' can be handy for having an in-f

Re: [Qemu-devel] patch: add delay= suboption to -display curses

2014-05-26 Thread Gerd Hoffmann
On Sa, 2014-05-24 at 21:21 -0400, Dave Mielke wrote: > [quoted lines by Peter Maydell on 2014/05/25 at 01:04 +0100] > > >Why is this a problem only for the curses UI frontend, and not for > >any of the other UIs which might send key events? > > One reason is that most UIs send key events as they

Re: [Qemu-devel] [RFC v2 1/4] Add EXEC_FLAG to VFIO DMA mappings

2014-05-26 Thread Alvise Rigo
On 23/05/2014 10:40, Eric Auger wrote: > On 05/11/2014 07:13 PM, Alvise Rigo wrote: >> The flag is mandatory for the ARM SMMU so we always add it if the MMIO >> handles it. > > Hi Alvise, > > Refering to the root problem explanation found in > https://lkml.org/lkml/2014/2/8/176, I understand the

Re: [Qemu-devel] patch: add -kbddelay option

2014-05-26 Thread Dave Mielke
>[quoted lines by Peter Maydell on 2014/05/25 at 10:11 +0100] >Ah, I see. Still, I think it makes more sense for the queue and delay >to be in the common key handling code, not in the curses frontend >specifically. This patch, attached as qemu-kbddelay-1.patch, is a rework of the former curses U

Re: [Qemu-devel] qemu 2.0, deadlock in block-commit

2014-05-26 Thread Marcin Gibuła
Two options for making progress on this bug: 1. Debug bdrv_drain_all() and find out whether there are any I/O requests remaining. Yes, there is one request pending on active layer of disk that is being commited (on bs->tracked_requests list). IO threads die off because they have nothing t

Re: [Qemu-devel] [PATCH] docs: clarify that qcow2 file size is not always a cluster multiple

2014-05-26 Thread Benoît Canet
The Thursday 22 May 2014 à 11:42:50 (+0200), Stefan Hajnoczi wrote : > Normally one would expect that qcow2 image file lengths are multiples of > the cluster size. This is not true in all cases and the spec should > document this so implementers remember to accept such files. > > $ qemu-img creat

Re: [Qemu-devel] [PATCH V2 0/4] machine: QemuOpts per machine

2014-05-26 Thread Michael S. Tsirkin
On Mon, May 26, 2014 at 03:40:54PM +0300, Marcel Apfelbaum wrote: > V1 -> V2: > - Rebased on qom-next queue. > - Patch 1/4: >- Since there are a lot of discussions on the correct > way to do the fix, added a FIXME comment to find a better way. > - Patch 2/4: >- Addressed Michael Ro

[Qemu-devel] [PATCH V2 1/4] qapi: output visitor crashes qemu if it encounters a NULL value

2014-05-26 Thread Marcel Apfelbaum
A NULL value is not added to visitor's stack, but there is no check for that when the visitor tries to return that value, leading to Qemu crash. Reviewed-by: Eric Blake Acked-by: Luiz Capitulino Signed-off-by: Marcel Apfelbaum --- qapi/qmp-output-visitor.c | 6 ++ 1 file changed, 6 inserti

[Qemu-devel] [PATCH V2 4/4] hw/machine: qemu machine opts as properties to QemuMachineState

2014-05-26 Thread Marcel Apfelbaum
Make machine's QemuOpts QOM properties of machine. The properties are automatically filled in. This opens the possiblity to create opts per machine rather than global. Signed-off-by: Marcel Apfelbaum --- hw/core/machine.c | 256 include/hw/b

[Qemu-devel] [PATCH V2 3/4] vl.c: do not set 'type' property in obj_set_property

2014-05-26 Thread Marcel Apfelbaum
Filter out also 'type' property when setting object's properties Reviewed-by: Paolo Bonzini Signed-off-by: Marcel Apfelbaum --- vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 2de90fb..2153b9e 100644 --- a/vl.c +++ b/vl.c @@ -2889,7 +2889,8 @@ static

[Qemu-devel] [PATCH V2 0/4] machine: QemuOpts per machine

2014-05-26 Thread Marcel Apfelbaum
V1 -> V2: - Rebased on qom-next queue. - Patch 1/4: - Since there are a lot of discussions on the correct way to do the fix, added a FIXME comment to find a better way. - Patch 2/4: - Addressed Michael Roth's comments: - Added output visitor test - Tweaked it as advised -

[Qemu-devel] [PATCH V2 2/4] tests: check empty qmp output visitor

2014-05-26 Thread Marcel Apfelbaum
Checks the output visitor behaviour for NULL values. Signed-off-by: Marcel Apfelbaum --- tests/test-qmp-output-visitor.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c index 9c15458..74020de 100644 --- a/tests/te

Re: [Qemu-devel] [PATCH v4] block: replace fprintf(stderr, ...) with error_report()

2014-05-26 Thread Stefan Hajnoczi
On Mon, May 26, 2014 at 09:44:03AM +0800, Le Tan wrote: > Replace fprintf(stderr,...) with error_report() in files block/*, block.c, > block-migration.c and blockdev.c. The trailing "\n"s of the @fmt argument > have been removed because @fmt of error_report() should not contain newline. > > Signed

[Qemu-devel] 回复: Re: BUG: commit 50a2c6e breaks KVM/ARM (reset/init vcpu order)

2014-05-26 Thread 管雪涛
- Andreas Färber 写道: > Am 26.05.2014 11:57, schrieb Alexander Graf: > > > > Any reason we're so incredibly inconsistent in what we do during realize > > with reset? I would really prefer to ensure we're doing the same thing > > on all targets. > > > > > > Alex > > > > $ grep -R -A 3 -B 3

Re: [Qemu-devel] BUG: commit 50a2c6e breaks KVM/ARM (reset/init vcpu order)

2014-05-26 Thread Andreas Färber
Am 26.05.2014 12:31, schrieb Alexander Graf: > > On 26.05.14 12:20, Andreas Färber wrote: >> Am 26.05.2014 11:57, schrieb Alexander Graf: >>> Any reason we're so incredibly inconsistent in what we do during realize >>> with reset? I would really prefer to ensure we're doing the same thing >>> on a

Re: [Qemu-devel] qemu 2.0, deadlock in block-commit

2014-05-26 Thread Stefan Hajnoczi
On Fri, May 23, 2014 at 06:25:31PM +0200, Marcin Gibuła wrote: > >If you see a pending request on a RADOS block device (rbd) then it would > >be good to dig deeper into QEMU's block/rbd.c driver to see why it's not > >completing that request. > > > >Are you using qcow2 on top of rbd? > > Hi, > I'v

  1   2   3   >