Re: [Qemu-devel] [PATCH] Make sysbus EHCI devices ARM only by default

2015-02-18 Thread Paolo Bonzini
On 18/02/2015 06:01, David Gibson wrote: > A number of ARM embedded boards include EHCI USB host controllers which > appear as directly mapped devices, rather than sitting on a PCI bus. > > At present code to emulate such devices is included whenever EHCI support > is included. This patch adjus

Re: [Qemu-devel] [PATCH 0/4] ucb: Convert remaining PCI HCDs to realize

2015-02-18 Thread Gerd Hoffmann
On Di, 2015-02-17 at 14:28 +0100, Markus Armbruster wrote: > This series requires my "[PATCH 00/10] pci: Partial conversion to > realize" and my "[PATCH 0/9] Clean up around error_get_pretty(), > qerror_report_err()". > > Markus Armbruster (4): > usb: Propagate errors through usb_register_compan

[Qemu-devel] RFC RFC

2015-02-18 Thread Vladimir Sementsov-Ogievskiy
Hi Can anybody explain what the reasons, politics and consequences of adding RFC into patch header in this mailing list? I think, it is not worth to add this information to http://wiki.qemu.org/Contribute/SubmitAPatch -- Best regards, Vladimir

Re: [Qemu-devel] [PATCH] console/gtk: add qemu_console_get_label

2015-02-18 Thread Gerd Hoffmann
Hi, > Thanks for this code. Is this how I should display the Serial console? > void myDisplaySerialConsole() > { > QemuConsole *con; > char *name; > int index = 0; > > con = qemu_console_lookup_by_index(0); > while(con != NULL) { > name = qemu_console_get_label

Re: [Qemu-devel] [PATCH] sheepdog: fix confused return values

2015-02-18 Thread Markus Armbruster
Liu Yuan writes: > From: Liu Yuan > > These functions mix up -1 and -errno in return values and would might cause > trouble error handling in the call chain. > > This patch let them return -errno and add some comments. > > Reported-by: Markus Armbruster > Signed-off-by: Liu Yuan Did you revie

Re: [Qemu-devel] RFC RFC

2015-02-18 Thread Peter Maydell
On 18 February 2015 at 17:10, Vladimir Sementsov-Ogievskiy wrote: > Can anybody explain what the reasons, politics and consequences of adding > RFC into patch header in this mailing list? I think, it is not worth to add > this information to http://wiki.qemu.org/Contribute/SubmitAPatch "RFC" mean

Re: [Qemu-devel] [RFC PATCH v2 11/15] cpu-model/s390: Add QMP command query-cpu-model

2015-02-18 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 17 Feb 2015 11:03:11 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > This patch implements a new QMP request named 'query-cpu-model'. > > It returns the cpu model of cpu 0 and its backing accelerator. > > > > req

Re: [Qemu-devel] [PATCH 00/25] s390x: rework guest memory access

2015-02-18 Thread Christian Borntraeger
Am 12.02.2015 um 18:09 schrieb Jens Freimann: > Cornelia, Alex, Christian, > > this patches are a rework of guest memory access to allow access to > guest logical address space. > > Frank Blaschka (1): > s390x/pci: Rework memory access in zpci instruction > > Thomas Huth (24): > s390x/mmu:

Re: [Qemu-devel] [PATCH 0/3] SPICE/VNC: Allow ticketing on the fly

2015-02-18 Thread Gerd Hoffmann
On Di, 2015-02-17 at 17:40 +0100, Michal Privoznik wrote: > Currently, if the ticketing (password) is not set at the command > line, there's no way how to set it afterwards. Or vice versa - > disable previously set password. I think it's worth allowing > users to do that. The use case may be a teac

Re: [Qemu-devel] [PATCH v3 01/52] acpi: introduce AML composer aml_append()

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:46:32 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:53:23AM +, Igor Mammedov wrote: > > Adds for dynamic AML creation, which will be used > > for piecing ASL/AML primitives together and hiding > > from user/caller details about how nested context > > sh

Re: [Qemu-devel] [RFC PATCH v2 02/15] cpu-model: Introduce option --probe to switch into probe mode

2015-02-18 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 17 Feb 2015 12:16:20 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > The option --probe allows to switch into probe mode also for machines > > different from none. If one or more accelerators are specified these >

Re: [Qemu-devel] [PATCH v4 0/2] bootdevice: fix two problems about parameters check

2015-02-18 Thread Markus Armbruster
writes: > From: Gonglei > > Patch 1 check boot order arguments validation > before vm running. Patch 2 passing &error_abort > to restore_boot_order() because qemu_boot_set() > can't fail in that scenario. Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH 0/4] ucb: Convert remaining PCI HCDs to realize

2015-02-18 Thread Markus Armbruster
Gerd Hoffmann writes: > On Di, 2015-02-17 at 14:28 +0100, Markus Armbruster wrote: >> This series requires my "[PATCH 00/10] pci: Partial conversion to >> realize" and my "[PATCH 0/9] Clean up around error_get_pretty(), >> qerror_report_err()". >> >> Markus Armbruster (4): >> usb: Propagate er

Re: [Qemu-devel] [PATCH v3 07/17] virtio-blk: switch to standard-headers

2015-02-18 Thread Thomas Huth
On Mon, 16 Feb 2015 22:36:03 +0100 "Michael S. Tsirkin" wrote: > Drop duplicated code. Minor codechanges were required > as geometry is a sub-structure now. > > Signed-off-by: Michael S. Tsirkin > --- > include/hw/virtio/virtio-blk.h | 77 > +- > hw/blo

[Qemu-devel] [Bug 1422307] Re: qemu-nbd corrupts files

2015-02-18 Thread Pierre Schweitzer
So, if I understand well, it's "just" some kind of race condition in the handling of writes in the VDI driver of Qemu? Does that mean it can also affect VMs running with VDI disk(s)? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. ht

Re: [Qemu-devel] [RFC PATCH v2 12/15] cpu-model/s390: Extend QMP command query-cpu-definitions

2015-02-18 Thread Michael Mueller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, 17 Feb 2015 11:09:34 -0700 Eric Blake wrote: > On 02/17/2015 07:24 AM, Michael Mueller wrote: > > This patch implements the QMP command 'query-cpu-definitions' in the S390 > > context. The command returns a in terms of machine release date de

Re: [Qemu-devel] [PATCH v3 08/17] virtio-net, tap: use standard-headers

2015-02-18 Thread Thomas Huth
On Mon, 16 Feb 2015 22:36:09 +0100 "Michael S. Tsirkin" wrote: > Drop duplicated code. > > Signed-off-by: Michael S. Tsirkin > --- > include/hw/virtio/virtio-net.h | 151 > + > include/net/tap.h | 24 +-- > 2 files changed, 2 insertion

Re: [Qemu-devel] [PATCH v3 09/17] virtio-rng: use standard-headers

2015-02-18 Thread Thomas Huth
On Mon, 16 Feb 2015 22:36:15 +0100 "Michael S. Tsirkin" wrote: > Drop duplicated code. > > Signed-off-by: Michael S. Tsirkin > --- > include/hw/virtio/virtio-rng.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/vi

Re: [Qemu-devel] [PATCH v3 04/52] acpi: factor out ACPI const int packing out of build_append_value()

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:53:52 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:53:26AM +, Igor Mammedov wrote: > > it will be reused for adding a plain integer value into AML. > > > > Signed-off-by: Igor Mammedov > > --- > > hw/acpi/aml-build.c | 19 +++ > > h

Re: [Qemu-devel] [PATCH v3 05/52] acpi: add aml_def_block() term

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:15:42 +0100 "Michael S. Tsirkin" wrote: > On Tue, Feb 17, 2015 at 05:47:26PM +0100, Igor Mammedov wrote: > > On Tue, 17 Feb 2015 17:35:55 +0100 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Feb 09, 2015 at 10:53:27AM +, Igor Mammedov wrote: > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH v3 06/52] pc: acpi-build: use aml_def_block() for declaring SSDT table

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 17:42:00 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:53:28AM +, Igor Mammedov wrote: > > it replaces prebuilt SSDT table header template copying/patching > > with AML API > > > > Signed-off-by: Igor Mammedov > > I note that this changed the SSDT signa

Re: [Qemu-devel] [PATCH v3 21/52] pc: acpi-build: drop template patching and create PCI bus tree dynamically

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:39:03 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:53:43AM +, Igor Mammedov wrote: > > Replace AML template patching with direct composing > > of PCI device entries in C. It allows to simplify > > PCI tree generation further and saves us about 400LOC >

Re: [Qemu-devel] [PATCH v3 23/52] pc: acpi-build: drop unsupported PM1b_CNT.SLP_TYP

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 17:41:03 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:53:45AM +, Igor Mammedov wrote: > > QEMU doesn't implement/advertize PM1b_CNT_BLK > > register block so do not set/patch its \_Sx > > values to avoid confusion. > > > > Signed-off-by: Igor Mammedov >

[Qemu-devel] [PULL 8/8] Make sysbus EHCI devices ARM only by default

2015-02-18 Thread Gerd Hoffmann
From: David Gibson A number of ARM embedded boards include EHCI USB host controllers which appear as directly mapped devices, rather than sitting on a PCI bus. At present code to emulate such devices is included whenever EHCI support is included. This patch adjusts teh config options to only in

[Qemu-devel] [PULL 7/8] PPC: Don't use legacy -usbdevice support for setting up board

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster It's tempting, because usbdevice_create() is so simple to use. But there's a lot of unwanted complexity behind the simple interface. Switch to usb_create_simple(). Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Alexander Graf

[Qemu-devel] [PULL 4/8] usb: Suppress bogus error when automatic usb-hub creation fails

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster USBDevice's realize method usb_qdev_realize() automatically creates a usb-hub when only one port is left. Creating devices in realize methods is questionable, but works. If usb-hub creation fails, an error is reported to stderr, but the failure is otherwise ignored. We

[Qemu-devel] [PULL 2/8] usb: Improve -usbdevice error reporting a bit

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster Most LegacyUSBFactory usbdevice_init() methods realize with qdev_init_nofail(), even though their caller usbdevice_create() can handle failure. Okay if it really can't fail (I didn't check), but somewhat brittle. usb_msd_init() and usb_bt_init() call qdev_init(). The la

[Qemu-devel] [PULL 0/8] usb: error handling fixes from Markus, make sysbus ehci arm-only.

2015-02-18 Thread Gerd Hoffmann
0212' into staging (2015-02-13 11:44:50 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-usb-20150218-1 for you to fetch changes up to c3cf77cb63b71618224129df41f114488e0f74e4: Make sysbus EHCI devices ARM only by default (2015-02-18

[Qemu-devel] [PULL 1/8] usb: usb_create() can't fail, drop useless error handling

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/usb/bus.c | 4 hw/usb/dev-bluetooth.c | 6 +- hw/usb/dev-network.c | 3 --- hw/usb/dev-serial.c| 3 --- hw/usb/dev-storage.c | 3 --- 5 files changed, 1 insertion(+), 18 dele

[Qemu-devel] [PULL 5/8] usb: Change usb_create_simple() to abort on failure

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster Instead of returning null pointer. Matches pci_create_simple(), isa_create_simple(), sysbus_create_simple(). It's unused since the previous commit, but I'll put it to use again shortly. Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/usb/bus.c |

[Qemu-devel] [PULL 3/8] usb: Do not prefix error_setg() messages with "Error: "

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster Because it produces beauties like (qemu) usb_add mouse Failed to initialize USB device 'usb-mouse': Error: tried to attach usb device QEMU USB Mouse to a bus with no free ports Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/usb/bus.c | 4

Re: [Qemu-devel] [PATCH v3 47/52] pc: acpi-build: drop remaining ssdt_misc template and use acpi_def_block()

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 17:44:31 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:54:09AM +, Igor Mammedov wrote: > > It completes dynamic SSDT generation and makes it > > independed of IASL binary blobs. It also hides > > from user all pointer arithmetic when building > > SSDT whic

[Qemu-devel] [PULL 6/8] r2d: Don't use legacy -usbdevice support for setting up board

2015-02-18 Thread Gerd Hoffmann
From: Markus Armbruster It's tempting, because usbdevice_create() is so simple to use. But there's a lot of unwanted complexity behind the simple interface. Switch to usb_create_simple(). Cc: Magnus Damm Signed-off-by: Markus Armbruster Signed-off-by: Gerd Hoffmann --- hw/sh4/r2d.c | 2 +-

Re: [Qemu-devel] [PATCH v2] block: move I/O request processing to block/io.c

2015-02-18 Thread Stefan Hajnoczi
On Tue, Feb 17, 2015 at 09:12:45AM -0700, Eric Blake wrote: > On 02/17/2015 07:39 AM, Stefan Hajnoczi wrote: > > -void bdrv_drain_all(void) > > -{ > > -/* Always run first iteration so any pending completion BHs run */ > > -bool busy = true; > > -BlockDriverState *bs; > > - > > -whi

Re: [Qemu-devel] [PATCH v2 1/4] virtio-pci: add flags to enable/disable legacy/modern

2015-02-18 Thread Gerd Hoffmann
On Di, 2015-02-17 at 10:03 +0100, Gerd Hoffmann wrote: > On Di, 2015-02-17 at 09:42 +0100, Michael S. Tsirkin wrote: > > On Tue, Feb 17, 2015 at 09:23:35AM +0100, Gerd Hoffmann wrote: > > > Hi, > > > > > > > Should we forbid setting both legacy and modern at the same time? > > > > > > No, this

[Qemu-devel] [PULL 09/11] vl: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helpers machine_set_property() and object_create(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blak

[Qemu-devel] [PULL 08/11] tpm: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helper configure_tpm(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tpm.c | 6 ++ 1

[Qemu-devel] [PULL 00/11] Clean up around error_get_pretty(), qerror_report_err()

2015-02-18 Thread Markus Armbruster
Tree-wide cleanup, but the tree-wide changes are mechanical. Includes separately posted "[PATCH] vhost-scsi: Improve error reporting for invalid vhostfd". Markus Armbruster (11): vhost-scsi: Improve error reporting for invalid vhostfd error: New convenience function error_report_err() error

[Qemu-devel] [PULL 05/11] monitor: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in HMP command handler hmp_trace_event(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- monitor.c | 3 +-- 1

[Qemu-devel] [PULL 10/11] qemu-img: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qemu-img.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletion

[Qemu-devel] [PULL 06/11] net: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in HMP command handler hmp_host_net_add() and initial startup helpers net_init_client(), net_init_netdev(). Keep it in QMP comm

[Qemu-devel] [PULL 03/11] error: Use error_report_err() where appropriate

2015-02-18 Thread Markus Armbruster
Coccinelle semantic patch: @@ expression E; @@ -error_report("%s", error_get_pretty(E)); -error_free(E); +error_report_err(E); @@ expression E, S; @@ -error_report("%s", error_get_pretty(E)); +error_report_err(E); ( exit(

[Qemu-devel] [PULL 01/11] vhost-scsi: Improve error reporting for invalid vhostfd

2015-02-18 Thread Markus Armbruster
We get two error messages: one from monitor_handle_fd_param2(), and another one from vhost_scsi_realize(). The second one gets suppressed in QMP context. That's because monitor_handle_fd_param() calls qerror_report_err(). Calling qerror_report_err() is always inappropriate in realize methods, bec

Re: [Qemu-devel] [PATCH v3 00/52] ACPI refactoring: replace template patching with C AML API

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:14:06 +0100 "Michael S. Tsirkin" wrote: > On Tue, Feb 17, 2015 at 06:51:16PM +0100, Igor Mammedov wrote: > > On Tue, 17 Feb 2015 17:47:03 +0100 > > "Michael S. Tsirkin" wrote: > > > > > This seems to change the contents of the tables in too many ways. So of > > > it need

[Qemu-devel] [PULL 07/11] numa: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helper numa_init_func() and board setup helper memory_region_allocate_system_memory(). Signed-off-by: Markus

[Qemu-devel] [PULL 02/11] error: New convenience function error_report_err()

2015-02-18 Thread Markus Armbruster
I've typed error_report("%s", error_get_pretty(ERR)) too many times already, and I've fixed too many instances of qerror_report_err(ERR) to error_report("%s", error_get_pretty(ERR)) as well. Capture the pattern in a convenience function. Since it's almost invariably followed by error_free(), stuf

[Qemu-devel] [PULL 04/11] monitor: Clean up around monitor_handle_fd_param()

2015-02-18 Thread Markus Armbruster
monitor_handle_fd_param() is a wrapper around monitor_handle_fd_param2() that feeds errors to qerror_report_err() instead of returning them. qerror_report_err() is inappropriate in many contexts. monitor_handle_fd_param() looks simpler than monitor_handle_fd_param2(), which tempts use. Remove th

Re: [Qemu-devel] [PATCH v3 21/52] pc: acpi-build: drop template patching and create PCI bus tree dynamically

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:39:03 +0100 "Michael S. Tsirkin" wrote: > On Mon, Feb 09, 2015 at 10:53:43AM +, Igor Mammedov wrote: > > Replace AML template patching with direct composing > > of PCI device entries in C. It allows to simplify > > PCI tree generation further and saves us about 400LOC >

[Qemu-devel] [PULL 11/11] qemu-char: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in legacy chardev parser qemu_chr_parse_compat(). Legacy chardev syntax is not to be used in QMP. Signed-off-by: Markus Armbru

Re: [Qemu-devel] [PATCH v3 05/52] acpi: add aml_def_block() term

2015-02-18 Thread Igor Mammedov
On Tue, 17 Feb 2015 20:03:52 +0100 "Michael S. Tsirkin" wrote: > On Tue, Feb 17, 2015 at 05:47:26PM +0100, Igor Mammedov wrote: > > On Tue, 17 Feb 2015 17:35:55 +0100 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Feb 09, 2015 at 10:53:27AM +, Igor Mammedov wrote: > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH 1/1] unbreak dtrace tracing due to double _ in rdma names

2015-02-18 Thread Stefan Hajnoczi
On Mon, Feb 16, 2015 at 04:58:05PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > It looks like the dtrace trace code gets upset if you have trace names > with __ in, which the migration/rdma.c code does. > > Rename the functions and the associated traces. > > F

Re: [Qemu-devel] [PULL 00/11] Clean up around error_get_pretty(), qerror_report_err()

2015-02-18 Thread Markus Armbruster
Screwed up, v2 coming, sorry!

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

2015-02-18 Thread Kevin Wolf
Am 10.02.2015 um 21:29 hat Max Reitz geschrieben: > Add a test for conversion between different refcount widths and errors > specific to certain widths (i.e. snapshots with refcount_bits=1). > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake Can you please split this patch, so that the part

Re: [Qemu-devel] [PATCH v6 11/24] qcow2: refcount_order parameter for qcow2_create2

2015-02-18 Thread Kevin Wolf
Am 10.02.2015 um 21:28 hat Max Reitz geschrieben: > Add a refcount_order parameter to qcow2_create2(), use that value for > the image header and for calculating the size required for > preallocation. > > For now, always pass 4. > > This addition requires changes to the calculation of the file siz

[Qemu-devel] [PULL 0/3] hmp: Normalize HMP command handler names

2015-02-18 Thread Markus Armbruster
When I can't guess a handler's name, I have to look it up in hmp-commands.hx. Happens often enough to annoy me. Let's make them more predictable. Touches several subsystems because HMP command handlers are still spread far and wide, but the changes are trivial. Speak up if you want your subsyst

[Qemu-devel] [PULL 2/3] hmp: Name HMP command handler functions hmp_COMMAND()

2015-02-18 Thread Markus Armbruster
Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(), and sometimes COMMAND pointlessly differs in spelling. Normalize to hmp_COMMAND(), where COMMAND is exactly the command name with '-' replaced by '_'. Exceptions: * do_device_add() and client_migrate_info() *not* renamed to

[Qemu-devel] [PULL 3/3] hmp: Name HMP info handler functions hmp_info_SUBCOMMAND()

2015-02-18 Thread Markus Armbruster
Some are called do_info_SUBCOMMAND() (old ones, usually), some hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND pointlessly differs in spelling. Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the subcommand name with '-' replaced by '_'. Exceptions: * sun4m_ir

[Qemu-devel] [PULL v2 02/11] error: New convenience function error_report_err()

2015-02-18 Thread Markus Armbruster
I've typed error_report("%s", error_get_pretty(ERR)) too many times already, and I've fixed too many instances of qerror_report_err(ERR) to error_report("%s", error_get_pretty(ERR)) as well. Capture the pattern in a convenience function. Since it's almost invariably followed by error_free(), stuf

[Qemu-devel] [PULL v2 01/11] vhost-scsi: Improve error reporting for invalid vhostfd

2015-02-18 Thread Markus Armbruster
We get two error messages: one from monitor_handle_fd_param2(), and another one from vhost_scsi_realize(). The second one gets suppressed in QMP context. That's because monitor_handle_fd_param() calls qerror_report_err(). Calling qerror_report_err() is always inappropriate in realize methods, bec

[Qemu-devel] [PULL v2 11/11] qemu-char: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in legacy chardev parser qemu_chr_parse_compat(). Legacy chardev syntax is not to be used in QMP. Signed-off-by: Markus Armbru

[Qemu-devel] [PULL v2 00/11] Clean up around error_get_pretty(), qerror_report_err()

2015-02-18 Thread Markus Armbruster
Tree-wide cleanup, but the tree-wide changes are mechanical. Includes separately posted "[PATCH] vhost-scsi: Improve error reporting for invalid vhostfd". The following changes since commit cd2d5541271f1934345d8ca42f5fafff1744eee7: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-201502

[Qemu-devel] [PULL v2 04/11] monitor: Clean up around monitor_handle_fd_param()

2015-02-18 Thread Markus Armbruster
monitor_handle_fd_param() is a wrapper around monitor_handle_fd_param2() that feeds errors to qerror_report_err() instead of returning them. qerror_report_err() is inappropriate in many contexts. monitor_handle_fd_param() looks simpler than monitor_handle_fd_param2(), which tempts use. Remove th

[Qemu-devel] [PULL v2 10/11] qemu-img: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qemu-img.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletion

[Qemu-devel] [PULL v2 06/11] net: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in HMP command handler hmp_host_net_add() and initial startup helpers net_init_client(), net_init_netdev(). Keep it in QMP comm

[Qemu-devel] [PULL v2 05/11] monitor: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in HMP command handler hmp_trace_event(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- monitor.c | 3 +-- 1

[Qemu-devel] [PULL v2 03/11] error: Use error_report_err() where appropriate

2015-02-18 Thread Markus Armbruster
Coccinelle semantic patch: @@ expression E; @@ -error_report("%s", error_get_pretty(E)); -error_free(E); +error_report_err(E); @@ expression E, S; @@ -error_report("%s", error_get_pretty(E)); +error_report_err(E); ( exit(

[Qemu-devel] [PULL v2 09/11] vl: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helpers machine_set_property() and object_create(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blak

[Qemu-devel] [PULL 1/3] hmp: Clean up declarations for long-gone info handlers

2015-02-18 Thread Markus Armbruster
Leftovers from d1f2964 qapi: Convert query-spice 791e7c8 qapi: Convert query-migrate 0fe6a7f slirp: Drop statistic code Signed-off-by: Markus Armbruster --- include/migration/migration.h | 4 include/sysemu/sysemu.h | 3 --- include/ui/qemu-spice.h | 3 --- 3 files changed, 10 d

[Qemu-devel] [PULL v2 07/11] numa: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helper numa_init_func() and board setup helper memory_region_allocate_system_memory(). Signed-off-by: Markus

[Qemu-devel] [PULL v2 08/11] tpm: Avoid qerror_report_err() outside QMP command handlers

2015-02-18 Thread Markus Armbruster
qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helper configure_tpm(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tpm.c | 6 ++ 1

Re: [Qemu-devel] [PATCH v6 14/24] qcow2: Allow creation with refcount order != 4

2015-02-18 Thread Kevin Wolf
Am 10.02.2015 um 21:28 hat Max Reitz geschrieben: > Add a creation option to qcow2 for setting the refcount order of images > to be created, and respect that option's value. > > This breaks some test outputs, fix them. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > Reviewed-by: Stefan

Re: [Qemu-devel] [PATCH v2 1/4] virtio-pci: add flags to enable/disable legacy/modern

2015-02-18 Thread Michael S. Tsirkin
On Wed, Feb 18, 2015 at 11:32:55AM +0100, Gerd Hoffmann wrote: > On Di, 2015-02-17 at 10:03 +0100, Gerd Hoffmann wrote: > > On Di, 2015-02-17 at 09:42 +0100, Michael S. Tsirkin wrote: > > > On Tue, Feb 17, 2015 at 09:23:35AM +0100, Gerd Hoffmann wrote: > > > > Hi, > > > > > > > > > Should we for

Re: [Qemu-devel] [PATCH v3 06/52] pc: acpi-build: use aml_def_block() for declaring SSDT table

2015-02-18 Thread Michael S. Tsirkin
On Wed, Feb 18, 2015 at 10:57:18AM +0100, Igor Mammedov wrote: > On Tue, 17 Feb 2015 17:42:00 +0100 > "Michael S. Tsirkin" wrote: > > > On Mon, Feb 09, 2015 at 10:53:28AM +, Igor Mammedov wrote: > > > it replaces prebuilt SSDT table header template copying/patching > > > with AML API > > > >

Re: [Qemu-devel] [PATCH v3 05/52] acpi: add aml_def_block() term

2015-02-18 Thread Michael S. Tsirkin
On Wed, Feb 18, 2015 at 11:47:08AM +0100, Igor Mammedov wrote: > On Tue, 17 Feb 2015 20:03:52 +0100 > "Michael S. Tsirkin" wrote: > > > On Tue, Feb 17, 2015 at 05:47:26PM +0100, Igor Mammedov wrote: > > > On Tue, 17 Feb 2015 17:35:55 +0100 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Mon,

[Qemu-devel] [RFC PATCH v9 04/23] replay: internal functions for replay log

2015-02-18 Thread Pavel Dovgalyuk
This patch adds functions to perform read and write operations with replay log. Signed-off-by: Pavel Dovgalyuk --- replay/Makefile.objs |1 replay/replay-internal.c | 143 ++ replay/replay-internal.h | 44 ++ 3 files changed, 18

[Qemu-devel] [RFC PATCH v9 01/23] i386: partial revert of interrupt poll fix

2015-02-18 Thread Pavel Dovgalyuk
Processing CPU_INTERRUPT_POLL requests in cpu_has_work functions break the determinism of cpu_exec. This patch is required to make interrupts processing deterministic. Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpu-exec.c|6 ++ target-i386/cpu.c | 10 ++--

Re: [Qemu-devel] [PATCH v3 21/52] pc: acpi-build: drop template patching and create PCI bus tree dynamically

2015-02-18 Thread Michael S. Tsirkin
On Wed, Feb 18, 2015 at 11:42:15AM +0100, Igor Mammedov wrote: > On Tue, 17 Feb 2015 20:39:03 +0100 > "Michael S. Tsirkin" wrote: > > > On Mon, Feb 09, 2015 at 10:53:43AM +, Igor Mammedov wrote: > > > Replace AML template patching with direct composing > > > of PCI device entries in C. It all

[Qemu-devel] [RFC PATCH v9 06/23] replay: introduce icount event

2015-02-18 Thread Pavel Dovgalyuk
This patch adds icount event to the replay subsystem. This event corresponds to execution of several instructions and used to synchronize input events in the replay phase. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c | 21 + repla

[Qemu-devel] [RFC PATCH v9 03/23] sysemu: system functions for replay

2015-02-18 Thread Pavel Dovgalyuk
This patch removes "static" specifier from several qemu function to make them visible to the replay module. It also invents several system functions that will be used by replay. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpus.c |4 ++-- include/exec/exec

[Qemu-devel] [RFC PATCH v9 00/23] Deterministic replay core

2015-02-18 Thread Pavel Dovgalyuk
This set of patches is related to the reverse execution and deterministic replay of qemu execution. This implementation of deterministic replay can be used for deterministic debugging of guest code through gdb remote interface. These patches include only core function of the replay, excluding th

[Qemu-devel] [RFC PATCH v9 11/23] replay: recording and replaying clock ticks

2015-02-18 Thread Pavel Dovgalyuk
Clock ticks are considered as the sources of non-deterministic data for virtual machine. This patch implements saving the clock values when they are acquired (virtual, host clock). When replaying the execution corresponding values are read from log and transfered to the module, which wants to read

[Qemu-devel] [RFC PATCH v9 07/23] cpu-exec: allow temporary disabling icount

2015-02-18 Thread Pavel Dovgalyuk
This patch is required for deterministic replay to generate an exception by trying executing an instruction without changing icount. It adds new flag to TB for disabling icount while translating it. Signed-off-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- cpu-exec.c |7

[Qemu-devel] [RFC PATCH v9 02/23] replay: global variables and function stubs

2015-02-18 Thread Pavel Dovgalyuk
This patch adds global variables, defines, functions declarations, and function stubs for deterministic VM replay used by external modules. Reviewed-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Pavel Dovgalyuk --- Makefile.target |1 docs/replay.txt | 161 +

[Qemu-devel] [RFC PATCH v9 09/23] replay: interrupts and exceptions

2015-02-18 Thread Pavel Dovgalyuk
This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-by: Pavel Dovgalyuk ---

[Qemu-devel] [RFC PATCH v9 08/23] cpu: replay instructions sequence

2015-02-18 Thread Pavel Dovgalyuk
This patch adds calls to replay functions into the icount setup block. In record mode number of executed instructions is written to the log. In replay mode number of istructions to execute is taken from the replay log. Signed-off-by: Pavel Dovgalyuk --- cpus.c | 38 +++

[Qemu-devel] [RFC PATCH v9 15/23] aio: replace stack of bottom halves with queue

2015-02-18 Thread Pavel Dovgalyuk
Bottom halves in AIO context are stored and removes in LIFO order. It makes their execution non-deterministic. This patch replaces the stack with queue to preserve the order of bottom halves processing. Signed-off-by: Pavel Dovgalyuk --- async.c | 25 + inc

[Qemu-devel] [RFC PATCH v9 05/23] replay: introduce mutex to protect the replay log

2015-02-18 Thread Pavel Dovgalyuk
This mutex will protect read/write operations for replay log. Using mutex is necessary because most of the events consist of several fields stored in the log. The mutex will help to avoid races. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.c | 27 +

[Qemu-devel] [RFC PATCH v9 10/23] replay: asynchronous events infrastructure

2015-02-18 Thread Pavel Dovgalyuk
This patch adds module for saving and replaying asynchronous events. These events include network packets, keyboard and mouse input, USB packets, thread pool and bottom halves callbacks. All events are stored in the queue to be processed at synchronization points such as beginning of TB execution,

[Qemu-devel] [RFC PATCH v9 12/23] timer: replace time() with QEMU_CLOCK_HOST

2015-02-18 Thread Pavel Dovgalyuk
This patch replaces time() function calls with calls to qemu_clock_get_ns(QEMU_CLOCK_HOST). It makes such requests deterministic in record/replay mode of icount. Signed-off-by: Pavel Dovgalyuk --- vl.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.

[Qemu-devel] [RFC PATCH v9 21/23] replay: replay blockers for devices

2015-02-18 Thread Pavel Dovgalyuk
Some devices are not supported by record/replay subsystem. This patch introduces replay blocker which denies starting record/replay if such devices are included into the configuration. Signed-off-by: Pavel Dovgalyuk --- hw/bt/hci.c |7 +++ include/qapi/qmp/qerror.h |3 +

Re: [Qemu-devel] [PATCH v3 05/52] acpi: add aml_def_block() term

2015-02-18 Thread Michael S. Tsirkin
On Wed, Feb 18, 2015 at 10:50:54AM +0100, Igor Mammedov wrote: > On Tue, 17 Feb 2015 20:15:42 +0100 > "Michael S. Tsirkin" wrote: > > > On Tue, Feb 17, 2015 at 05:47:26PM +0100, Igor Mammedov wrote: > > > On Tue, 17 Feb 2015 17:35:55 +0100 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Mon,

[Qemu-devel] [RFC PATCH v9 13/23] replay: shutdown event

2015-02-18 Thread Pavel Dovgalyuk
This patch records and replays simulator shutdown event. Reviewed-by: Paolo Bonzini Signed-off-by: Pavel Dovgalyuk --- replay/replay-internal.h |2 ++ replay/replay.c | 12 replay/replay.h |5 + vl.c |1 + 4 files changed, 20

[Qemu-devel] [RFC PATCH v9 16/23] replay: bottom halves

2015-02-18 Thread Pavel Dovgalyuk
This patch introduces bottom half event for replay queue. It saves the events into the queue and process them at the checkpoints and instructions execution. Signed-off-by: Pavel Dovgalyuk --- async.c | 24 +++- dma-helpers.c|4 +++- hw/ide/a

[Qemu-devel] [RFC PATCH v9 23/23] replay: recording of the user input

2015-02-18 Thread Pavel Dovgalyuk
This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk --- include/ui/input.h |2 + replay/Makefile.objs |1 replay/replay-events.c | 31 + replay/replay-input.c| 159 +++

[Qemu-devel] [RFC PATCH v9 14/23] replay: checkpoints

2015-02-18 Thread Pavel Dovgalyuk
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk --- block.c | 12 cpus.c |5 + main-loop.c

[Qemu-devel] [RFC PATCH v9 17/23] replay: replay aio requests

2015-02-18 Thread Pavel Dovgalyuk
This patch adds identifier to aio requests. ID is used for creating bottom halves and identifying them while replaying. The patch also introduces several functions that make possible replaying of the aio requests. Signed-off-by: Pavel Dovgalyuk --- block.c| 81 +

[Qemu-devel] [RFC PATCH v9 18/23] replay: thread pool

2015-02-18 Thread Pavel Dovgalyuk
This patch modifies thread pool to allow replaying asynchronous thread tasks synchronously in replay mode. Signed-off-by: Pavel Dovgalyuk --- block/raw-posix.c |6 - block/raw-win32.c |4 +++- include/block/thread-pool.h |4 +++- replay/replay-events.c |

[Qemu-devel] [RFC PATCH v9 20/23] replay: initialization and deinitialization

2015-02-18 Thread Pavel Dovgalyuk
This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Signed-off-by: Pavel Dovgalyuk --- block.c |2 - exec.c |1 replay/replay-internal.h |2 + replay/replay.c | 138 +

[Qemu-devel] [RFC PATCH v9 19/23] typedef: add typedef for QemuOpts

2015-02-18 Thread Pavel Dovgalyuk
This patch moves typedefs for QemuOpts and related types to qemu/typedefs.h file. Signed-off-by: Pavel Dovgalyuk --- include/qemu/option.h |5 + include/qemu/typedefs.h |3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qemu/option.h b/include/qemu/optio

[Qemu-devel] [RFC PATCH v9 22/23] replay: command line options

2015-02-18 Thread Pavel Dovgalyuk
This patch introduces command line options for enabling recording or replaying virtual machine behavior. "-record" option starts recording of the execution and saves it into the log, specified with "fname" parameter. "-replay" option is intended for replaying previously saved log. Signed-off-by: P

  1   2   3   4   >