[Qemu-devel] QEMU graphics API

2014-11-17 Thread Anna Fischer
Good morning, Is there documentation somewhere describing the QEMU graphics API - e.g. I'm looking for some guidance on developing a new QEMU frontend (like the SDL/SDL2 frontend)? Many thanks, Anna

Re: [Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-17 Thread Max Reitz
On 2014-11-15 at 15:50, Eric Blake wrote: On 11/14/2014 06:06 AM, Max Reitz wrote: Add a test for conversion between different refcount widths and errors specific to certain widths (i.e. snapshots with refcount_width=1). Signed-off-by: Max Reitz --- tests/qemu-iotests/112 | 252 +

Re: [Qemu-devel] [PATCH v2 06/21] qcow2: Helper for refcount array reallocation

2014-11-17 Thread Max Reitz
On 2014-11-15 at 17:50, Eric Blake wrote: On 11/14/2014 06:05 AM, Max Reitz wrote: Add a helper function for reallocating a refcount array, independently s/independently/independent/ of the refcount order. The newly allocated space is zeroed and the function handles failed reallocations grace

Re: [Qemu-devel] [PATCH v2 07/21] qcow2: Helper function for refcount modification

2014-11-17 Thread Max Reitz
On 2014-11-15 at 18:02, Eric Blake wrote: On 11/14/2014 06:06 AM, Max Reitz wrote: Since refcounts do not always have to be a uint16_t, all refcount blocks and arrays in memory should not have a specific type (thus they become pointers to void) and for accessing them, two helper functions are us

Re: [Qemu-devel] QEMU graphics API

2014-11-17 Thread Gerd Hoffmann
On Mo, 2014-11-17 at 08:32 +, Anna Fischer wrote: > Good morning, > > Is there documentation somewhere describing the QEMU graphics API - > e.g. I'm looking for some guidance on developing a new QEMU frontend > (like the SDL/SDL2 frontend)? Not really. my kvm forum talk covers some of it:

Re: [Qemu-devel] [PATCH v2 08/21] qcow2: More helpers for refcount modification

2014-11-17 Thread Max Reitz
On 2014-11-15 at 18:08, Eric Blake wrote: On 11/14/2014 06:06 AM, Max Reitz wrote: Add helper functions for getting and setting refcounts in a refcount array for any possible refcount order, and choose the correct one during refcount initialization. Signed-off-by: Max Reitz --- block/qcow2-r

Re: [Qemu-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-17 Thread Chen, Tiejun
On 2014/11/17 14:10, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 10:47:56AM +0800, Chen, Tiejun wrote: On 2014/11/5 22:09, Michael S. Tsirkin wrote: On Wed, Nov 05, 2014 at 03:22:59PM +0800, Tiejun Chen wrote: Currently IGD drivers always need to access PCH by 1f.0, and PCH vendor/device

[Qemu-devel] Possible approaches to limit csw overhead

2014-11-17 Thread Andrey Korolyov
Hello, I have a rather practical question, is it possible to limit amount of vm-initiated events for single VM? As and example, VM which experienced OOM and effectively stuck dead generates a lot of unnecessary context switches triggering do_raw_spin_lock very often and therefore increasing overal

Re: [Qemu-devel] [PATCH V8 0/3] Virtual Machine Generation ID

2014-11-17 Thread Gal Hammer
- Original Message - > From: "Michael S. Tsirkin" > To: "Gal Hammer" > Cc: pbonz...@redhat.com, qemu-devel@nongnu.org > Sent: Sunday, November 16, 2014 9:49:37 PM > Subject: Re: [Qemu-devel] [PATCH V8 0/3] Virtual Machine Generation ID > > On Sun, Nov 16, 2014 at 12:15:56PM +0200, Gal

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-11-17 Thread Leen Keus
I greatly appriciate your help to find a solution for this issue, but I have used apt-get to installed QEMU already since version 12.10. I never used the QEMU source code for something. Is it possible that you provide an updated executable or library? Regards, Leen -- You received this bug not

Re: [Qemu-devel] [PATCH v2 0/5] libqos: Virtio MMIO driver

2014-11-17 Thread Marc Marí
El Sat, 1 Nov 2014 18:02:25 +0100 Marc Marí escribió: > Add virtio-mmio support to libqos and test case for virtio-blk. Ping! It has been two weeks. Is it in somebody's todo list? Thanks Marc

Re: [Qemu-devel] [PATCH V8 0/3] Virtual Machine Generation ID

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 04:03:45AM -0500, Gal Hammer wrote: > > > - Original Message - > > From: "Michael S. Tsirkin" > > To: "Gal Hammer" > > Cc: pbonz...@redhat.com, qemu-devel@nongnu.org > > Sent: Sunday, November 16, 2014 9:49:37 PM > > Subject: Re: [Qemu-devel] [PATCH V8 0/3] Virtu

Re: [Qemu-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 04:48:32PM +0800, Chen, Tiejun wrote: > On 2014/11/17 14:10, Michael S. Tsirkin wrote: > >On Mon, Nov 17, 2014 at 10:47:56AM +0800, Chen, Tiejun wrote: > >>On 2014/11/5 22:09, Michael S. Tsirkin wrote: > >>>On Wed, Nov 05, 2014 at 03:22:59PM +0800, Tiejun Chen wrote: > C

Re: [Qemu-devel] [RFC PATCH v4 11/25] cpu-exec: allow temporary disabling icount

2014-11-17 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 07/11/2014 11:32, Pavel Dovgalyuk wrote: > > cpu_restore_state_from_tb(cpu, tb, retaddr); > > +/* tb could be temporary, generated by exec nocache */ > > +tb_phys_invalidate(tb, -1); >

Re: [Qemu-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-17 Thread Chen, Tiejun
On 2014/11/17 17:25, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 04:48:32PM +0800, Chen, Tiejun wrote: On 2014/11/17 14:10, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 10:47:56AM +0800, Chen, Tiejun wrote: On 2014/11/5 22:09, Michael S. Tsirkin wrote: On Wed, Nov 05, 2014 at 03:22

Re: [Qemu-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 05:42:12PM +0800, Chen, Tiejun wrote: > On 2014/11/17 17:25, Michael S. Tsirkin wrote: > >On Mon, Nov 17, 2014 at 04:48:32PM +0800, Chen, Tiejun wrote: > >>On 2014/11/17 14:10, Michael S. Tsirkin wrote: > >>>On Mon, Nov 17, 2014 at 10:47:56AM +0800, Chen, Tiejun wrote: > >>>

[Qemu-devel] [PATCH v3 for-2.2 1/3] raw-posix: Fix comment for raw_co_get_block_status()

2014-11-17 Thread Markus Armbruster
Missed in commit 705be72. Signed-off-by: Markus Armbruster Reviewed-by: Paolo Bonzini Reviewed-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- block/raw-posix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index

[Qemu-devel] [PATCH v3 for-2.2 2/3] raw-posix: SEEK_HOLE suffices, get rid of FIEMAP

2014-11-17 Thread Markus Armbruster
Commit 5500316 (May 2012) implemented raw_co_is_allocated() as follows: 1. If defined(CONFIG_FIEMAP), use the FS_IOC_FIEMAP ioctl 2. Else if defined(SEEK_HOLE) && defined(SEEK_DATA), use lseek() 3. Else pretend there are no holes Later on, raw_co_is_allocated() was generalized to raw_co_get_blo

[Qemu-devel] [PATCH v3 for-2.2 0/3] raw-posix: Get rid of FIEMAP, fix SEEK_HOLE

2014-11-17 Thread Markus Armbruster
PATCH 1 is just a comment fix. PATCH 2 drops FIEMAP use and explains why it needs to go. PATCH 3 carefully rewrites the SEEK_HOLE code. Why 2.2? The series fixes bugs, but the bugs are either not terribly severe, or not particularly likely to bite. The reason I want it included is we've alread

[Qemu-devel] [PATCH v3 for-2.2 3/3] raw-posix: The SEEK_HOLE code is flawed, rewrite it

2014-11-17 Thread Markus Armbruster
On systems where SEEK_HOLE in a trailing hole seeks to EOF (Solaris, but not Linux), try_seek_hole() reports trailing data instead. Additionally, unlikely lseek() failures are treated badly: * When SEEK_HOLE fails, try_seek_hole() reports trailing data. For -ENXIO, there's in fact a trailing h

Re: [Qemu-devel] [PATCH v3 for-2.2 2/3] raw-posix: SEEK_HOLE suffices, get rid of FIEMAP

2014-11-17 Thread Max Reitz
On 2014-11-17 at 11:18, Markus Armbruster wrote: Commit 5500316 (May 2012) implemented raw_co_is_allocated() as follows: 1. If defined(CONFIG_FIEMAP), use the FS_IOC_FIEMAP ioctl 2. Else if defined(SEEK_HOLE) && defined(SEEK_DATA), use lseek() 3. Else pretend there are no holes Later on, raw_

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 12:06:38PM +0530, Amit Shah wrote: > On (Wed) 12 Nov 2014 [11:44:35], Michael S. Tsirkin wrote: > > This patchset fixes CVE-2014-7840: invalid > > migration stream can cause arbitrary qemu memory > > overwrite. > > First patch includes the minimal fix for the issue. > > Foll

Re: [Qemu-devel] [PATCH v3 for-2.2 3/3] raw-posix: The SEEK_HOLE code is flawed, rewrite it

2014-11-17 Thread Max Reitz
On 2014-11-17 at 11:18, Markus Armbruster wrote: On systems where SEEK_HOLE in a trailing hole seeks to EOF (Solaris, but not Linux), try_seek_hole() reports trailing data instead. Additionally, unlikely lseek() failures are treated badly: * When SEEK_HOLE fails, try_seek_hole() reports trailin

Re: [Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-17 Thread Max Reitz
On 2014-11-17 at 09:34, Max Reitz wrote: On 2014-11-15 at 15:50, Eric Blake wrote: On 11/14/2014 06:06 AM, Max Reitz wrote: Add a test for conversion between different refcount widths and errors specific to certain widths (i.e. snapshots with refcount_width=1). Signed-off-by: Max Reitz ---

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Amit Shah
On (Mon) 17 Nov 2014 [12:32:57], Michael S. Tsirkin wrote: > On Mon, Nov 17, 2014 at 12:06:38PM +0530, Amit Shah wrote: > > On (Wed) 12 Nov 2014 [11:44:35], Michael S. Tsirkin wrote: > > > This patchset fixes CVE-2014-7840: invalid > > > migration stream can cause arbitrary qemu memory > > > overwr

Re: [Qemu-devel] [PATCH v2 0/3] fix bug about balloon working incorrectly when hotplug memeory

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 01:11:07PM +0800, zhanghailiang wrote: > Hi, > > Patch 1 and 2 mainly fix bug about balloon not working correctly when we do > hotplug memory. It takes 'ram_size' as VM's real RAM size which is wrong > after we hotplug memory. > > This bug exists since we begin to support

Re: [Qemu-devel] [PATCH 6/9] acl: fix memory leak

2014-11-17 Thread Paolo Bonzini
On 15/11/2014 11:06, arei.gong...@huawei.com wrote: > From: Gonglei > > If 'i != index' for all acl->entries, variable > entry leaks the storage it points to. > > Signed-off-by: Gonglei > --- > util/acl.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/ut

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 04:08:58PM +0530, Amit Shah wrote: > On (Mon) 17 Nov 2014 [12:32:57], Michael S. Tsirkin wrote: > > On Mon, Nov 17, 2014 at 12:06:38PM +0530, Amit Shah wrote: > > > On (Wed) 12 Nov 2014 [11:44:35], Michael S. Tsirkin wrote: > > > > This patchset fixes CVE-2014-7840: invalid

Re: [Qemu-devel] [PATCH v2 0/3] fix bug about balloon working incorrectly when hotplug memeory

2014-11-17 Thread zhanghailiang
On 2014/11/17 18:39, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 01:11:07PM +0800, zhanghailiang wrote: Hi, Patch 1 and 2 mainly fix bug about balloon not working correctly when we do hotplug memory. It takes 'ram_size' as VM's real RAM size which is wrong after we hotplug memory. This b

Re: [Qemu-devel] [PATCH 9/9] hcd-musb: fix dereference null return value

2014-11-17 Thread Paolo Bonzini
On 15/11/2014 11:06, arei.gong...@huawei.com wrote: > From: Gonglei > > Signed-off-by: Gonglei > --- > hw/usb/hcd-musb.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c > index 66bc61a..f2cb73c 100644 > --- a/hw/usb/hcd-musb.c > +++ b/hw/usb

Re: [Qemu-devel] [PATCH v3 for-2.2 2/3] raw-posix: SEEK_HOLE suffices, get rid of FIEMAP

2014-11-17 Thread Markus Armbruster
Max Reitz writes: > On 2014-11-17 at 11:18, Markus Armbruster wrote: >> Commit 5500316 (May 2012) implemented raw_co_is_allocated() as >> follows: >> >> 1. If defined(CONFIG_FIEMAP), use the FS_IOC_FIEMAP ioctl >> >> 2. Else if defined(SEEK_HOLE) && defined(SEEK_DATA), use lseek() >> >> 3. Else p

Re: [Qemu-devel] [PATCH 2/4] exec: add wrapper for host pointer access

2014-11-17 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > host pointer accesses force pointer math, let's > add a wrapper to make them safer. > > Signed-off-by: Michael S. Tsirkin > --- > include/exec/cpu-all.h | 5 + > exec.c | 10 +- > 2 files changed, 10 insertions(+), 5 de

Re: [Qemu-devel] [PATCH] target-cris/translate.c: fix out of bounds read

2014-11-17 Thread Paolo Bonzini
On 17/11/2014 06:57, zhanghailiang wrote: > In function t_gen_mov_TN_preg and t_gen_mov_preg_TN, The begin check about the > validity of in-parameter 'r' is useless. We still access cpu_PR[r] in the > follow code if it is invalid. Which will be an out-of-bounds read error. > > Fix it by using asse

Re: [Qemu-devel] [PATCH v3 for-2.2 2/3] raw-posix: SEEK_HOLE suffices, get rid of FIEMAP

2014-11-17 Thread Max Reitz
On 2014-11-17 at 11:58, Markus Armbruster wrote: Max Reitz writes: On 2014-11-17 at 11:18, Markus Armbruster wrote: Commit 5500316 (May 2012) implemented raw_co_is_allocated() as follows: 1. If defined(CONFIG_FIEMAP), use the FS_IOC_FIEMAP ioctl 2. Else if defined(SEEK_HOLE) && defined(SEEK

Re: [Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-17 Thread Max Reitz
On 2014-11-17 at 11:38, Max Reitz wrote: On 2014-11-17 at 09:34, Max Reitz wrote: On 2014-11-15 at 15:50, Eric Blake wrote: On 11/14/2014 06:06 AM, Max Reitz wrote: Add a test for conversion between different refcount widths and errors specific to certain widths (i.e. snapshots with refcount_w

Re: [Qemu-devel] [PATCH] exec: Handle multipage ranges in invalidate_and_set_dirty()

2014-11-17 Thread Paolo Bonzini
On 16/11/2014 20:44, Peter Maydell wrote: > The code in invalidate_and_set_dirty() needs to handle addr/length > combinations which cross guest physical page boundaries. This can happen, > for example, when disk I/O reads large blocks into guest RAM which previously > held code that we have cache

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Amit Shah
On (Mon) 17 Nov 2014 [12:52:59], Michael S. Tsirkin wrote: > On Mon, Nov 17, 2014 at 04:08:58PM +0530, Amit Shah wrote: > > On (Mon) 17 Nov 2014 [12:32:57], Michael S. Tsirkin wrote: > > > On Mon, Nov 17, 2014 at 12:06:38PM +0530, Amit Shah wrote: > > > > On (Wed) 12 Nov 2014 [11:44:35], Michael S.

Re: [Qemu-devel] [PATCH] mips: Enable vectored interrupt support for the 74Kf CPU

2014-11-17 Thread Leon Alrae
On 04/11/2014 15:42, Maciej W. Rozycki wrote: > Enable vectored interrupt support for the 74Kf CPU, reflecting hardware. > > Signed-off-by: Maciej W. Rozycki > --- > qemu-mips-config-74k-vint.diff > Index: qemu-git-trunk/target-mips/translate_init.c > =

Re: [Qemu-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-17 Thread Chen, Tiejun
On 2014/11/17 18:13, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 05:42:12PM +0800, Chen, Tiejun wrote: On 2014/11/17 17:25, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 04:48:32PM +0800, Chen, Tiejun wrote: On 2014/11/17 14:10, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 10:4

Re: [Qemu-devel] [PATCH 9/9] hcd-musb: fix dereference null return value

2014-11-17 Thread Gonglei
On 2014/11/17 18:58, Paolo Bonzini wrote: > > > On 15/11/2014 11:06, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> Signed-off-by: Gonglei >> --- >> hw/usb/hcd-musb.c | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/usb/hcd-musb.c b/hw/usb/hcd-musb.c >> index 66bc61a.

Re: [Qemu-devel] [PATCH v2] mips: Correct MIPS16/microMIPS branch size calculation

2014-11-17 Thread Leon Alrae
On 07/11/2014 20:05, Maciej W. Rozycki wrote: > Correct MIPS16/microMIPS branch size calculation in PC adjustment > needed: > > - to set the value of CP0.ErrorEPC at the entry to the reset exception, > > - for the purpose of branch reexecution in the context of device I/O. > > Follow the approa

Re: [Qemu-devel] [PATCH] net: The third parameter of getsockname should be initialized

2014-11-17 Thread Paolo Bonzini
On 17/11/2014 06:54, zhanghailiang wrote: > Signed-off-by: zhanghailiang > --- > net/socket.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/socket.c b/net/socket.c > index fb21e20..ca4b8ba 100644 > --- a/net/socket.c > +++ b/net/socket.c > @@ -352,7 +352,7 @@ sta

Re: [Qemu-devel] [PATCH 2/4] exec: add wrapper for host pointer access

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 10:58:53AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > host pointer accesses force pointer math, let's > > add a wrapper to make them safer. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > include/exec/cpu-all.h | 5

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 04:37:50PM +0530, Amit Shah wrote: > On (Mon) 17 Nov 2014 [12:52:59], Michael S. Tsirkin wrote: > > On Mon, Nov 17, 2014 at 04:08:58PM +0530, Amit Shah wrote: > > > On (Mon) 17 Nov 2014 [12:32:57], Michael S. Tsirkin wrote: > > > > On Mon, Nov 17, 2014 at 12:06:38PM +0530, A

Re: [Qemu-devel] [PATCH v2 21/21] iotests: Add test for different refcount widths

2014-11-17 Thread Max Reitz
On 2014-11-15 at 15:50, Eric Blake wrote: On 11/14/2014 06:06 AM, Max Reitz wrote: Add a test for conversion between different refcount widths and errors specific to certain widths (i.e. snapshots with refcount_width=1). Signed-off-by: Max Reitz --- tests/qemu-iotests/112 | 252 +

Re: [Qemu-devel] [RFC][PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 07:18:17PM +0800, Chen, Tiejun wrote: > On 2014/11/17 18:13, Michael S. Tsirkin wrote: > >On Mon, Nov 17, 2014 at 05:42:12PM +0800, Chen, Tiejun wrote: > >>On 2014/11/17 17:25, Michael S. Tsirkin wrote: > >>>On Mon, Nov 17, 2014 at 04:48:32PM +0800, Chen, Tiejun wrote: > >>>

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Amit Shah
On (Mon) 17 Nov 2014 [13:48:58], Michael S. Tsirkin wrote: > On Mon, Nov 17, 2014 at 04:37:50PM +0530, Amit Shah wrote: > > On (Mon) 17 Nov 2014 [12:52:59], Michael S. Tsirkin wrote: > > > On Mon, Nov 17, 2014 at 04:08:58PM +0530, Amit Shah wrote: > > > > On (Mon) 17 Nov 2014 [12:32:57], Michael S.

Re: [Qemu-devel] [PATCH v2 0/3] fix bug about balloon working incorrectly when hotplug memeory

2014-11-17 Thread zhanghailiang
On 2014/11/17 18:53, zhanghailiang wrote: On 2014/11/17 18:39, Michael S. Tsirkin wrote: On Mon, Nov 17, 2014 at 01:11:07PM +0800, zhanghailiang wrote: Hi, Patch 1 and 2 mainly fix bug about balloon not working correctly when we do hotplug memory. It takes 'ram_size' as VM's real RAM size whic

Re: [Qemu-devel] [Qemu-ppc] [PATCH V2 0/3] spapr: Fix stale HTAB during live migration

2014-11-17 Thread Alexander Graf
> Am 17.11.2014 um 05:12 schrieb Samuel Mendoza-Jonas : > > If a spapr guest reboots during a live migration, the guest HTAB on the > destination is not updated properly, usually resulting in a kernel panic. > > This is a (delayed!) follow up to my previous patch including a fix > for TCG gues

[Qemu-devel] [PATCH v4 1/3] chardev: Add -qmp-pretty

2014-11-17 Thread Max Reitz
Add a command line option for adding a QMP monitor using pretty JSON formatting. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- qemu-options.hx | 8 vl.c| 15 ++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-optio

[Qemu-devel] [PATCH v4 0/3] chardev: Add -qmp-pretty

2014-11-17 Thread Max Reitz
This series does not add new functionality. Adding a QMP monitor with prettily formatted JSON output can be done as follows: $ qemu -chardev stdio,id=mon0 -mon chardev=mon0,mode=control,pretty=on However, this is rather cumbersome, so this series (its first patch) adds a shortcut in the form of t

[Qemu-devel] [PATCH v4 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-17 Thread Max Reitz
_filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filt

[Qemu-devel] [PATCH v4 3/3] iotests: Use -qmp-pretty in 067

2014-11-17 Thread Max Reitz
067 invokes query-block, resulting in a reference output with really long lines (which may pose a problem in email patches and always poses a problem when the output changes, because it is hard to see what has actually changed). Use -qmp-pretty to mitigate this issue. Signed-off-by: Max Reitz Rev

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB

2014-11-17 Thread Peter Maydell
On 13 November 2014 23:55, Liviu Ionescu wrote: > The shortcomings addressed by this patch: > - the semihosting trace messages disapeared when the GDB session was started > - the semihosting exit code was not passed back to the host > - the semihosting command line was not passed properly, because

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB

2014-11-17 Thread Peter Maydell
On 17 November 2014 12:32, Peter Maydell wrote: > This (the extra command line option to specify where semihosting > should go) is definitely a feature we should add. I think it's > possible to make use of the QemuOpts infrastructure to support > -semihosting # current option name with existing

Re: [Qemu-devel] [PATCH 0/4] migration: fix CVE-2014-7840

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 05:50:34PM +0530, Amit Shah wrote: > On (Mon) 17 Nov 2014 [13:48:58], Michael S. Tsirkin wrote: > > On Mon, Nov 17, 2014 at 04:37:50PM +0530, Amit Shah wrote: > > > On (Mon) 17 Nov 2014 [12:52:59], Michael S. Tsirkin wrote: > > > > On Mon, Nov 17, 2014 at 04:08:58PM +0530, A

Re: [Qemu-devel] [PATCH v2 0/3] fix bug about balloon working incorrectly when hotplug memeory

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 08:25:14PM +0800, zhanghailiang wrote: > On 2014/11/17 18:53, zhanghailiang wrote: > >On 2014/11/17 18:39, Michael S. Tsirkin wrote: > >>On Mon, Nov 17, 2014 at 01:11:07PM +0800, zhanghailiang wrote: > >>>Hi, > >>> > >>>Patch 1 and 2 mainly fix bug about balloon not working

Re: [Qemu-devel] [RFC PATCH] spapr-pci: Enable huge BARs

2014-11-17 Thread Alexander Graf
> Am 17.11.2014 um 04:54 schrieb Alexey Kardashevskiy : > > At the moment sPAPR only supports 512MB window for MMIO BARs. However > modern devices might want bigger 64bit BARs. > > This adds another 64bit MMIO window per PHB and advertises it via > the PHB's "ranges" property in the device tre

Re: [Qemu-devel] [PATCH v6 04/10] hbitmap: Add hbitmap_copy

2014-11-17 Thread Vladimir Sementsov-Ogievskiy
+ +HBitmap *hbitmap_copy(const HBitmap *bitmap) +{ +int i; +int64_t size; +HBitmap *hb = g_memdup(bitmap, sizeof(struct HBitmap)); + +size = bitmap->size; +for (i = HBITMAP_LEVELS; i-- > 0; ) { +size = MAX((size + BITS_PER_LONG - 1) >> BITS_PER_LEVEL, 1); +hb->l

Re: [Qemu-devel] [PATCH 9/9] hcd-musb: fix dereference null return value

2014-11-17 Thread Gonglei
On 2014/11/17 19:18, Gonglei wrote: > On 2014/11/17 18:58, Paolo Bonzini wrote: > >> >> >> On 15/11/2014 11:06, arei.gong...@huawei.com wrote: >>> From: Gonglei >>> >>> Signed-off-by: Gonglei >>> --- >>> hw/usb/hcd-musb.c | 4 >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/hw/us

[Qemu-devel] [PATCH] hcd-musb: fix dereference null return value

2014-11-17 Thread arei.gonglei
From: Gonglei usb_ep_get and usb_handle_packet can deal with a NULL device, but we have to avoid dereferencing NULL pointers when building the id. Signed-off-by: Paolo Bonzini Signed-off-by: Gonglei --- hw/usb/hcd-musb.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --gi

Re: [Qemu-devel] [PATCH 2/4] exec: add wrapper for host pointer access

2014-11-17 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Mon, Nov 17, 2014 at 10:58:53AM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > host pointer accesses force pointer math, let's > > > add a wrapper to make them safer. > > > > > > Signed-off-by: Michael

Re: [Qemu-devel] [PATCH] mips: Correct the handling of writes to CP0.Status for MIPSr6

2014-11-17 Thread Leon Alrae
On 10/11/2014 13:45, Maciej W. Rozycki wrote: > Correct these issues with the handling of CP0.Status for MIPSr6: > > * only ignore the bit pattern of 0b11 on writes to CP0.Status.KSU, that > is for processors that do implement Supervisor Mode, let the bit > pattern be written to CP0.Status.UM

Re: [Qemu-devel] [PATCH 9/9] hcd-musb: fix dereference null return value

2014-11-17 Thread Gerd Hoffmann
> >> @@ -625,8 +626,11 @@ static void musb_packet(MUSBState *s, MUSBEndPoint > >> *ep, > >> /* A wild guess on the FADDR semantics... */ > >> dev = usb_find_device(&s->port, ep->faddr[idx]); > >> uep = usb_ep_get(dev, pid, ep->type[idx] & 0xf); > >> -usb_packet_setup(&ep->packey

Re: [Qemu-devel] [PATCH 9/9] hcd-musb: fix dereference null return value

2014-11-17 Thread Paolo Bonzini
17/11/2014 14:36, Gerd Hoffmann wrote: @@ -625,8 +626,11 @@ static void musb_packet(MUSBState *s, MUSBEndPoint *ep, /* A wild guess on the FADDR semantics... */ dev = usb_find_device(&s->port, ep->faddr[idx]); uep = usb_ep_get(dev, pid, ep->type[idx] & 0xf)

Re: [Qemu-devel] [PATCH] mips: Correct the writes to CP0 Status and Cause registers via gdbstub

2014-11-17 Thread Leon Alrae
Hi Maciej, On 10/11/2014 13:46, Maciej W. Rozycki wrote: > qemu-mips-status.diff > Index: qemu-git-trunk/target-mips/cpu.h > === > --- qemu-git-trunk.orig/target-mips/cpu.h 2014-11-09 23:44:32.0 > + > +++ qemu-git-tru

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB

2014-11-17 Thread Liviu Ionescu
On 17 Nov 2014, at 14:32, Peter Maydell wrote: > that it's combining six different features and bug fixes into a > single commit. Could you separate them out into their own patches? sure. in practical terms, this requires separate branches and each be applied to master, right? my experience w

Re: [Qemu-devel] State of ARM FIQ in Qemu

2014-11-17 Thread Tim Sander
Hi Greg Am Freitag, 14. November 2014, 10:50:40 schrieb Greg Bellows: > On 14 November 2014 09:34, Tim Sander wrote: > > > > > 0xbfffe000? You where talking about the fact that the security > > > > > extensions > > > > > where not implemented. I was not aware that the different vbar's > > > > wh

Re: [Qemu-devel] [PATCH v10 01/26] target-arm: extend async excp masking

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:50, Greg Bellows wrote: > This patch extends arm_excp_unmasked() to use lookup tables for determining > whether IRQ and FIQ exceptions are masked. The lookup tables are based on the > ARMv8 and ARMv7 specification physical interrupt masking tables. > > If EL3 is using AArch6

Re: [Qemu-devel] [PATCH v10 06/26] target-arm: add secure state bit to CPREG hash

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:50, Greg Bellows wrote: > Added additional NS-bit to CPREG hash encoding. Updated hash lookup > locations to specify hash bit currently set to non-secure. > > Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell thanks -- PMM

[Qemu-devel] [Bug 1393440] [NEW] pcie.c:148: possible error in OR expression ?

2014-11-17 Thread dcb
Public bug reported: [qemu/hw/pci/pcie.c:148] -> [qemu/hw/pci/pcie.c:148]: (style) Same expression on both sides of '|'. pci_long_test_and_set_mask(dev->w1cmask + pos + PCI_EXP_DEVSTA, PCI_EXP_DEVSTA_CED | PCI_EXP_DEVSTA_NFED | PCI

Re: [Qemu-devel] [PATCH v10 07/26] target-arm: insert AArch32 cpregs twice into hashtable

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:50, Greg Bellows wrote: > From: Fabian Aggeler > > Prepare for cp register banking by inserting every cp register twice, > once for secure world and once for non-secure world. > > Signed-off-by: Fabian Aggeler > Signed-off-by: Greg Bellows > +if (state

Re: [Qemu-devel] [PATCH v10 14/26] target-arm: respect SCR.FW, SCR.AW and SCTLR.NMFI

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > Add checks of SCR AW/FW bits when performing writes of CPSR. These SCR bits > are used to control whether the CPSR masking bits can be adjusted from > non-secure state. > > Signed-off-by: Fabian Aggeler > Signed-off-by: Gr

Re: [Qemu-devel] [PATCH v10 13/26] target-arm: add SCTLR_EL3 and make SCTLR banked

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > Implements SCTLR_EL3 and uses secure/non-secure instance when > needed. > > Signed-off-by: Fabian Aggeler > Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell thanks -- PMM

Re: [Qemu-devel] [PATCH v10 19/26] target-arm: make IFSR banked

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > When EL3 is running in AArch32 (or ARMv7 with Security Extensions) > IFSR has a secure and a non-secure instance. Adds IFSR32_EL2 definition and > storage. > > Signed-off-by: Fabian Aggeler > Signed-off-by: Greg Bellows

Re: [Qemu-devel] [PATCH v2 1/5] libqos: Change use of pointers to uint64_t in virtio

2014-11-17 Thread Stefan Hajnoczi
On Sat, Nov 01, 2014 at 06:02:26PM +0100, Marc Marí wrote: > Convert use of pointers in functions of virtio to uint64_t in order to make it > platform-independent. > > Add casting from pointers (in PCI functions) to uint64_t and vice versa > through > uintptr_t. > > Signed-off-by: Marc Marí > -

Re: [Qemu-devel] [PATCH v2 1/5] libqos: Change use of pointers to uint64_t in virtio

2014-11-17 Thread Marc Marí
El Mon, 17 Nov 2014 15:16:21 + Stefan Hajnoczi escribió: > On Sat, Nov 01, 2014 at 06:02:26PM +0100, Marc Marí wrote: > > Convert use of pointers in functions of virtio to uint64_t in order > > to make it platform-independent. > > > > Add casting from pointers (in PCI functions) to uint64_t a

Re: [Qemu-devel] [PATCH v10 18/26] target-arm: make DACR banked

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > When EL3 is running in AArch32 (or ARMv7 with Security Extensions) > DACR has a secure and a non-secure instance. Adds definition for DACR32_EL2. > > Signed-off-by: Fabian Aggeler > Signed-off-by: Greg Bellows Reviewed-b

Re: [Qemu-devel] [PATCH v2 2/5] tests: Prepare virtio-blk-test for multi-arch implementation

2014-11-17 Thread Stefan Hajnoczi
On Sat, Nov 01, 2014 at 06:02:27PM +0100, Marc Marí wrote: > Modularize functions in virtio-blk-test and add PCI suffix for PCI specific > components. > > Signed-off-by: Marc Marí > --- > tests/virtio-blk-test.c | 57 > +++ > 1 file changed, 38 inse

Re: [Qemu-devel] [PATCH v10 16/26] target-arm: make TTBR0/1 banked

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > Adds secure and non-secure bank register suport for TTBR0 and TTBR1. > Changes include adding secure and non-secure instances of ttbr0 and ttbr1 as > well as a CP register definition for TTBR0_EL3. Added a union containing

Re: [Qemu-devel] [PATCH v10 24/26] target-arm: make c13 cp regs banked (FCSEIDR, ...)

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > When EL3 is running in AArch32 (or ARMv7 with Security Extensions) > FCSEIDR, CONTEXTIDR, TPIDRURW, TPIDRURO and TPIDRPRW have a secure > and a non-secure instance. > > Signed-off-by: Fabian Aggeler > Signed-off-by: Greg Be

Re: [Qemu-devel] [PATCH v2 1/5] libqos: Change use of pointers to uint64_t in virtio

2014-11-17 Thread Andreas Färber
Am 17.11.2014 um 16:19 schrieb Marc Marí: > El Mon, 17 Nov 2014 15:16:21 + > Stefan Hajnoczi escribió: >> On Sat, Nov 01, 2014 at 06:02:26PM +0100, Marc Marí wrote: >>> Convert use of pointers in functions of virtio to uint64_t in order >>> to make it platform-independent. >>> >>> Add casting

Re: [Qemu-devel] [PATCH v2 4/5] libqos: Add malloc generic

2014-11-17 Thread Stefan Hajnoczi
On Sat, Nov 01, 2014 at 06:02:29PM +0100, Marc Marí wrote: > This malloc is a basic interface implementation that works for any platform. > It should be replaced in the future for a real malloc implementation for each > of the platforms. > > Signed-off-by: Marc Marí > --- > tests/libqos/malloc-g

[Qemu-devel] [PATCH 3/5] block: Add blk_add_close_notifier() for BB

2014-11-17 Thread Max Reitz
Adding something like a "delete notifier" to a BlockBackend would not make much sense, because whoever is interested in registering there will probably hold a reference to that BlockBackend; therefore, the notifier will never be called (or only when the notifiee already relinquished its reference a

[Qemu-devel] [PATCH 1/5] block: Lift more functions into BlockBackend

2014-11-17 Thread Max Reitz
There are already some blk_aio_* functions, so we might as well have blk_co_* functions (as far as we need them). This patch adds blk_co_flush(), blk_co_discard(), and also blk_invalidate_cache() (which is not a blk_co_* function but is needed nonetheless). Signed-off-by: Max Reitz --- block/blo

[Qemu-devel] [PATCH 2/5] block: Add AioContextNotifier functions to BB

2014-11-17 Thread Max Reitz
Because all BlockDriverStates behind a single BlockBackend reside in a single AioContext, it is fine to just pass these functions (blk_add_aio_context_notifier() and blk_remove_aio_context_notifier()) through to the root BlockDriverState. Signed-off-by: Max Reitz --- block/block-backend.c

[Qemu-devel] [PATCH 5/5] nbd: Use BlockBackend internally

2014-11-17 Thread Max Reitz
With all externally visible functions changed to use BlockBackend, this patch makes nbd use BlockBackend for everything internally as well. While touching them, substitute 512 by BDRV_SECTOR_SIZE in the calls to blk_read(), blk_write() and blk_co_discard(). Signed-off-by: Max Reitz --- nbd.c |

[Qemu-devel] [PATCH 0/5] nbd: Use BlockBackend

2014-11-17 Thread Max Reitz
>From the block layer's perspective, the nbd server is pretty similar to a guest device. Therefore, it should use BlockBackend to access block devices, just like any other guest device does. This series consequently makes the nbd server use BlockBackend for referencing block devices. Max Reitz (

[Qemu-devel] [PATCH 4/5] nbd: Change external interface to BlockBackend

2014-11-17 Thread Max Reitz
Substitute BlockDriverState by BlockBackend in every globally visible function provided by nbd. Signed-off-by: Max Reitz --- blockdev-nbd.c | 15 --- include/block/nbd.h | 7 +++ nbd.c | 11 ++- qemu-nbd.c | 2 +- 4 files changed, 18 insertio

Re: [Qemu-devel] [PATCH v10 17/26] target-arm: make TTBCR banked

2014-11-17 Thread Peter Maydell
On 6 November 2014 15:51, Greg Bellows wrote: > From: Fabian Aggeler > > Adds secure and non-secure bank register suport for TTBCR. > Added new struct to compartmentalize the TCR data and masks. Removed old > tcr/ttbcr data and added a 4 element array of the new structs in cp15. This > allows f

Re: [Qemu-devel] [PATCH v2 5/5] libqos: Add virtio MMIO support

2014-11-17 Thread Stefan Hajnoczi
On Sat, Nov 01, 2014 at 06:02:30PM +0100, Marc Marí wrote: > Add virtio MMIO support. > Add virtio-blk-test MMIO test case. > > Signed-off-by: Marc Marí > --- > tests/Makefile |4 +- > tests/libqos/virtio-mmio.c | 190 > > tests/libq

[Qemu-devel] [PATCH] spice: remove spice-experimental.h include

2014-11-17 Thread Marc-André Lureau
Nothing seems to be using functions from spice-experimental.h (better that way). Let's remove its inclusion. Signed-off-by: Marc-André Lureau --- spice-qemu-char.c | 1 - ui/spice-core.c | 1 - 2 files changed, 2 deletions(-) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index 8106e06..7

Re: [Qemu-devel] [PATCH v4 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-17 Thread Eric Blake
On 11/17/2014 05:31 AM, Max Reitz wrote: > _filter_qmp should be able to correctly filter out the QMP version > object for pretty JSON output. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/common.filter | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/tests/

Re: [Qemu-devel] [PATCH v4 2/3] iotests: _filter_qmp for pretty JSON output

2014-11-17 Thread Max Reitz
On 2014-11-17 at 17:04, Eric Blake wrote: On 11/17/2014 05:31 AM, Max Reitz wrote: _filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz --- tests/qemu-iotests/common.filter | 4 +++- 1 file changed, 3 insertions(+), 1 del

Re: [Qemu-devel] [PATCH] functional ARM semihosting under GDB

2014-11-17 Thread Peter Maydell
On 17 November 2014 14:32, Liviu Ionescu wrote: > On 17 Nov 2014, at 14:32, Peter Maydell wrote: > >> that it's combining six different features and bug fixes into a >> single commit. Could you separate them out into their own patches? > > sure. in practical terms, this requires separate branches

Re: [Qemu-devel] [PATCH 2/4] exec: add wrapper for host pointer access

2014-11-17 Thread Michael S. Tsirkin
On Mon, Nov 17, 2014 at 12:59:44PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Mon, Nov 17, 2014 at 10:58:53AM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > host pointer accesses force pointer math, l

Re: [Qemu-devel] [PATCH] Tracing: Fix simpletrace.py error on tcg enabled binary traces

2014-11-17 Thread Stefan Hajnoczi
On Sun, Nov 02, 2014 at 10:37:59PM +0100, christoph.seif...@posteo.de wrote: > From: Christoph Seifert > > simpletrace.py does not recognize the tcg option while reading trace-events > file. In result simpletrace does not work on binary traces and tcg enabled > events. Moved transformation of

Re: [Qemu-devel] QEMU trunk now in hardfreeze

2014-11-17 Thread Stefan Hajnoczi
On Fri, Nov 07, 2014 at 08:42:57AM +0800, Gonglei wrote: > On 2014/11/7 1:26, Paolo Bonzini wrote: > > > On 06/11/2014 17:49, Stefan Hajnoczi wrote: > -Boot Devices Supporting dynamically modify boot order of > guest, and assuring taking effect after the guest rebooting. > >> "Please add

Re: [Qemu-devel] [PATCH v3 for-2.2 2/3] raw-posix: SEEK_HOLE suffices, get rid of FIEMAP

2014-11-17 Thread Eric Blake
On 11/17/2014 03:58 AM, Markus Armbruster wrote: > Max Reitz writes: > >> On 2014-11-17 at 11:18, Markus Armbruster wrote: >>> Commit 5500316 (May 2012) implemented raw_co_is_allocated() as >>> follows: >>> >>> Signed-off-by: Markus Armbruster >>> Reviewed-by: Max Reitz >>> Reviewed-by: Eric B

Re: [Qemu-devel] [PATCH v3 for-2.2 3/3] raw-posix: The SEEK_HOLE code is flawed, rewrite it

2014-11-17 Thread Eric Blake
On 11/17/2014 03:18 AM, Markus Armbruster wrote: > On systems where SEEK_HOLE in a trailing hole seeks to EOF (Solaris, > but not Linux), try_seek_hole() reports trailing data instead. Maybe worth a comment that this is not fatal, but also not optimal. > > Additionally, unlikely lseek() failures

  1   2   3   >