[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

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 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

[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

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

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

[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] 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

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] 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] [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 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] [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] [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 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

[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] [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

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] [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

[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

[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 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 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 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 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

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

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] [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] 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

<    1   2   3