[Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2016-01-13 Thread willmo
Judging by their comments on bug 1399191, jan-wang1989 doesn't appear to be a QEMU developer. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1490611 Title: Using qemu >=2.2.1 to convert raw->VHD (fi

Re: [Qemu-devel] [PATCH v2 0/2] qga: guest-set-user-password - added ability to create new user

2016-01-13 Thread Denis V. Lunev
On 01/06/2016 03:01 PM, Denis V. Lunev wrote: These patches add optional 'create' flag to guest-set-user-password command. When it is specified, a new user will be created if it does not exist yet. Since v1: - fixed english language mistakes in comments - json description now mentions 'create' a

Re: [Qemu-devel] [PATCH v4 00/11] simplify usage of tracepoints, and connect them to logging

2016-01-13 Thread Denis V. Lunev
On 01/07/2016 04:55 PM, Denis V. Lunev wrote: This series does three things: 1) add a "-trace [enable=]foo" option to enable one or more trace events, and a "-trace help" option to show the list of tracepoints (patches 4-5) 2) change the stderr tracing backend so that it prints to the -D log fi

Re: [Qemu-devel] [PATCH 1/5] block: added lock image option and callback

2016-01-13 Thread Denis V. Lunev
On 01/13/2016 07:44 PM, Eric Blake wrote: On 01/12/2016 05:10 PM, Fam Zheng wrote: If we will switch default in my patch from 'nolock' to 'lock' then pour guys which are calling qemu-img etc stuff will see the lock as necessary while 'proper management software' aka libvirt will be able to call

[Qemu-devel] [PATCH] linux-user/syscall.c: Let lv always match val in do_getsockopt()

2016-01-13 Thread chengang
From: Chen Gang After host_to_target_sock_type(), the length of val may be changed, so calculate the related lv, too. Signed-off-by: Chen Gang --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index fcdca2a..0e95f35 100644

[Qemu-devel] [PATCH] translate-all.c: Remove writable protection feature for tb_alloc_page()

2016-01-13 Thread chengang
From: Chen Gang Guest may allocate a readable, writable, and executable page, then write data on the page, and execute data as code on the page too, then write anther data still within the page. So remove this feature from linux-user: it not only consumes a little performance, but also causes is

[Qemu-devel] [PATCH] intel_iommu: large page support

2016-01-13 Thread Jason Wang
Current intel_iommu only supports 4K page which may not be sufficient to cover guest working set. This patch tries to enable 2M and 1G mapping for intel_iommu. This is also useful for future device IOTLB implementation to have a better hit rate. Major work is adding a page mask field on IOTLB entr

[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 b/tests/qemu-iotests/051 i

[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 ++- include/qemu/throt

[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 huge

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 > occur

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 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 limits now. > Yes, I

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 ju

[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

[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 r

[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 patch

[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 Mammedov (supporter

[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 (supporter:ACPI/SMBIOS) Cc: Xiao Guangrong (mai

[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 apprec

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: ht

Re: [Qemu-devel] [PATCH v1 08/15] block: add generic full disk encryption driver

2016-01-13 Thread Eric Blake
On 01/12/2016 11:56 AM, Daniel P. Berrange wrote: > Add a block driver that is capable of supporting any full disk > encryption format. This utilizes the previously added block > encryption code, and at this time supports the LUKS format. > > The driver code is capable of supporting any format sup

Re: [Qemu-devel] [PATCH v1 06/15] crypto: implement the LUKS block encryption format

2016-01-13 Thread Eric Blake
On 01/12/2016 11:56 AM, Daniel P. Berrange wrote: > Provide a block encryption implementation that follows the > LUKS/dm-crypt specification. > > This supports all combinations of hash, cipher algorithm, > cipher mode and iv generator that are implemented by the > current crypto layer. > > The no

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 data

[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 cpu_get

[Qemu-devel] bug with io/channel-socket.c - variable-sized object may not be initialized

2016-01-13 Thread Programmingkid
This code causes an error to occur during compiling: char control[CMSG_SPACE(sizeof(int) * SOCKET_MAX_FDS)] = { 0 }; It is located at line 496 in io/channel-socket.c. Here is the full error message: io/channel-socket.c: In function 'qio_channel_socket_writev': io/channel-socket.c:496:18: error

Re: [Qemu-devel] [PATCH V6 2/8] introduce aux-bus

2016-01-13 Thread Peter Crosthwaite
On Mon, Jan 4, 2016 at 10:25 AM, wrote: > From: KONRAD Frederic > > This introduces a new bus: aux-bus. > > It contains an address space for aux slaves devices and a bridge to an I2C bus > for I2C through AUX transactions. > > Signed-off-by: KONRAD Frederic > Tested-By: Hyun Kwon > --- > defa

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

2016-01-13 Thread Peter Crosthwaite
On Wed, Jan 13, 2016 at 8:07 AM, Tim Sander wrote: > 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. >> >>

[Qemu-devel] [PATCH] docs: Style the command and its options in the synopsis

2016-01-13 Thread Sitsofe Wheeler
Signed-off-by: Sitsofe Wheeler --- fsdev/virtfs-proxy-helper.texi | 2 +- qemu-doc.texi | 8 qemu-ga.texi | 2 +- qemu-img.texi | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.texi b/fsde

Re: [Qemu-devel] [vfio-users] [PATCH v2 1/3] input: add qemu_input_qcode_to_linux + qemu_input_linux_to_qcode

2016-01-13 Thread sL1pKn07 SpinFlo
Today have notice the patch stop working on my VM input_linux_event_mouse: read: Resource temporarily unavailable input_linux_event_keyboard: read: Resource temporarily unavailable i only rebuild qemu (from Gerd Hoffmann's input-dev-event barnch) with some changes. this is my options: ./confi

[Qemu-devel] [Bug 1490611] Re: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2016-01-13 Thread Stephen Kent
Which release contains this fix? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1490611 Title: Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft

[Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-13 Thread Laurent Vivier
commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991 vhost-net: tell tap backend about the vnet endianness makes vhost net to set the endianness of the device, but only for the first device. In case of multiqueue, we have multiple devices... This patch sets the endianness for all the devices of

Re: [Qemu-devel] [Qemu-block] [PATCH v1 10/15] qcow2: convert QCow2 to use QCryptoBlock for encryption

2016-01-13 Thread Kevin Wolf
Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > This converts the qcow2 driver to make use of the QCryptoBlock > APIs for encrypting image content. As well as continued support > for the legacy QCow2 encryption format, the appealing benefit > is that it enables support for the LUKS for

Re: [Qemu-devel] [Qemu-block] [PATCH v1 07/15] block: add flag to indicate that no I/O will be performed

2016-01-13 Thread Daniel P. Berrange
On Wed, Jan 13, 2016 at 06:44:41PM +0100, Kevin Wolf wrote: > Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > > When opening an image it is useful to know whether the caller > > intends to perform I/O on the image or not. In the case of > > encrypted images this will allow the block dr

Re: [Qemu-devel] [Qemu-block] [PATCH v1 07/15] block: add flag to indicate that no I/O will be performed

2016-01-13 Thread Kevin Wolf
Am 12.01.2016 um 19:56 hat Daniel P. Berrange geschrieben: > When opening an image it is useful to know whether the caller > intends to perform I/O on the image or not. In the case of > encrypted images this will allow the block driver to avoid > having to prompt for decryption keys when we merely

Re: [Qemu-devel] [PATCH v3 0/6] virtio/vhost cross-endian cleanup

2016-01-13 Thread Greg Kurz
On Tue, 12 Jan 2016 18:21:05 +0100 Greg Kurz wrote: > This series brings some improvements to the cross-endian support in the > virtio and vhost code: > - use qemu_set_vnet_be() and qemu_set_vnet_le() directly from virtio-net, > so that backend cross-endian capabilities benefit to both emulated

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 DIRTY_MEMORY_CODE bit and

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 technical

[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] [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 in

Re: [Qemu-devel] [PATCH 1/5] block: added lock image option and callback

2016-01-13 Thread Eric Blake
On 01/12/2016 05:10 PM, Fam Zheng wrote: >> If we will switch default in my patch from 'nolock' to 'lock' then >> pour guys which are calling qemu-img etc stuff will see the lock >> as necessary while 'proper management software' aka libvirt >> will be able to call qemu/qemu-img etc with proper 'n

[Qemu-devel] [PATCH v2 8/9] qcow2: Fix BDRV_O_INACTIVE handling in qcow2_invalidate_cache()

2016-01-13 Thread Kevin Wolf
What qcow2_invalidate_cache() should do is close the image with BDRV_O_INACTIVE set and reopen it with the flag cleared. In fact, it used to do exactly the opposite: qcow2_close() relied on bs->open_flags, which is already updated to have cleared BDRV_O_INACTIVE at this point, whereas qcow2_open()

[Qemu-devel] [PATCH v2 9/9] qcow2: Make image inaccessible after failed qcow2_invalidate_cache()

2016-01-13 Thread Kevin Wolf
If qcow2_invalidate_cache() fails, we are in a state where qcow2_close() has already been completed, but the image hasn't been reopened yet. Calling into any qcow2 function for an image in this state will cause crashes. The real solution would be to get rid of the close/open pair and instead do an

[Qemu-devel] [PATCH v2 6/9] block: Inactivate BDS when migration completes

2016-01-13 Thread Kevin Wolf
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 source is still actively using it, but after completing the migration, the image was fully opened on both sides. This is bad. This patch adds a block driver ca

[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 c

[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 --- block/io.c | 2 ++ 1 file changed, 2 insertion

[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: Eric Blake --- bloc

[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 ca

[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 -- tests/qemu-iotests/031.out | 12 +--- tests/qe

[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 +++ b/block.c @@ -3276,12 +3276,14 @@ void

[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 images

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 mark

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, Andrey Korolyov wro

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 AML

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 th

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 ACP

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 o

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 operation

[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 on softfloat patches, you might want to get this o

[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 Message-Id: <1450370121-5768-4-git-send-email-arm...@redhat.com> --- hw/timer/

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 wrote: > > Versio

[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 resul

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, &ERR); +T RET = FUN(ARGS, &error_fatal); | -RET = FUN(ARGS, &ERR); +RET = FUN(ARGS, &error_fat

[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 initia

[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(); ) fo

[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 b/xen-hvm.c index 3d78a0c..2a93390 100644 --- a/xen-hvm.c

[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 Message-Id: <1450452927-8346-23-git-send-email-arm...@redhat.com> --- hw/s390x/ipl.c | 12 ++--

[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 +- tests/qemu-iotests/059.out | 8 tests/qemu-iotests/06

[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: <1450452927-8346-24-git-send-email-arm...@redhat.com> --- hw/s390x/sclp.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-)

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 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 I

[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 Dingel Cc: David Hildenbrand Cc: Jason J. Herne Cc: Stefan Berger Cc:

[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 on

[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, &err); 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 (i

[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: <1450452927-8346-18-git-send-email-arm...@redhat.com> --- block/vmdk.c | 28 +++-

[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 hw/core/nmi.c | 10 +

[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 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 statement. But those cases should be

[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 only

[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 /*": %s"*/,

[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 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 Signed-off-

[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 +- util/qemu-error.c| 8 3

[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 Reviewed-by: Eric

[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 hav

[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-...@nongnu.org Signed-off-by

[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 insertions(+), 3 deletions(-) diff --git a

[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 then

[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 &error_abort crashes. Improvement, because now

[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: <1450370121-5768-10-git-send-email-arm...@redhat.com> --- hw/isa/lpc_ich9.c | 5 ++--- hw/sparc64/sun4u.c

[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: <1450452927-8346-11-git-send-email-arm...@redhat.com> --- hw/core/qdev-properties.c

[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: Ma

[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-...@nongnu.org Signed-off-by: Mar

[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 duplic

[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 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 pr

[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 Message-Id: <1450899731-19517-1-git-send-email-shmulik.ladk...@ravellosystems.com

[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 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 error

  1   2   3   >