Re: [Qemu-devel] [PULL 00/28] Misc changes for 2016-02-08

2016-02-09 Thread Peter Maydell
On 8 February 2016 at 17:02, Paolo Bonzini wrote: > The following changes since commit e4a096b1cd4350eeca5dcdc391ab333d2083d7fd: > > ui/cocoa.m: Include qemu/osdep.h (2016-02-08 13:14:40 +) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git tags/for-upstream

Re: [Qemu-devel] [PULL 00/12] TCG patch queue

2016-02-09 Thread Peter Maydell
On 8 February 2016 at 23:25, Richard Henderson wrote: > On 02/09/2016 07:24 AM, Richard Henderson wrote: >> IMO this is a clang bug. > > > I'm glad they agree: https://llvm.org/bugs/show_bug.cgi?id=16154 > > What clang version are you using, Peter? This showed up with both: Ubuntu clang version

Re: [Qemu-devel] Regarding Cortex-A7 CPU definition

2016-02-09 Thread Peter Maydell
On 9 February 2016 at 07:43, Deepak kumar Raju wrote: > Can you please help me with the cortex-a7 CPU definitions/configuration that > I need to add in QEMU. Thanks, I'm afraid I don't have time to do this myself. I suggested below how you can go about doing this yourself if you need it: >> You

Re: [Qemu-devel] [PATCH v2 10/17] block: add generic full disk encryption driver

2016-02-09 Thread Daniel P. Berrange
On Mon, Feb 08, 2016 at 01:23:28PM -0700, Eric Blake wrote: > On 02/08/2016 09:28 AM, Daniel P. Berrange wrote: > > >> My vote: do the same as we do for qcow2 or any other format. Make the > >> size requested by the user as the size visible to the guest, and a > >> fully-allocated image will take

[Qemu-devel] [PATCH 2/2] migration: move bdrv_invalidate_cache_all of of coroutine context

2016-02-09 Thread Denis V. Lunev
There is a possibility to hit assert qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that in the qcow2_invalidate_cache closes and the

[Qemu-devel] [PATCH 1/2] migration: move bdrv_invalidate_cache_all of of coroutine context

2016-02-09 Thread Denis V. Lunev
There is a possibility to hit assert qcow2_get_specific_info that s->qcow_version is undefined. This happens when VM in starting from suspended state, i.e. it processes incoming migration, and in the same time 'info block' is called. The problem is that in the qcow2_invalidate_cache closes and the

Re: [Qemu-devel] [PATCH 3/3] replay: introduce block devices record/replay

2016-02-09 Thread Kevin Wolf
Am 09.02.2016 um 06:55 hat Pavel Dovgalyuk geschrieben: > This patch introduces a set of functions that implement recording > and replaying of block devices' operations. These functions form a thin > layer between blk_aio_ functions and replay subsystem. > All asynchronous block requests are added

Re: [Qemu-devel] [PATCH 1/3] block: Allow x-blockdev-del on a BB with a monitor-owned BDS

2016-02-09 Thread Kevin Wolf
Am 08.02.2016 um 15:14 hat Alberto Garcia geschrieben: > When x-blockdev-del is performed on a BlockBackend that has inserted > media it will only succeed if the BDS doesn't have any additional > references. > > The only problem with this is that if the BDS was created separately > using blockdev-

[Qemu-devel] [PATCH 00/15] tcg mips64 and mipsr6 improvements

2016-02-09 Thread Richard Henderson
Some of this patch set is two years old, though I never got around to posting it. I've (lightly) tested it under qemu with a 5kc cpu, with a debian n64 runtime. I've not been able to test any of the r6 changes, except for compilation. So to some extent this is an RFC. Hopefully someone has an R

[Qemu-devel] [PATCH 02/15] tcg-mips: Support 64-bit opcodes

2016-02-09 Thread Richard Henderson
Bulk patch adding 64-bit opcodes into tcg_out_op. Note that mips64 is as yet neither complete nor enabled. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 372 -- tcg/mips/tcg-target.h | 43 ++ 2 files changed, 403 insertions(+),

[Qemu-devel] [PATCH 04/15] tcg-mips: Adjust load/store functions for mips64

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 43210c5..8f90360 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -733,7 +733,7 @@ st

[Qemu-devel] [PATCH 07/15] tcg-mips: Adjust qemu_ld/st for mips64

2016-02-09 Thread Richard Henderson
At the same time, use extract in the tlb_load for mips32r2. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 239 ++ 1 file changed, 163 insertions(+), 76 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index e9

[Qemu-devel] [PATCH 01/15] tcg-mips: Add mips64 opcodes

2016-02-09 Thread Richard Henderson
Since the mips manual tables are in octal, reorg all of the opcodes into that format for clarity. Note that the 64-bit opcodes are as yet unused. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 191 +++--- 1 file changed, 117 insertions(+

[Qemu-devel] [PATCH 05/15] tcg-mips: Adjust prologue for mips64

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 57 --- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 8f90360..89083fb 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mi

[Qemu-devel] [PATCH 11/15] tcg-mips: Use mips64r6 instructions in tcg_out_movi

2016-02-09 Thread Richard Henderson
The DAHI and DATI instructions can eliminate two insns off the pre-r6 path. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 63 +++ 1 file changed, 63 insertions(+) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 97f9

[Qemu-devel] [PATCH 08/15] tcg-mips: Adjust calling conventions for mips64

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 21 +++-- tcg/mips/tcg-target.h | 19 +++ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 242db14..b5982de 100644 --- a/tcg/mips/tcg-ta

[Qemu-devel] [PATCH 03/15] tcg-mips: Adjust move functions for mips64

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index e56dbc6..43210c5 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@

[Qemu-devel] [PATCH 12/15] tcg-mips: Use mips64r6 instructions in tcg_out_ldst

2016-02-09 Thread Richard Henderson
The DAUI, DAHI, and DATI insns can be used to eliminate one extra instruction in these cases. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 40 1 file changed, 40 insertions(+) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c ind

[Qemu-devel] [PATCH 14/15] tcg-mips: Use mipsr6 instructions in branches

2016-02-09 Thread Richard Henderson
Using compact branches, when possible, avoids a delay slot nop. Signed-off-by: Richard Henderson --- include/elf.h | 4 + tcg/mips/tcg-target.c | 216 +++--- 2 files changed, 172 insertions(+), 48 deletions(-) diff --git a/include/elf.h b/in

[Qemu-devel] [PATCH 13/15] tcg-mips: Use mips64r6 instructions in constant addition

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 59 ++- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index bda31c2..e0972ba 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mi

[Qemu-devel] [PATCH 06/15] tcg-mips: Add tcg unwind info

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 44 1 file changed, 44 insertions(+) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 89083fb..e986437 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -2302

[Qemu-devel] [PATCH 15/15] tcg-mips: Use mipsr6 instructions in calls

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 06e15d4..1b876af 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -3

[Qemu-devel] [PATCH 09/15] tcg-mips: Fix exit_tb for mips64

2016-02-09 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index b5982de..b8c5d90 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -1656,6 +1656,7 @@ static inline void tcg_out_op(TC

Re: [Qemu-devel] [PATCH 1/3] block: Allow x-blockdev-del on a BB with a monitor-owned BDS

2016-02-09 Thread Alberto Garcia
On Tue 09 Feb 2016 11:32:20 AM CET, Kevin Wolf wrote: >> When x-blockdev-del is performed on a BlockBackend that has inserted >> media it will only succeed if the BDS doesn't have any additional >> references. >> >> The only problem with this is that if the BDS was created separately >> using blo

Re: [Qemu-devel] [PULL v2 00/13] TCG patch queue

2016-02-09 Thread Peter Maydell
e following changes since commit e4a096b1cd4350eeca5dcdc391ab333d2083d7fd: > > ui/cocoa.m: Include qemu/osdep.h (2016-02-08 13:14:40 +) > > are available in the git repository at: > > git://github.com/rth7680/qemu.git tags/pull-tcg-20160209 > > for you to fetch changes u

[Qemu-devel] [PATCH 10/15] tcg-mips: Move bswap code to subroutines

2016-02-09 Thread Richard Henderson
Without the mips32r2 / mips64r2 instructions to perform swapping, 32 and 64-bit bswap is quite large. Move them to a subroutine in the prologue block to minimize code bloat. Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 389 ++ tcg/

Re: [Qemu-devel] [PATCH v19 3/9] pc: add a Virtual Machine Generation ID device

2016-02-09 Thread Igor Mammedov
On Tue, 2 Feb 2016 13:16:38 +0200 "Michael S. Tsirkin" wrote: > On Tue, Feb 02, 2016 at 10:59:53AM +0100, Igor Mammedov wrote: > > On Sun, 31 Jan 2016 18:22:13 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Jan 29, 2016 at 12:13:59PM +0100, Igor Mammedov wrote: > > > > On Thu, 28 J

Re: [Qemu-devel] [PATCH 0/2] tests: clean includes

2016-02-09 Thread Markus Armbruster
Peter Maydell writes: > This patchset runs clean-includes on all the .c files in > tests/, except those in tests/tcg, which I think are all > intended as standalone test programs for the guest. > > The first patch handles i440fx-test.c manually since otherwise > compilation would fail due to the

[Qemu-devel] [PATCH] cirrus_vga: fix off-by-one in blit_region_is_unsafe

2016-02-09 Thread Paolo Bonzini
The "max" value is being compared with >=, but addr + width points to the first byte that will _not_ be copied. Subtract one like it is already done above for the height. Cc: Gerd Hoffmann Signed-off-by: Paolo Bonzini --- hw/display/cirrus_vga.c | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation

2016-02-09 Thread Paolo Bonzini
Two wrongs make a right, but they should be fixed anyway. Cc: Daniel P. Berrange Signed-off-by: Paolo Bonzini --- io/channel-socket.c | 2 +- qemu-char.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/io/channel-socket.c b/io/channel-socket.c index 22d2fd6..bf66a

[Qemu-devel] [PATCH] gtk: fix uninitialized temporary VirtualConsole

2016-02-09 Thread Paolo Bonzini
Only the echo field is used in the temporary VirtualConsole, so the damage was limited. But still, if echo was incorrectly set to true, the result would be some puzzling output in VTE monitor and serial consoles. Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd Cc: Gerd Hoffmann Tested-by: Mark C

Re: [Qemu-devel] [PATCH] usb: check RNDIS buffer offsets & length

2016-02-09 Thread P J P
+-- On Fri, 5 Feb 2016, P J P wrote --+ | From: Prasad J Pandit | | When processing remote NDIS control message packets, the USB Net | device emulator uses a fixed length(4096) data buffer. The incoming | informationBufferOffset & Length combination could cross that range. | Check control message

Re: [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation

2016-02-09 Thread Daniel P. Berrange
On Tue, Feb 09, 2016 at 11:59:15AM +0100, Paolo Bonzini wrote: > Two wrongs make a right, but they should be fixed anyway. > > Cc: Daniel P. Berrange > Signed-off-by: Paolo Bonzini > --- > io/channel-socket.c | 2 +- > qemu-char.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(

Re: [Qemu-devel] [PULL 00/28] Misc changes for 2016-02-08

2016-02-09 Thread Paolo Bonzini
On 09/02/2016 10:21, Peter Maydell wrote: > On 8 February 2016 at 17:02, Paolo Bonzini wrote: >> The following changes since commit e4a096b1cd4350eeca5dcdc391ab333d2083d7fd: >> >> ui/cocoa.m: Include qemu/osdep.h (2016-02-08 13:14:40 +) >> >> are available in the git repository at: >> >>

Re: [Qemu-devel] [PULL 05/13] trace: split trace_init_file out of trace_init_backends

2016-02-09 Thread Denis V. Lunev
On 02/08/2016 09:43 PM, Alex Bennée wrote: Stefan Hajnoczi writes: From: Paolo Bonzini This is cleaner, and improves error reporting with -daemonize. Signed-off-by: Paolo Bonzini Signed-off-by: Denis V. Lunev Acked-by: Christian Borntraeger Message-id: 1452174932-28657-4-git-send-email-.

Re: [Qemu-devel] [PATCH 1/3] char: fix vhost-user socket full

2016-02-09 Thread Michael S. Tsirkin
On Mon, Feb 08, 2016 at 02:12:14PM +0100, Didier Pallard wrote: > On 02/04/2016 03:10 PM, Michael S. Tsirkin wrote: > >On Thu, Dec 03, 2015 at 10:53:17AM +0100, Didier Pallard wrote: > >>unix_send_msgfds is used by vhost-user control socket. qemu_chr_fe_write_all > >>is used to send a message and r

[Qemu-devel] [PULL 28/31] qmp: Fix reference-counting of qnull on empty output visit

2016-02-09 Thread Markus Armbruster
From: Eric Blake Commit 6c2f9a15 ensured that we would not return NULL when the caller used an output visitor but had nothing to visit. But in doing so, it added a FIXME about a reference count leak that could abort qemu in the (unlikely) case of SIZE_MAX such visits (more plausible on 32-bit).

[Qemu-devel] [PULL 03/31] Revert "tracetool: use Python 2.4-compatible exception handling syntax"

2016-02-09 Thread Markus Armbruster
This reverts commit 662da3854e3f490223373b40afdcfcc339d14aa5. We require Python 2.6 now (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi Message-Id: <1450425164-24969-4-git-send-email-arm...@redhat.com> --- scripts/tracetool.py | 4 ++-- 1 f

[Qemu-devel] [PULL 02/31] scripts/qmp: Use Python 2.6 "except E as ..." syntax

2016-02-09 Thread Markus Armbruster
PEP 8 calls for it, because it's forward compatible with Python 3. Supported since Python 2.6, which we require (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi Message-Id: <1450425164-24969-3-git-send-email-arm...@redhat.com> --- scripts/qmp

[Qemu-devel] [PULL 12/31] vl: Ensure qapi visitor properly ends struct visit

2016-02-09 Thread Markus Armbruster
From: Eric Blake Guarantee that visit_end_struct() is called if visit_start_struct() succeeded. This matches the behavior of most other uses of visitors, and is a step towards the possibility of a future patch that adds and enforces some tighter semantics to the visitor interface (namely, cleanu

[Qemu-devel] [PULL 09/31] qapi: Drop dead parameter in gen_params()

2016-02-09 Thread Markus Armbruster
From: Eric Blake Commit 5cdc8831 reworked gen_params() to be simpler, but forgot to clean up a now-unused errp named argument. No change to generated code. Reported-by: Markus Armbruster Signed-off-by: Eric Blake Message-Id: <1454075341-13658-6-git-send-email-ebl...@redhat.com> Signed-off-by:

[Qemu-devel] [PULL 00/31] QAPI patches for 2016-02-09

2016-02-09 Thread Markus Armbruster
The following changes since commit e4a096b1cd4350eeca5dcdc391ab333d2083d7fd: ui/cocoa.m: Include qemu/osdep.h (2016-02-08 13:14:40 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2016-02-09 for you to fetch changes up to 423aeaf219890e8a7311dbe

[Qemu-devel] [PULL 08/31] qapi: Dealloc visitor does not need a type_size()

2016-02-09 Thread Markus Armbruster
From: Eric Blake The intent of having the visitor type_size() callback differ from type_uint64() is to allow special handling for sizes; the visitor core gracefully falls back to type_uint64() if there is no need for the distinction. Since the dealloc visitor does nothing for any of the int visi

[Qemu-devel] [PULL 04/31] tests: Use Python 2.6 "except E as ..." syntax

2016-02-09 Thread Markus Armbruster
PEP 8 calls for it, because it's forward compatible with Python 3. Supported since Python 2.6, which we require (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi Message-Id: <1450425164-24969-5-git-send-email-arm...@redhat.com> --- tests/image

[Qemu-devel] [PULL 01/31] qapi: Use Python 2.6 "except E as ..." syntax

2016-02-09 Thread Markus Armbruster
PEP 8 calls for it, because it's forward compatible with Python 3. Supported since Python 2.6, which we require (commit fec2103). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Acked-by: Stefan Hajnoczi Message-Id: <1450425164-24969-2-git-send-email-arm...@redhat.com> --- scripts/qap

[Qemu-devel] [PULL 10/31] hmp: Drop pointless allocation during qapi visit

2016-02-09 Thread Markus Armbruster
From: Eric Blake The qapi visitor contract allows us to visit a virtual structure, where we don't have any corresponding qapi struct. Most such uses pass NULL for @obj; but these two callers were passing a dummy pointer, which then gets allocated to heap memory but then immediately freed without

[Qemu-devel] [PULL 26/31] qapi: Tighten qmp_input_end_list()

2016-02-09 Thread Markus Armbruster
From: Eric Blake The only way that qmp_input_pop() will set errp is if a dictionary was the most recent thing pushed. Since we don't have any push(struct)/pop(list) or push(list)/pop(struct) mismatches (such a mismatch is a programming bug), we therefore cannot set errp inside qmp_input_end_list

[Qemu-devel] [PULL 13/31] balloon: Improve use of qapi visitor

2016-02-09 Thread Markus Armbruster
From: Eric Blake Rework the control flow of balloon_stats_get_all() to make it easier for a later patch to split visit_end_struct(). Also switch to the uint64 visitor to match the data type. Signed-off-by: Eric Blake Message-Id: <1454075341-13658-10-git-send-email-ebl...@redhat.com> Signed-off

[Qemu-devel] [PULL 05/31] qobject: Document more shortcomings in our number handling

2016-02-09 Thread Markus Armbruster
From: Eric Blake We've already documented that our JSON parsing is locale dependent; but we should also document that our JSON output has the same problem. Additionally, JSON requires finite values (you have to upgrade to JSON5 to get support for Inf or NaN), and our output truncates floating po

[Qemu-devel] [PULL 18/31] qapi: Make all visitors supply uint64 callbacks

2016-02-09 Thread Markus Armbruster
From: Eric Blake Our qapi visitor contract supports multiple integer visitors, but left the type_uint64 visitor as optional (falling back on type_int64); which in turn can lead to awkward behavior with numbers larger than INT64_MAX (the user has to be aware of twos complement, and deal with negat

[Qemu-devel] [PULL 11/31] hmp: Cache use of qapi visitor

2016-02-09 Thread Markus Armbruster
From: Eric Blake Cache the visitor in a local variable instead of repeatedly calling the accessor. Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau Message-Id: <1454075341-13658-8-git-send-email-ebl...@redhat.com> Signed-off-by: Markus Armbruster --- hmp.c | 12 +++- vl.c |

[Qemu-devel] [PULL 07/31] qapi: Drop dead dealloc visitor variable

2016-02-09 Thread Markus Armbruster
From: Eric Blake Commit 0b9d8542 added StackEntry.is_list_head, but forgot to delete the now-unused QapiDeallocVisitor.is_list_head. Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau Message-Id: <1454075341-13658-4-git-send-email-ebl...@redhat.com> Signed-off-by: Markus Armbruster ---

[Qemu-devel] [PULL 15/31] qapi: Track all failures between visit_start/stop

2016-02-09 Thread Markus Armbruster
From: Eric Blake Inside the generated code between visit_start_struct() and visit_end_struct(), we were blindly setting the error into the caller's errp parameter. But a future patch to split visit_end_struct() will require that we take action based on whether an error has occurred, which requir

[Qemu-devel] [PULL 19/31] qapi: Consolidate visitor small integer callbacks

2016-02-09 Thread Markus Armbruster
From: Eric Blake Commit 4e27e819 introduced optional visitor callbacks for all sorts of int types, but no visitor has supplied any of the callbacks for sizes less than 64 bits. In other words, the generic implementation based on using type_[u]int64() followed by bounds-checking works just fine.

[Qemu-devel] [PULL 31/31] qapi: Add missing JSON files in build dependencies

2016-02-09 Thread Markus Armbruster
From: Lluís Vilanova Forgotten in commit 1dde0f4 (trace.json) and commit fafa4d5 (rocker.json). Signed-off-by: Lluís Vilanova Message-Id: <145461055662.15201.2702170180078718114.stgit@localhost> Reviewed-by: Eric Blake [Commit message tweaked] Signed-off-by: Markus Armbruster --- Makefile |

[Qemu-devel] [PULL 20/31] qapi: Don't cast Enum* to int*

2016-02-09 Thread Markus Armbruster
From: Eric Blake C compilers are allowed to represent enums as a smaller type than int, if all enum values fit in the smaller type. There are even compiler flags that force the use of this smaller representation, although using them changes the ABI of a binary. Therefore, our generated code for

[Qemu-devel] [PULL 16/31] qapi-visit: Kill unused visit_end_union()

2016-02-09 Thread Markus Armbruster
From: Eric Blake The generated code can call visit_end_union() without having called visit_start_union(). Example: if (!*obj) { goto out_obj; } visit_type_CpuInfoBase_fields(v, (CpuInfoBase **)obj, &err); if (err) { goto out_obj; // if we

[Qemu-devel] [PULL 06/31] qapi: Avoid use of misnamed DO_UPCAST()

2016-02-09 Thread Markus Armbruster
From: Eric Blake The macro DO_UPCAST() is incorrectly named: it converts from a parent class to a derived class (which is a downcast). Better, and more consistent with some of the other qapi visitors, is to use the container_of() macro through a to_FOO() helper. Names like 'to_ov()' may be a bi

[Qemu-devel] [PATCH 01/16] aio: introduce aio_context_in_iothread

2016-02-09 Thread Paolo Bonzini
This will be used by the synchronous I/O helpers, to choose between aio_poll or QemuEvent. Signed-off-by: Paolo Bonzini --- include/block/aio.h | 7 +++ iothread.c | 9 + 2 files changed, 16 insertions(+) diff --git a/include/block/aio.h b/include/block/aio.h index e086e3b.

[Qemu-devel] [PULL 17/31] qapi: Prefer type_int64 over type_int in visitors

2016-02-09 Thread Markus Armbruster
From: Eric Blake The qapi builtin type 'int' is basically shorthand for the type 'int64'. In fact, since no visitor was providing the optional type_int64() callback, visit_type_int64() was just always falling back to type_int(), cementing the equivalence between the types. However, some visitor

[Qemu-devel] [PATCH 03/16] aio: introduce aio_poll_internal

2016-02-09 Thread Paolo Bonzini
Move the implemntation of aio_poll to aio_poll_internal, and introduce a wrapper for public use. For now it just asserts that aio_poll is being used correctly---either from the thread that manages the context, or with the QEMU global mutex held. The next patch, however, will completely separate t

[Qemu-devel] [PATCH 13/16] aio-posix: remove walking_handlers, protecting AioHandler list with list_lock

2016-02-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- aio-posix.c | 54 -- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index 450da51..cbdc6e4 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -16,7 +16,7 @@ #include "qemu/o

[Qemu-devel] [PATCH 08/16] aio: rename bh_lock to list_lock

2016-02-09 Thread Paolo Bonzini
This will be used for AioHandlers too. There is going to be little or no contention, so it is better to reuse the same lock. Signed-off-by: Paolo Bonzini --- async.c | 16 include/block/aio.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/as

[Qemu-devel] [PATCH 04/16] aio: only call aio_poll_internal from iothread

2016-02-09 Thread Paolo Bonzini
aio_poll is not thread safe; it can report progress incorrectly when called from the main thread. The bug remains latent as long as all of it is called within aio_context_acquire/aio_context_release, but this will change soon. The details of the bug are pretty simple, but fixing it in an efficien

[Qemu-devel] [PULL 22/31] qapi: Swap visit_* arguments for consistent 'name' placement

2016-02-09 Thread Markus Armbruster
From: Eric Blake JSON uses "name":value, but many of our visitor interfaces were called with visit_type_FOO(v, &value, name, errp). This can be a bit confusing to have to mentally swap the parameter order to match JSON order. It's particularly bad for visit_start_struct(), where the 'name' para

[Qemu-devel] [PATCH 10/16] aio: make ctx->list_lock a QemuLockCnt, subsuming ctx->walking_bh

2016-02-09 Thread Paolo Bonzini
This will make it possible to walk the list of bottom halves without holding the AioContext lock---and in turn to call bottom half handlers without holding the lock. Signed-off-by: Paolo Bonzini --- async.c | 31 ++- include/block/aio.h | 12 +---

[Qemu-devel] [PATCH 12/16] aio: tweak walking in dispatch phase

2016-02-09 Thread Paolo Bonzini
Preparing for the following patch, use QLIST_FOREACH_SAFE and modify the placement of walking_handlers increment/decrement. Signed-off-by: Paolo Bonzini --- aio-posix.c | 27 +-- aio-win32.c | 26 -- 2 files changed, 25 insertions(+), 28 deletions(

Re: [Qemu-devel] [PATCH v3 06/16] register: QOMify

2016-02-09 Thread Alex Bennée
Alistair Francis writes: > From: Peter Crosthwaite > > QOMify registers as a child of TYPE_DEVICE. This allows registers to > define GPIOs. > > Define an init helper that will do QOM initialisation as well as setup > the r/w fast paths. I don't know if there has been bit-rot since posting but

[Qemu-devel] [PATCH 14/16] aio-win32: remove walking_handlers, protecting AioHandler list with list_lock

2016-02-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- aio-win32.c | 81 + 1 file changed, 49 insertions(+), 32 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index f1a8780..862f48c 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -43,6 +43,7 @@ void aio_s

[Qemu-devel] [PATCH 16/16] aio: push aio_context_acquire/release down to dispatching

2016-02-09 Thread Paolo Bonzini
The AioContext data structures are now protected by list_lock and/or they are walked with FOREACH_RCU primitives. There is no need anymore to acquire the AioContext for the entire duration of aio_dispatch. Instead, just acquire it before and after invoking the callbacks. The next step is then to p

[Qemu-devel] [PATCH 05/16] iothread: release AioContext around aio_poll

2016-02-09 Thread Paolo Bonzini
This is the first step towards having fine-grained critical sections in dataplane threads, which resolves lock ordering problems between address_space_* functions (which need the BQL when doing MMIO, even after we complete RCU-based dispatch) and the AioContext. Because AioContext does not use con

[Qemu-devel] [PATCH 07/16] aio: convert from RFifoLock to QemuRecMutex

2016-02-09 Thread Paolo Bonzini
It is simpler and a bit faster, and QEMU does not need the contention callbacks (and thus the fairness) anymore. Signed-off-by: Paolo Bonzini --- async.c | 8 ++--- include/block/aio.h | 3 +- include/qemu/rfifolock.h | 54 tests/.gitignore

[Qemu-devel] [PATCH 09/16] qemu-thread: introduce QemuLockCnt

2016-02-09 Thread Paolo Bonzini
A QemuLockCnt comprises a counter and a mutex, with primitives to increment and decrement the counter, and to take and release the mutex. It can be used to do lock-free visits to a data structure whenever mutexes would be too heavy-weight and the critical section is too long for RCU. This could b

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events

2016-02-09 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> The tracing infrastructure later needs to differentiate between regular >> pointers and pointers to vCPUs. >> >> Also changes all targets to use the new 'TCGv_cpu' type instead of the >> generic 'TCGv_ptr'. As of now, the change is merely cosmetic

[Qemu-devel] [PATCH 11/16] qemu-thread: optimize QemuLockCnt with futexes on Linux

2016-02-09 Thread Paolo Bonzini
This is complex, but I think it is reasonably documented in the source. Signed-off-by: Paolo Bonzini --- docs/lockcnt.txt | 9 +- include/qemu/futex.h | 36 ++ include/qemu/thread.h| 3 + trace-events | 10 ++ util/lockcnt.c | 282 +

[Qemu-devel] [PATCH 15/16] aio: document locking

2016-02-09 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- docs/multiple-iothreads.txt | 5 ++--- include/block/aio.h | 32 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/multiple-iothreads.txt b/docs/multiple-iothreads.txt index c5d38e9..8ec3777 100644 ---

Re: [Qemu-devel] [PATCH 1/3] char: fix vhost-user socket full

2016-02-09 Thread Daniel P. Berrange
On Thu, Feb 04, 2016 at 04:10:38PM +0200, Michael S. Tsirkin wrote: > On Thu, Dec 03, 2015 at 10:53:17AM +0100, Didier Pallard wrote: > > unix_send_msgfds is used by vhost-user control socket. qemu_chr_fe_write_all > > is used to send a message and retries as long as EAGAIN errno is set, > > but wr

Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events

2016-02-09 Thread Lluís Vilanova
Alex Bennée writes: > Lluís Vilanova writes: >> The tracing infrastructure later needs to differentiate between regular >> pointers and pointers to vCPUs. >> >> Also changes all targets to use the new 'TCGv_cpu' type instead of the >> generic 'TCGv_ptr'. As of now, the change is merely cosmetic

[Qemu-devel] [PATCH 02/16] aio: do not really acquire/release the main AIO context

2016-02-09 Thread Paolo Bonzini
The main AIO context is used in many places that are not aware of AioContexts at all. bdrv_drain will soon do a release/acquire itself, which for the main AIO context would break because code calls bdrv_drain on it without acquiring anything. Very soon, bdrv will be ready for removal of aio_conte

[Qemu-devel] [PATCH 1/8] ipmi: add a realize function to the device class

2016-02-09 Thread Cédric Le Goater
This will be useful to define and use properties when the object is instanciated. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index e1ad19b8db6e..131713

[Qemu-devel] [PATCH 3/8] ipmi: remove the need of an ending record in the SDR table

2016-02-09 Thread Cédric Le Goater
Currently, the code initializing the sdr table relies on an ending record with a recid of 0x. This patch changes the loop to use the sdr size as a breaking condition. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(

[Qemu-devel] [PATCH 4/8] ipmi: add some local variables in ipmi_sdr_init

2016-02-09 Thread Cédric Le Goater
This patch adds a couple of variables to manipulate the raw sdr entries. The const attribute is also removed on init_sdrs. This will ease the introduction of a sdr loader using a file. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 15 ++- 1 file changed, 10 insertions(

[Qemu-devel] [PATCH 6/8] ipmi: provide support for FRUs

2016-02-09 Thread Cédric Le Goater
This patch provides a simple FRU support for the BMC simulator. FRUs are loaded from a file which name is specified in the object properties, each entry having a fixed size, also specified in the properties. If the file is unknown or not accessible for some reason, a unique entry of 1024 bytes is c

[Qemu-devel] [PATCH 0/8] ipmi: a couple of enhancements to the BMC simulator (round 2)

2016-02-09 Thread Cédric Le Goater
The first patches are cleanups and prepare ground for an extension of the BMC simulator providing a SDR loader using a file. A simple FRU support comes next. The last patches introduce APIs to populate a guest device tree with the available sensors and to generate events, which is needed by platfo

[Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_sdr_find() API

2016-02-09 Thread Cédric Le Goater
This patch exposes a new IPMI routine to query a sdr entry from the sdr table maintained by the IPMI BMC simulator. The API is very similar to the internal sdr_find_entry() routine and should be used the same way to query one or all sdrs. A typical use would be to loop on the sdrs to build nodes o

[Qemu-devel] [PATCH 5/8] ipmi: use a file to load SDRs

2016-02-09 Thread Cédric Le Goater
The IPMI BMC simulator populates the sdr/sensor tables with a minimal set of entries (Watchdog). But some qemu platforms might want to use extra entries for their custom needs. This patch modifies slighty the initializing routine to take into account a larger set read from a file. The name of the

[Qemu-devel] [PULL 31/32] MAINTAINERS: add all-match entry for qemu-devel@

2016-02-09 Thread Paolo Bonzini
From: Stephen Warren Add an entry to MAINTAINERS that matches every patch, and requests the user send patches to qemu-devel@nongnu.org. It's not 100% obvious to project newcomers that all patches should be sent there; checkpatch doesn't say so, and since it mentions other lists to CC, the wordin

[Qemu-devel] [PATCH 2/8] ipmi: use a function to initialize the SDR table

2016-02-09 Thread Cédric Le Goater
This patch does not change anything. It only moves the code section initializing the sdrs in its own routine and prepares ground for the subsequent patches. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 49 - 1 file changed, 28 inser

[Qemu-devel] [PULL 02/32] memory: RCU ram_list.dirty_memory[] for safe RAM hotplug

2016-02-09 Thread Paolo Bonzini
From: Stefan Hajnoczi Although accesses to ram_list.dirty_memory[] use atomics so multiple threads can safely dirty the bitmap, the data structure is not fully thread-safe yet. This patch handles the RAM hotplug case where ram_list.dirty_memory[] is grown. ram_list.dirty_memory[] is change from

[Qemu-devel] [PULL 29/32] docs/memory.txt: Improve list of different memory regions

2016-02-09 Thread Paolo Bonzini
From: Peter Maydell Improve the part of the memory region documentation which describes the various different kinds of memory region: * add the missing types ROM, IOMMU and reservation * mention the functions used to initialize each type, as a hint for finding the API docs and examples of us

[Qemu-devel] [PULL 32/32] qemu-char, io: fix ordering of arguments for UDP socket creation

2016-02-09 Thread Paolo Bonzini
Two wrongs make a right, but they should be fixed anyway. Cc: Daniel P. Berrange Signed-off-by: Paolo Bonzini Message-Id: <1455015557-15106-1-git-send-email-pbonz...@redhat.com> --- io/channel-socket.c | 2 +- qemu-char.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --

[Qemu-devel] [PATCH 8/8] ipmi: introduce an ipmi_bmc_gen_event() API

2016-02-09 Thread Cédric Le Goater
It will be used to fill the message buffer with custom events expected by some systems. Typically, an Open PowerNV platform guest is notified with an OEM SEL message before a shutdown or a reboot. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 24 include/h

[Qemu-devel] [PULL 08/32] hw: Add support for LSI SAS1068 (mptsas) device

2016-02-09 Thread Paolo Bonzini
This adds the SAS1068 device, a SAS disk controller used in VMware that is oldish but widely supported and has decent performance. Unlike megasas, it presents itself as a SAS controller and not as a RAID controller. The device corresponds to the mptsas kernel driver in Linux. A few small things

[Qemu-devel] [PULL v2 00/32] Misc changes for 2016-02-08

2016-02-09 Thread Paolo Bonzini
The following changes since commit e4a096b1cd4350eeca5dcdc391ab333d2083d7fd: ui/cocoa.m: Include qemu/osdep.h (2016-02-08 13:14:40 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 91eb5e5293fda2127ae33594715b47

[Qemu-devel] [PULL 30/32] target-i386: fix PSE36 mode

2016-02-09 Thread Paolo Bonzini
(pde & 0x1fe000) is a 32-bit integer; when shifting it into bits 39-32 the result is zero. Fix it by making the mask (and thus the result of the AND) a 64-bit integer. Reported by Coverity. Signed-off-by: Paolo Bonzini --- target-i386/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

Re: [Qemu-devel] [PATCH 1/3] char: fix vhost-user socket full

2016-02-09 Thread Michael S. Tsirkin
On Tue, Feb 09, 2016 at 11:48:13AM +, Daniel P. Berrange wrote: > On Thu, Feb 04, 2016 at 04:10:38PM +0200, Michael S. Tsirkin wrote: > > On Thu, Dec 03, 2015 at 10:53:17AM +0100, Didier Pallard wrote: > > > unix_send_msgfds is used by vhost-user control socket. > > > qemu_chr_fe_write_all > >

Re: [Qemu-devel] [PATCH v19 3/9] pc: add a Virtual Machine Generation ID device

2016-02-09 Thread Michael S. Tsirkin
On Tue, Feb 09, 2016 at 11:46:08AM +0100, Igor Mammedov wrote: > > So the linker interface solves this rather neatly: > > bios allocates memory, bios passes memory map to guest. > > Served us well for several years without need for extensions, > > and it does solve the VM GEN ID problem, even thoug

Re: [Qemu-devel] [PULL 05/13] trace: split trace_init_file out of trace_init_backends

2016-02-09 Thread Alex Bennée
Denis V. Lunev writes: > On 02/08/2016 09:43 PM, Alex Bennée wrote: >> Stefan Hajnoczi writes: >> >>> From: Paolo Bonzini >>> >>> This is cleaner, and improves error reporting with -daemonize. >>> >>> Signed-off-by: Paolo Bonzini >>> Signed-off-by: Denis V. Lunev >>> Acked-by: Christian Born

[Qemu-devel] [PULL 30/31] qapi: Fix compilation failure on MIPS and SPARC

2016-02-09 Thread Markus Armbruster
From: Eric Blake Commit 86f4b687 broke compilation on MIPS and SPARC, which have a preprocessor pollution of '#define mips 1' and '#define sparc 1', respectively. Treat it the same way as we do for the pollution with 'unix', so that QMP remains backwards compatible and only the C code needs to u

[Qemu-devel] [PULL 21/31] qom: Use typedef for Visitor

2016-02-09 Thread Markus Armbruster
From: Eric Blake No need to repeat 'struct Visitor' when we already have it in typedefs.h. Omitting the redundant 'struct' also makes a later patch easier to search for all object property callbacks that are associated with a Visitor. Signed-off-by: Eric Blake Reviewed-by: Marc-André Lureau M

  1   2   3   4   >