Re: [Qemu-devel] [RFC] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-02-06 Thread Alexander Graf
On 06.02.15 03:54, David Gibson wrote: On Thu, Feb 05, 2015 at 12:55:45PM +0100, Alexander Graf wrote: On 05.02.15 12:30, David Gibson wrote: On Thu, Feb 05, 2015 at 11:22:13AM +0100, Alexander Graf wrote: [snip] [snip] +ret1 = kvmppc_enable_hcall(kvm_state, H_LOGICAL_CI_LOAD); +

Re: [Qemu-devel] [PATCH v2 0/3] bootdevcie: change the boot order validation logic

2015-02-06 Thread Gonglei
On 2015/2/3 20:34, Gonglei (Arei) wrote: From: Gonglei arei.gong...@huawei.com The reset logic can be done by both machine reset and boot handler. So we shouldn't return error when the boot handler callback don't be set in patch 1. Patch 2 check boot order argument validation before vm

Re: [Qemu-devel] Intel X86 hardware transactional memory

2015-02-06 Thread Peter Maydell
On 5 February 2015 at 05:09, Patrick Williams III iawil...@us.ibm.com wrote: Consider two virtual addresses that point to the same physical address. One thread uses the first virtual address in a transaction; another thread writes to the second virtual address while the transaction is going

Re: [Qemu-devel] [PATCH v4] sheepdog: selectable object size support

2015-02-06 Thread Teruaki Ishizaki
(2015/02/06 11:18), Liu Yuan wrote: On Wed, Feb 04, 2015 at 01:54:19PM +0900, Teruaki Ishizaki wrote: (2015/02/02 15:52), Liu Yuan wrote: On Tue, Jan 27, 2015 at 05:35:27PM +0900, Teruaki Ishizaki wrote: Previously, qemu block driver of sheepdog used hard-coded VDI object size. This patch

Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversion operations

2015-02-06 Thread Maciej W. Rozycki
On Fri, 6 Feb 2015, Peter Maydell wrote: What I think would make sense here is instead of say `float32_to_float64' making a call to `float64_maybe_silence_nan' directly, we'd have a static inline function or a macro called say `float64_convert_silence_nan' invoked where the former is in

[Qemu-devel] [PATCH v2 2/3] iotests: Add wait functionality to _cleanup_qemu

2015-02-06 Thread Max Reitz
The qemu process does not always need to be killed, just waiting for it can be fine, too. This introduces a way to do so. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- tests/qemu-iotests/common.qemu | 12 +++- 1 file changed, 11

Re: [Qemu-devel] [PATCH v2] blkdebug: fix once rule

2015-02-06 Thread John Snow
On 02/06/2015 04:15 PM, Max Reitz wrote: On 2015-02-06 at 13:23, John Snow wrote: Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an active list of rules to

[Qemu-devel] [PATCH 1/3] vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback

2015-02-06 Thread Paolo Bonzini
Now that vfio_put_base_device is called unconditionally at instance_finalize time, it can be called twice if vfio_populate_device fails. This works but it is slightly harder to follow. Change vfio_get_device to not touch the vbasedev struct until it will definitely succeed, moving the

Re: [Qemu-devel] [PATCH v3 0/7] cpu: add device_add foo-x86_64-cpu support

2015-02-06 Thread Jeff King
On Thu, Feb 05, 2015 at 12:17:15PM -0800, Junio C Hamano wrote: Would length() 1 be enough[1]? Or are people really typing yes and not just y? I cannot imagine a charset name that is smaller than two characters. It may be that there are none smaller than 4, and we could cut it off

[Qemu-devel] [PATCH v2 0/3] nbd: Drop BDS backpointer

2015-02-06 Thread Max Reitz
Right now, bdrv_swap() on NBD BDSs results in a segmentation fault pretty much all of the time. This series fixes this. Note that this is not a common case, as bdrv_swap() is generally only performed on root BDSs (there are exceptions, though) and NBD BDSs normally have a format BDS above them.

Re: [Qemu-devel] [PATCH v2] blkdebug: fix once rule

2015-02-06 Thread Max Reitz
On 2015-02-06 at 13:23, John Snow wrote: Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an active list of rules to be used for the forthcoming action, provided

[Qemu-devel] [PATCH v3 0/3] vfio: free data and unmap BARs in instance_finalize

2015-02-06 Thread Paolo Bonzini
Mostly the same as v2; - patch 1 makes the error paths of vfio_get_device a bit simpler - patch 2 introduces instance_finalize - patch 3 makes the freeing of BARs RCU-friendly Changes from v2: 1) not removing anymore the NULL assignment in vfio_put_base_device 2) patch 1 should goto out_put

[Qemu-devel] [PATCH 3/3] vfio: unmap and free BAR data in instance_finalize

2015-02-06 Thread Paolo Bonzini
In the case of VFIO, the unrealize callback is too early to munmap the BARs. The munmap must be delayed until memory accesses are complete. To do this, split vfio_unmap_bars in two. The removal step, now called vfio_unregister_bars, remains in vfio_exitfn. The reclamation step is

[Qemu-devel] X86 cpuid reported feature

2015-02-06 Thread Xin Tong
I am wondering why QEMU requires host CPU to support a feature for a emulated CPU to support the same feature. say i want to support intel transactional memory. I put the CPUID_7_0_EBX_RTM flag in the haswell cpu feature list. However, why do i need to put the same flag into TCG_7_0_EBX_FEATURES

[Qemu-devel] [PATCH v2 3/3] iotests: Add test for drive-mirror with NBD target

2015-02-06 Thread Max Reitz
When the drive-mirror block job is completed, it will call bdrv_swap() on the source and the target BDS; this should obviously not result in a segmentation fault. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- tests/qemu-iotests/094 | 81

[Qemu-devel] [PATCH v2 1/3] nbd: Drop BDS backpointer

2015-02-06 Thread Max Reitz
Before this patch, the opaque pointer in an NBD BDS points to a BDRVNBDState, which contains an NbdClientSession object, which in turn contains a pointer to the BDS. This pointer may become invalid due to bdrv_swap(), so drop it, and instead pass the BDS directly to the nbd-client.c functions

[Qemu-devel] [PATCH 2/3] vfio: free dynamically-allocated data in instance_finalize

2015-02-06 Thread Paolo Bonzini
In order to enable out-of-BQL address space lookup, destruction of devices needs to be split in two phases. Unrealize is the first phase; once it complete no new accesses will be started, but there may still be pending memory accesses can still be completed. The second part is freeing the

Re: [Qemu-devel] [PATCH 12/21] block: Use BlockBackend more

2015-02-06 Thread Max Reitz
On 2015-01-29 at 20:12, Eric Blake wrote: On 01/26/2015 12:27 PM, Max Reitz wrote: Replace bdrv_drain_all(), bdrv_commmit_all(), bdrv_flush_all(), bdrv_invalidate_cache_all(), bdrv_next() and occurrences of bdrv_states by their BlockBackend equivalents. Signed-off-by: Max Reitz

Re: [Qemu-devel] [PATCH v3] blkdebug: fix once rule

2015-02-06 Thread Max Reitz
On 2015-02-06 at 16:26, John Snow wrote: Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an active list of rules to be used for the forthcoming action, provided

[Qemu-devel] [PATCH] vfio: Use vfio type1 v2 IOMMU interface

2015-02-06 Thread Alex Williamson
The difference between v1 and v2 is fairly subtle, simply more deterministic behavior for unmaps. The v1 interface allows the user to attempt to unmap sub-regions of previous mappings, returning success with zero size if unable to comply. This was a reflection of the underlying IOMMU API. The

[Qemu-devel] [PATCH v3] blkdebug: fix once rule

2015-02-06 Thread John Snow
Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an active list of rules to be used for the forthcoming action, provided the events and state numbers match. Then,

[Qemu-devel] [PATCH v3 2/4] bootdevice: check boot order argument validation before vm running

2015-02-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com Either 'once' option or 'order' option can take effect for -boot at the same time, that is say initial startup processing can check only one. And pc.c's set_boot_dev() fails when its boot order argument is invalid. This patch provide a solution fix this

[Qemu-devel] [PATCH v3 1/4] bootdevice: remove the check about boot_set_handler

2015-02-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com The reset logic can be done by both machine reset and boot handler. So we shouldn't return error when the boot handler callback don't be set. Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Alexander Graf ag...@suse.de --- bootdevice.c | 10

[Qemu-devel] [PATCH v3 0/4] bootdevcie: change the boot order validation logic

2015-02-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com The reset logic can be done by both machine reset and boot handler. So we shouldn't return error when the boot handler callback don't be set in patch 1. Patch 2 check boot order argument validation before vm running. Patch 3 passing error_abort instead of

[Qemu-devel] [PATCH v3 4/4] bootdevice: update boot_order in MachineState

2015-02-06 Thread arei.gonglei
From: Dinar Valeev dval...@suse.com on sPAPR we need to update boot_order in MachineState in case it got changed on reset. Signed-off-by: Dinar Valeev dval...@suse.com Reviewed-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Gonglei arei.gong...@huawei.com --- bootdevice.c | 4 1

[Qemu-devel] [PATCH v3 3/4] bootdevice: add check in restore_boot_order()

2015-02-06 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com qemu_boot_set() can't fail in restore_boot_order(), then simply assert it doesn't fail, by passing error_abort. Signed-off-by: Gonglei arei.gong...@huawei.com --- bootdevice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootdevice.c

[Qemu-devel] [PATCH v2] Rudimentary Intel Restricted Transactional Memory Support.

2015-02-06 Thread trent . tong
From: Xin Tong trent.t...@gmail.com A better looking patch generated by git format-patch. Implement a rudimentary support for intel RTM. Xbegin always fails to fallback code path. Handle Xbegin, Xend, Xtest, Xabort described in Intel ISA extension manual @

[Qemu-devel] [PATCH v1] Rudimentary Intel Restricted Transactional Memory Support.

2015-02-06 Thread trent . tong
Implement a rudimentary support for intel RTM. Xbegin always fails to fallback code path. Handle Xbegin, Xend, Xtest, Xabort described in Intel ISA extension manual @ http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf

Re: [Qemu-devel] [PATCH v3 0/3] vfio: free data and unmap BARs in instance_finalize

2015-02-06 Thread Alex Williamson
On Fri, 2015-02-06 at 22:15 +0100, Paolo Bonzini wrote: Mostly the same as v2; We've got something screwy going on with MemoryListeners, I did some hotplug testing with this and I hit the following segfault: Program received signal SIGSEGV, Segmentation fault. 0x7ff7bd8f7416 in

Re: [Qemu-devel] [RFC PATCH v2 09/11] hw/arm/virt-acpi-build: Generate XSDT table

2015-02-06 Thread Shannon Zhao
On 2015/2/4 0:51, Laszlo Ersek wrote: On 02/03/15 17:19, Igor Mammedov wrote: On Thu, 29 Jan 2015 16:37:11 +0800 Shannon Zhao zhaoshengl...@huawei.com wrote: XDST points to other tables except FACS DSDT. Is there any reason to use XSDT instead of RSDT? If ACPI tables are below 4Gb which

Re: [Qemu-devel] [PATCH v2 2/3] bootdevice: check boot order argument validation before vm running

2015-02-06 Thread Markus Armbruster
arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com Either 'once' option or 'order' option can take effect for -boot at the same time, that is say initial startup processing can check only one. And pc.c's set_boot_dev() fails when its boot order argument is invalid. This

Re: [Qemu-devel] value of VIRTQUEUE_MAX_SIZE

2015-02-06 Thread Stefan Hajnoczi
On Thu, Feb 05, 2015 at 03:29:17PM +0100, Peter Lieven wrote: Am 05.02.2015 um 15:00 schrieb Stefan Hajnoczi: On Fri, Jan 30, 2015 at 10:08:02PM +0100, Peter Lieven wrote: Just wondering if VIRTQUEUE_MAX_SIZE in include/hw/virtio/virtio.h should not be equal to IOV_MAX instead of the

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-06 Thread Kevin Wolf
Am 06.02.2015 um 10:44 hat Alberto Garcia geschrieben: On Thu, Feb 05, 2015 at 03:17:19PM +0100, Kevin Wolf wrote: By never allowing the hit count to go down to zero, we make sure that all unused entries are chosen first before a valid one is discarded. But does this actually

Re: [Qemu-devel] [PATCH 1/1] nbd: fix max_discard/max_transfer_length

2015-02-06 Thread Denis V. Lunev
On 06/02/15 14:53, Kevin Wolf wrote: Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben: nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t as the length in bytes of the data to discard due to the following definition: struct nbd_request { uint32_t magic;

Re: [Qemu-devel] [PATCH v2 2/3] bootdevice: check boot order argument validation before vm running

2015-02-06 Thread Gonglei
On 2015/2/6 17:06, Markus Armbruster wrote: arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com Either 'once' option or 'order' option can take effect for -boot at the same time, that is say initial startup processing can check only one. And pc.c's set_boot_dev() fails

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-06 Thread Alberto Garcia
On Thu, Feb 05, 2015 at 03:17:19PM +0100, Kevin Wolf wrote: By never allowing the hit count to go down to zero, we make sure that all unused entries are chosen first before a valid one is discarded. But does this actually improve a lot? cache_hits is only 0 for the first few accesses

[Qemu-devel] [PATCH 1/1] nbd: fix max_discard/max_transfer_length

2015-02-06 Thread Denis V. Lunev
nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t as the length in bytes of the data to discard due to the following definition: struct nbd_request { uint32_t magic; uint32_t type; uint64_t handle; uint64_t from; uint32_t len; -- the length of data to be

Re: [Qemu-devel] [PATCH V2] block: introduce BDRV_REQUEST_MAX_SECTORS

2015-02-06 Thread Denis V. Lunev
On 06/02/15 13:54, Peter Lieven wrote: we check and adjust request sizes at several places with sometimes inconsistent checks or default values: INT_MAX INT_MAX BDRV_SECTOR_BITS UINT_MAX BDRV_SECTOR_BITS SIZE_MAX BDRV_SECTOR_BITS This patches introdocues a macro for the maximal

Re: [Qemu-devel] [PATCH v2 10/19] qtest/ahci: add ahci_write_fis

2015-02-06 Thread Stefan Hajnoczi
On Thu, Feb 05, 2015 at 11:19:16AM -0500, John Snow wrote: On 02/05/2015 08:29 AM, Stefan Hajnoczi wrote: On Tue, Feb 03, 2015 at 04:46:30PM -0500, John Snow wrote: Similar to ahci_set_command_header, add a helper that takes an in-memory representation of a command FIS and writes it to

Re: [Qemu-devel] [PATCH] block: introduce BDRV_REQUEST_MAX_SECTORS

2015-02-06 Thread Denis V. Lunev
On 06/02/15 11:49, Peter Lieven wrote: Am 03.02.2015 um 16:33 schrieb Denis V. Lunev: On 03/02/15 17:30, Peter Lieven wrote: Am 03.02.2015 um 14:29 schrieb Denis V. Lunev: On 03/02/15 15:12, Peter Lieven wrote: we check and adjust request sizes at several places with sometimes inconsistent

Re: [Qemu-devel] [v4 03/13] migration: Add the framework of multi-thread decompression

2015-02-06 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: Add the code to create and destroy the multiple threads those will be used to do data decompression. Left some functions empty just to keep clearness, and the code will be added later. Reviewed-by: Dr. David Alan Gilbert dgilb...@redhat.com

Re: [Qemu-devel] [PATCH v2 1/1] Print PID and time in stderr traces

2015-02-06 Thread Stefan Hajnoczi
On Tue, Jan 20, 2015 at 09:41:15AM +, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com When debugging migration it's useful to know the PID of each trace message so you can figure out if it came from the source or the destination. Printing the time

Re: [Qemu-devel] value of VIRTQUEUE_MAX_SIZE

2015-02-06 Thread Peter Lieven
Am 06.02.2015 um 11:42 schrieb Stefan Hajnoczi: On Thu, Feb 05, 2015 at 03:29:17PM +0100, Peter Lieven wrote: Am 05.02.2015 um 15:00 schrieb Stefan Hajnoczi: On Fri, Jan 30, 2015 at 10:08:02PM +0100, Peter Lieven wrote: Just wondering if VIRTQUEUE_MAX_SIZE in include/hw/virtio/virtio.h should

Re: [Qemu-devel] [v4 05/13] arch_init: Alloc and free data struct for compression

2015-02-06 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: Define the data structure and variables used to do multiple thread compression, and add the code to initialize and free them. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com Reviewed-by: Dr. David Alan

[Qemu-devel] [PATCH V2] block: introduce BDRV_REQUEST_MAX_SECTORS

2015-02-06 Thread Peter Lieven
we check and adjust request sizes at several places with sometimes inconsistent checks or default values: INT_MAX INT_MAX BDRV_SECTOR_BITS UINT_MAX BDRV_SECTOR_BITS SIZE_MAX BDRV_SECTOR_BITS This patches introdocues a macro for the maximal allowed sectors per request and uses it at several

Re: [Qemu-devel] [PATCH 1/1] nbd: fix max_discard/max_transfer_length

2015-02-06 Thread Kevin Wolf
Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben: nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t as the length in bytes of the data to discard due to the following definition: struct nbd_request { uint32_t magic; uint32_t type; uint64_t handle;

Re: [Qemu-devel] [PATCH] block: introduce BDRV_REQUEST_MAX_SECTORS

2015-02-06 Thread Peter Lieven
Am 03.02.2015 um 16:33 schrieb Denis V. Lunev: On 03/02/15 17:30, Peter Lieven wrote: Am 03.02.2015 um 14:29 schrieb Denis V. Lunev: On 03/02/15 15:12, Peter Lieven wrote: we check and adjust request sizes at several places with sometimes inconsistent checks or default values: INT_MAX

Re: [Qemu-devel] [v4 06/13] arch_init: Add and free data struct for decompression

2015-02-06 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: Define the data structure and variables used to do multiple thread decompression, and add the code to initialize and free them. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH v2 1/3] bootdevice: remove the check about boot_set_handler

2015-02-06 Thread Markus Armbruster
arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com The reset logic can be done by both machine reset and boot handler. So we shouldn't return error when the boot handler callback don't be set. Signed-off-by: Gonglei arei.gong...@huawei.com Reviewed-by: Alexander Graf

Re: [Qemu-devel] [PATCH v2 1/3] bootdevice: remove the check about boot_set_handler

2015-02-06 Thread Gonglei
On 2015/2/6 16:56, Markus Armbruster wrote: arei.gong...@huawei.com writes: From: Gonglei arei.gong...@huawei.com The reset logic can be done by both machine reset and boot handler. So we shouldn't return error when the boot handler callback don't be set. Signed-off-by: Gonglei

Re: [Qemu-devel] [PULL 00/10] Migration queue

2015-02-06 Thread Peter Maydell
On 5 February 2015 at 16:24, Juan Quintela quint...@redhat.com wrote: Hi This is the migration queue. Thanks to Amit for doing almost all the work. There were a Makefile missing dependency to make test-vmstate compile with the json changes, Alex agreed with the changes. List of things:

Re: [Qemu-devel] [v4 07/13] migration: Split the function ram_save_page

2015-02-06 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: Split the function ram_save_page for code reuse purpose. That's better, but I still think there is an XBZRLE problem; see below. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- arch_init.c | 102

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

2015-02-06 Thread Peter Maydell
On 6 February 2015 at 13:45, Stefan Hajnoczi stefa...@redhat.com wrote: The following changes since commit 16017c48547960539fcadb1f91d252124f442482: softfloat: Clarify license status (2015-01-29 16:45:45 +) are available in the git repository at: git://github.com/stefanha/qemu.git

Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversion operations

2015-02-06 Thread Maciej W. Rozycki
On Thu, 5 Feb 2015, Peter Maydell wrote: Fix sNaN handling in floating-point format conversion operations, that are classified by the IEEE 754-2008 standard as general-computational operations [1]: 5.4 formatOf general-computational operations 5.4.2 Conversion operations for

[Qemu-devel] [PATCH] bitops.h: sextract64() return type should be int64_t, not uint64_t

2015-02-06 Thread Peter Maydell
The documentation for sextract64() claims that the return type is an int64_t, but the code itself disagrees. Fix the return type to conform to the documentation and to bring it into line with sextract32(), which returns int32_t. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- I quickly

Re: [Qemu-devel] [PATCH 1/4] monitor: print hub port name during info network

2015-02-06 Thread Stefan Hajnoczi
On Mon, Feb 02, 2015 at 03:06:35PM +0800, Jason Wang wrote: Signed-off-by: Jason Wang jasow...@redhat.com --- net/hub.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan pgpS_3oP0TnC2.pgp

Re: [Qemu-devel] [PATCH 3/4] net: del hub port when peer is deleted

2015-02-06 Thread Stefan Hajnoczi
On Fri, Feb 06, 2015 at 09:37:54AM +0008, Jason Wang wrote: On Thu, Feb 5, 2015 at 10:25 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Feb 02, 2015 at 03:06:37PM +0800, Jason Wang wrote: We should del hub port when peer is deleted since it will not be reused and will only be freed

Re: [Qemu-devel] [PATCH v2] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-06 Thread Kevin Wolf
Am 05.02.2015 um 16:58 hat Max Reitz geschrieben: qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: Max Reitz mre...@redhat.com --- v2: - s/free_cluster_index/free_byte_index/ [Eric] - added an assertion at

[Qemu-devel] [PULL 0/6] Net patches

2015-02-06 Thread Stefan Hajnoczi
The following changes since commit 16017c48547960539fcadb1f91d252124f442482: softfloat: Clarify license status (2015-01-29 16:45:45 +) are available in the git repository at: git://github.com/stefanha/qemu.git tags/net-pull-request for you to fetch changes up to

[Qemu-devel] [PULL 3/6] monitor: print hub port name during info network

2015-02-06 Thread Stefan Hajnoczi
From: Jason Wang jasow...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Message-id: 1422860798-17495-1-git-send-email-jasow...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- net/hub.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/hub.c

[Qemu-devel] [PULL 1/6] MAINTAINERS: add Jason Wang as net subsystem maintainer

2015-02-06 Thread Stefan Hajnoczi
Jason Wang will be co-maintaining the QEMU net subsystem with me. He has contributed improvements and reviewed patches over the past years as part of working on virtio-net and virtualized networking. Jason has already been backing me up with patch reviews. For the time being I will continue to

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-06 Thread Kevin Wolf
Am 05.02.2015 um 13:55 hat Alberto Garcia geschrieben: The current algorithm to replace entries from the L2 cache gives priority to newer hits by dividing the hit count of all existing entries by two everytime there is a cache miss. However, if there are several cache misses the hit count of

[Qemu-devel] [PULL 4/6] net: remove the wrong comment in net_init_hubport()

2015-02-06 Thread Stefan Hajnoczi
From: Jason Wang jasow...@redhat.com Not only nic could be the one to peer. Signed-off-by: Jason Wang jasow...@redhat.com Message-id: 1422860798-17495-2-git-send-email-jasow...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- net/hub.c | 1 - 1 file changed, 1 deletion(-) diff

[Qemu-devel] [PULL 2/6] rtl8139: simplify timer logic

2015-02-06 Thread Stefan Hajnoczi
From: Paolo Bonzini pbonz...@redhat.com Pavel Dovgalyuk reports that TimerExpire and the timer are not restored correctly on the receiving end of migration. It is not clear to me whether this is really the case, but we can take the occasion to get rid of the complicated code that computes

[Qemu-devel] [PULL 5/6] net: del hub port when peer is deleted

2015-02-06 Thread Stefan Hajnoczi
From: Jason Wang jasow...@redhat.com We should del hub port when peer is deleted since it will not be reused and will only be freed during exit. Signed-off-by: Jason Wang jasow...@redhat.com Message-id: 1422860798-17495-3-git-send-email-jasow...@redhat.com Signed-off-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v2] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-06 Thread Max Reitz
On 2015-02-06 at 09:08, Kevin Wolf wrote: Am 05.02.2015 um 16:58 hat Max Reitz geschrieben: qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: Max Reitz mre...@redhat.com --- v2: -

[Qemu-devel] [PULL 6/6] monitor: more accurate completion for host_net_remove()

2015-02-06 Thread Stefan Hajnoczi
From: Jason Wang jasow...@redhat.com Current completion for host_net_remove will show hub ports and clients that were not peered with hub ports. Fix this. Cc: Luiz Capitulino lcapitul...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Message-id:

[Qemu-devel] [PATCH 0/4] target-arm: fix various clang UB sanitizer warnings

2015-02-06 Thread Peter Maydell
This patchset fixes a collection of warnings emitted by the clang undefined behaviour sanitizer in the course of booting an AArch64 Linux guest to a shell prompt. These are all various kinds of bad shift (shifting into the sign bit, left shifting negative values, shifting by more than the size of

[Qemu-devel] [PATCH 1/4] target-arm: A64: Fix shifts into sign bit

2015-02-06 Thread Peter Maydell
Fix attempts to shift into the sign bit of an int, which is undefined behaviour in C and warned about by the clang sanitizer. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 3/4] target-arm: A64: Avoid left shifting negative integers in disas_pc_rel_addr

2015-02-06 Thread Peter Maydell
Shifting a negative integer left is undefined behaviour in C. Avoid it by assembling and shifting the offset fields as unsigned values and then sign extending as the final action. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/translate-a64.c | 5 +++-- 1 file changed, 3

[Qemu-devel] [PATCH 2/2] openpic: convert to vmstate

2015-02-06 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland mark.cave-ayl...@ilande.co.uk --- hw/intc/openpic.c | 253 + 1 file changed, 119 insertions(+), 134 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 2a3144f..1ceac97 100644 ---

[Qemu-devel] [PATCH 0/2] openpic: convert to vmstate

2015-02-06 Thread Mark Cave-Ayland
This patchset follows on from my ppc loadvm/savevm work and converts openpic over to vmstate. With these patches applied, I can successfully a savevm/loadvm pair under -M mac99 within OpenBIOS, the same result as with the previous patchset applied. Alex: if you're happy with this, I could fixup

[Qemu-devel] [PATCH 1/2] openpic: switch IRQQueue queue from inline to bitmap

2015-02-06 Thread Mark Cave-Ayland
This is in preparation for using VMSTATE_BITMAP in a followup vmstate migration patch. Signed-off-by: Mark Cave-Ayland mark.cave-ayl...@ilande.co.uk --- hw/intc/openpic.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/hw/intc/openpic.c

Re: [Qemu-devel] [PATCH v11 12/13] qemu-iotests: Add tests for drive-backup sync=dirty-bitmap

2015-02-06 Thread Vladimir Sementsov-Ogievskiy
On 12.01.2015 19:31, John Snow wrote: From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- tests/qemu-iotests/056| 33 ++--- tests/qemu-iotests/056.out| 4 ++--

Re: [Qemu-devel] [PATCH] net: synchronize net_host_device_remove with host_net_remove_completion

2015-02-06 Thread Paolo Bonzini
On 06/02/2015 14:54, Stefan Hajnoczi wrote: On Mon, Jan 19, 2015 at 12:27:11PM +0100, Paolo Bonzini wrote: On 02/01/2015 17:20, Paolo Bonzini wrote: The assert can be dropped completely since the code already has an equivalent assert: queues = qemu_find_net_clients_except(nc-name, ncs,

Re: [Qemu-devel] [PATCH] rtl8139: simplify timer logic

2015-02-06 Thread Stefan Hajnoczi
On Tue, Jan 20, 2015 at 03:44:59PM +0100, Paolo Bonzini wrote: Pavel Dovgalyuk reports that TimerExpire and the timer are not restored correctly on the receiving end of migration. It is not clear to me whether this is really the case, but we can take the occasion to get rid of the

[Qemu-devel] [PATCH 2/4] target-arm: A64: Fix handling of rotate in logic_imm_decode_wmask

2015-02-06 Thread Peter Maydell
The code in logic_imm_decode_wmask attempts to rotate a mask value within the bottom 'e' bits of the value with mask = (mask r) | (mask (e - r)); This has two issues: * if the element size is 64 then a rotate by zero results in a shift left by 64, which is undefined behaviour * if the

[Qemu-devel] [PATCH 4/4] target-arm: A64: Avoid signed shifts in disas_ldst_pair()

2015-02-06 Thread Peter Maydell
Avoid shifting potentially negative signed offset values in disas_ldst_pair() by keeping the offset in a uint64_t rather than an int64_t. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v3] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-06 Thread Max Reitz
qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: Max Reitz mre...@redhat.com --- v3: - Use alloc_clusters_noref() and update_refcount() [Kevin] - Only modify s-free_byte_offset if the function is successful; this is

Re: [Qemu-devel] [PATCH 1/7] softfloat: Fix sNaN handling in FP conversion operations

2015-02-06 Thread Peter Maydell
On 6 February 2015 at 14:37, Maciej W. Rozycki ma...@linux-mips.org wrote: On Thu, 5 Feb 2015, Peter Maydell wrote: Have you looked at the other architectures that use these functions to convert float values to see what their NaN handling semantics are? I agree about what the spec says, but

Re: [Qemu-devel] [PATCH 3/4] net: del hub port when peer is deleted

2015-02-06 Thread Jason Wang
On Thu, Feb 5, 2015 at 10:25 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Feb 02, 2015 at 03:06:37PM +0800, Jason Wang wrote: We should del hub port when peer is deleted since it will not be reused and will only be freed during exit. Signed-off-by: Jason Wang

Re: [Qemu-devel] [v4 02/13] migration: Add the framework of multi-thread compression

2015-02-06 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: Add the code to create and destroy the multiple threads those will be used to do data compression. Left some functions empty to keep clearness, and the code will be added later. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang

Re: [Qemu-devel] [v4 04/13] qemu-file: Add compression functions to QEMUFile

2015-02-06 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: qemu_put_compression_data() compress the data and put it to QEMUFile. qemu_put_qemu_file() put the data in the buffer of source QEMUFile to destination QEMUFile. Signed-off-by: Liang Li liang.z...@intel.com Signed-off-by: Yang Zhang

Re: [Qemu-devel] [PATCH 1/5] virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX

2015-02-06 Thread Cornelia Huck
On Fri, 6 Feb 2015 15:54:09 +0800 Jason Wang jasow...@redhat.com wrote: VIRTIO_PCI_QUEUE_MAX was not specific to pci, so rename it to VIRTIO_QUEUE_MAX. Cc: Amit Shah amit.s...@redhat.com Cc: Anthony Liguori aligu...@amazon.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Alexander Graf

Re: [Qemu-devel] [PATCH 1/1] nbd: fix max_discard/max_transfer_length

2015-02-06 Thread Peter Lieven
Am 06.02.2015 um 12:59 schrieb Denis V. Lunev: On 06/02/15 14:53, Kevin Wolf wrote: Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben: nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t as the length in bytes of the data to discard due to the following definition:

Re: [Qemu-devel] [PATCH 2/2] e1000: unconditionally enable bus mastering

2015-02-06 Thread Stefan Hajnoczi
On Wed, Jan 07, 2015 at 04:08:29PM +, Stefan Hajnoczi wrote: On Thu, Dec 18, 2014 at 05:22:19PM +0800, Amos Kong wrote: After enabled network debug of e1000 in Win2012-64r2 guest, Bus mastering of e1000 can't be enabled by e1000 driver. It caused guest can't get IP address. #

Re: [Qemu-devel] [PATCH 0/3] softfloat: Remove STATUS macros

2015-02-06 Thread Peter Maydell
On 2 February 2015 at 21:37, Richard Henderson r...@twiddle.net wrote: On 02/02/2015 12:31 PM, Peter Maydell wrote: Peter Maydell (3): softfloat: Expand out the STATUS_PARAM macro softfloat: expand out STATUS_VAR softfloat: expand out STATUS macro fpu/softfloat-specialize.h | 124

Re: [Qemu-devel] [PATCH 1/2] target-i386: Simplify listflags() function

2015-02-06 Thread Paolo Bonzini
On 03/02/2015 19:08, Eduardo Habkost wrote: listflags() had lots of unnecessary complexity. Instead of printing to a buffer that will be immediately printed, simply call the printing function directly. Also, remove the fbits and flags arguments that were always set to the same value. Also,

Re: [Qemu-devel] [PATCH 0/4] target-arm: fix various clang UB sanitizer warnings

2015-02-06 Thread Greg Bellows
On Fri, Feb 6, 2015 at 8:34 AM, Peter Maydell peter.mayd...@linaro.org wrote: This patchset fixes a collection of warnings emitted by the clang undefined behaviour sanitizer in the course of booting an AArch64 Linux guest to a shell prompt. These are all various kinds of bad shift (shifting

Re: [Qemu-devel] [PATCH 1/1] nbd: fix max_discard/max_transfer_length

2015-02-06 Thread Kevin Wolf
Am 06.02.2015 um 12:59 hat Denis V. Lunev geschrieben: On 06/02/15 14:53, Kevin Wolf wrote: Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben: nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t as the length in bytes of the data to discard due to the following

Re: [Qemu-devel] [PATCH v3] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-06 Thread Eric Blake
On 02/06/2015 07:39 AM, Max Reitz wrote: qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: Max Reitz mre...@redhat.com --- v3: - Use alloc_clusters_noref() and update_refcount() [Kevin] Ouch. Not done quite

Re: [Qemu-devel] [PATCH v2 0/1] dataplane vs. endianness

2015-02-06 Thread Stefan Hajnoczi
On Mon, Jan 26, 2015 at 05:26:41PM +0100, Cornelia Huck wrote: Stefan: Here's v2 of my endianness patch for dataplane, with the extraneous vdev argument dropped from get_desc(). I orginally planned to send my virtio-1 patchset as well, but I haven't found the time for it; therefore, I

Re: [Qemu-devel] Google Summer of Code 2015 - Implement Mac OS 9 support

2015-02-06 Thread Stefan Hajnoczi
On Thu, Feb 05, 2015 at 11:07:40AM -0500, Programmingkid wrote: Implement support for Mac OS 9 in QEMU. QEMU has gone a long way in emulating a Macintosh. But we can still improve. Adding support for Mac OS 9 would be a great imporovement. This would allow everyone who misses their older

Re: [Qemu-devel] [PATCH v3] qcow2: Rewrite qcow2_alloc_bytes()

2015-02-06 Thread Kevin Wolf
Am 06.02.2015 um 16:31 hat Eric Blake geschrieben: On 02/06/2015 08:27 AM, Eric Blake wrote: -/* The cluster refcount was incremented, either by qcow2_alloc_clusters() - * or explicitly by qcow2_update_cluster_refcount(). Refcount blocks must - * be flushed before

Re: [Qemu-devel] [PATCH 2/5] virtio: increase VIRITO_QUEUE_MAX to 513

2015-02-06 Thread Stefan Hajnoczi
On Fri, Feb 06, 2015 at 03:54:10PM +0800, Jason Wang wrote: Subject has a typo s/VIRITIO/VIRTIO/ Recent linux kernel supports up to 256 tap queues. Increase the limit to 513 (256 * 2 + 1(ctrl vq)). For other reviewers: sizeof(VirtQueue) on x86_64 is 88 bytes. We waste memory but it's only on

[Qemu-devel] [PULL 15/42] virtio-blk: introduce multiread

2015-02-06 Thread Kevin Wolf
From: Peter Lieven p...@kamp.de this patch finally introduces multiread support to virtio-blk. While multiwrite support was there for a long time, read support was missing. The complete merge logic is moved into virtio-blk.c which has been the only user of request merging ever since. This is

[Qemu-devel] [PULL 08/42] block: use fallocate(FALLOC_FL_PUNCH_HOLE) fallocate(0) to write zeroes

2015-02-06 Thread Kevin Wolf
From: Denis V. Lunev d...@openvz.org This sequence works efficiently if FALLOC_FL_ZERO_RANGE is not supported. Unfortunately, FALLOC_FL_ZERO_RANGE is supported on really modern systems and only for a couple of filesystems. FALLOC_FL_PUNCH_HOLE is much more mature. The sequence of 2 operations

[Qemu-devel] [PULL 05/42] block/raw-posix: refactor handle_aiocb_write_zeroes a bit

2015-02-06 Thread Kevin Wolf
From: Denis V. Lunev d...@openvz.org move code dealing with a block device to a separate function. This will allow to implement additional processing for ordinary files. Please note, that xfs_code has been moved before checking for s-has_write_zeroes as xfs_write_zeroes does not touch this flag

[Qemu-devel] [PULL 11/42] qed: Really remove unused field QEDAIOCB.finished

2015-02-06 Thread Kevin Wolf
From: Fam Zheng f...@redhat.com The commit 533ffb17a that removed qed_aiocb_info.cancel said to remove this but didn't do it. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qed.h | 1 - 1 file changed, 1 deletion(-) diff --git a/block/qed.h

[Qemu-devel] [PULL 06/42] block: use fallocate(FALLOC_FL_ZERO_RANGE) in handle_aiocb_write_zeroes

2015-02-06 Thread Kevin Wolf
From: Denis V. Lunev d...@openvz.org This efficiently writes zeroes on Linux if the kernel is capable enough. FALLOC_FL_ZERO_RANGE correctly handles all cases, including and not including file expansion. CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com CC: Peter Lieven

  1   2   3   >