[Qemu-devel] [PATCH RFC v4 21/32] qapi-commands: Rearrange code

2015-09-03 Thread Markus Armbruster
Rename gen_marshal_input() to gen_marshal(), because the generated function marshals both arguments and results. Rename gen_visitor_input_containers_decl() to gen_marshal_vars(), and move the other variable declarations there, too. Rename gen_visitor_input_block() to gen_marshal_input_visit(), an

[Qemu-devel] [PATCH RFC v4 24/32] qapi-commands: De-duplicate output marshaling functions

2015-09-03 Thread Markus Armbruster
gen_marshal_output() uses its parameter name only for name of the generated function. Name it after the type being marshaled instead of its caller, and drop duplicates. Saves 7 copies of qmp_marshal_output_int() in qemu-ga, and one copy of qmp_marshal_output_str() in qemu-system-*. Signed-off-by

[Qemu-devel] [PATCH RFC v4 16/32] qapi: Generate comments to simplify splitting for review

2015-09-03 Thread Markus Armbruster
The effect of the previous few patches on generated files is hard to review, because stuff gets generated in different order, which renders diffs of the generated files useless. To get reviewable diffs, we need to split the generated files into suitable parts: put every top-level declaration in a

[Qemu-devel] [PATCH RFC v4 30/32] qapi: New QMP command query-schema for QMP schema introspection

2015-09-03 Thread Markus Armbruster
qapi/introspect.json defines the introspection schema. It's designed for QMP introspection, but should do for similar uses, such as QGA. The introspection schema does not reflect all the rules and restrictions that apply to QAPI schemata. A valid QAPI schema has an introspection value conforming

[Qemu-devel] [PATCH RFC v4 27/32] qom: Don't use 'gen': false for qom-get, qom-set, object-add

2015-09-03 Thread Markus Armbruster
With the previous commit, the generated marshalers just work, and save us a bit of handwritten code. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/monitor/monitor.h | 3 --- qapi-schema.json | 9 +++-- qmp-commands.hx | 6 +++--- qmp.c

[Qemu-devel] [PATCH RFC v4 32/32] qapi-introspect: Hide type names

2015-09-03 Thread Markus Armbruster
To eliminate the temptation for clients to look up types by name (which are not ABI), replace all type names by meaningless strings. Reduces output of query-schema by 13 out of 85KiB. As a debugging aid, provide option -u to suppress the hiding. Signed-off-by: Markus Armbruster --- docs/qapi-c

Re: [Qemu-devel] [PATCH 32/33] docs/qapi-code-gen.txt: Fix QAPI schema examples

2015-09-03 Thread Eric Blake
On 09/03/2015 03:55 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > docs/qapi-code-gen.txt | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > > - { 'enum': 'BlockdevDriver', 'data': [ 'raw', 'qcow2' ] } > + { 'enum': 'BlockdevDriver', 'data': [ 'file', 'q

[Qemu-devel] [PATCH RFC v4 29/32] qapi: Pseudo-type '**' is now unused, drop it

2015-09-03 Thread Markus Armbruster
'gen': false needs to stay for now, because netdev_add is still using it. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt| 18 ++ scripts/qapi.py | 20 tests/Makefile

Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection

2015-09-03 Thread Eric Blake
On 09/03/2015 03:26 AM, Markus Armbruster wrote: >> >> I think we need to be careful that these descriptions are not >> interpreted by clients as an alternative to the more-specific >> constraints in the QAPI schema though. 'query-schema' seems >> a bit misleading in that regard, it appears to be m

[Qemu-devel] [PATCH RFC v4 22/32] qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()

2015-09-03 Thread Markus Armbruster
These functions marshal both input and output. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt| 4 +- docs/writing-qmp-commands.txt | 8 +- monitor.c | 2 +- qmp-commands.hx | 240 +--

Re: [Qemu-devel] [PATCH v2] trivial: remove trailing newline from error_report

2015-09-03 Thread Stefan Hajnoczi
On Mon, Aug 24, 2015 at 08:19:34PM -0400, John Snow wrote: > > > On 07/09/2015 06:26 AM, Stefan Hajnoczi wrote: > > On Mon, Jun 29, 2015 at 04:56:26PM -0400, John Snow wrote: > >> Minor cleanup. > >> > >> Signed-off-by: John Snow --- hw/ide/ahci.c > >> | 2 +- hw/vfio/platform.c | 2 +- net/tap-l

Re: [Qemu-devel] [PATCH 02/17] target-openrisc: Streamline arithmetic and OVE

2015-09-03 Thread Richard Henderson
On 09/03/2015 07:16 AM, Bastian Koppelmann wrote: On 09/03/2015 02:17 AM, Richard Henderson wrote: + +void HELPER(ove)(CPUOpenRISCState *env, target_ulong test) +{ +if (unlikely(test) && (env->sr & SR_OVE)) { +OpenRISCCPU *cpu = openrisc_env_get_cpu(env); +CPUState *cs = CP

[Qemu-devel] [PULL 0/1] Tracing patches

2015-09-03 Thread Stefan Hajnoczi
The following changes since commit 561578c2a82292ddf55737791d2838b797f49f35: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150902' into staging (2015-09-03 13:05:45 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/tracing-pull-request for y

Re: [Qemu-devel] [PATCH 33/33] qapi: Generators crash when --output-dir isn't given, fix

2015-09-03 Thread Eric Blake
On 09/03/2015 03:55 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http:/

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

2015-09-03 Thread Jeff Cody
On Wed, Sep 02, 2015 at 08:35:37AM +0200, Alberto Garcia wrote: > On Wed 02 Sep 2015 12:30:15 AM CEST, Jeff Cody wrote: > > > 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

[Qemu-devel] [PATCH RFC v4 05/32] tests/qapi-schema: Convert test harness to QAPISchemaVisitor

2015-09-03 Thread Markus Armbruster
The old code prints the result of parsing (list of expression dictionaries), and partial results of semantic analysis (list of enum dictionaries, list of struct dictionaries). The new code prints a trace of a schema visit, i.e. what the back-ends are going to use. Built-in and array types are omi

Re: [Qemu-devel] [PATCH v2 0/2] qom: Fix misuse of Error API

2015-09-03 Thread Eric Blake
On 09/03/2015 04:06 AM, Markus Armbruster wrote: > Ping? > > My "qapi: QMP introspection" series fails "make check" without these > fixes. > > Markus Armbruster writes: > >> v1 was posted for possible inclusion into 2.4, but the maintainer >> didn't bite ;-) >> >> v2: >> * Commit messages updat

Re: [Qemu-devel] [PATCH RFC v3 02/32] qapi: New QAPISchema intermediate reperesentation

2015-09-03 Thread Eric Blake
On 08/31/2015 12:09 PM, Markus Armbruster wrote: > > since we don't allow 2D arrays? If the generators actually rely on it, yes. > The appended experimental frontend patch passes "make check". Looks > like the backends are just fine with arrays of arrays. I'll therefore > refr

Re: [Qemu-devel] Should we auto-generate IDs?

2015-09-03 Thread Jeff Cody
On Thu, Sep 03, 2015 at 10:34:04AM -0400, Programmingkid wrote: > It has been over a week since we first started talking about this > subject. A lot of opinions have been flying around. Does this issue > look like it is starting to be fixed? I just have to say I don't > think it has been solved yet

Re: [Qemu-devel] "Using Python to investigate EFI and ACPI"

2015-09-03 Thread Josh Triplett
On Thu, Sep 03, 2015 at 11:16:40AM +0200, Laszlo Ersek wrote: > Hi Josh, > > I just found the LWN.net article with the title in the subject: > > http://lwn.net/SubscriberLink/655992/04701db2bbb7e716/ > > ("Thank you LWN", of course. :)) > > This got me kind of excited. In your presentation, a

Re: [Qemu-devel] [PATCH v15 01/33] linux-user: tilegx: Firstly add architecture related features

2015-09-03 Thread Eric Blake
On 09/02/2015 07:30 PM, Richard Henderson wrote: > From: Chen Gang s/Firstly add/Add/ in the subject line > > They are based on Linux kernel tilegx architecture for 64 bit binary, > and also based on tilegx ABI reference document, and also reference from > other targets implementations. > > Si

[Qemu-devel] [PULL 1/1] trace-events: Add hmp completion

2015-09-03 Thread Stefan Hajnoczi
From: "Dr. David Alan Gilbert" Add completion for the trace event names in the hmp trace-event command. Signed-off-by: Dr. David Alan Gilbert Message-id: 1439548063-18410-1-git-send-email-dgilb...@redhat.com Signed-off-by: Stefan Hajnoczi --- hmp-commands.hx | 1 + hmp.h | 1 + mo

Re: [Qemu-devel] Should we auto-generate IDs?

2015-09-03 Thread Programmingkid
It has been over a week since we first started talking about this subject. A lot of opinions have been flying around. Does this issue look like it is starting to be fixed? I just have to say I don't think it has been solved yet. Having device_del use a QOM path does not sound very good. It is ac

Re: [Qemu-devel] [PATCH 03/17] target-openrisc: Invert the decoding in dec_calc

2015-09-03 Thread Bastian Koppelmann
On 09/03/2015 02:17 AM, Richard Henderson wrote: Decoding the opcodes in the right order reduces by 100+ lines. Also, it happens to put the opcodes in the same order as Chapter 17. Signed-off-by: Richard Henderson --- target-openrisc/translate.c | 300 ++-

Re: [Qemu-devel] [PATCH v12 2/5] intc/gic: Extract some reusable vGIC code

2015-09-03 Thread Peter Maydell
On 26 August 2015 at 11:28, Pavel Fedin wrote: > Some functions previously used only by vGICv2 are useful also for vGICv3 > implementation. Untie them from GICState and make accessible from within > other modules: > - kvm_arm_gic_set_irq() > - kvm_gic_supports_attr() - moved to common code and ren

Re: [Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-03 Thread Greg Kurz
On Wed, 2 Sep 2015 18:53:44 +0200 Pierre Morel wrote: > Let dataplane allocate different region for the desc/avail/used > ring regions. > Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail > rings accordingly. > > Signed-off-by: Pierre Morel > > --- Yet another remark, see

Re: [Qemu-devel] [PATCH 2/4] vnc: allow the Buffer to shrink again

2015-09-03 Thread Peter Lieven
Am 03.09.2015 um 13:52 schrieb Gerd Hoffmann: Hi, Beside that I think it makes sense to have the shrinking logic in buffer_reserve too so we don't have to add buffer_shrink calls all over the place. We need a possibility to shrink the buffer after it has been used. Especially the queue->buf

Re: [Qemu-devel] [RESEND PATCHv2] sdhci: Pass drive parameter to sdhci-pci via qdev property

2015-09-03 Thread Stefan Hajnoczi
On Mon, Aug 17, 2015 at 03:20:33PM -0400, Kevin O'Connor wrote: > Commit 19109131 disabled the sdhci-pci support because it used > drive_get_next(). This patch reenables sdhci-pci and changes it to > pass the drive via a qdev property - for example: > -device sdhci-pci,drive=drive0 -drive id=driv

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

2015-09-03 Thread Kevin Wolf
Am 02.09.2015 um 00:30 hat Jeff Cody geschrieben: > 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 Joh

Re: [Qemu-devel] [PATCH v15 33/33] target-tilegx: Handle v1shl, v1shru, v1shrs

2015-09-03 Thread Eric Blake
On 09/02/2015 07:31 PM, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target-tilegx/Makefile.objs | 2 +- > target-tilegx/helper.h | 4 +++ > target-tilegx/simd_helper.c | 63 > + > target-tilegx/translate.c | 17

Re: [Qemu-devel] [PATCH v2 00/49] audio: -audiodev option, multiple options

2015-09-03 Thread Eric Blake
On 09/03/2015 04:15 AM, Gerd Hoffmann wrote: > On Fr, 2015-08-21 at 17:36 +0200, Kővágó, Zoltán wrote: >> This patch series adds support to multiple audio backends. Afterwards I >> add support to multiple backends. Audio fronteds gain a new audiodev >> option to specify the id of the audiodev to

Re: [Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-03 Thread Laszlo Ersek
On 09/02/15 23:32, Michael S. Tsirkin wrote: > On Wed, Sep 02, 2015 at 08:03:37PM +0100, Richard W.M. Jones wrote: >> When using qemu's internal ACPI table generation, qemu sets the fields >> OEM ID and OEM table ID to arbitrary default values. OEM ID is set to >> "BOCHS " and OEM table ID is set

Re: [Qemu-devel] [PATCH 04/17] target-openrisc: Keep SR_F in a separate variable

2015-09-03 Thread Bastian Koppelmann
On 09/03/2015 02:17 AM, Richard Henderson wrote: This avoids having to keep merging and extracting the flag from SR. Signed-off-by: Richard Henderson --- target-openrisc/cpu.h | 15 +- target-openrisc/gdbstub.c | 4 +- target-openrisc/interrupt.c| 2 +-

Re: [Qemu-devel] [PATCH v12 3/5] arm_kvm: Do not assume particular GIC type in kvm_arch_irqchip_create()

2015-09-03 Thread Peter Maydell
On 26 August 2015 at 11:28, Pavel Fedin wrote: > This allows to use different GIC types from v2. There are no kernels which > could advertise KVM_CAP_DEVICE_CTRL without the actual ability to create > GIC with it. Minor grammar nit, since you're respinning this series anyway: "allows us to use".

Re: [Qemu-devel] [PATCH v2] qemu-img: Fix crash in amend invocation

2015-09-03 Thread Kevin Wolf
Am 21.08.2015 um 01:00 hat Max Reitz geschrieben: > Example: > $ ./qemu-img create -f qcow2 /tmp/t.qcow2 64M > $ ./qemu-img amend -f qcow2 -o backing_file=/tmp/t.qcow2, -o help \ > /tmp/t.qcow2 > > This should not crash. This actually is tested by iotest 082, but not > caught due to the segmen

Re: [Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-03 Thread Michael Tokarev
03.09.2015 18:09, Laszlo Ersek wrote: > On 09/02/15 23:32, Michael S. Tsirkin wrote: >> On Wed, Sep 02, 2015 at 08:03:37PM +0100, Richard W.M. Jones wrote: >>> When using qemu's internal ACPI table generation, qemu sets the fields >>> OEM ID and OEM table ID to arbitrary default values. OEM ID is

Re: [Qemu-devel] [PULL 0/8] s390x: storage key migration

2015-09-03 Thread Peter Maydell
; > are available in the git repository at: > > git://github.com/cohuck/qemu tags/s390x-20150903 > > for you to fetch changes up to 9ef40173fbe99c0562d227980779a73613788782: > > s390x: Disable storage key migration

Re: [Qemu-devel] "Using Python to investigate EFI and ACPI"

2015-09-03 Thread josh
On Thu, Sep 03, 2015 at 07:50:07AM -0700, Josh Triplett wrote: > On Thu, Sep 03, 2015 at 11:16:40AM +0200, Laszlo Ersek wrote: > > I'm excited because for virtualization we might have the reverse use > > case: use BITS to test / debug / develop the ACPI generator of QEMU. :) > > Awesome. Unit tes

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

2015-09-03 Thread Sergey Smolov
Перенаправленное сообщение Тема: Re: [Qemu-devel] QEMU+Aarch64: in_asm log skips instructions of loop-programs Дата: Thu, 03 Sep 2015 18:22:16 +0300 От: Sergey Smolov Кому: Richard Henderson Richard Henderson писал 2015-09-03 17:28: On 09/02/2015 11:33 PM, Pet

Re: [Qemu-devel] [PATCH v2 0/4] iotests: Emit signal-kill messages

2015-09-03 Thread Kevin Wolf
Am 02.09.2015 um 20:52 hat Max Reitz geschrieben: > Currently, if a qemu-related command (qemu, qemu-io, qemu-img, qemu-nbd) > is invoked in an iotest, receives a signal and is subsequently killed > (e.g. a segmentation fault), this is not logged in the test output. The > first patch in this series

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

2015-09-03 Thread 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 record for every executed block, Yes (this would just need to disable the TB linking optimisation, which we've discussed providing a debug toggle for in another th

Re: [Qemu-devel] [PATCH 1/2] acpi: Allow ACPI default OEM ID and OEM table ID fields to be set.

2015-09-03 Thread Laszlo Ersek
On 09/03/15 17:17, Michael Tokarev wrote: > 03.09.2015 18:09, Laszlo Ersek wrote: >> On 09/02/15 23:32, Michael S. Tsirkin wrote: >>> On Wed, Sep 02, 2015 at 08:03:37PM +0100, Richard W.M. Jones wrote: When using qemu's internal ACPI table generation, qemu sets the fields OEM ID and OEM t

Re: [Qemu-devel] [PATCH v15 33/33] target-tilegx: Handle v1shl, v1shru, v1shrs

2015-09-03 Thread Richard Henderson
On 09/03/2015 08:02 AM, Eric Blake wrote: Is it any more efficient to use multiplies instead of looping, as in: uint64_t m; b &= 7; m = 0x0101010101010101ULL * ((1 << (8 - b)) - 1); return (a & m) << b; Or if multiplies are bad, what about straight-line expansion of the mask, as in: uint64_t

[Qemu-devel] [PATCH FYI 00/46] Generic TLS support across VNC/chardev/migration

2015-09-03 Thread Daniel P. Berrange
Earlier in the year I posted an RFC series providing impl of generic TLS support for VNC and chardevs. https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg02038.html Since that time the initial QOM enhancements and crypto API consolidation patches from that RFC have been merged. I currentl

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

2015-09-03 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 FYI 02/46] sockets: move qapi_copy_SocketAddress into qemu-sockets.c

2015-09-03 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

[Qemu-devel] [PATCH FYI 05/46] coroutine: move into libqemuutil.a library

2015-09-03 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 FYI 01/46] sockets: add helpers for creating SocketAddress from a socket

2015-09-03 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 FYI 19/46] char: remove fixed length filename allocation

2015-09-03 Thread Daniel P. Berrange
A variety of places were snprintf()ing into a fixed length filename buffer. Some of the buffers were stack allocated, while another was heap allocated with g_malloc(). Switch them all to heap allocated using g_strdup_printf() avoiding arbitrary length restrictions. Signed-off-by: Daniel P. Berrang

[Qemu-devel] [PATCH FYI 04/46] osdep: add qemu_fork() wrapper for safely handling signals

2015-09-03 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

[Qemu-devel] [PATCH FYI 11/46] io: add QIOChannelFile class

2015-09-03 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/ch

[Qemu-devel] [PATCH FYI 06/46] io: add abstract QIOChannel classes

2015-09-03 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 FYI 18/46] ui: convert VNC server to use QIOChannelWebsock

2015-09-03 Thread Daniel P. Berrange
Remove custom websock handling code from the VNC server and use the QIOChannelWebsock class instead. Signed-off-by: Daniel P. Berrange --- ui/vnc-ws.c | 328 +--- ui/vnc-ws.h | 63 ui/vnc.c| 25 + ui/vnc.h| 4 -

[Qemu-devel] [PATCH FYI 08/46] io: pull Buffer code out of VNC module

2015-09-03 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 FYI 16/46] ui: convert VNC server to use QIOChannelSocket

2015-09-03 Thread Daniel P. Berrange
The minimal first step conversion to use QIOChannelSocket classes instead of directly using POSIX sockets API. This will later be extended to also cover the TLS, SASL and websockets code. Signed-off-by: Daniel P. Berrange --- ui/vnc-auth-sasl.c | 57 +++-- ui/vnc-auth-vencrypt.c | 27 ++-

[Qemu-devel] [PATCH FYI 20/46] char: convert from GIOChannel to QIOChannel

2015-09-03 Thread Daniel P. Berrange
In preparation for introducing TLS support to the TCP chardev backend, convert existing chardev code from using GIOChannel to QIOChannel. This simplifies the chardev code by removing most of the OS platform conditional code for dealing with file descriptor passing. Signed-off-by: Daniel P. Berrang

[Qemu-devel] [PATCH FYI 28/46] sockets: remove use of QemuOpts from socket_dgram

2015-09-03 Thread Daniel P. Berrange
The socket_dgram method accepts a QAPI SocketAddress object which it then turns into QemuOpts before calling the inet_dgram_opts helper method. By converting the latter to use QAPI SocketAddress directly, the QemuOpts conversion step can be eliminated. This removes the very last use of QemuOpts fr

[Qemu-devel] [PATCH FYI 25/46] sockets: remove use of QemuOpts from header file

2015-09-03 Thread Daniel P. Berrange
There are no callers of the sockets methods which accept QemuOpts any more. Make all the QemuOpts related functions static to avoid new callers being added, in preparation for removal of all QemuOpts usage, in favour of QAPI SocketAddress. Signed-off-by: Daniel P. Berrange --- include/qemu/socke

[Qemu-devel] [PATCH FYI 10/46] io: add QIOChannelSocket class

2015-09-03 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 FYI 14/46] io: add QIOChannelCommand class

2015-09-03 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|

[Qemu-devel] [PATCH FYI 26/46] sockets: remove use of QemuOpts from socket_listen

2015-09-03 Thread Daniel P. Berrange
The socket_listen method accepts a QAPI SocketAddress object which it then turns into QemuOpts before calling the inet_listen_opts/unix_listen_opts helper methods. By converting the latter to use QAPI SocketAddress directly, the QemuOpts conversion step can be eliminated Signed-off-by: Daniel P. B

[Qemu-devel] [PATCH FYI 41/46] migration: convert RDMA to use QIOChannel interface

2015-09-03 Thread Daniel P. Berrange
This converts the RDMA code to provide a subclass of QIOChannel that uses RDMA for the data transport. The RDMA code would be much better off it it could be split up in a generic RDMA layer, a QIOChannel impl based on RMDA, and then the RMDA migration glue. This is left as a future exercise for th

[Qemu-devel] [PATCH FYI 13/46] io: add QIOChannelWebsock class

2015-09-03 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 FYI 15/46] ui: convert VNC startup code to use SocketAddress

2015-09-03 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

[Qemu-devel] [PATCH FYI 27/46] sockets: remove use of QemuOpts from socket_connect

2015-09-03 Thread Daniel P. Berrange
The socket_connect method accepts a QAPI SocketAddress object which it then turns into QemuOpts before calling the inet_connect_opts/unix_connect_opts helper methods. By converting the latter to use QAPI SocketAddress directly, the QemuOpts conversion step can be eliminated Signed-off-by: Daniel P

Re: [Qemu-devel] [PATCH RFC 1/7] qom: allow properties to be registered against classes

2015-09-03 Thread Daniel P. Berrange
On Wed, Sep 02, 2015 at 06:18:28PM +0200, Andreas Färber wrote: > Am 26.08.2015 um 14:03 schrieb Daniel P. Berrange: > > When there are many instances of a given class, registering > > properties against the instance is wasteful of resources. The > > majority of objects have a statically defined li

[Qemu-devel] [PATCH FYI 12/46] io: add QIOChannelTLS class

2015-09-03 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 FYI 09/46] io: add QIOTask class for async operations

2015-09-03 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

[Qemu-devel] [PATCH FYI 17/46] ui: convert VNC server to use QIOChannelTLS

2015-09-03 Thread Daniel P. Berrange
Switch VNC server over to using the QIOChannelTLS object for the TLS session. This removes all remaining VNC specific code for dealing with TLS handshakes. Signed-off-by: Daniel P. Berrange --- ui/vnc-auth-sasl.c | 26 ++-- ui/vnc-auth-vencrypt.c | 106 ++

[Qemu-devel] [PATCH FYI 36/46] migration: introduce a new QEMUFile impl based on QIOChannel

2015-09-03 Thread Daniel P. Berrange
Introduce a new QEMUFile implementation that is based on the QIOChannel objects. This impl is different from existing impls in that there is no file descriptor that can be made available, as some channels may be based on higher level protocols such as TLS. The QIOChannel based implementation provi

[Qemu-devel] [PATCH FYI 32/46] migration: split migration hooks out of QEMUFileOps

2015-09-03 Thread Daniel P. Berrange
The QEMUFileOps struct contains the I/O subsystem callbacks and the migration stage hooks. Split the hooks out into a separate QEMUFileHooks struct to make it easier to refactor the I/O side of QEMUFile without affecting the hooks. Signed-off-by: Daniel P. Berrange --- include/migration/qemu-fil

Re: [Qemu-devel] [PATCH RFC v4 01/32] qapi: Rename class QAPISchema to QAPISchemaParser

2015-09-03 Thread Daniel P. Berrange
On Thu, Sep 03, 2015 at 04:29:52PM +0200, Markus Armbruster wrote: > I want to name a new class QAPISchema. > > While there, make it a new-style class. > > Signed-off-by: Markus Armbruster > Reviewed-by: Eric Blake Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: http://berrange.com

[Qemu-devel] [PATCH FYI 30/46] migration: remove memory buffer based QEMUFile backend

2015-09-03 Thread Daniel P. Berrange
The qemu_bufopen() method is no longer used, so the memory buffer based QEMUFile backend can be deleted entirely. Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 15 -- migration/Makefile.objs | 2 +- migration/qemu-file-buf.c | 462

[Qemu-devel] [PATCH FYI 29/46] migration: remove use of qemu_bufopen from vmstate tests

2015-09-03 Thread Daniel P. Berrange
The test-vmstate.c file is the only remaining user of the qemu_bufopen function. Half of the test cases already use a temporary file, so convert the remaining cases to match Signed-off-by: Daniel P. Berrange --- tests/Makefile | 2 +- tests/test-vmstate.c | 44 +---

[Qemu-devel] [PATCH FYI 35/46] migration: force QEMUFile to blocking mode for outgoing migration

2015-09-03 Thread Daniel P. Berrange
Instead of relying on the default QEMUFile I/O blocking flag state, explicitly turn on blocking I/O for outgoing migration since it takes place in a background thread. Signed-off-by: Daniel P. Berrange --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migrat

Re: [Qemu-devel] [PATCH] Block: don't do copy-on-read in before_write_notifier

2015-09-03 Thread Kevin Wolf
Am 02.09.2015 um 16:18 hat Stefan Hajnoczi geschrieben: > On Wed, Aug 19, 2015 at 10:54:44AM +0800, Wen Congyang wrote: > > We will copy data in before_write_notifier to do backup. > > It is a nested I/O request, so we cannot do copy-on-read. > > > > Signed-off-by: Wen Congyang > > --- > > block

[Qemu-devel] [PATCH FYI 33/46] migration: ensure qemu_fflush() always writes full data amount

2015-09-03 Thread Daniel P. Berrange
The QEMUFile writev_buffer / put_buffer functions are expected to write out the full set of requested data, blocking until complete. The qemu_fflush() caller does not expect to deal with partial writes. Clarify the function comments and add a sanity check to the code to catch mistaken implementatio

[Qemu-devel] [PATCH FYI 39/46] migration: convert fd socket protocol to use QIOChannel

2015-09-03 Thread Daniel P. Berrange
Convert the fd socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built because the QIOChannel APIs it uses will take care to report suitable error messages if needed. Signed-off-by: Daniel P. Berrange --- migration/Ma

[Qemu-devel] [PATCH FYI 07/46] io: add helper module for creating watches on FDs

2015-09-03 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] [Qemu-block] [PATCH v2 0/2] Auto-generated IDs

2015-09-03 Thread Kevin Wolf
Am 03.09.2015 um 17:02 hat Kevin Wolf geschrieben: > Am 02.09.2015 um 00:30 hat Jeff Cody geschrieben: > > Changes from RFC v1: > > > > Patch 1: Several typos / grammatical errors (thanks Eric, John) > > Make id_subsys_str[] const pointer to const strings (thanks > > Eric) > >

[Qemu-devel] [PATCH FYI 31/46] migration: move definition of struct QEMUFile back into qemu-file.c

2015-09-03 Thread Daniel P. Berrange
Now that the memory buffer based QEMUFile impl is gone, there is no need for any backend to be accessing internals of the QEMUFile struct, so it can be moved back into qemu-file.c Signed-off-by: Daniel P. Berrange --- migration/qemu-file-internal.h | 53 --

[Qemu-devel] [PATCH FYI 24/46] qemu-nbd: convert to use the QAPI SocketAddress object

2015-09-03 Thread Daniel P. Berrange
The qemu-nbd program currently uses a QemuOpts objects when setting up sockets. Switch it over to use the QAPI SocketAddress objects instead. Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 102 +++-- 1 file changed, 38 insertions(+), 64

[Qemu-devel] [PATCH FYI 22/46] char: introduce support for TLS encrypted TCP chardev backend

2015-09-03 Thread Daniel P. Berrange
This integrates support for QIOChannelTLS object in the TCP chardev backend. If the 'tls-creds=NAME' option is passed with the '-chardev tcp' argument, then it will setup the chardev such that the client is required to establish a TLS handshake when connecting. There is no support for checking the

[Qemu-devel] [PATCH FYI 34/46] migration: introduce qemu_fset_blocking function on QEMUFile

2015-09-03 Thread Daniel P. Berrange
Remove the assumption that every QEMUFile implementation has a file descriptor available by introducing a new function to change the blocking state of a QEMUFile. Provide a default impl of the new method based on the get_fd method. Signed-off-by: Daniel P. Berrange --- include/migration/qemu-fi

[Qemu-devel] [PATCH FYI 38/46] migration: convert tcp socket protocol to use QIOChannel

2015-09-03 Thread Daniel P. Berrange
Convert the tcp socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. While this now looks pretty similar to the migration/unix.c file from the previous patch, it was decided not to merge the two, because when TLS is added to the TCP impl later, thi

[Qemu-devel] [PATCH FYI 37/46] migration: convert unix socket protocol to use QIOChannel

2015-09-03 Thread Daniel P. Berrange
Convert the unix socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built, since the socket impl of QIOChannel will report a suitable error on platforms where UNIX sockets are unavailable. Signed-off-by: Daniel P. Berran

[Qemu-devel] [PATCH FYI 42/46] migration: convert savevm to use QIOChannel for writing to files

2015-09-03 Thread Daniel P. Berrange
Convert the exec savevm code to use QIOChannel and QEMUFileChannel, instead of the stdio APIs. Signed-off-by: Daniel P. Berrange --- migration/savevm.c | 8 +--- tests/Makefile | 4 ++-- tests/test-vmstate.c | 11 ++- 3 files changed, 17 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH FYI 21/46] char: don't assume telnet initialization will not block

2015-09-03 Thread Daniel P. Berrange
The current code for doing telnet initialization is writing to a socket without checking the return status. While it is highly unlikely to be a problem when writing to a bare socket, as the buffers are large enough to prevent blocking, this cannot be assumed safe with TLS sockets. So write the teln

[Qemu-devel] [PATCH FYI 40/46] migration: convert exec socket protocol to use QIOChannel

2015-09-03 Thread Daniel P. Berrange
Convert the exec socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of the stdio popen APIs. It can be unconditionally built because the QIOChannelCommand class can report suitable error messages on platforms which can't fork processes. Signed-off-by: Daniel P. Berrang

[Qemu-devel] [PATCH FYI 44/46] migration: delete QEMUFile stdio implementation

2015-09-03 Thread Daniel P. Berrange
Now that the exec migration backend and savevm have converted to use the QIOChannel based QEMUFile, there is no user remaining for the stdio based QEMUFile impl and it can be deleted. Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 2 - migration/Makefile.objs | 2

Re: [Qemu-devel] [PATCH 05/17] target-openrisc: Use movcond where appropriate

2015-09-03 Thread Bastian Koppelmann
On 09/03/2015 02:17 AM, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target-openrisc/translate.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) Reviewed-by: Bastian Koppelmann Cheers, Bastian

[Qemu-devel] [PATCH FYI 43/46] migration: delete QEMUFile sockets implementation

2015-09-03 Thread Daniel P. Berrange
Now that the tcp, unix and fd migration backends have converted to use the QIOChannel based QEMUFile, there is no user remaining for the sockets based QEMUFile impl and it can be deleted. Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 2 - migration/Makefile.objs |

[Qemu-devel] [PATCH FYI 46/46] migration: remove support for non-iovec based write handlers

2015-09-03 Thread Daniel P. Berrange
All the remaining QEMUFile implementations provide an iovec based write handler, so the put_buffer callback can be removed to simplify the code. Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 9 - migration/qemu-file.c | 36

[Qemu-devel] [PATCH FYI 45/46] migration: support TLS encryption with TCP migration backend

2015-09-03 Thread Daniel P. Berrange
This extends the TCP migration backend so that it can make use of QIOChannelTLS to provide transparent TLS encryption. To trigger enablement the URI on the incoming and outgoing sides should have 'tls-creds=ID' appended, eg tcp:$HOST:$PORT,tls-creds=ID where ID is the object identifier of a se

Re: [Qemu-devel] Should we auto-generate IDs?

2015-09-03 Thread Programmingkid
On Sep 3, 2015, at 10:43 AM, Jeff Cody wrote: > On Thu, Sep 03, 2015 at 10:34:04AM -0400, Programmingkid wrote: >> It has been over a week since we first started talking about this >> subject. A lot of opinions have been flying around. Does this issue >> look like it is starting to be fixed? I ju

[Qemu-devel] [PATCH FYI 23/46] nbd: convert to use the QAPI SocketAddress object

2015-09-03 Thread Daniel P. Berrange
The nbd block driver currently uses a QemuOpts objects when setting up sockets. Switch it over to use the QAPI SocketAddress objects instead. Signed-off-by: Daniel P. Berrange --- block/nbd.c | 66 +++-- 1 file changed, 34 insertions(+), 32

Re: [Qemu-devel] "Using Python to investigate EFI and ACPI"

2015-09-03 Thread Laszlo Ersek
On 09/03/15 16:50, Josh Triplett wrote: > On Thu, Sep 03, 2015 at 11:16:40AM +0200, Laszlo Ersek wrote: >> Hi Josh, >> >> I just found the LWN.net article with the title in the subject: >> >> http://lwn.net/SubscriberLink/655992/04701db2bbb7e716/ >> >> ("Thank you LWN", of course. :)) >> >> This

Re: [Qemu-devel] [PATCH RFC v4 02/32] qapi: New QAPISchema intermediate reperesentation

2015-09-03 Thread Daniel P. Berrange
On Thu, Sep 03, 2015 at 04:29:53PM +0200, Markus Armbruster wrote: > The QAPI code generators work with a syntax tree (nested dictionaries) > plus a few symbol tables (also dictionaries) on the side. > > They have clearly outgrown these simple data structures. There's lots > of rummaging around i

Re: [Qemu-devel] [PATCH 0/2] Dynamic module support for block drivers

2015-09-03 Thread Stefan Hajnoczi
On Mon, Aug 17, 2015 at 10:09:33AM +0200, Marc Marí wrote: > The current module infrastructure has been improved to enable dynamic module > loading. > > This reduces the load time for very simple guests. For the following > configuration (very loaded) > > ./configure --enable-sdl --enable-gtk --e

Re: [Qemu-devel] [PATCH RFC v3 30/32] qapi: New QMP command query-schema for QMP schema introspection

2015-09-03 Thread Michael Roth
Quoting Eric Blake (2015-09-03 09:31:01) > On 09/03/2015 03:26 AM, Markus Armbruster wrote: > >> > >> I think we need to be careful that these descriptions are not > >> interpreted by clients as an alternative to the more-specific > >> constraints in the QAPI schema though. 'query-schema' seems > >

<    1   2   3   4   >