[Qemu-devel] [PATCH 0/7] Fix device introspection regressions

2015-09-18 Thread Markus Armbruster
QMP command device-list-properties regressed in 2.1: it can crash or leave dangling pointers behind. -device FOO,help regressed in 2.2: it no longer works for non-pluggable devices. I tried to fix that some time ago[*], but my fix failed review. This is my second, more comprehensive try. PATCH

[Qemu-devel] [PATCH 3/7] device-introspect-test: New, covering device introspection

2015-09-18 Thread Markus Armbruster
The test doesn't check the output makes any sense, only that QEMU survives. Useful since we've had an astounding number of crash bugs around there. In fact, we have a bunch of them right now: several devices crash or hang, and all CPUs leave a dangling pointer behind. Blacklist them in the test.

Re: [Qemu-devel] Someone kill the in-tree build, please (was: MIPS qemu build failure)

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 13:06, Markus Armbruster wrote: > "Daniel P. Berrange" writes: >> You have your build directory *outside* the QEMU source tree, >> eg $GIT/../build, whereas I had been testing with $GIT/build >> and an non-VPATH build. > Dropping the in-tree build entirely would save us f

Re: [Qemu-devel] Someone kill the in-tree build, please (was: MIPS qemu build failure)

2015-09-18 Thread Daniel P. Berrange
On Fri, Sep 18, 2015 at 02:06:39PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Fri, Sep 18, 2015 at 09:53:31AM +0100, Leon Alrae wrote: > >> On 18/09/2015 09:24, Daniel P. Berrange wrote: > >> > On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: > >> >> On

Re: [Qemu-devel] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Kevin Wolf
Am 18.09.2015 um 13:45 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:17 PM CEST, Kevin Wolf wrote: > > > +static void swap_feature_fields(BlockDriverState *bs_top, > > +BlockDriverState *bs_new) > > +{ > > +BlockDriverState tmp; > > + > > +bdrv_

Re: [Qemu-devel] [PATCH 1/7] qapi: support implicit structs in OptsVisitor

2015-09-18 Thread Eric Blake
On 09/17/2015 02:30 PM, Eric Blake wrote: > On 09/07/2015 06:08 AM, Kővágó, Zoltán wrote: >> They are required for flat unions (you still have to allocate the >> structs). >> >> Signed-off-by: Kővágó, Zoltán >> --- >> qapi/opts-visitor.c | 15 +++ >> 1 file changed, 15 insertions(+) >

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Eric Blake
On 09/18/2015 03:03 AM, Yang Hongyang wrote: >> Fix is simple: add this patch to your build: >> >> https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg01650.html >> >> I've rebased my git repo accordingly for now, and will post v5 later on >> (I'm still working on other improvements, and may

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Eric Blake
On 09/17/2015 06:52 PM, Wen Congyang wrote: >> > > OK, I will try it. What is difference between start_struct() and > start_implicit_struct()? If you have the following QDict: { "a":1, "b":2", "c:3" } start_struct() corresponds to the {, and end_struct() corresponds to the }. If the correspon

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Eric Blake
On 09/18/2015 12:56 AM, Markus Armbruster wrote: >> OK, I will try it. What is difference between start_struct() and >> start_implicit_struct()? > > I hope to be able to answer this question next week, after taking a dive > in the (almost entirely undocumented) visitors code. It's not quite undo

Re: [Qemu-devel] [PATCH 5/7] qdev: Protect device-list-properties against broken devices

2015-09-18 Thread Christian Borntraeger
Am 18.09.2015 um 14:00 schrieb Markus Armbruster: > Several devices don't survive object_unref(object_new(T)): they crash > or hang during cleanup, or they leave dangling pointers behind. > > This breaks at least device-list-properties, because > qmp_device_list_properties() needs to create a devi

Re: [Qemu-devel] [PATCH v2 03/22] target-*: Increment num_insns immediately after tcg_gen_insn_start

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > This does tidy the icount test common to all targets. > > Signed-off-by: Richard Henderson > --- > target-alpha/translate.c | 4 ++-- > target-arm/translate-a64.c| 6 +++--- > target-arm/translate.c| 7 --- > target-c

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3 incorrect instruction set

2015-09-18 Thread PeteVine
Still there in the latest master. To clarify, running the binary with the -cpu athlon switch (same instruction set as P3) also exhibits the problem whereas a real athlon SIGILL's correctly. ** Description changed: Running a binary containing a movsd instruction (SSE2) in 32-bit - qemu-i386 -cp

Re: [Qemu-devel] [PATCH v2 04/22] target-*: Introduce and use cpu_breakpoint_test

2015-09-18 Thread Sergey Fedorov
On 18.09.2015 13:32, Peter Maydell wrote: >> +/* Return true if PC matches an installed breakpoint. */ >> > +static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) >> > +{ >> > +CPUBreakpoint *bp; >> > + >> > +if (unlikely(!QTAILQ_EMPTY(&cpu->breakpoints))) { >> > +

[Qemu-devel] Someone kill the in-tree build, please (was: MIPS qemu build failure)

2015-09-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, Sep 18, 2015 at 09:53:31AM +0100, Leon Alrae wrote: >> On 18/09/2015 09:24, Daniel P. Berrange wrote: >> > On Thu, Sep 17, 2015 at 07:38:53PM +0100, Peter Maydell wrote: >> >> On 17 September 2015 at 19:21, Steve Ellcey wrote: >> >>> >> >>> Following up to

Re: [Qemu-devel] [PATCH v2 1/2] util - add automated ID generation utility

2015-09-18 Thread Markus Armbruster
Jeff Cody writes: > Multiple sub-systems in QEMU may find it useful to generate IDs > for objects that a user may reference via QMP or HMP. This patch > presents a standardized way to do it, so that automatic ID generation > follows the same rules. > > This patch enforces the following rules whe

Re: [Qemu-devel] [PATCH v2 2/2] block: auto-generated node-names

2015-09-18 Thread Markus Armbruster
Jeff Cody writes: > If a node-name is not specified, automatically generate the node-name. > > Generated node-names will use the "block" sub-system identifier. > > Reviewed-by: Eric Blake > Reviewed-by: John Snow > Signed-off-by: Jeff Cody > --- > block.c | 25 - > 1 f

Re: [Qemu-devel] QEMU+Aarch64: in_asm log skips instructions of loop-programs

2015-09-18 Thread Sergey Smolov
Hi Christopher, 18.09.2015 02:02, Christopher Covington пишет: Hi Sergey, On 09/04/2015 12:38 PM, Sergey Smolov wrote: 03.09.2015 19:35, Peter Maydell пишет: On 3 September 2015 at 15:31, Sergey Smolov wrote: Do you think it is possible to implement another QEMU logger which will make a rec

Re: [Qemu-devel] [PATCH v2 0/2] Auto-generated IDs

2015-09-18 Thread Markus Armbruster
Jeff Cody writes: > Changes from RFC v1: > > Patch 1: Several typos / grammatical errors (thanks Eric, John) > Make id_subsys_str[] const pointer to const strings (thanks Eric) > Moved id_subsys_str[] out from id_generate() (thanks John) > Assert on nul

Re: [Qemu-devel] [PATCH v2 20/22] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 05:55, Richard Henderson wrote: > We can now restore state without retranslation. > > Signed-off-by: Richard Henderson > --- > +/* Encode the data collected about the instructions while compiling TB. > + Place the data at BLOCK, and return the number of bytes consumed. >

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3/athlon incorrect instruction set

2015-09-18 Thread Paolo Bonzini
QEMU doesn't try to mimic the exact set of instructions for a processor, unfortunately. Virtualization solutions like KVM also do not allow you to do that, so the case for this feature is relatively minor. However, patches are welcome. ** Changed in: qemu Status: New => Won't Fix -- You

[Qemu-devel] [PATCH v5 0/4] Add 'blockdev-snapshot' command

2015-09-18 Thread Alberto Garcia
This fixes the problem detect by Fam: the previous series was deleting the 'backing' option for 'blockdev-add' even if it contained a non-empty string. The code is also rebased on top of the current master. In particular the test output had to be adapted because of fe646693. Again, this depends o

[Qemu-devel] [PATCH v5 1/4] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-09-18 Thread Alberto Garcia
We will introduce the 'blockdev-snapshot' command that will require its own struct for the parameters, so we need to rename this one in order to avoid name clashes. Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Reviewed-by: Max Reitz --- blockdev.c | 2 +- qapi-schema.json

[Qemu-devel] [PATCH v5 2/4] block: support passing 'backing': '' to 'blockdev-add'

2015-09-18 Thread Alberto Garcia
Passing an empty string allows opening an image but not its backing file. This was already described in the API documentation, only the implementation was missing. This is useful for creating snapshots using images opened with blockdev-add, since they are not supposed to have a backing image befor

[Qemu-devel] [PATCH v5 4/4] block: add tests for the 'blockdev-snapshot' command

2015-09-18 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/085 | 102 ++--- tests/qemu-iotests/085.out | 34 ++- 2 files changed, 128 insertions(+), 8 deletions(-) diff --git a/tests/qemu-iotests/085 b/tests/qemu-iotests/085 index 56cd6f8..532eb

[Qemu-devel] [PATCH v5 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-18 Thread Alberto Garcia
One of the limitations of the 'blockdev-snapshot-sync' command is that it does not allow passing BlockdevOptions to the newly created snapshots, so they are always opened using the default values. Extending the command to allow passing options is not a practical solution because there is overlap b

[Qemu-devel] [PULL 1/8] error: only prepend timestamp on stderr

2015-09-18 Thread Markus Armbruster
From: Stefan Hajnoczi The -msg timestamp=on option prepends a timestamp to error messages. This is useful on stderr where it allows users to identify when an error was raised. Timestamps do not make sense on the monitor since error_report() is called in response to a synchronous monitor command

[Qemu-devel] [PULL 3/8] error: Copy location information in error_copy()

2015-09-18 Thread Markus Armbruster
From: Eric Blake Commit 1e9b65bb forgot to propagate source information to copied errors. Signed-off-by: Eric Blake Message-Id: <1441902890-23064-1-git-send-email-ebl...@redhat.com> Signed-off-by: Markus Armbruster --- util/error.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/e

[Qemu-devel] [PULL 8/8] memory: Fix bad error handling in memory_region_init_ram_ptr()

2015-09-18 Thread Markus Armbruster
Commit ef701d7 screwed up handling of out-of-memory conditions. Before the commit, we report the error and exit(1), in one place. The commit lifts the error handling up the call chain some, to three places. Fine. Except it uses &error_abort in these places, changing the behavior from exit(1) to

[Qemu-devel] [PULL 4/8] MAINTAINERS: Add "Error reporting" entry

2015-09-18 Thread Markus Armbruster
Error reporting work has been flowing through my tree for a while. Time for MAINTAINERS to catch up. Signed-off-by: Markus Armbruster Message-Id: <1442057396-21989-1-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Peter Crosthwaite --- MAINTAINERS | 8 1 file ch

[Qemu-devel] [PULL 0/8] Error reporting patches

2015-09-18 Thread Markus Armbruster
The following changes since commit 16a1b6e97c2a2919fd296db4bea2f9da2ad3cc4d: target-cris: update CPU state save/load to use VMStateDescription (2015-09-17 14:31:38 +0100) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-error-2015-09-18 for you to fetch ch

[Qemu-devel] [PULL 7/8] loader: Fix memory_region_init_resizeable_ram() error handling

2015-09-18 Thread Markus Armbruster
Commit ef701d7 screwed up handling of out-of-memory conditions. Before the commit, we report the error and exit(1), in one place. The commit lifts the error handling up the call chain some, to three places. Fine. Except it uses &error_abort in these places, changing the behavior from exit(1) to

[Qemu-devel] [PULL 6/8] Fix bad error handling after memory_region_init_ram()

2015-09-18 Thread Markus Armbruster
Symptom: $ qemu-system-x86_64 -m 1000 Unexpected error in ram_block_add() at /work/armbru/qemu/exec.c:1456: upstream-qemu: cannot set up guest memory 'pc.ram': Cannot allocate memory Aborted (core dumped) Root cause: commit ef701d7 screwed up handling of out-of-memory conditio

[Qemu-devel] [PULL 5/8] error: New error_fatal

2015-09-18 Thread Markus Armbruster
Similar to error_abort, but doesn't report where the error was created, and terminates the process with exit(1) rather than abort(). Signed-off-by: Markus Armbruster Message-Id: <1441983105-26376-2-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Peter Crosthwaite --- inc

[Qemu-devel] [PULL 2/8] hmp: Allow for error message hints on HMP

2015-09-18 Thread Markus Armbruster
From: Eric Blake Commits 7216ae3d and d2828429 disabled some error message hints, all because a change to use modern error reporting meant that the hint would be output prior to the actual error. Fix this by making hints a first-class member of Error. For example, we are now back to the pleasan

[Qemu-devel] [PATCH v1 07/16] io: add abstract QIOChannel classes

2015-09-18 Thread Daniel P. Berrange
Start the new generic I/O channel framework by defining a QIOChannel abstract base class. This is designed to feel similar to GLib's GIOChannel, but with the addition of support for using iovecs, qemu error reporting, file descriptor passing, coroutine integration and use of the QOM framework for e

[Qemu-devel] [PATCH v1 15/16] io: add QIOChannelCommand class

2015-09-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that is capable of performing I/O to/from a separate process, via a pair of pipes. The command can be used for unidirectional or bi-directional I/O. Signed-off-by: Daniel P. Berrange --- include/io/channel-command.h| 91 ++ io/Makefile.objs|

Re: [Qemu-devel] [PATCH 2/2] target-arm: Implement checking of fired watchpoint

2015-09-18 Thread Peter Maydell
On 14 September 2015 at 11:50, Sergey Fedorov wrote: > ARM stops before access to a location covered by watchpoint. Also, QEMU > watchpoint fire is not necessarily an architectural watchpoint match. > Unfortunately, that is hardly possible to ignore a fired watchpoint in > debug exception handler.

[Qemu-devel] [PATCH v1 01/16] sockets: add helpers for creating SocketAddress from a socket

2015-09-18 Thread Daniel P. Berrange
Add two helper methods that, given a socket file descriptor, can return a populated SocketAddress struct containing either the local or remote address information. Signed-off-by: Daniel P. Berrange --- include/qemu/sockets.h | 30 ++ util/qemu-sockets.c| 110

[Qemu-devel] [PATCH v1 00/16] Introduce I/O channels framework

2015-09-18 Thread Daniel P. Berrange
This series of patches is a first formal submission for review of another chunk of my large series supporting TLS across chardevs, VNC and migration, previously shown here: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html In this series, I have provided only the general I/O c

Re: [Qemu-devel] [PATCH 1/2] cpu: Add callback to check architectural watchpoint match

2015-09-18 Thread Peter Maydell
On 14 September 2015 at 11:50, Sergey Fedorov wrote: > When QEMU watchpoint matches, that is not definitely an architectural > watchpoint match yet. If it is a stop-before-access watchpoint then that > is hardly possible to ignore it after throwing a TCG exception. > > A special callback is introd

[Qemu-devel] [PATCH v1 08/16] io: add helper module for creating watches on FDs

2015-09-18 Thread Daniel P. Berrange
A number of the channel implementations will require the ability to create watches on file descriptors / sockets. To avoid duplicating this code in each channel, provide a helper API for dealing with file descriptor watches. There are two watch implementations provided. The first is useful for bi-

Re: [Qemu-devel] How to make USB work with Mac OS X

2015-09-18 Thread Programmingkid
On Sep 18, 2015, at 2:14 AM, Alexander Graf wrote: > > >> Am 17.09.2015 um 14:42 schrieb Programmingkid : >> >> Is there a way to make USB work with Mac OS X on qemu-system-ppc? I used the >> -usb option, but mounting a flash drive didn't work. Would you know anything >> that could help? >

[Qemu-devel] [PATCH v1 06/16] coroutine: move into libqemuutil.a library

2015-09-18 Thread Daniel P. Berrange
The coroutine files are currently referenced by the block-obj-y variable. The coroutine functionality though is already used by more than just the block code. eg migration code uses coroutine yield. In the future the I/O channel code will also use the coroutine yield functionality. Since the corout

[Qemu-devel] [PATCH v1 13/16] io: add QIOChannelTLS class

2015-09-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that can run the TLS protocol over the top of another QIOChannel instance. The object provides a simplified API to perform the handshake when starting the TLS session. The layering of TLS over the underlying channel does not have to be setup immediately. It is possible to

[Qemu-devel] [PATCH v1 12/16] io: add QIOChannelFile class

2015-09-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that is capable of operating on things that are files, such as plain files, pipes, character/block devices, but notably not sockets. Signed-off-by: Daniel P. Berrange --- include/io/channel-file.h| 93 + io/Makefile.objs | 1 + io/chan

[Qemu-devel] [PATCH v1 11/16] io: add QIOChannelSocket class

2015-09-18 Thread Daniel P. Berrange
Implement a QIOChannel subclass that supports sockets I/O. The implementation is able to manage a single socket file descriptor, whether a TCP/UNIX listener, TCP/UNIX connection, or a UDP datagram. It provides APIs which can listen and connect either asynchronously or synchronously. Since there is

[Qemu-devel] [PATCH v1 05/16] osdep: add qemu_fork() wrapper for safely handling signals

2015-09-18 Thread Daniel P. Berrange
When using regular fork() the child process of course inherits all the parents' signal handlers. If the child then proceeds to close() any open file descriptors, it may break some of those registered signal handlers. The child generally does not want to ever run any of the signal handlers tha paren

Re: [Qemu-devel] [PATCH 1/2] cpu: Add callback to check architectural watchpoint match

2015-09-18 Thread Peter Maydell
On 14 September 2015 at 11:50, Sergey Fedorov wrote: > When QEMU watchpoint matches, that is not definitely an architectural > watchpoint match yet. If it is a stop-before-access watchpoint then that > is hardly possible to ignore it after throwing a TCG exception. > > A special callback is introd

Re: [Qemu-devel] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Alberto Garcia
On Fri 18 Sep 2015 02:24:21 PM CEST, Kevin Wolf wrote: >> > +static void swap_feature_fields(BlockDriverState *bs_top, >> > +BlockDriverState *bs_new) >> > +{ >> > +BlockDriverState tmp; >> > + >> > +bdrv_move_feature_fields(&tmp, bs_top); >> > +bdrv_mov

Re: [Qemu-devel] [PATCH 7/7] tests: Simplify how qom-test is run

2015-09-18 Thread Andreas Färber
Am 18.09.2015 um 14:00 schrieb Markus Armbruster: > Add it to check-qtest-generic-y instead of check-qtest-$(target)-y for > every target. > > Signed-off-by: Markus Armbruster > --- > tests/Makefile | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/tests/Makefile b/te

[Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class

2015-09-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that is capable of performing I/O to/from a memory buffer. This implementation does not attempt to support concurrent readers & writers. It is designed for serialized access where by a single thread at a time may write data, seek and then read data back out. Signed-off-by

[Qemu-devel] Allwinner-a10 maintainership

2015-09-18 Thread Markus Armbruster
Hi Beniamino, E-mail to our maintainer for Allwinner-a10 Li Guang bounces. Need a new one. Since you've done substantial work on it relatively recently, you seem to be the obvious victim. Would you be willing to serve? If not, do you know anyone who's interested in this stuff?

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3/athlon incorrect instruction set

2015-09-18 Thread PeteVine
I'm pretty sure you're right regarding entire instruction sets - but surely simply disabling SSE2 is possible even now? (after all pentium2 and below doesn't have it) That could solve this problem with a simple hack like, eg. : pentium3 = $pentium3 - SSE2 -- You received this bug notification b

[Qemu-devel] [PATCH v1 03/16] sockets: allow port to be NULL when listening on IP address

2015-09-18 Thread Daniel P. Berrange
If the port in the SocketAddress struct is NULL, it can allow the kernel to automatically select a free port. This is useful in particular in unit tests to avoid a race trying to find a free port to run a test case on. Signed-off-by: Daniel P. Berrange --- util/qemu-sockets.c | 18 +-

[Qemu-devel] [PATCH v1 04/16] ui: convert VNC startup code to use SocketAddress

2015-09-18 Thread Daniel P. Berrange
The VNC code is currently using QemuOpts to configure the sockets connections / listeners it needs. Convert it to use SocketAddress to bring it in line with modern QAPI based code elsewhere in QEMU. Signed-off-by: Daniel P. Berrange --- ui/vnc.c | 161

Re: [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 15:07, Sergey Fedorov wrote: > On 18.09.2015 16:50, Peter Maydell wrote: >> On 14 September 2015 at 11:51, Sergey Fedorov wrote: >>> --- a/target-arm/translate-a64.c >>> +++ b/target-arm/translate-a64.c >>> @@ -11000,11 +11000,13 @@ void gen_intermediate_code_internal_a64

[Qemu-devel] [PATCH] vhost-scsi: include linux/vhost.h

2015-09-18 Thread marcandre . lureau
From: Marc-André Lureau Replace ad-hoc declarations with the linux header. Signed-off-by: Marc-André Lureau --- hw/scsi/vhost-scsi.c | 1 + include/hw/virtio/vhost-scsi.h | 25 - 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/hw/scsi/vhost-scs

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3/athlon incorrect instruction set

2015-09-18 Thread PeteVine
In the case it's really unfixable and both pentium3 and athlon are nothing more than aliases for 'QEMU Virtual CPU version 2.4.50' they should be removed from the list the user gets after: qemu-i386 -cpu help so as not to mislead. Thanks! -- You received this bug notification because you are a

Re: [Qemu-devel] [PATCH] target-arm: implement arm_debug_target_el()

2015-09-18 Thread Peter Maydell
On 14 September 2015 at 11:53, Sergey Fedorov wrote: > Implement debug exception routing according to ARM ARM D2.3.1 Pseudocode > description of routing debug exceptions. > > Signed-off-by: Sergey Fedorov Applied to target-arm.next, thanks. -- PMM

Re: [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling

2015-09-18 Thread Sergey Fedorov
On 18.09.2015 16:50, Peter Maydell wrote: > On 14 September 2015 at 11:51, Sergey Fedorov wrote: >> A QEMU breakpoint match is not definitely an architectural breakpoint >> match. If an exception is generated unconditionally during translation, >> it is hardly possible to ignore it in the debug ex

Re: [Qemu-devel] [PATCH] target-arm: implement arm_debug_target_el()

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 15:08, Peter Maydell wrote: > On 14 September 2015 at 11:53, Sergey Fedorov wrote: >> Implement debug exception routing according to ARM ARM D2.3.1 Pseudocode >> description of routing debug exceptions. >> >> Signed-off-by: Sergey Fedorov > > > > Applied to target-arm.nex

Re: [Qemu-devel] [PATCH 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-09-18 Thread Kevin Wolf
Am 18.09.2015 um 15:31 hat Alberto Garcia geschrieben: > On Fri 18 Sep 2015 02:24:21 PM CEST, Kevin Wolf wrote: > > >> > +static void swap_feature_fields(BlockDriverState *bs_top, > >> > +BlockDriverState *bs_new) > >> > +{ > >> > +BlockDriverState tmp; > >> > +

Re: [Qemu-devel] [PULL 00/10] target-mips queue

2015-09-18 Thread Peter Maydell
a2f9da2ad3cc4d: > > target-cris: update CPU state save/load to use VMStateDescription > (2015-09-17 14:31:38 +0100) > > are available in the git repository at: > > git://github.com/lalrae/qemu.git tags/mips-20150918 > > for you to fetch changes up to 9c708c7f9fbb813a3f

[Qemu-devel] [PATCH v1 02/16] sockets: move qapi_copy_SocketAddress into qemu-sockets.c

2015-09-18 Thread Daniel P. Berrange
The qapi_copy_SocketAddress method is going to be useful in more places than just qemu-char.c, so move it into the qemu-sockets.c file to allow its reuse. Signed-off-by: Daniel P. Berrange --- include/qemu/sockets.h | 4 qemu-char.c| 25 - util/qemu-sock

Re: [Qemu-devel] [PATCH 7/7] tests: Simplify how qom-test is run

2015-09-18 Thread Markus Armbruster
Andreas Färber writes: > Am 18.09.2015 um 14:00 schrieb Markus Armbruster: >> Add it to check-qtest-generic-y instead of check-qtest-$(target)-y for >> every target. >> >> Signed-off-by: Markus Armbruster >> --- >> tests/Makefile | 5 + >> 1 file changed, 1 insertion(+), 4 deletions(-) >>

[Qemu-devel] [PATCH] virtio-9p: migrate virtio subsections

2015-09-18 Thread Greg Kurz
In a cross-endian setup, the virtio-9p device has state in @device_endian. It must be migrated. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 93a407c45926..e

[Qemu-devel] [PATCH v1 09/16] io: pull Buffer code out of VNC module

2015-09-18 Thread Daniel P. Berrange
The Buffer code in the VNC server is useful for the IO channel code, so pull it out into a shared module, QIOBuffer. Signed-off-by: Daniel P. Berrange --- include/io/buffer.h | 118 io/Makefile.objs| 3 +- io/buffer.c | 65 +

[Qemu-devel] [PATCH v1 10/16] io: add QIOTask class for async operations

2015-09-18 Thread Daniel P. Berrange
A number of I/O operations need to be performed asynchronously to avoid blocking the main loop. The caller of such APIs need to provide a callback to be invoked on completion/error and need access to the error, if any. The small QIOTask provides a simple framework for dealing with such probes. The

Re: [Qemu-devel] Maintainer talking about the QEMU 2.4 release

2015-09-18 Thread Thomas Huth
On 07/09/15 18:29, Amit Shah wrote: > Hello all, > > For the 2.4 release, we tried a little experiment. > > I asked maintainers who had pull reqs merged in the 2.4 release to > give me a few talking points for their subsystem via email. Since the > release also coincided with the QEMU Summit / K

Re: [Qemu-devel] QEMU+Aarch64: in_asm log skips instructions of loop-programs

2015-09-18 Thread Christopher Covington
On 09/18/2015 04:15 AM, Sergey Smolov wrote: > Hi Christopher, > > 18.09.2015 02:02, Christopher Covington пишет: >> Hi Sergey, >> >> On 09/04/2015 12:38 PM, Sergey Smolov wrote: 03.09.2015 19:35, Peter Maydell пишет: > On 3 September 2015 at 15:31, Sergey Smolov wrote: >> Do you thi

Re: [Qemu-devel] [PATCH] target-arm: fix CPU breakpoint handling

2015-09-18 Thread Peter Maydell
On 14 September 2015 at 11:51, Sergey Fedorov wrote: > A QEMU breakpoint match is not definitely an architectural breakpoint > match. If an exception is generated unconditionally during translation, > it is hardly possible to ignore it in the debug exceptoin hanlder. "exception". > > Generate a

Re: [Qemu-devel] internal snapshots with sheepdog

2015-09-18 Thread Eric Blake
On 09/18/2015 03:03 AM, Vasiliy Tolstov wrote: > 2015-09-18 12:02 GMT+03:00 Kevin Wolf : >> Doesn't sheepdog already support storing snapshots in the same image? >> I thought it would just work; at least, there's some code there for it. > > > Yes, qemu and sheepdog have ability to create internal

[Qemu-devel] [Bug 1469342] Re: qemu-i386 pentium3/athlon incorrect instruction set

2015-09-18 Thread PeteVine
After looking at target-i386/cpu.c, it's clear to me CPUID_SSE and CPUID_SSE2 are defined seperately and neither pentium3 nor athlon have those defines set. This could mean it's a bug not in the instruction set but possibly in the build process somewhere. -- You received this bug notification be

Re: [Qemu-devel] [PATCH v4 2/4] block: support passing 'backing': '' to 'blockdev-add'

2015-09-18 Thread Eric Blake
On 09/15/2015 12:42 AM, Alberto Garcia wrote: > On Tue 15 Sep 2015 04:27:21 AM CEST, Fam Zheng wrote: > >>> +backing = qdict_get_try_str(options, "backing"); >>> +if (backing && *backing == '\0') { >>> +flags |= BDRV_O_NO_BACKING; >>> +} >>> +qdict_del(options, "backing");

Re: [Qemu-devel] [PATCH v2 00/22] Do away with TB retranslation

2015-09-18 Thread Leon Alrae
I've been testing target mips on the tcg-search-2 branch -- I haven't spotted any obvious regressions and performance gain was visible in some of my tests. On qemu-system-mips64el the Linux kernel build time went down from 465m to 305m. And in a virtual memory torture test I can see slightly above

Re: [Qemu-devel] [PATCH] vhost-scsi: include linux/vhost.h

2015-09-18 Thread Paolo Bonzini
On 18/09/2015 16:18, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Replace ad-hoc declarations with the linux header. > > Signed-off-by: Marc-André Lureau > --- > hw/scsi/vhost-scsi.c | 1 + > include/hw/virtio/vhost-scsi.h | 25 - > 2 fi

Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: Fix wrong size of flash

2015-09-18 Thread Peter Maydell
On 17 September 2015 at 02:57, wrote: > From: Shannon Zhao > > While virt machine creates two flash devices with total size 0x0800, > it wrongly uses this total size for each one. So it will overlap other > MMIO spaces. > > Signed-off-by: Shannon Zhao Applied to target-arm.next, thanks. A

Re: [Qemu-devel] [PATCH v4 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-18 Thread Eric Blake
On 09/14/2015 10:01 AM, Alberto Garcia wrote: > One of the limitations of the 'blockdev-snapshot-sync' command is that > it does not allow passing BlockdevOptions to the newly created > snapshots, so they are always opened using the default values. > > Extending the command to allow passing option

Re: [Qemu-devel] [PATCH v4 1/4] Add new block driver interface to add/delete a BDS's child

2015-09-18 Thread Eric Blake
On 09/18/2015 04:13 AM, Wen Congyang wrote: > In some cases, we want to take a quorum child offline, and take > another child online. > > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > --- > block.c | 50 > ++

[Qemu-devel] [PATCH v1 14/16] io: add QIOChannelWebsock class

2015-09-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that can run the websocket protocol over the top of another QIOChannel instance. This initial implementation is only capable of acting as a websockets server. There is no support for acting as a websockets client yet. Signed-off-by: Daniel P. Berrange --- include/io/cha

[Qemu-devel] [PATCH v10 0/7] vhost-user multiple queue support

2015-09-18 Thread Yuanhan Liu
Hi, Here is the updated patch set for enabling vhost-user multiple queue. And I did proper and formal testing this time. This patch set introduces 2 more vhost user messages: VHOST_USER_GET_QUEUE_NUM, for querying how many queues the backend supports, and VHOST_USER_SET_VRING_ENABLE, for enablin

[Qemu-devel] [PATCH v10 2/7] vhost-user: add protocol feature negotiation

2015-09-18 Thread Yuanhan Liu
From: "Michael S. Tsirkin" Support a separate bitmask for vhost-user protocol features, and messages to get/set protocol features. Invoke them at init. No features are defined yet. [ leverage vhost_user_call for request handling -- Yuanhan Liu ] Signed-off-by: Michael S. Tsirkin Signed-off-b

[Qemu-devel] [PATCH v10 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE

2015-09-18 Thread Yuanhan Liu
Quote from Michael: We really should rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE. Suggested-by: Michael S. Tsirkin Signed-off-by: Yuanhan Liu --- docs/specs/vhost-user.txt | 4 ++-- hw/net/vhost_net.c | 2 +- hw/virtio/vhost-user.c | 6 +++--- linux-headers/linux/vhost.h

[Qemu-devel] [PATCH v10 5/7] vhost: introduce vhost_backend_get_vq_index method

2015-09-18 Thread Yuanhan Liu
Minusing the idx with the base(dev->vq_index) for vhost-kernel, and then adding it back for vhost-user doesn't seem right. Here introduces a new method vhost_backend_get_vq_index() for getting the right vq index for following vhost messages calls. Suggested-by: Jason Wang Signed-off-by: Yuanhan L

[Qemu-devel] [PATCH v10 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-09-18 Thread Yuanhan Liu
This is for querying how many queues the backend supports if it has mq support(when VHOST_USER_PROTOCOL_F_MQ flag is set from the quried protocol features). vhost_net_get_max_queues() is the interface to export that value, and to tell if the backend supports # of queues user requested, which is do

[Qemu-devel] [PATCH v10 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement

2015-09-18 Thread Yuanhan Liu
So that we could let vhost_user_call to handle extented requests, such as VHOST_USER_GET/SET_PROTOCOL_FEATURES, instead of invoking vhost_user_read/write and constructing the msg again by ourself. Signed-off-by: Yuanhan Liu --- hw/virtio/vhost-user.c | 38 ++

[Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support

2015-09-18 Thread Yuanhan Liu
From: Changchun Ouyang This patch is initially based a patch from Nikolay Nikolaev. This patch adds vhost-user multiple queue support, by creating a nc and vhost_net pair for each queue. Qemu exits if find that the backend can't support number of requested queues (by providing queues=# option).

[Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-18 Thread Yuanhan Liu
From: Changchun Ouyang Add a new message, VHOST_USER_SET_VRING_ENABLE, to enable or disable a specific virt queue, which is similar to attach/detach queue for tap device. virtio driver on guest doesn't have to use max virt queue pair, it could enable any number of virt queue ranging from 1 to ma

Re: [Qemu-devel] [PATCH v4 3/4] qmp: add monitor command to add/remove a child

2015-09-18 Thread Eric Blake
On 09/18/2015 04:13 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei Commit message should probably mention the name of the new commands. Also, if you still want the command to be experimental, it would be nice to explain in the comm

Re: [Qemu-devel] [PATCH v4 4/4] hmp: add monitor command to add/remove a child

2015-09-18 Thread Eric Blake
On 09/18/2015 04:13 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Cc: Luiz Capitulino > --- > hmp-commands.hx | 28 > hmp.c | 20 > hmp.h | 2 ++ > 3 files c

Re: [Qemu-devel] [PATCH v2 2/4] tests: add some qemu_strtosz() tests

2015-09-18 Thread Eric Blake
On 09/18/2015 04:59 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > While reading the function I decided to write some tests. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Eric Blake > --- > tests/test-cutils.c | 91 > +++

Re: [Qemu-devel] [PATCH v2 2/4] tests: add some qemu_strtosz() tests

2015-09-18 Thread Marc-André Lureau
Hi - Original Message - > On 09/18/2015 04:59 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > While reading the function I decided to write some tests. > > > > Signed-off-by: Marc-André Lureau > > Reviewed-by: Eric Blake > > --- > > tests/test-cutils.c | 91

Re: [Qemu-devel] [PATCH v5 0/4] Add 'blockdev-snapshot' command

2015-09-18 Thread Eric Blake
On 09/18/2015 07:16 AM, Alberto Garcia wrote: > This fixes the problem detect by Fam: the previous series was deleting > the 'backing' option for 'blockdev-add' even if it contained a > non-empty string. > > The code is also rebased on top of the current master. In particular > the test output had

Re: [Qemu-devel] [PATCH 1/4] hmp-commands-info: move info_cmds content out of monitor.c

2015-09-18 Thread Paolo Bonzini
On 18/09/2015 17:12, Markus Armbruster wrote: > "Denis V. Lunev" writes: > >> From: Pavel Butsykin >> >> For moving target- and device-specific code from monitor.c, >> to beginning we move info_cmds content to hmp-commands-info.hx >> >> Signed-off-by: Pavel Butsykin >> Signed-off-by: Denis V

Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 09:58, Marc Marí wrote: > Enable the fw_cfg DMA interface for the ARM virt machine. > > Based on Gerd Hoffman's initial implementation. > > Signed-off-by: Marc Marí > --- > hw/arm/virt.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/hw/

Re: [Qemu-devel] [PATCH v3 5/5] Enable fw_cfg DMA interface for x86

2015-09-18 Thread Peter Maydell
On 18 September 2015 at 11:58, Gerd Hoffmann wrote: > Hi, > >> -fw_cfg = fw_cfg_init_io(BIOS_CFG_IOPORT); >> +fw_cfg = fw_cfg_init_io_dma(BIOS_CFG_IOPORT, BIOS_CFG_IOPORT + 4, as); > >> +as = g_malloc(sizeof(*as)); >> +address_space_init(as, ram_below_4g, "pc.as"); >> +fw_cfg

Re: [Qemu-devel] [PATCH v2 2/4] tests: add some qemu_strtosz() tests

2015-09-18 Thread Eric Blake
On 09/18/2015 09:10 AM, Marc-André Lureau wrote: > Hi > > - Original Message - >> On 09/18/2015 04:59 AM, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> While reading the function I decided to write some tests. >>> >>> Signed-off-by: Marc-André Lureau >>> Reviewed

[Qemu-devel] [PATCH] hmp: Restore "info pci"

2015-09-18 Thread Paolo Bonzini
Dropped by commit da76ee76f78b9705e2a91e3c964aef28fecededb's transition to hmp-commands-info.hx. Reported-by: Markus Armbruster Signed-off-by: Paolo Bonzini --- hmp-commands-info.hx | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx i

Re: [Qemu-devel] [PATCH 1/4] hmp-commands-info: move info_cmds content out of monitor.c

2015-09-18 Thread Markus Armbruster
"Denis V. Lunev" writes: > From: Pavel Butsykin > > For moving target- and device-specific code from monitor.c, > to beginning we move info_cmds content to hmp-commands-info.hx > > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Paolo Bonzini > CC: Peter Maydell For me,

Re: [Qemu-devel] [PATCH v2 4/4] Replace strotok() by strtok_r()

2015-09-18 Thread Paolo Bonzini
On 18/09/2015 12:59, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > --- > block/archipelago.c | 10 +- > block/sheepdog.c| 5 +++-- > qom/cpu.c | 12 ++-- > target-i386/cpu.c | 6 +++--- > target-sparc/cpu.

  1   2   3   4   >