[Qemu-devel] trace: timestamps, core IDs, and file creation

2016-01-13 Thread Hollis Blanchard
Hi Stefan, I've been starting to use qemu tracing and found it quite useful. I have a couple comments about the trace events in general: The event timestamps are host time (get_clock()). I'm correlating qemu events with other logs (using icount), so host time is unhelpful. Could we use

Re: [Qemu-devel] [PATCH v1 05/15] crypto: add block encryption framework

2016-01-13 Thread Eric Blake
On 01/12/2016 11:56 AM, Daniel P. Berrange wrote: > Add a generic framework for support different block encryption > formats. Upon instantiating a QCryptoBlock object, it will read > the encryption header and extract the encryption keys. It is > then possible to call methods to encrypt/decrypt

[Qemu-devel] [PATCH 4/4] pc: set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-13 Thread Laszlo Ersek
The Microsoft spec about the SLIC and MSDM ACPI tables at requires the OEM ID and OEM Table ID fields to be consistent between the SLIC and the RSDT/XSDT. That further affects the FADT, because a similar match between the FADT and the RSDT/XSDT is

[Qemu-devel] [Bug 1533848] [NEW] A workaround for Windows 7 ACPI SLIC table behavior when used with OVMF

2016-01-13 Thread Aleksei Kovura
Public bug reported: When OVMF is used, Windows 7 refuses to read SLIC ACPI table, passed via -acpitable option, because it expects oem id and oem table id to match in SLIC, XSDT, RSDT, FADT. There's a detailed discussion here: https://bugzilla.redhat.com/show_bug.cgi?id=1248758 ** Affects: qemu

Re: [Qemu-devel] [PATCH v2 1/2] blockdev: Error out on negative throttling option values

2016-01-13 Thread Fam Zheng
On Wed, 01/13 12:13, Alberto Garcia wrote: > On Wed 13 Jan 2016 12:02:00 PM CET, Fam Zheng wrote: > > >> > Check the number range so this case is catched and reported. > >> > >> I still don't know why qemu_opt_get_number() convert silently > >> negative numbers into positive ones, shouldn't it

[Qemu-devel] [PATCH v3 0/2] block: Reject negative values for throttling options

2016-01-13 Thread Fam Zheng
v3: Address comments: - Add test for large value; [Berto] - Fix typos "negative" & "caught"; [Eric, Berto] - Use "LL" suffix to the upper limit constant. [Berto] v2: Check the value range and report an appropriate error. [Berto] Now the negative values are silently converted to a

[Qemu-devel] [PATCH v3 1/2] blockdev: Error out on negative throttling option values

2016-01-13 Thread Fam Zheng
The implicit casting from unsigned int to double changes negative values into large positive numbers and accepts them. We should instead print an error. Check the number range so this case is caught and reported. Signed-off-by: Fam Zheng --- blockdev.c | 3 ++-

[Qemu-devel] [PATCH v3 2/2] iotests: Test that negative and large throttle values are rejected

2016-01-13 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/051| 12 tests/qemu-iotests/051.out| 24 tests/qemu-iotests/051.pc.out | 24 3 files changed, 60 insertions(+) diff --git a/tests/qemu-iotests/051

Re: [Qemu-devel] [PATCH v2 1/2] blockdev: Error out on negative throttling option values

2016-01-13 Thread Eric Blake
On 01/13/2016 03:17 AM, Alberto Garcia wrote: > On Wed 13 Jan 2016 01:52:29 AM CET, Fam Zheng wrote: > >> The implicit casting from unsigned int to double changes negative values >> into large positive numbers and accepts them. We should instead print >> an error. >> >> Check the number range so

Re: [Qemu-devel] [PATCH v14 0/8] Block replication for continuous checkpoints

2016-01-13 Thread Changlong Xie
It seems i missed someone in CC list, add them. Thanks -Xie On 01/13/2016 05:18 PM, Changlong Xie wrote: Block replication is a very important feature which is used for continuous checkpoints(for example: COLO). You can get the detailed information about block replication from here:

[Qemu-devel] [PATCH 3/4] acpi: stash the OEM ID and OEM Table ID fields from an external SLIC table

2016-01-13 Thread Laszlo Ersek
The SLIC table is not generated by QEMU. If the user specifies an external one however, then board-specific code might want to adapt other, auto-generated tables to it. This patch saves the OEM ID and OEM Table ID fields from the SLIC, and leaves the actual utilization to board code (the next

Re: [Qemu-devel] [PATCH 2/2] net: netmap: avoid mmap() when ports use the same shared memory area

2016-01-13 Thread Jason Wang
On 01/08/2016 09:15 PM, Vincenzo Maffione wrote: > With this patch, nm_open() does not mmap() the netmap device. This > operation is performed separately only if the memory area of the > port just opened was not known before. > A global list of netmap clients is kept to check when matches >

[Qemu-devel] [PATCH 1/4] acpi: take oem_id in build_header(), optionally

2016-01-13 Thread Laszlo Ersek
This patch is the continuation of commit 8870ca0e94f2 ("acpi: support specified oem table id for build_header"). It will allow us to control the OEM ID field too in the SDT header. Cc: "Michael S. Tsirkin" (supporter:ACPI/SMBIOS) Cc: Igor Mammedov

[Qemu-devel] [PATCH 0/4] set the OEM fields in the RSDT and the FADT from the SLIC

2016-01-13 Thread Laszlo Ersek
Background: - https://bugzilla.redhat.com/show_bug.cgi?id=1248758 - http://thread.gmane.org/gmane.comp.emulators.qemu/358854 - https://github.com/tianocore/edk2/issues/5 This matters mostly for Win7 installations that were converted with p2v. Testing feedback from such environments would be

[Qemu-devel] [PATCH 2/4] acpi: expose oem_id and oem_table_id in build_rsdt()

2016-01-13 Thread Laszlo Ersek
Since build_rsdt() is implemented as common utility code (in "hw/acpi/aml-build.c"), it should expose -- and forward -- the oem_id and oem_table_id parameters between board code and the generic build_header() function. Cc: "Michael S. Tsirkin" (supporter:ACPI/SMBIOS) Cc: Igor

Re: [Qemu-devel] [PATCH v2 2/2] iotests: Test that negative throttle values are rejected

2016-01-13 Thread Fam Zheng
On Wed, 01/13 11:02, Alberto Garcia wrote: > On Wed 13 Jan 2016 01:52:30 AM CET, Fam Zheng wrote: > > > +echo === Catching nagative throttling values === > > s/nagative/negative/ > > (there are several of these in the patch) Will fix. > > You could also test the upper

[Qemu-devel] [PULL 09/41] error: Don't append a newline when printing the error hint

2016-01-13 Thread Markus Armbruster
Since commit 50b7b00, we have error_append_hint() to conveniently accumulate Error member @hint. error_report_err() prints it with a newline appended. Consequently, users of error_append_hint() need to know whether theirs is the final line of the hint to decide whether it needs a newline. Not a

[Qemu-devel] [PULL 01/41] error: Document how to accumulate multiple errors

2016-01-13 Thread Markus Armbruster
Suggested-by: Eric Blake Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1447776349-2344-1-git-send-email-arm...@redhat.com> --- include/qapi/error.h | 17 + 1 file changed, 17 insertions(+) diff

[Qemu-devel] [PULL 20/41] error: Use error_report_err() instead of ad hoc prints

2016-01-13 Thread Markus Armbruster
Unlike ad hoc prints, error_report_err() uses the error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b00). Example: $ bld/ivshmem-server -l 42@ Parameter 'shm_size' expects a size You may use k, M, G or T

[Qemu-devel] [PULL 15/41] audio: Clean up inappropriate and unreachable use of hw_error()

2016-01-13 Thread Markus Armbruster
audio_init() should not use hw_error(), because dumping CPU registers is unhelpful there, and aborting is wrong, because it can be called called from an audio device's realize() method. The two uses of hw_error() come from commit 0d9acba: * When qemu_new_timer() fails. It couldn't fail back

[Qemu-devel] [PULL 26/41] error: Don't decorate original error message when adding to it

2016-01-13 Thread Markus Armbruster
Prepend the additional information, colon, space to the original message without enclosing it in parenthesis or quotes, like we do elsewhere. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 21/41] error: Improve documentation

2016-01-13 Thread Markus Armbruster
While there, tighten error_append_hint()'s assertion. Signed-off-by: Markus Armbruster Message-Id: <1450452927-8346-6-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- include/qapi/error.h | 20 ++-- util/error.c | 2 +-

[Qemu-devel] [PULL 35/41] pci-assign: Clean up "Failed to assign" error messages

2016-01-13 Thread Markus Armbruster
The arguments of error_setg() & friends should yield a short error string without newlines. Two places try to append additional help to the error message by embedding newlines in the error string. That's nice, but let's do it the right way, with error_append_hint(). Cc: Laszlo Ersek

[Qemu-devel] [PULL 17/41] qemu-nbd: Replace BSDism by error_report()

2016-01-13 Thread Markus Armbruster
Coccinelle semantic patch @@ expression E; expression list ARGS; @@ - errx(E, ARGS); + error_report(ARGS); + exit(E); @@ expression E, FMT; expression list ARGS; @@ - err(E, FMT, ARGS); + error_report(FMT /*":

[Qemu-devel] [PULL 13/41] isa: Clean up error handling around isa_bus_new()

2016-01-13 Thread Markus Armbruster
We can have at most one ISA bus. If you try to create another one, isa_bus_new() complains to stderr and returns null. isa_bus_new() is called in two contexts, machine's init() and device's realize() methods. Since complaining to stderr is not proper in the latter context, convert isa_bus_new()

[Qemu-devel] [PULL 37/41] error: Clean up errors with embedded newlines (again)

2016-01-13 Thread Markus Armbruster
The arguments of error_report() should yield a short error string without newlines. A few places try to print additional help after the error message by embedding newlines in the error string. That's nice, but let's do it the right way. Commit 474c213 cleaned up some, but they keep coming back.

[Qemu-devel] [PULL 33/41] vmdk: Clean up control flow in vmdk_parse_extents() a bit

2016-01-13 Thread Markus Armbruster
Factor out loop stepping to turn a while-loop with goto into a for-loop with continue. Cc: Fam Zheng Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Fam Zheng Message-Id:

[Qemu-devel] [PULL 25/41] error: New error_prepend(), error_reportf_err()

2016-01-13 Thread Markus Armbruster
Instead of simply propagating an error verbatim, we sometimes want to add to its message, like this: frobnicate(arg, ); error_setg(errp, "Can't frobnicate %s: %s", arg, error_get_pretty(err)); error_free(err); This is suboptimal, because it loses err's hint (if

[Qemu-devel] [PULL 40/41] error: Consistently name Error * objects err, and not errp

2016-01-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1450452927-8346-25-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake --- contrib/ivshmem-server/main.c | 8 hmp.c | 32

[Qemu-devel] [PULL 28/41] error: Use error_prepend() where it makes obvious sense

2016-01-13 Thread Markus Armbruster
Done with this Coccinelle semantic patch @@ expression FMT, E1, E2; expression list ARGS; @@ -error_setg(E1, FMT, ARGS, error_get_pretty(E2)); +error_propagate(E1, E2);/*###*/ +error_prepend(E1, FMT/*@@@*/, ARGS); followed by manual cleanup, first because

Re: [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-13 Thread Roman Kagan
On Wed, Jan 13, 2016 at 03:36:18PM +0100, Laszlo Ersek wrote: > On 12/30/15 21:11, Roman Kagan wrote: > > Windows on UEFI systems is only capable of detecting the presence and > > the type of floppy drives via corresponding ACPI objects. > > I'm late to the party, but please allow me a question:

[Qemu-devel] [PULL 32/41] error: Strip trailing '\n' from error string arguments (again)

2016-01-13 Thread Markus Armbruster
Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they keep coming back. Tracked down with the Coccinelle semantic patch from commit 312fd5f. Cc: Fam Zheng Cc: Peter Crosthwaite Cc: Bharata B Rao Cc: Dominik

[Qemu-devel] [PULL 16/41] xen-hvm: Mark inappropriate error handling FIXME

2016-01-13 Thread Markus Armbruster
Cc: Stefano Stabellini Cc: xen-de...@lists.xensource.com Signed-off-by: Markus Armbruster Message-Id: <1450370121-5768-14-git-send-email-arm...@redhat.com> --- xen-hvm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/xen-hvm.c

[Qemu-devel] [PULL 04/41] hw: Don't use hw_error() for machine initialization errors

2016-01-13 Thread Markus Armbruster
Printing CPU registers is not helpful during machine initialization. Moreover, these are straightforward configuration or "can get resources" errors, so dumping core isn't appropriate either. Replace hw_error() by error_report(); exit(1). Matches how we report these errors in other machine

[Qemu-devel] [PULL 27/41] error: Use error_reportf_err() where it makes obvious sense

2016-01-13 Thread Markus Armbruster
Done with this Coccinelle semantic patch @@ expression FMT, E, S; expression list ARGS; @@ -error_report(FMT, ARGS, error_get_pretty(E)); +error_reportf_err(E, FMT/*@@@*/, ARGS); ( -error_free(E); | exit(S); | abort(); )

Re: [Qemu-devel] usb-storage assertions

2016-01-13 Thread Gerd Hoffmann
On Di, 2016-01-12 at 14:56 +, Daniel P. Berrange wrote: > On Tue, Jan 12, 2016 at 03:36:40PM +0100, Kevin Wolf wrote: > > Am 12.01.2016 um 15:17 hat Gerd Hoffmann geschrieben: > > > On Sa, 2016-01-09 at 20:34 +0300, Andrey Korolyov wrote: > > > > Hello, > > > > > > > > during regular

[Qemu-devel] [PULL 03/41] hw: Inline the qdev_prop_set_drive_nofail() wrapper

2016-01-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <1449764955-10741-3-git-send-email-arm...@redhat.com> Reviewed-by: Peter Maydell --- hw/arm/nseries.c | 4 ++-- hw/block/fdc.c | 15 ++- hw/block/nand.c

[Qemu-devel] [PULL 14/41] isa: Clean up inappropriate hw_error()

2016-01-13 Thread Markus Armbruster
isa_bus_irqs(), isa_create() and isa_try_create() call hw_error() when passed a null bus. Use of hw_error() has always been questionable, because these are used only during machine initialization, and printing CPU registers isn't useful there. Since the previous commit, passing a null bus is a

[Qemu-devel] [PULL 22/41] block: Clean up "Could not create temporary overlay" error message

2016-01-13 Thread Markus Armbruster
bdrv_create() sets an error and returns -errno on failure. When the latter is interesting, the error is created with error_setg_errno(). bdrv_append_temp_snapshot() uses the error's message to create a new one with error_setg_errno(). This adds a strerror() that is either uninteresting or

[Qemu-devel] [PULL 00/41] Error reporting patches for 2016-01-13

2016-01-13 Thread Markus Armbruster
The following changes since commit 649a1bbaf95adb228f1030ab0618a932bc26aa8b: Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' into staging (2016-01-12 17:37:22 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-error-2016-01-13

[Qemu-devel] [PULL 10/41] hw/arm/virt: Fix property "gic-version" error handling

2016-01-13 Thread Markus Armbruster
virt_set_gic_version() calls exit(1) when passed an invalid property value. Property setters are not supposed to do that. Screwed up in commit b92ad39. Harmless, because the property belongs to a machine. Set an error object instead. Cc: Peter Maydell Cc:

[Qemu-devel] [PULL 19/41] error: Use error_report_err() instead of monitor_printf()

2016-01-13 Thread Markus Armbruster
Both error_report_err() and monitor_printf() print to the same destination when monitor_printf() is used correctly, i.e. within an HMP monitor. Elsewhere, monitor_printf() does nothing, while error_report_err() reports to stderr. Most changed functions are HMP command handlers. These should

[Qemu-devel] [PULL 31/41] qemu-io qemu-nbd: Use error_report() etc. instead of fprintf()

2016-01-13 Thread Markus Armbruster
Just three instances left. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1450452927-8346-16-git-send-email-arm...@redhat.com> --- qemu-io.c | 8 +++- qemu-nbd.c | 2 +-

Re: [Qemu-devel] [PATCH 0/6] Get rid of confusing softfloat-specific integer types

2016-01-13 Thread Aurelien Jarno
On 2016-01-12 12:55, Peter Maydell wrote: > This patchset removes the confusing softfloat-specific integer > types int8, uint8, int32, uint32, int64 and uint64, replacing > them with the standard _t types that they were typedef'd as. > These frequently got accidentally used outside the softfloat >

[Qemu-devel] [PULL 02/41] Use error_fatal to simplify obvious fatal errors

2016-01-13 Thread Markus Armbruster
Done with this Coccinelle semantic patch: @@ type T; identifier FUN, RET; expression list ARGS; expression ERR, EC; @@ ( -T RET = FUN(ARGS, ); +T RET = FUN(ARGS, _fatal); | -RET = FUN(ARGS, ); +RET = FUN(ARGS, _fatal); | -

Re: [Qemu-devel] [PATCH] i2c-tiny-usb: add new usb to i2c bridge

2016-01-13 Thread Tim Sander
Hi Am Donnerstag, 7. Januar 2016, 02:14:23 schrieb Peter Crosthwaite: > Patch subject prefix should contain the version number. Use the > --subject-prefix or -v options to git format-patch. Ok, i will try to remember this next time. > > On Wed, Jan 6, 2016 at 6:58 AM, Tim Sander

Re: [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-13 Thread Laszlo Ersek
On 01/13/16 16:49, Roman Kagan wrote: > On Wed, Jan 13, 2016 at 03:36:18PM +0100, Laszlo Ersek wrote: >> On 12/30/15 21:11, Roman Kagan wrote: >>> Windows on UEFI systems is only capable of detecting the presence and >>> the type of floppy drives via corresponding ACPI objects. >> >> I'm late to

Re: [Qemu-devel] [Qemu-block] [PATCH 05/10] block: Inactivate BDS when migration completes

2016-01-13 Thread Kevin Wolf
Am 05.01.2016 um 21:21 hat John Snow geschrieben: > > > On 12/22/2015 03:43 PM, Eric Blake wrote: > > On 12/22/2015 09:46 AM, Kevin Wolf wrote: > >> So far, live migration with shared storage meant that the image is in a > >> not-really-ready don't-touch-me state on the destination while the >

[Qemu-devel] [PULL 0/9] First set of s390x patches for 2.6

2016-01-13 Thread Cornelia Huck
The following changes since commit 649a1bbaf95adb228f1030ab0618a932bc26aa8b: Merge remote-tracking branch 'remotes/kvaneesh/tags/for-upstream-signed' into staging (2016-01-12 17:37:22 +) are available in the git repository at: git://github.com/cohuck/qemu tags/s390x-20160113 for you

[Qemu-devel] [PULL 4/9] s390x/pci: reject some operations to disabled PCI function

2016-01-13 Thread Cornelia Huck
From: Yi Min Zhao According to the s390 architecture, any mpcifc, pcilg, pcistg, pcistb and rpcit instructions issued to disabled PCI functions are rejected, and the instruction completes by setting condition code 3. In addition, any DMA and MSIX interruption

[Qemu-devel] [PULL 7/9] s390: Introduce CCW_COMPAT_2_5

2016-01-13 Thread Cornelia Huck
From: Shmulik Ladkani In 240240d5 'pc: Add pc-*-2.6 machine classes' HW_COMPAT_2_5 and PC_COMPAT_2_5 were introduced. Accordingly, introduce CCW_COMPAT_2_5 that uses HW_COMPAT_2_5. Signed-off-by: Shmulik Ladkani

[Qemu-devel] [PULL 07/41] etraxfs_eth: Don't use hw_error() in init() method

2016-01-13 Thread Markus Armbruster
Device init() methods aren't supposed to call hw_error(), they should report the error and fail cleanly. Do that. Cc: "Edgar E. Iglesias" Signed-off-by: Markus Armbruster Reviewed-by: Edgar E. Iglesias Message-Id:

[Qemu-devel] [PULL 11/41] sysbus: Don't use hw_error() in machine_init_done_notifiers

2016-01-13 Thread Markus Armbruster
platform_bus_map_irq() and platform_bus_map_mmio() use hw_error() to fail. They run in machine_init_done_notifiers, via platform_bus_init_notify() and link_sysbus_device(). Printing CPU registers is not helpful there. Replace hw_error() by error_report(); exit(1). If these are programming

[Qemu-devel] [PULL 24/41] test-throttle: Simplify qemu_init_main_loop() error handling

2016-01-13 Thread Markus Armbruster
The code looks like it tries to check for both qemu_init_main_loop() and qemu_get_aio_context() failure in one conditional. In fact, qemu_get_aio_context() can fail only after qemu_init_main_loop() failed. Simplify accordingly: check for qemu_init_main_loop() error directly, without bothering to

[Qemu-devel] [PULL 05/41] omap: Don't use hw_error() in device init() methods

2016-01-13 Thread Markus Armbruster
Device init() methods aren't supposed to call hw_error(), they should report the error and fail cleanly. Do that. The errors are all device misconfiguration. All callers use qdev_init_nofail(), so this patch merely converts hw_error() crashes into _abort crashes. Improvement, because now it

[Qemu-devel] [PULL 18/41] error: Use error_report_err() where appropriate (again)

2016-01-13 Thread Markus Armbruster
Same Coccinelle semantic patch as in commit 565f65d. We now use the original error whole instead of just its message obtained with error_get_pretty(). This avoids suppressing its hint (see commit 50b7b00), but I don't think the errors touched in this commit can come with hints. Signed-off-by:

[Qemu-devel] [PULL 12/41] isa: Trivially convert remaining PCI-ISA bridges to realize()

2016-01-13 Thread Markus Armbruster
These are "ICH9-LPC" and "ebus". Cc: "Michael S. Tsirkin" Cc: Mark Cave-Ayland Signed-off-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Message-Id:

[Qemu-devel] [PULL 23/41] qemu-nbd: Clean up "Failed to load snapshot" error message

2016-01-13 Thread Markus Armbruster
bdrv_snapshot_load_tmp() sets an error and returns -errno on failure. We report both even though the error message is self-contained. Drop the redundant strerror(). While there: setting errno right before exit() is pointless, so drop that, too. Signed-off-by: Markus Armbruster

[Qemu-devel] [PULL 34/41] vmdk: Clean up "Invalid extent lines" error message

2016-01-13 Thread Markus Armbruster
vmdk_parse_extents() reports parse errors like this: error_setg(errp, "Invalid extent lines:\n%s", p); where p points to the beginning of the malformed line in the image descriptor. This results in a multi-line error message Invalid extent lines: Error messages should not

[Qemu-devel] [PULL 08/41] raven: Mark use of hw_error() in realize() FIXME

2016-01-13 Thread Markus Armbruster
Device realize() methods aren't supposed to call hw_error(), they should set an error and fail cleanly. Blindly doing that would be easy enough, but then realize() would fail without undoing its side effects. Just mark it FIXME for now. Cc: "Andreas Färber" Cc:

[Qemu-devel] [PULL 29/41] spapr: Use error_reportf_err()

2016-01-13 Thread Markus Armbruster
Not caught by Coccinelle, because we report the error only conditionally here. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <1450452927-8346-14-git-send-email-arm...@redhat.com> --- hw/ppc/spapr.c | 7 --- 1 file changed, 4

[Qemu-devel] [PULL 41/41] checkpatch: Detect newlines in error_report and other error functions

2016-01-13 Thread Markus Armbruster
From: "Jason J. Herne" We don't want newlines embedded in error messages. This seems to be a common problem with new code so let's try to catch it with checkpatch. This will not catch cases where newlines are inserted into the middle of an existing multi-line

[Qemu-devel] [PULL 30/41] migration: Use error_reportf_err() instead of monitor_printf()

2016-01-13 Thread Markus Armbruster
Both error_reportf_err() and monitor_printf() print to the same destination when monitor_printf() is used correctly, i.e. within an HMP monitor. Elsewhere, monitor_printf() does nothing, while error_reportf_err() reports to stderr. Both changed functions are HMP command handlers. These should

[Qemu-devel] [PULL 39/41] s390/sclp: Simplify control flow in sclp_realize()

2016-01-13 Thread Markus Armbruster
Suggested-by: David Hildenbrand Signed-off-by: Markus Armbruster Reviewed-by: David Hildenbrand Acked-by: Cornelia Huck Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 38/41] hw/s390x: Rename local variables Error *l_err to just err

2016-01-13 Thread Markus Armbruster
Let's follow established naming practice here as well. Cc: David Hildenbrand Signed-off-by: Markus Armbruster Acked-by: Cornelia Huck Reviewed-by: David Hildenbrand Reviewed-by: Eric Blake

[Qemu-devel] [PULL 36/41] vhdx: Fix "log that needs to be replayed" error message

2016-01-13 Thread Markus Armbruster
The arguments of error_setg_errno() should yield a short error string without newlines. Here, we try to append additional help to the error message by embedding newlines in the error string. That's nice, but it's doesn't play nicely with the errno part. tests/qemu-iotests/070.out shows the

[Qemu-devel] [PULL 06/41] arm_mptimer: Don't use hw_error() in realize() method

2016-01-13 Thread Markus Armbruster
Device realize() methods aren't supposed to call hw_error(), they should set an error and fail cleanly. Do that. Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH RESEND] softfloat: fix return type of roundAndPackFloat16

2016-01-13 Thread Aurelien Jarno
The roundAndPackFloat16 function should return a float16 value, not a float32 one. Fix that. Cc: Peter Maydell Signed-off-by: Aurelien Jarno --- fpu/softfloat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Peter, given you are working

Re: [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-13 Thread Roman Kagan
On Wed, Jan 13, 2016 at 06:49:44PM +0300, Roman Kagan wrote: > On Wed, Jan 13, 2016 at 03:36:18PM +0100, Laszlo Ersek wrote: > > On 12/30/15 21:11, Roman Kagan wrote: > > > Windows on UEFI systems is only capable of detecting the presence and > > > the type of floppy drives via corresponding ACPI

Re: [Qemu-devel] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI

2016-01-13 Thread Andrew Jones
On Wed, Jan 13, 2016 at 10:54:17PM +0800, Shannon Zhao wrote: > When booting the VM with UEFI, UEFI takes ownership of the RTC hardware. > While UEFI can use libfdt to disable the RTC device node in the DTB that > it passes to the OS, it cannot modify AML. Therefore, we won't generate > the RTC

Re: [Qemu-devel] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI

2016-01-13 Thread Laszlo Ersek
On 01/13/16 17:16, Andrew Jones wrote: > On Wed, Jan 13, 2016 at 10:54:17PM +0800, Shannon Zhao wrote: >> When booting the VM with UEFI, UEFI takes ownership of the RTC hardware. >> While UEFI can use libfdt to disable the RTC device node in the DTB that >> it passes to the OS, it cannot modify

[Qemu-devel] [PATCH RESEND] fix MSI injection on Xen

2016-01-13 Thread Stefano Stabellini
On Xen MSIs can be remapped into pirqs, which are a type of event channels. It's mostly for the benefit of PCI passthrough devices, to avoid the overhead of interacting with the emulated lapic. However remapping interrupts and MSIs is also supported for emulated devices, such as the e1000 and

Re: [Qemu-devel] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI

2016-01-13 Thread Ard Biesheuvel
On 13 January 2016 at 15:54, Shannon Zhao wrote: > When booting the VM with UEFI, UEFI takes ownership of the RTC hardware. > While UEFI can use libfdt to disable the RTC device node in the DTB that > it passes to the OS, it cannot modify AML. Therefore, we won't generate

[Qemu-devel] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI

2016-01-13 Thread Shannon Zhao
When booting the VM with UEFI, UEFI takes ownership of the RTC hardware. While UEFI can use libfdt to disable the RTC device node in the DTB that it passes to the OS, it cannot modify AML. Therefore, we won't generate the RTC ACPI device at all when using UEFI. Signed-off-by: Shannon Zhao

[Qemu-devel] [PATCH v2] arm64: kernel: fix architected PMU registers unconditional access

2016-01-13 Thread Lorenzo Pieralisi
The Performance Monitors extension is an optional feature of the AArch64 architecture, therefore, in order to access Performance Monitors registers safely, the kernel should detect the architected PMU unit presence through the ID_AA64DFR0_EL1 register PMUVer field before accessing them. This

[Qemu-devel] [PULL 8/9] virtio-ccw: fix sanity check for vector

2016-01-13 Thread Cornelia Huck
From: Halil Pasic The commit 8dfbaa6ac ("virtio-ccw: introduce ccw specific queue limit") did not touch the sanity check for the vector argument of the method virtio_ccw_notify, despite intended as seen from

[Qemu-devel] [PULL 2/9] s390x: remove s390-virtio machine

2016-01-13 Thread Cornelia Huck
From: Pierre Morel Remove machine code for the s390-virtio machine, but keep functions useful for the ccw machine. Signed-off-by: Pierre Morel Acked-by: Cornelia Huck Acked-by: Christian Borntraeger

[Qemu-devel] [PULL 6/9] s390x/virtio: use qemu_check_nic_model()

2016-01-13 Thread Cornelia Huck
Switching to the generally used interface changes the output of s390x-softmmu/qemu-system-s390x -net nic,model=? from S390 only supports VirtIO nics to the rather more useful qemu: Supported NIC models: virtio while still giving us a sensible error message for unsupported models:

Re: [Qemu-devel] [PATCH 06/10] qemu-img: Prepare for locked images

2016-01-13 Thread Kevin Wolf
Am 13.01.2016 um 09:44 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 12.01.2016 um 16:20 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > Am 11.01.2016 um 16:49 hat Markus Armbruster geschrieben: > >> >> Eric Blake

Re: [Qemu-devel] [PATCH v5 0/6] i386: expose floppy-related objects in SSDT

2016-01-13 Thread Laszlo Ersek
Hi Roman, On 12/30/15 21:11, Roman Kagan wrote: > Windows on UEFI systems is only capable of detecting the presence and > the type of floppy drives via corresponding ACPI objects. I'm late to the party, but please allow me a question: how did you figure out that UEFI Windows requires this? In

[Qemu-devel] [PULL 3/9] s390x: remove s390-virtio devices

2016-01-13 Thread Cornelia Huck
From: Pierre Morel The s390-virtio machine has been removed; remove the associated devices as well. hw/s390x/s390-virtio-bus.c and hw/s390x/s390-virtio-bus.h have been deleted and removed from hw/s390x/Makefile.objs virtio-size has no more meaning for the modern

[Qemu-devel] [PULL 1/9] s390x: add 2.6 compat machine

2016-01-13 Thread Cornelia Huck
New qemu version, new machine. Acked-by: Christian Borntraeger Signed-off-by: Cornelia Huck --- hw/s390x/s390-virtio-ccw.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c

[Qemu-devel] [PULL 5/9] s390x/pci: code cleanup

2016-01-13 Thread Cornelia Huck
From: Yi Min Zhao Make use of the new FH_ENABLED define in existing code. Signed-off-by: Yi Min Zhao Reviewed-by: Cornelia Huck Signed-off-by: Cornelia Huck --- hw/s390x/s390-pci-inst.c

Re: [Qemu-devel] [PATCH v2] ARM: Virt: Don't generate RTC ACPI device when using UEFI

2016-01-13 Thread Laszlo Ersek
On 01/13/16 15:54, Shannon Zhao wrote: > When booting the VM with UEFI, UEFI takes ownership of the RTC hardware. > While UEFI can use libfdt to disable the RTC device node in the DTB that > it passes to the OS, it cannot modify AML. Therefore, we won't generate > the RTC ACPI device at all when

[Qemu-devel] [PULL 9/9] s390x/pci: return real state during listing PCI

2016-01-13 Thread Cornelia Huck
From: Yi Min Zhao At present, list_pci() shows all PCI devices as being in configured state. As devices can be deconfigured by the guest, we need to show the real configuration status instead. Signed-off-by: Yi Min Zhao Reviewed-by:

[Qemu-devel] [PATCH v3] xenfb.c: avoid expensive loops when prod <= out_cons

2016-01-13 Thread Stefano Stabellini
If the frontend sets out_cons to a value higher than out_prod, it will cause xenfb_handle_events to loop about 2^32 times. Avoid that by using better checks at the beginning of the function. Signed-off-by: Stefano Stabellini Reported-by: Ling Liu

Re: [Qemu-devel] [RFC PATCH] vhost: fix lost interrupts from slow reacting back-end

2016-01-13 Thread Victor Kaplansky
On Tue, Jan 12, 2016 at 01:05:52PM +0100, Didier Pallard wrote: > On 01/12/2016 09:26 AM, Victor Kaplansky wrote: > >This RFC PATCH tries to solve the problem of lost interrupts > >from a slow back-end. Didier could you test it? > > > >Thanks, Victor > > > >When interrupts are unmasked, it could

Re: [Qemu-devel] usb-storage assertions

2016-01-13 Thread Andrey Korolyov
On Wed, Jan 13, 2016 at 7:13 PM, Gerd Hoffmann wrote: > On Di, 2016-01-12 at 14:56 +, Daniel P. Berrange wrote: >> On Tue, Jan 12, 2016 at 03:36:40PM +0100, Kevin Wolf wrote: >> > Am 12.01.2016 um 15:17 hat Gerd Hoffmann geschrieben: >> > > On Sa, 2016-01-09 at 20:34 +0300,

[Qemu-devel] [PATCH v2 0/9] block/qcow2: Migration handoff fixes and cleanups

2016-01-13 Thread Kevin Wolf
This is the non-controversal part of the qcow2 locking series, which just makes the state of images with respect to live migration clearer and fixes a few bugs we have in the handoff procedure and with writing the qcow2 feature table. Kevin Wolf (9): qcow2: Write feature table only for v3

[Qemu-devel] [PATCH v2 4/9] block: Fix error path in bdrv_invalidate_cache()

2016-01-13 Thread Kevin Wolf
We can only clear BDRV_O_INCOMING if the caches were actually invalidated. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index ef37d51..ee9d7ea 100644 --- a/block.c +++

[Qemu-devel] [PATCH v2 2/9] qcow2: Write full header on image creation

2016-01-13 Thread Kevin Wolf
When creating a qcow2 image, we didn't necessarily call qcow2_update_header(), but could end up with the basic header that qcow2_create2() created manually. One thing that this basic header lacks is the feature table. Let's make sure that it's always present. This requires a few updates to test

[Qemu-devel] [PATCH v2 7/9] qcow2: Implement .bdrv_inactivate

2016-01-13 Thread Kevin Wolf
The callback has to ensure that closing or flushing the image afterwards wouldn't cause a write access to the image files. This means that just the caches have to be written out, which is part of the existing .bdrv_close implementation. Signed-off-by: Kevin Wolf Reviewed-by:

[Qemu-devel] [PATCH v2 3/9] block: Assert no write requests under BDRV_O_INCOMING

2016-01-13 Thread Kevin Wolf
As long as BDRV_O_INCOMING is set, the image file is only opened so we have a file descriptor for it. We're definitely not supposed to modify the image, it's still owned by the migration source. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake ---

[Qemu-devel] Question regarding self-modifying code.

2016-01-13 Thread farmdve
On Windows, in software MMU mode, how does QEMU handle self-modifying code? Thank you.

Re: [Qemu-devel] [PATCH v2 5/9] block: Rename BDRV_O_INCOMING to BDRV_O_INACTIVE

2016-01-13 Thread Eric Blake
On 01/13/2016 09:37 AM, Kevin Wolf wrote: > Instead of covering only the state of images on the migration > destination before the migration is completed, the flag will also cover > the state of images on the migration source after completion. This > common state implies that the image is

Re: [Qemu-devel] Question regarding self-modifying code.

2016-01-13 Thread Peter Maydell
On 13 January 2016 at 16:45, farmdve wrote: > On Windows, in software MMU mode, how does QEMU handle > self-modifying code? When we translate the guest code in a page of guest memory, we mark that page as "not dirty for code" by calling tlb_protect_code(), which clears a

[Qemu-devel] [PATCH v2 5/9] block: Rename BDRV_O_INCOMING to BDRV_O_INACTIVE

2016-01-13 Thread Kevin Wolf
Instead of covering only the state of images on the migration destination before the migration is completed, the flag will also cover the state of images on the migration source after completion. This common state implies that the image is technically still open, but no writes will happen and any

Re: [Qemu-devel] [RFC PATCH] vhost: fix lost interrupts from slow reacting back-end

2016-01-13 Thread Didier Pallard
On 01/13/2016 04:32 PM, Victor Kaplansky wrote: On Tue, Jan 12, 2016 at 01:05:52PM +0100, Didier Pallard wrote: On 01/12/2016 09:26 AM, Victor Kaplansky wrote: This RFC PATCH tries to solve the problem of lost interrupts >from a slow back-end. Didier could you test it? Thanks, Victor When

Re: [Qemu-devel] [Qemu-block] [PATCH 05/10] block: Inactivate BDS when migration completes

2016-01-13 Thread Eric Blake
On 01/13/2016 07:25 AM, Kevin Wolf wrote: >>> The name BDRV_O_INCOMING now doesn't quite match semantics on the >>> source, but I don't have any better suggestions. BDRV_O_LIMITED_USE? >>> BDRV_O_HANDOFF? At any rate, I fully agree with your logic of locking >>> things down on the source to

[Qemu-devel] [PATCH v2 1/9] qcow2: Write feature table only for v3 images

2016-01-13 Thread Kevin Wolf
Version 2 images don't have feature bits, so writing a feature table to those images is kind of pointless. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/qcow2.c | 48 --

<    1   2   3   >