Re: [Qemu-devel] [PATCH 06/10] migration: Make sure that we pass the right cache size

2017-10-11 Thread Peter Xu
On Tue, Oct 10, 2017 at 08:15:38PM +0200, Juan Quintela wrote: > Instead of passing silently round down the number of pages, make it an > error that the cache size is not a multiple of 2. s/multiple/power/? Would this patch break existing users? > > Signed-off-by: Juan Quintela

Re: [Qemu-devel] [PATCH 05/10] migration: Make cache_init() take an error parameter

2017-10-11 Thread Peter Xu
On Tue, Oct 10, 2017 at 08:15:37PM +0200, Juan Quintela wrote: [...] > diff --git a/migration/page_cache.h b/migration/page_cache.h > index 931868b857..4596496416 100644 > --- a/migration/page_cache.h > +++ b/migration/page_cache.h > @@ -24,12 +24,11 @@ typedef struct PageCache PageCache; > *

Re: [Qemu-devel] [PATCH 04/10] migration: Move xbzrle cache resize error handling to xbzrle_cache_resize

2017-10-11 Thread Peter Xu
On Tue, Oct 10, 2017 at 08:15:36PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [Qemu-devel] [PATCH 01/10] migration: Fix migrate_test_apply for multifd parameters

2017-10-11 Thread Peter Xu
On Tue, Oct 10, 2017 at 08:15:33PM +0200, Juan Quintela wrote: > They were missing when introduced on the tree > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/migration/migration.c

Re: [Qemu-devel] [PATCH 02/10] migratiom: Remove max_item_age parameter

2017-10-11 Thread Peter Xu
On Tue, Oct 10, 2017 at 08:15:34PM +0200, Juan Quintela wrote: > It was not used at all since commit: > > 27af7d6ea5015e5ef1f7985eab94a8a218267a2b > > which replaced its use by the dirty sync count. > > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu

Re: [Qemu-devel] [PATCH v2 3/8] s390x: improve error handling for SSCH and RSCH

2017-10-11 Thread Dong Jia Shi
* Halil Pasic [2017-10-11 12:54:51 +0200]: > > > On 10/11/2017 05:47 AM, Dong Jia Shi wrote: > > * Halil Pasic [2017-10-04 17:41:39 +0200]: > > > >> Simplify the error handling of the SSCH and RSCH handler avoiding > >> arbitrary and

Re: [Qemu-devel] FW: Are there any qemu emulated SR-IOV devices?

2017-10-11 Thread Knut Omang
On Thu, 2017-10-05 at 16:31 +0200, Kashyap Chamarthy wrote: > [Sorry, I'm a bit late in responding, as I missed this e-mail.] > > On Thu, Jun 08, 2017 at 07:35:52AM -0700, mwoodpatr...@gmail.com wrote: > > I wanted to play around with SR-IOV using qemu and was wondering if there > > are any qemu

Re: [Qemu-devel] QEMU migration cancellation

2017-10-11 Thread Peter Xu
On Wed, Oct 11, 2017 at 06:36:56PM +0100, Dr. David Alan Gilbert wrote: > * Jag Raman (jag.ra...@oracle.com) wrote: > > Hi, > > Hi Jag, (Yet another Hi From Peter :) > > > I'd like to check about the behavior of a QEMU instance when live > > migration is cancelled. > > > > If the migration of

Re: [Qemu-devel] [PATCH v2 3/4] spapr/rtas: fix reboot of a SMP TCG guest

2017-10-11 Thread Nikunj A Dadhania
Cédric Le Goater writes: > Just like for hot unplugged CPUs, when a guest is rebooted, the > secondary CPUs can be awaken by the decrementer and start entering > SLOF at the same time the boot CPU is. > > To be safe, let's disable the decrementer interrupt in the LPCR for > the

[Qemu-devel] [Bug 1722884] Re: keyboard input while mouse moving triggers mouse failure

2017-10-11 Thread Geoffrey McRae
Further to this, it appears to be a race condition with reading from the i8042 controller. I have turned on debugging of PS2 and KBD and filtered out the event that causes the issue. I have split the below up to show the valid reads for the mouse and then the sequence that triggers a reset when

[Qemu-devel] [PATCH v6 21/24] block: Align block status requests

2017-10-11 Thread Eric Blake
Any device that has request_alignment greater than 512 should be unable to report status at a finer granularity; it may also be simpler for such devices to be guaranteed that the block layer has rounded things out to the granularity boundary (the way the block layer already rounds all other I/O

[Qemu-devel] [PATCH v6 24/24] qemu-io: Relax 'alloc' now that block-status doesn't assert

2017-10-11 Thread Eric Blake
Previously, the alloc command required that input parameters be sector-aligned and clamped to 32 bits, because the underlying bdrv_is_allocated used a 32-bit parameter and asserted aligned inputs. But now that we have fixed block status to report a 64-bit bytes value, and to properly round

Re: [Qemu-devel] [PATCH v16 5/5] virtio-balloon: VIRTIO_BALLOON_F_CTRL_VQ

2017-10-11 Thread Wei Wang
On 10/11/2017 09:49 PM, Michael S. Tsirkin wrote: On Wed, Oct 11, 2017 at 02:03:20PM +0800, Wei Wang wrote: On 10/10/2017 11:15 PM, Michael S. Tsirkin wrote: On Mon, Oct 02, 2017 at 04:38:01PM +, Wang, Wei W wrote: On Sunday, October 1, 2017 11:19 AM, Michael S. Tsirkin wrote: On Sat,

[Qemu-devel] [PATCH v6 23/24] qcow2: Relax is_zero() assertion

2017-10-11 Thread Eric Blake
Now that bdrv_is_allocated accepts non-aligned inputs, we can remove the TODO added in earlier refactoring. Signed-off-by: Eric Blake --- v6: new patch [Kevin] --- block/qcow2.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/block/qcow2.c

[Qemu-devel] [PATCH v6 19/24] qemu-img: Change img_rebase() to be byte-based

2017-10-11 Thread Eric Blake
In the continuing quest to make more things byte-based, change the internal iteration of img_rebase(). We can finally drop the TODO assertion added earlier, now that the entire algorithm is byte-based and no longer has to shift from bytes to sectors. Most of the change is mechanical

[Qemu-devel] [PATCH v6 22/24] block: Relax bdrv_aligned_preadv() assertion

2017-10-11 Thread Eric Blake
Now that bdrv_is_allocated accepts non-aligned inputs, we can remove the TODO added in commit d6a644bb. Signed-off-by: Eric Blake Reviewed-by: John Snow --- v4-v5: no change v3: new patch [Kevin] --- block/io.c | 8 ++-- 1 file changed, 2

[Qemu-devel] [PATCH v6 20/24] qemu-img: Change img_compare() to be byte-based

2017-10-11 Thread Eric Blake
In the continuing quest to make more things byte-based, change the internal iteration of img_compare(). We can finally drop the TODO assertions added earlier, now that the entire algorithm is byte-based and no longer has to shift from bytes to sectors. Most of the change is mechanical

[Qemu-devel] [PATCH v6 18/24] qemu-img: Change compare_sectors() to be byte-based

2017-10-11 Thread Eric Blake
In the continuing quest to make more things byte-based, change compare_sectors(), renaming it to compare_buffers() in the process. Note that one caller (qemu-img compare) only cares about the first difference, while the other (qemu-img rebase) cares about how many consecutive sectors have the

[Qemu-devel] [PATCH v6 16/24] qemu-img: Drop redundant error message in compare

2017-10-11 Thread Eric Blake
If a read error is encountered during 'qemu-img compare', we were printing the "Error while reading offset ..." message twice; this was because our helper function was awkward, printing output on some but not all paths. Fix it to consistently report errors on all paths, so that the callers do not

[Qemu-devel] [PATCH v6 14/24] qemu-img: Speed up compare on pre-allocated larger file

2017-10-11 Thread Eric Blake
Compare the following images with all-zero contents: $ truncate --size 1M A $ qemu-img create -f qcow2 -o preallocation=off B 1G $ qemu-img create -f qcow2 -o preallocation=metadata C 1G On my machine, the difference is noticeable for pre-patch speeds, with more than an order of magnitude in

[Qemu-devel] [PATCH v6 12/24] block: Convert bdrv_get_block_status_above() to bytes

2017-10-11 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

[Qemu-devel] [PATCH v6 17/24] qemu-img: Change check_empty_sectors() to byte-based

2017-10-11 Thread Eric Blake
Continue on the quest to make more things byte-based instead of sector-based. Signed-off-by: Eric Blake Reviewed-by: John Snow --- v4-v5: no change v3: new patch --- qemu-img.c | 27 +++ 1 file changed, 15 insertions(+), 12

[Qemu-devel] [PATCH v6 15/24] qemu-img: Add find_nonzero()

2017-10-11 Thread Eric Blake
During 'qemu-img compare', when we are checking that an allocated portion of one file is all zeros, we don't need to waste time computing how many additional sectors after the first non-zero byte are also non-zero. Create a new helper find_nonzero() to do the check for a first non-zero sector,

[Qemu-devel] [PATCH v6 10/24] block: Switch bdrv_common_block_status_above() to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change). Signed-off-by: Eric Blake --- v6: rebase to split return interface change [Kevin], R-b dropped v4-v5: no change

[Qemu-devel] [PATCH v6 13/24] qemu-img: Simplify logic in img_compare()

2017-10-11 Thread Eric Blake
As long as we are querying the status for a chunk smaller than the known image size, we are guaranteed that a successful return will have set pnum to a non-zero size (pnum is zero only for queries beyond the end of the file). Use that to slightly simplify the calculation of the current chunk size

[Qemu-devel] [PATCH v6 11/24] block: Switch bdrv_co_get_block_status_above() to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- v6: rebase to split

[Qemu-devel] [PATCH v6 02/24] block: Add flag to avoid wasted work in bdrv_is_allocated()

2017-10-11 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file, or where the zeroes lie within that mapping. In particular, bdrv_is_allocated() cares more about finding the largest run of allocated data from the guest perspective, whether or not that data is consecutive from

[Qemu-devel] [PATCH v6 08/24] block: Switch bdrv_co_get_block_status() to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change); and as with its public counterpart, rename to bdrv_co_block_status() and split the offset return, to make the compiler enforce that

[Qemu-devel] [PATCH v6 04/24] qcow2: Switch is_zero_sectors() to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal function (no semantic change), and rename it to is_zero() in the process. Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v6 09/24] block: Switch BdrvCoGetBlockStatusData to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- v6: fix -O2

[Qemu-devel] [PATCH v6 06/24] qemu-img: Switch get_block_status() to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Continue by converting an internal function (no semantic change), and simplifying its caller accordingly. Signed-off-by: Eric Blake Reviewed-by: Fam Zheng

[Qemu-devel] [PATCH v6 01/24] block: Allow NULL file for bdrv_get_block_status()

2017-10-11 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. This patch merely simplifies the callers by consolidating the logic in the common call point, while guaranteeing a non-NULL file to all the driver callbacks, for no semantic change. The only caller that does not

[Qemu-devel] [PATCH v6 03/24] block: Make bdrv_round_to_clusters() signature more useful

2017-10-11 Thread Eric Blake
In the process of converting sector-based interfaces to bytes, I'm finding it easier to represent a byte count as a 64-bit integer at the block layer (even if we are internally capped by SIZE_MAX or even INT_MAX for individual transactions, it's still nicer to not have to worry about

[Qemu-devel] [PATCH v6 07/24] block: Convert bdrv_get_block_status() to bytes

2017-10-11 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

[Qemu-devel] [PATCH v6 00/24] make bdrv_get_block_status byte-based

2017-10-11 Thread Eric Blake
There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a

[Qemu-devel] [PATCH v6 05/24] block: Switch bdrv_make_zero() to byte-based

2017-10-11 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the internal loop iteration of zeroing a device to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned).

Re: [Qemu-devel] [PATCH v4] pci: Set err to errp directly rather than through error_propagate()

2017-10-11 Thread Mao Zhongyi
On 09/12/2017 06:16 PM, Stefan Hajnoczi wrote: On Sat, Sep 09, 2017 at 02:22:26PM +0800, Mao Zhongyi wrote: ioh3420_interrupts_init() pass error message to local_err, then propagate it to errp by error_propagate(), which is not necessary. So eliminate it and pass errp directly instead of

Re: [Qemu-devel] [PATCH v3 0/6] Convert to realize and improve error handling

2017-10-11 Thread Mao Zhongyi
Hi, Long time no news. Ping... Thanks, Mao On 09/19/2017 09:25 AM, Mao Zhongyi wrote: On 09/19/2017 07:59 AM, John Snow wrote: On 09/18/2017 10:05 AM, Mao Zhongyi wrote: This series mainly implements the conversions of ide, floppy and nvme device to realize. Add some error handling

Re: [Qemu-devel] [PATCH v2 2/4] spapr/rtas: disable the decrementer interrupt when a CPU is unplugged

2017-10-11 Thread David Gibson
On Wed, Oct 11, 2017 at 01:55:20PM +0200, Cédric Le Goater wrote: > On 10/11/2017 08:45 AM, David Gibson wrote: > > On Mon, Oct 09, 2017 at 05:49:28PM +0200, Cédric Le Goater wrote: > >> When a CPU is stopped with the 'stop-self' RTAS call, its state > >> 'halted' is switched to 1 and, in this

Re: [Qemu-devel] [RFC PATCH 0/4] tpm: Extend TPM with state migration support

2017-10-11 Thread Eric Blake
On 10/11/2017 04:37 PM, Stefan Berger wrote: > This set of patches implements support for migrating the state of the > external 'swtpm' TPM emulator. I have primarily tested this with TPM 1.2 > so far. > > This series of patches builds on top of the recent pull request Just to make sure patchew

[Qemu-devel] [Bug 1719196] Re: [arm64 ocata] newly created instances are unable to raise network interfaces

2017-10-11 Thread Sean Feole
I spent some time today trying to modify the ocata xml templates produced in /etc/libvirt/qemu/.xml for each of the generated instances. Destroying & Undefining the existing instance, making some changes and redefining the xml, however it appears that nova regenerates these templates upon

[Qemu-devel] [RFC PATCH 2/4] tpm: Introduce condition to notify waiters of completed command

2017-10-11 Thread Stefan Berger
Introduce a lock and a condition to notify anyone waiting for the completion of the execution of a TPM command by the backend (thread). The backend uses the condition to signal anyone waiting for command completion. We need to place the condition in two locations: one is invoked by the backend

[Qemu-devel] [RFC PATCH 0/4] tpm: Extend TPM with state migration support

2017-10-11 Thread Stefan Berger
This set of patches implements support for migrating the state of the external 'swtpm' TPM emulator. I have primarily tested this with TPM 1.2 so far. This series of patches builds on top of the recent pull request Stefan Stefan Berger (4): tpm: print buffers received from TPM when

[Qemu-devel] [RFC PATCH 3/4] tpm: Introduce condition in TPM backend for notification

2017-10-11 Thread Stefan Berger
TPM backends will suspend independently of the frontends. Also here we need to be able to wait for the TPM command to have been completely processed. Signed-off-by: Stefan Berger --- backends/tpm.c | 16 hw/tpm/tpm_emulator.c|

[Qemu-devel] [RFC PATCH 4/4] tpm: extend TPM emulator and TIS with state migration support

2017-10-11 Thread Stefan Berger
Extend the TPM emulator and TPM TIS interface with state migration support. The external TPM emulator 'swtpm' provides a protocol over its control channel to retrieve its state blobs. We implement functions for getting and setting the different state blobs. Since we have an external TPM

[Qemu-devel] [RFC PATCH 1/4] tpm: print buffers received from TPM when debugging

2017-10-11 Thread Stefan Berger
Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index d5118e7..9bf0bce 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -373,6 +373,8 @@ static void

[Qemu-devel] QEMU migration cancellation

2017-10-11 Thread Jag Raman
Hi, I'd like to check about the behavior of a QEMU instance when live migration is cancelled. If the migration of a guest OS from source QEMU instance to destination instance is cancelled, the destination instance exits with a failure code. Could you please explain why this design decision was

Re: [Qemu-devel] [Bug 1721788] Re: Failed to get shared "write" lock with 'qemu-img info'

2017-10-11 Thread Liang Yan
This does  not only affect qemu-img only, it could not make libvirt "" work either when two vms were running with share disk image.  Is there a workaround for this situation? Best, Liang On 10/6/17 10:30 AM, Daniel Berrange wrote: > I've just noticed, however, that '--force-share' appears

Re: [Qemu-devel] [PATCH 0/7] x86: Rework KVM-defaults compat code, enable kvm_pv_unhalt by default

2017-10-11 Thread Waiman Long
On 10/10/2017 03:41 PM, Eduardo Habkost wrote: > On Tue, Oct 10, 2017 at 02:07:25PM -0400, Waiman Long wrote: >> On 10/10/2017 11:50 AM, Eduardo Habkost wrote: Yes. Another possibility is to enable it when there is >1 NUMA node in the guest. We generally don't do this kind of magic but

Re: [Qemu-devel] [PATCH 3/3 v4] xenfb: Add [feature|request]-raw-pointer

2017-10-11 Thread Stefano Stabellini
On Wed, 11 Oct 2017, Anthony PERARD wrote: > On Tue, Oct 10, 2017 at 04:52:48PM -0700, Stefano Stabellini wrote: > > On Mon, 2 Oct 2017, Anthony PERARD wrote: > > > On Tue, Sep 26, 2017 at 02:43:39PM +, Owen Smith wrote: > > > > Writes "feature-raw-pointer" during init to indicate the backend

Re: [Qemu-devel] [PATCH] Several fixes for the Pulse Audio driver, and the HDA device.

2017-10-11 Thread Paolo Bonzini
On 10/10/2017 20:32, Martin Schrodt wrote: > These 3 here are only paaudio.c > > - Remove PA reader/writer threads from paaudio.c, and do IO from the > audio timer directly. > - Expose new configurable settings, such as TLENGTH and FRAGSIZE, plus > settings to > enable PA_STREAM_ADJUST_LATENCY

Re: [Qemu-devel] [PATCH 0/7] migration: pause-before-device

2017-10-11 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20171011191317.24157-1-dgilb...@redhat.com Subject: [Qemu-devel] [PATCH 0/7] migration: pause-before-device === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

[Qemu-devel] [PATCH v3] tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD

2017-10-11 Thread Stefan Berger
EBADMSG was only added to OpenBSD very recently. To make QEMU compilable on older OpenBSD versions use EMSGSIZE instead when a mismatch between number of received bytes and message size indicated in the header was found. Return -EMSGSIZE and convert all other errnos in the same functions to

Re: [Qemu-devel] [Qemu-block] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-11 Thread Paolo Bonzini
On 11/10/2017 15:08, Peter Maydell wrote: >> Tracing is the right tool to detect bad guest code, and I think it makes >> sense to mark conditions that shouldn't happen with a correctly >> operating guest driver. I'm not sure if an exclamation mark is the best >> syntax for this, because I wouldn't

Re: [Qemu-devel] [Qemu-arm] [PATCH] nvic: Add missing 'break'

2017-10-11 Thread Philippe Mathieu-Daudé
On 10/11/2017 02:24 PM, Peter Maydell wrote: > Coverity points out that we forgot the 'break' for > the SAU_CTRL write case (CID1381683). This has > no actual visible consequences because it happens > that the following case is effectively a no-op. > > Signed-off-by: Peter Maydell

Re: [Qemu-devel] [RFC] KVM "fake DAX" device flushing

2017-10-11 Thread Dan Williams
On Wed, Oct 11, 2017 at 11:51 AM, Pankaj Gupta wrote: > We are sharing the prototype version of 'fake DAX' flushing > interface for the initial feedback. This is still work in progress > and not yet ready for merging. > > Protoype right now just implements basic functionality

[Qemu-devel] [PATCH 7/7] migration: pause-before-device for postcopy

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add pause-before-device support for postcopy. After starting postcopy it will transition active->pause_before_device->postcopy_active Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 29

[Qemu-devel] [PATCH 4/7] migration: migrate-continue

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" A new qmp command allows the caller to continue from a given paused state. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 11 +++ qapi/migration.json | 17 + 2 files changed,

[Qemu-devel] [PATCH 3/7] migration: Wait for semaphore before completing migration

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wait for a semaphore before completing the migration, if the previously added capability was enabled. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 47 +++

[Qemu-devel] [PATCH 6/7] migration: allow cancel to unpause

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" If a migration_cancel is issued during the new paused state, kick the pause_sem to get to unpause so it can cancel. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 4 1 file changed, 4

[Qemu-devel] [PATCH 2/7] migration: Add 'pause-before-device' and 'device' statuses

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add two statuses for use when the 'pause-before-device' capability is enabled. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 6 ++ qapi/migration.json | 8 +++- 2 files changed, 13

[Qemu-devel] [PATCH 5/7] migrate: HMP migate_continue

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" HMP equivalent to the just added migrate-continue Unpause a migrate paused at a given state. Signed-off-by: Dr. David Alan Gilbert --- hmp-commands.hx | 12 hmp.c | 13 + hmp.h

[Qemu-devel] [PATCH 1/7] migration: Add 'pause-before-device' capability

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When 'pause-before-device' is enabled, the outgoing migration will pause after completing any outstanding IOs but before serialising the device state. At this point the management layer gets the chance to clean up any device jobs or other

[Qemu-devel] [PATCH 0/7] migration: pause-before-device

2017-10-11 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This set attempts to make a race condition between migration and drive-mirror (and other block users) soluble by allowing the migration to be paused after the source qemu releases the block devices but before the serialisation of the

[Qemu-devel] [Bug 1722884] [NEW] keyboard input while mouse moving triggers mouse failure

2017-10-11 Thread Geoffrey McRae
Public bug reported: When QEMU is getting a ton of mouse input events if keys are pressed on the keyboard the scan code will be corrupted causing erroneous behavior. I have confirmed this problem in the latest version in git (530049bc1dcc24c1178a29d99ca08b6dd08413e0). After the erroneous

[Qemu-devel] [Bug 1722884] Re: keyboard input while mouse moving triggers mouse failure

2017-10-11 Thread Geoffrey McRae
Here is a backtrace of the PS2 reset event: #0 ps2_write_mouse (opaque=0x55804518ae30, val=255) at /home/geoff/Projects/qemu/qemu/hw/input/ps2.c:1033 #1 0x5580420e1dd9 in kbd_write_data (opaque=0x558045147aa0, addr=0, val=255, size=1) at /home/geoff/Projects/qemu/qemu/hw/input/pckbd.c:357

[Qemu-devel] [RFC] KVM "fake DAX" device flushing

2017-10-11 Thread Pankaj Gupta
We are sharing the prototype version of 'fake DAX' flushing interface for the initial feedback. This is still work in progress and not yet ready for merging. Protoype right now just implements basic functionality without advanced features with two major parts: - Qemu virtio-pmem device It

[Qemu-devel] [PULL 4/5] scripts: Remove debug parameter from QEMUMonitorProtocol

2017-10-11 Thread Eduardo Habkost
Use logging module for the QMP debug messages. The only scripts that set debug=True are iotests.py and guestperf/engine.py, and they already call logging.basicConfig() to set up logging. Scripts that don't configure logging are safe as long as they don't need debugging output, because debug

[Qemu-devel] [PULL 3/5] guestperf: Configure logging on all shell frontends

2017-10-11 Thread Eduardo Habkost
The logging module will eventually replace the 'debug' parameter in QEMUMachine and QEMUMonitorProtocol. Cc: Daniel P. Berrange Signed-off-by: Eduardo Habkost Message-Id: <20171005172013.3098-2-ehabk...@redhat.com> Reviewed-by: Lukáš Doktor

[Qemu-devel] [PULL 2/5] basevm: Call logging.basicConfig()

2017-10-11 Thread Eduardo Habkost
Just setting level=DEBUG when debug is enabled is not enough: we need to set up a log handler if we want debug messages generated using logging.getLogger(...).debug() to be printed. This was not a problem before because logging.debug() calls logging.basicConfig() implicitly, but it's safer to not

[Qemu-devel] [PULL 5/5] scripts: Remove debug parameter from QEMUMachine

2017-10-11 Thread Eduardo Habkost
All scripts that use the QEMUMachine and QEMUQtestMachine classes (device-crash-test, tests/migration/*, iotests.py, basevm.py) already configure logging. The basicConfig() call inside QEMUMachine.__init__() is being kept just to make sure a script would still work if it didn't configure logging.

[Qemu-devel] [PULL 1/5] iotests: Set up Python logging

2017-10-11 Thread Eduardo Habkost
Set up Python logging module instead of relying on QEMUMachine._debug to enable debugging messages. Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Eduardo Habkost Message-Id:

[Qemu-devel] [PULL 0/5] Python queue, 2017-10-11

2017-10-11 Thread Eduardo Habkost
The following changes since commit bac960832015bf4c4c1b873011612e2675e4464c: Merge remote-tracking branch 'remotes/elmarco/tags/vus-pull-request' into staging (2017-10-11 13:10:36 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git

Re: [Qemu-devel] [PATCH v5 14/23] qemu-img: Speed up compare on pre-allocated larger file

2017-10-11 Thread Eric Blake
On 10/03/2017 09:00 PM, Eric Blake wrote: > Compare the following images with all-zero contents: > $ truncate --size 1M A > $ qemu-img create -f qcow2 -o preallocation=off B 1G > $ qemu-img create -f qcow2 -o preallocation=metadata C 1G > > Signed-off-by: Eric Blake >

Re: [Qemu-devel] [PATCH v5 01/23] block: Allow NULL file for bdrv_get_block_status()

2017-10-11 Thread John Snow
On 10/11/2017 04:42 AM, Kevin Wolf wrote: > Am 10.10.2017 um 21:24 hat John Snow geschrieben: >> >> >> On 10/10/2017 03:00 PM, Eric Blake wrote: >>> On 10/10/2017 09:43 AM, Eric Blake wrote: >>> >> --- >> v5: use second label for cleaner exit logic [John], use local_pnum >> @@

Re: [Qemu-devel] QEMU migration cancellation

2017-10-11 Thread Dr. David Alan Gilbert
* Jag Raman (jag.ra...@oracle.com) wrote: > Hi, Hi Jag, > I'd like to check about the behavior of a QEMU instance when live > migration is cancelled. > > If the migration of a guest OS from source QEMU instance to destination > instance is cancelled, the destination instance exits with a

Re: [Qemu-devel] [PATCH] io: fix mem leak in websock error path

2017-10-11 Thread Philippe Mathieu-Daudé
Hi Daniel, On 10/11/2017 12:38 PM, Daniel P. Berrange wrote: > Coverity pointed out the 'date' is not free()d in the error > path > > Signed-off-by: Daniel P. Berrange > --- > io/channel-websock.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

[Qemu-devel] [PATCH] nvic: Add missing 'break'

2017-10-11 Thread Peter Maydell
Coverity points out that we forgot the 'break' for the SAU_CTRL write case (CID1381683). This has no actual visible consequences because it happens that the following case is effectively a no-op. Signed-off-by: Peter Maydell --- hw/intc/armv7m_nvic.c | 1 + 1 file

Re: [Qemu-devel] [PATCH v2 21/24] ppc: pnv: drop PnvCoreClass::cpu_oc field

2017-10-11 Thread Philippe Mathieu-Daudé
On 10/09/2017 04:51 PM, Igor Mammedov wrote: > deduce cpu type directly from core type instead of > maintaining type mapping in PnvCoreClass::cpu_oc and doing > extra cpu_model parsing in pnv_core_class_init() > > Signed-off-by: Igor Mammedov Reviewed-by: Philippe

Re: [Qemu-devel] [PATCH v2 04/10] nbd-server: refactor simple reply sending

2017-10-11 Thread Vladimir Sementsov-Ogievskiy
09.10.2017 22:18, Eric Blake wrote: [adding Dan for a qio question - search for your name below] On 10/09/2017 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: Get rid of calculating structure fields offsets by hand and set_cork, rename nbd_co_send_reply to nbd_co_send_simple_reply. Do not use

Re: [Qemu-devel] [PATCH v2 23/24] ppc: pnv: drop PnvChipClass::cpu_model field

2017-10-11 Thread Philippe Mathieu-Daudé
On 10/09/2017 04:51 PM, Igor Mammedov wrote: > deduce core type directly from chip type instead of > maintaining type mapping in PnvChipClass::cpu_model. > > Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé > --- > v2: > - fix typo:

Re: [Qemu-devel] [PATCH v2 13/24] ppc: spapr: define core types statically

2017-10-11 Thread Philippe Mathieu-Daudé
On 10/09/2017 04:51 PM, Igor Mammedov wrote: > spapr core type definition doesn't have any fields that > require it to be defined at runtime. So replace code > that fills in TypeInfo at runtime with static TypeInfo > array that does the same at complie time. "compile" > > Signed-off-by: Igor

Re: [Qemu-devel] [PATCH v2 17/24] ppc: move ppc_cpu_lookup_alias() before its first user

2017-10-11 Thread Philippe Mathieu-Daudé
On 10/09/2017 04:51 PM, Igor Mammedov wrote: > next commit will drop ppc_cpu_lookup_alias() declaration from header > and make it static which will break its last user ppc_cpu_class_by_name() > since ppc_cpu_class_by_name() defined before ppc_cpu_lookup_alias(). > > To avoid this move

Re: [Qemu-devel] [PATCH v2 10/10] nbd: Minimal structured read for client

2017-10-11 Thread Vladimir Sementsov-Ogievskiy
10.10.2017 11:02, Paolo Bonzini wrote: On 09/10/2017 19:27, Vladimir Sementsov-Ogievskiy wrote: +int ret = nbd_co_do_receive_one_chunk(s, handle, only_structured, + _ret, qiov, payload); + +if (ret < 0) { +s->quit = true; +} else { +

Re: [Qemu-devel] [RfC PATCH 5/6] vfio/display: adding region support

2017-10-11 Thread Alex Williamson
On Wed, 11 Oct 2017 12:47:20 +0200 Gerd Hoffmann wrote: > Hi, > > > > +ret = ioctl(vdev->vbasedev.fd, VFIO_DEVICE_QUERY_GFX_PLANE, > > > ); > > > +if (ret < 0) { > > > +fprintf(stderr, "ioctl VFIO_DEVICE_QUERY_GFX_PLANE: %s\n", > > > +

Re: [Qemu-devel] [PULL 00/10] Ui 20171011 patches

2017-10-11 Thread Peter Maydell
On 11 October 2017 at 16:49, Daniel P. Berrange wrote: > On Wed, Oct 11, 2017 at 03:37:08PM +0100, Peter Maydell wrote: >> Build failures: >> >> NetBSD: >> CC ui/input-keymap.o >> /root/qemu/ui/input-keymap.c:8:44: fatal error: >> ui/input-keymap-linux-to-qcode.c: No

Re: [Qemu-devel] [PATCH] io: fix mem leak in websock error path

2017-10-11 Thread Eric Blake
On 10/11/2017 10:38 AM, Daniel P. Berrange wrote: > Coverity pointed out the 'date' is not free()d in the error > path > > Signed-off-by: Daniel P. Berrange > --- > io/channel-websock.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Eric Blake >

[Qemu-devel] [Bug 1722857] [NEW] Missing PCI "programming interface" ID emulation for USB host controllers

2017-10-11 Thread Googulator
Public bug reported: Qemu doesn't currently emulate the correct value of the "register level programming interface" field in the PCI config space of USB host controllers. As a result, some guest operating systems (most notably Windows) fail to load e.g. generic xHCI drivers, and instead ask for a

Re: [Qemu-devel] [PATCH] pc: remove useless hot_add_cpu initialisation

2017-10-11 Thread Anthony PERARD
On Tue, Oct 10, 2017 at 03:32:41PM +0200, Laurent Vivier wrote: > Since 4458fb3a79 (pc: Eliminate pc_default_machine_options()), > hot_add_cpu is set in pc_machine_class_init(), so we don't > need to set it in pc_q35_machine_options(), pc_i440fx_machine_options() > and xenfv_machine_options(),

Re: [Qemu-devel] [RFC v4 00/16] VIRTIO-IOMMU device

2017-10-11 Thread Auger Eric
Hi Peter, On 11/10/2017 16:56, Peter Maydell wrote: > On 19 September 2017 at 08:46, Eric Auger wrote: >> This series implements the virtio-iommu device. >> >> This v4 is an upgrade to v0.4 spec [1] and applies on QEMU v2.10.0. >> - probe request support although no

Re: [Qemu-devel] [RFC 0/3] vITS Reset

2017-10-11 Thread Auger Eric
Hi Peter, On 09/10/2017 20:17, Peter Maydell wrote: > On 27 September 2017 at 15:56, Eric Auger wrote: >> At the moment the ITS is not properly reset. On System reset or >> reboot, previous ITS register values and caches are left >> unchanged. Some of the registers might

Re: [Qemu-devel] [PATCH] xen: Log errno rather than return value

2017-10-11 Thread Anthony PERARD
On Wed, Oct 11, 2017 at 04:52:03PM +0100, Ross Lagerwall wrote: > xen_modified_memory() sets errno to communicate what went wrong so log > this rather than the return value which is not interesting. > > Signed-off-by: Ross Lagerwall > --- > hw/i386/xen/xen-hvm.c | 2

[Qemu-devel] [PATCH] xen: Log errno rather than return value

2017-10-11 Thread Ross Lagerwall
xen_modified_memory() sets errno to communicate what went wrong so log this rather than the return value which is not interesting. Signed-off-by: Ross Lagerwall --- hw/i386/xen/xen-hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [Bug 1721952] [NEW] Network issue above 2.5.1.1

2017-10-11 Thread Stefan Hajnoczi
On Sat, Oct 07, 2017 at 12:09:25PM -, Joan Moreau via Qemu-devel wrote: > WHen running a QEMU guest (Windows7) on a linux x86-64 server, the network > stops working after some time for any version above 2.5.1.1 > > In 2.5.1.1, all is fine (no issue with network) > Any version ablve (trying

Re: [Qemu-devel] [PULL 00/10] Ui 20171011 patches

2017-10-11 Thread Daniel P. Berrange
tes/ehabkost/tags/x86-and-machine-pull-request' into staging > > (2017-10-10 13:25:46 +0100) > > > > are available in the git repository at: > > > > git://git.kraxel.org/qemu tags/ui-20171011-pull-request > > > > for you to fetch changes up to

Re: [Qemu-devel] [PATCH 3/3 v4] xenfb: Add [feature|request]-raw-pointer

2017-10-11 Thread Anthony PERARD
On Tue, Oct 10, 2017 at 04:52:48PM -0700, Stefano Stabellini wrote: > On Mon, 2 Oct 2017, Anthony PERARD wrote: > > On Tue, Sep 26, 2017 at 02:43:39PM +, Owen Smith wrote: > > > Writes "feature-raw-pointer" during init to indicate the backend > > > can pass raw unscaled values for absolute

[Qemu-devel] [PATCH] io: fix mem leak in websock error path

2017-10-11 Thread Daniel P. Berrange
Coverity pointed out the 'date' is not free()d in the error path Signed-off-by: Daniel P. Berrange --- io/channel-websock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/io/channel-websock.c b/io/channel-websock.c index aa35ef3274..a1c10ab719 100644 ---

Re: [Qemu-devel] [PATCH v1 1/1] virtio-ccw: Add the virtio-input devices for CCW bus

2017-10-11 Thread Cornelia Huck
On Mon, 9 Oct 2017 10:01:50 -0400 Farhan Ali wrote: > Wire up the virtio-input HID devices (keyboard, mouse, tablet) > for the CCW bus. The virtio-input is a virtio-1 device, > so disable legacy revision 0. > > Signed-off-by: Farhan Ali >

[Qemu-devel] [Bug 1715007] Re: hw/block/onenand.c:520: dead code ?

2017-10-11 Thread Thomas Huth
Fix has now been included here: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=dbfa934106d22402d ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH 0/3] qcow2: Fix preallocated truncation

2017-10-11 Thread Stefan Hajnoczi
On Mon, Oct 09, 2017 at 11:55:30PM +0200, Max Reitz wrote: > There are (at least...) two bugs in preallocated truncation, which this > series fixes. > > Both would have been apparent if the the related iotest had used the > default cluster size in addition to 512 byte clusters, but alas, it did >

  1   2   3   >