Re: [Qemu-devel] [PATCH] numa: fix qerror_report_err not free issue

2014-08-29 Thread Li Liu
On 2014/8/30 13:26, Michael Tokarev wrote: > 30.08.2014 07:36, john.liuli wrote: >> From: Li Liu >> >> All qerror_report_err returned none NULL pointers need to >> be freed, otherwise will cause memory leaking. >> >> Although this place did not cause real memory leaking by exit, >> obviously it'

[Qemu-devel] [PATCH] hypervisor property clashes with hypervisor node

2014-08-29 Thread Anton Blanchard
dtc fails on a recent QEMU snapshot: ERROR (name_properties): "name" property in /hypervisor#1 is incorrect ("hypervisor" instead of base node name) Looking at the device tree we have a hypervisor property: # lsprop hypervisor hypervisor "kvm" But we also have a hypervisor node, with a n

Re: [Qemu-devel] [PATCH] numa: fix qerror_report_err not free issue

2014-08-29 Thread Gonglei (Arei)
> -Original Message- > From: qemu-devel-bounces+arei.gonglei=huawei@nongnu.org > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Michael Tokarev > Sent: Saturday, August 30, 2014 1:26 PM > To: Liuli (I) > Cc: qemu-triv...@nongnu.org; qemu-devel@nongnu.org >

Re: [Qemu-devel] [PATCH] numa: fix qerror_report_err not free issue

2014-08-29 Thread Michael Tokarev
30.08.2014 07:36, john.liuli wrote: > From: Li Liu > > All qerror_report_err returned none NULL pointers need to > be freed, otherwise will cause memory leaking. > > Although this place did not cause real memory leaking by exit, > obviously it's not correct to use qerror_report_err > without err

[Qemu-devel] [PATCH] numa: fix qerror_report_err not free issue

2014-08-29 Thread john.liuli
From: Li Liu All qerror_report_err returned none NULL pointers need to be freed, otherwise will cause memory leaking. Although this place did not cause real memory leaking by exit, obviously it's not correct to use qerror_report_err without error_free it. Signed-off-by: Li Liu --- numa.c |

Re: [Qemu-devel] [PATCH target-arm v4 0/7] target-arm: Extend PMCCNTR for ARMv8

2014-08-29 Thread Peter Crosthwaite
On Fri, Aug 29, 2014 at 11:46 PM, Peter Maydell wrote: > On 26 August 2014 05:09, Peter Crosthwaite > wrote: >> This patch series continues on from Alistairs original PMCCNTR patch >> work. The counter is extended to 64-bit. >> >> V4: >> - Drop all EL awareness. >> V3: >> -Tidy up the arm_ccnt

Re: [Qemu-devel] [PATCH 01/12] spapr: populate DRC entries for root dt node

2014-08-29 Thread Alexander Graf
On 29.08.14 20:27, Tyrel Datwyler wrote: > On 08/26/2014 08:25 AM, Michael Roth wrote: >> Quoting Alexey Kardashevskiy (2014-08-26 03:24:08) >>> On 08/26/2014 05:55 PM, Alexey Kardashevskiy wrote: On 08/19/2014 10:21 AM, Michael Roth wrote: > From: Nathan Fontenot > > This add e

Re: [Qemu-devel] [PATCH 1/2] qcow2: Drop REFCOUNT_SHIFT

2014-08-29 Thread Eric Blake
On 08/29/2014 03:45 PM, Max Reitz wrote: > With BDRVQcowState.refcount_block_bits, we don't need REFCOUNT_SHIFT > anymore. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 32 ++-- > block/qcow2.c | 2 +- > block/qcow2.h | 2 -- > 3 fi

Re: [Qemu-devel] [PATCH v5 01/11] qcow2: Calculate refcount block entry count

2014-08-29 Thread Eric Blake
On 08/29/2014 03:40 PM, Max Reitz wrote: > The size of a refblock entry is (in theory) variable; calculate > therefore the number of entries per refblock and the according bit shift > (1 << x == entry count) when opening an image. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 2 ++ > bloc

Re: [Qemu-devel] [PATCH v2 4/8] target-i386: x87 exception pointers using TCG.

2014-08-29 Thread Richard Henderson
On 08/28/2014 01:44 PM, Jaume Marti Farriol wrote: > Hello, > > This patch contains a required modification due to the change of the size > from 16 bits to 32 bits of the fpop variable in the CPUX86State struct. Likewise not splittable from patch 1. r~

Re: [Qemu-devel] [PATCH v2 3/8] target-i386: x87 exception pointers using TCG.

2014-08-29 Thread Richard Henderson
On 08/28/2014 01:44 PM, Jaume Marti Farriol wrote: > This patch includes changes in the helper parameters, for the instructions > involved in saving to memory and restoring the x87 exception pointers. > The changes are to include a new parameter to indicate if the processor is > running in protec

[Qemu-devel] [RFC] mmap of BAR0 fails for ivshmem device

2014-08-29 Thread Cam Macdonell
Hello, A bug was reported to me regarding mmaping of BAR0 in ivshmem. Indeed the mmap fails. This bug will affect those using the ivshmem server as BAR0 contains the registers for sending and receiving interrupts. It does not affect those mapping just the shared memory region. I have bisected

Re: [Qemu-devel] [PATCH v2 2/8] target-i386: x87 exception pointers using TCG.

2014-08-29 Thread Richard Henderson
On 08/28/2014 01:44 PM, Jaume Marti Farriol wrote: > -void helper_fstenv(CPUX86State *env, target_ulong ptr, int data32) > +void helper_fstenv(CPUX86State *env, target_ulong ptr, int data32, > + int protected_mode) You ought not need two arguments here. All of the formats are mu

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-29 Thread Benoît Canet
The Friday 29 Aug 2014 à 15:36:41 (-0700), Andy Grover wrote : > On 08/29/2014 11:51 AM, Benoît Canet wrote: > >QMP is just a way to control QEMU via a socket: it is not particularly block > >related. > > > >On the other hand bringing the whole block layers into a tcmu-runner handler > >would mean

Re: [Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-08-29 Thread Eric Blake
On 08/29/2014 03:45 PM, Max Reitz wrote: > A refblock entry may have a different size than 16 bits, it may even be > smaller than a byte. Correct the refcount_block_entries calculation > accordingly. > > Signed-off-by: Max Reitz > --- > docs/specs/qcow2.txt | 2 +- > 1 file changed, 1 insertion(

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-29 Thread Andy Grover
On 08/29/2014 11:51 AM, Benoît Canet wrote: QMP is just a way to control QEMU via a socket: it is not particularly block related. On the other hand bringing the whole block layers into a tcmu-runner handler would mean that there would be _one_ QMP socket opened (by mean of wonderfull QEMU modul

Re: [Qemu-devel] [PATCH v2 1/8] target-i386: x87 exception pointers using TCG.

2014-08-29 Thread Richard Henderson
On 08/28/2014 01:44 PM, Jaume Marti Farriol wrote: > -void cpu_x86_fsave(CPUX86State *s, target_ulong ptr, int data32); > -void cpu_x86_frstor(CPUX86State *s, target_ulong ptr, int data32); > +void cpu_x86_fsave(CPUX86State *s, target_ulong ptr); > +void cpu_x86_frstor(CPUX86State *s, target_ulong

[Qemu-devel] [PATCH 0/2] qcow2: Drop REFCOUNT_SHIFT

2014-08-29 Thread Max Reitz
In preparation for qemu maybe actually supporting variable refcount widths in the far future, drop the hardcoded REFCOUNT_SHIFT and instead use the value as given by the image. Also, the qcow2 documentation gave the width of a refcount block entry as sizeof(uint16_t), which is wrong for any refcou

[Qemu-devel] [PATCH v5 11/11] iotests: Add test for potentially damaging repairs

2014-08-29 Thread Max Reitz
There are certain cases where repairing a qcow2 image might actually damage it further (or rather, where repairing it has in fact damaged it further with the old qcow2 check implementation). This should not happen, so add a test for these cases. Furthermore, the repair function now repairs refbloc

[Qemu-devel] [PATCH 1/2] qcow2: Drop REFCOUNT_SHIFT

2014-08-29 Thread Max Reitz
With BDRVQcowState.refcount_block_bits, we don't need REFCOUNT_SHIFT anymore. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 32 ++-- block/qcow2.c | 2 +- block/qcow2.h | 2 -- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git

[Qemu-devel] [PATCH v5 07/11] qcow2: Do not perform potentially damaging repairs

2014-08-29 Thread Max Reitz
If a referenced cluster has a refcount of 0, increasing its refcount may result in clusters being allocated for the refcount structures. This may overwrite the referenced cluster, therefore we cannot simply increase the refcount then. In such cases, we can either try to replicate all the refcount

[Qemu-devel] [PATCH 2/2] docs/qcow2: Correct refcount_block_entries

2014-08-29 Thread Max Reitz
A refblock entry may have a different size than 16 bits, it may even be smaller than a byte. Correct the refcount_block_entries calculation accordingly. Signed-off-by: Max Reitz --- docs/specs/qcow2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/qcow2.txt b/do

[Qemu-devel] [PATCH v5 10/11] iotests: Fix test outputs

2014-08-29 Thread Max Reitz
039, 060 and 061 all create images with referenced clusters having a refcount of 0. Because previous commits changed handling of such errors, these tests now have a different output. Fix it. Furthermore, 060 created a refblock with a refcount greater than one which now results in having to rebuild

[Qemu-devel] [PATCH v5 09/11] qcow2: Clean up after refcount rebuild

2014-08-29 Thread Max Reitz
Because the old refcount structure will be leaked after having rebuilt it, we need to recalculate the refcounts and run a leak-fixing operation afterwards (if leaks should be fixed at all). Signed-off-by: Max Reitz Reviewed-by: Benoît Canet --- block/qcow2-refcount.c | 35 ++

[Qemu-devel] [PATCH v5 04/11] qcow2: Pull check_refblocks() up

2014-08-29 Thread Max Reitz
Pull check_refblocks() before calculate_refcounts() so we can drop its static declaration. Signed-off-by: Max Reitz Reviewed-by: Benoît Canet --- block/qcow2-refcount.c | 102 - 1 file changed, 49 insertions(+), 53 deletions(-) diff --git a/block

[Qemu-devel] [PATCH v5 08/11] qcow2: Rebuild refcount structure during check

2014-08-29 Thread Max Reitz
The previous commit introduced the "rebuild" variable to qcow2's implementation of the image consistency check. Now make use of this by adding a function which creates a completely new refcount structure based solely on the in-memory information gathered before. The old refcount structure will be

[Qemu-devel] [PATCH v5 05/11] qcow2: Reuse refcount table in calculate_refcounts()

2014-08-29 Thread Max Reitz
We will later call calculate_refcounts multiple times, so reuse the refcount table if possible. Signed-off-by: Max Reitz Reviewed-by: Benoît Canet --- block/qcow2-refcount.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-ref

[Qemu-devel] [PATCH v5 00/11] qcow2: Fix image repairing

2014-08-29 Thread Max Reitz
As can be seen in the final patch of this series, there are certain cases where the current repair implementation of qcow2 actually damages the image further because it allocates new clusters for the refcount structure which overlap with existing but according to the on-disk refcounts (which are as

[Qemu-devel] [PATCH v5 01/11] qcow2: Calculate refcount block entry count

2014-08-29 Thread Max Reitz
The size of a refblock entry is (in theory) variable; calculate therefore the number of entries per refblock and the according bit shift (1 << x == entry count) when opening an image. Signed-off-by: Max Reitz --- block/qcow2.c | 2 ++ block/qcow2.h | 2 ++ 2 files changed, 4 insertions(+) diff

[Qemu-devel] [PATCH v5 02/11] qcow2: Fix leaks in dirty images

2014-08-29 Thread Max Reitz
When opening dirty images, qcow2's repair function should not only repair errors but leaks as well. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Benoît Canet --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2.c b/block/qcow2.c ind

[Qemu-devel] [PATCH v5 03/11] qcow2: Split qcow2_check_refcounts()

2014-08-29 Thread Max Reitz
Put the code for calculating the reference counts and comparing them during qemu-img check into own functions. Signed-off-by: Max Reitz Reviewed-by: Benoît Canet --- block/qcow2-refcount.c | 153 - 1 file changed, 102 insertions(+), 51 deletions(-

[Qemu-devel] [PATCH v5 06/11] qcow2: Fix refcount blocks beyond image end

2014-08-29 Thread Max Reitz
If the qcow2 check function detects a refcount block located beyond the image end, grow the image appropriately. This cannot break anything and is the logical fix for such a case. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/qcow2-refcount.c | 62 ++

Re: [Qemu-devel] [PATCH 01/12] spapr: populate DRC entries for root dt node

2014-08-29 Thread Tyrel Datwyler
On 08/26/2014 08:25 AM, Michael Roth wrote: > Quoting Alexey Kardashevskiy (2014-08-26 03:24:08) >> On 08/26/2014 05:55 PM, Alexey Kardashevskiy wrote: >>> On 08/19/2014 10:21 AM, Michael Roth wrote: From: Nathan Fontenot This add entries to the root OF node to advertise our PHBs as

Re: [Qemu-devel] [PATCH 11/12] spapr_events: event-scan RTAS interface

2014-08-29 Thread Tyrel Datwyler
On 08/26/2014 02:30 AM, Alexey Kardashevskiy wrote: > On 08/19/2014 10:21 AM, Michael Roth wrote: >> From: Tyrel Datwyler >> >> We don't actually rely on this interface to surface hotplug events, and >> instead rely on the similar-but-interrupt-driven check-exception RTAS >> interface used for EPO

[Qemu-devel] [PATCH v2 16/17] accel: Save AccelState on MachineState when initializing

2014-08-29 Thread Eduardo Habkost
This will allow machine initialization code to get the accelerator object if necessary. Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 3 +++ include/hw/boards.h | 1 + include/qemu/typedefs.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/hw/core/accel.c b/hw/core/acce

Re: [Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator

2014-08-29 Thread Eric Blake
On 08/29/2014 02:07 PM, Luiz Capitulino wrote: > Management software, such as RHEV's vdsm, want to be able to allocate > disk space on demand. The basic use case is to start a VM with a small > disk and then the disk is enlarged when QEMU hits a ENOSPC condition. > > To this end, the management so

[Qemu-devel] [PATCH v2 15/17] accel: Create accel object when initializing machine

2014-08-29 Thread Eduardo Habkost
Create an actual TYPE_ACCEL object when initializing a machine. This will allow accelerator classes to implement some initialization on instance_init, and to save state on the TYPE_ACCEL object. Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 4 1 file changed, 4 insertions(+) diff --

[Qemu-devel] [PATCH v2 10/17] accel: Move qtest accel registration to qtest.c

2014-08-29 Thread Eduardo Habkost
As qtest_availble() returns 1 only when CONFIG_POSIX is set, keep setting AccelClass.available to keep current behavior (this is different from what we did for KVM and Xen). This also allows us to make qtest_init_accel() static. Signed-off-by: Eduardo Habkost --- hw/core/accel.c| 18 ---

[Qemu-devel] [PATCH v2 12/17] accel: Move accel init/allowed code to separate function

2014-08-29 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/core/accel.c b/hw/core/accel.c index aeb779a..5817c3c 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -57,6 +57,17 @@ static AccelClass *accel_find(cons

[Qemu-devel] [PATCH v2 17/17] kvm: Make KVMState be the TYPE_KVM_ACCEL instance struct

2014-08-29 Thread Eduardo Habkost
Now that we create an accel object before calling machine_init, we can simply use the accel object to save all KVMState data, instead of allocationg KVMState manually. Signed-off-by: Eduardo Habkost --- kvm-all.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/k

[Qemu-devel] [PATCH v2 08/17] accel: Move KVM accel registration to kvm-all.c

2014-08-29 Thread Eduardo Habkost
Note that this has an user-visible side-effect: instead of reporting "KVM is not supported for this target", QEMU binaries not supporting KVM will report "kvm accelerator does not exist". As kvm_availble() always return 1 when CONFIG_KVM is enabled, we don't need to set AccelClass.available anymor

[Qemu-devel] [PATCH v2 14/17] accel: Pass MachineState object to accel init functions

2014-08-29 Thread Eduardo Habkost
Most of the machine options and machine state information is in the MachineState object, not on the MachineClass. This will allow init functions to use the MachineState object directly instead of qemu_get_machine_opts() or the current_machine global. Signed-off-by: Eduardo Habkost --- hw/core/ac

[Qemu-devel] [PATCH v2 09/17] accel: Move Xen registration code to xen-common.c

2014-08-29 Thread Eduardo Habkost
Note that this has an user-visible side-effect: instead of reporting "Xen is not supported for this target", QEMU binaries not supporting Xen will report "xen accelerator does not exist". As xen_available() always return 1 when CONFIG_XEN is enabled, we don't need to set AccelClass.available anymo

[Qemu-devel] [PATCH v2 06/17] accel: Use QOM classes for accel types

2014-08-29 Thread Eduardo Habkost
Instead of having a static AccelType array, register a class for each accelerator type, and use class name lookup to find accelerator information. Signed-off-by: Eduardo Habkost --- hw/core/accel.c| 117 ++--- include/hw/accel.h | 30 +

[Qemu-devel] [PATCH v2 05/17] accel: Move accel name lookup to separate function

2014-08-29 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 57 + 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/hw/core/accel.c b/hw/core/accel.c index 00a71c0..7f9b715 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -55,11

[Qemu-devel] [PATCH v2 04/17] accel: Simplify configure_accelerator() using AccelType *acc variable

2014-08-29 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/core/accel.c b/hw/core/accel.c index c23c04b..00a71c0 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -62,6 +62,7 @@ int configure_accelerator(Machin

[Qemu-devel] [PATCH v2 13/17] accel: Rename 'init' method to 'init_machine'

2014-08-29 Thread Eduardo Habkost
This makes explicit the fact that the method is for machine initialization, not just for accelerator object initialization. Signed-off-by: Eduardo Habkost --- hw/core/accel.c| 8 include/hw/accel.h | 2 +- kvm-all.c | 2 +- qtest.c| 2 +- xen-common.c | 2

[Qemu-devel] [PATCH v2 02/17] accel: Move accel code to accel.c

2014-08-29 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/Makefile.objs | 1 + hw/core/accel.c | 113 ++ include/hw/accel.h| 32 ++ vl.c | 81 +--- 4 files changed, 147 insertions(+), 80 de

[Qemu-devel] [PATCH v2 07/17] accel: Make AccelClass.available() optional

2014-08-29 Thread Eduardo Habkost
When we move accel classes outside accel.c, the available() function won't be necessary anymore, because the classes will be registered only if the accelerator code is really enabled at build time. Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[Qemu-devel] [PATCH v2 11/17] accel: Remove tcg_available() function

2014-08-29 Thread Eduardo Habkost
As the function always return 1, it is not needed anymore. Signed-off-by: Eduardo Habkost --- arch_init.c| 5 - hw/core/accel.c| 1 - include/sysemu/arch_init.h | 1 - 3 files changed, 7 deletions(-) diff --git a/arch_init.c b/arch_init.c index 28ece76..4cd21c9 1

[Qemu-devel] [PATCH v2 03/17] accel: Create AccelType typedef

2014-08-29 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/accel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/core/accel.c b/hw/core/accel.c index 04da696..c23c04b 100644 --- a/hw/core/accel.c +++ b/hw/core/accel.c @@ -40,13 +40,15 @@ static int tcg_init(MachineClass *mc) r

[Qemu-devel] [PATCH v2 00/17] QOMify accelerator code

2014-08-29 Thread Eduardo Habkost
This is an attempt to convert the accel initialization and registration code to be QOM-based. Some use cases for this are: * Isolating KVM-specific CPU initialization and compatibility code; * Use compat_props to implement accelrator-specific compatibility code on machine-types; * Returning

[Qemu-devel] [PATCH v2 01/17] vl.c: Small coding style fix

2014-08-29 Thread Eduardo Habkost
Just to make checkpatch.pl happy when moving the code. Signed-off-by: Eduardo Habkost --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 95be92d..e49c115 100644 --- a/vl.c +++ b/vl.c @@ -2711,7 +2711,7 @@ static int configure_accelerator(MachineClass *

[Qemu-devel] [PATCH] block: extend BLOCK_IO_ERROR event with nospace indicator

2014-08-29 Thread Luiz Capitulino
Management software, such as RHEV's vdsm, want to be able to allocate disk space on demand. The basic use case is to start a VM with a small disk and then the disk is enlarged when QEMU hits a ENOSPC condition. To this end, the management software has to be notified when QEMU encounters ENOSPC. Th

Re: [Qemu-devel] What tests should "make check-block" run?

2014-08-29 Thread Max Reitz
On 28.08.2014 17:24, Markus Armbruster wrote: Stefan Hajnoczi writes: On Thu, Aug 21, 2014 at 02:16:36PM +0100, Peter Maydell wrote: On 21 August 2014 14:12, Stefan Hajnoczi wrote: On Thu, Aug 21, 2014 at 02:27:00PM +0200, Markus Armbruster wrote: Should we have a variant of "make check-bl

Re: [Qemu-devel] [PATCH v4 05/10] qcow2: Fix refcount blocks beyond image end

2014-08-29 Thread Max Reitz
On 29.08.2014 21:50, Eric Blake wrote: On 08/27/2014 02:18 PM, Max Reitz wrote: If the qcow2 check function detects a refcount block located beyond the image end, grow the image appropriately. This cannot break anything and is the logical fix for such a case. Signed-off-by: Max Reitz --- blo

Re: [Qemu-devel] [PATCH v4 05/10] qcow2: Fix refcount blocks beyond image end

2014-08-29 Thread Eric Blake
On 08/27/2014 02:18 PM, Max Reitz wrote: > If the qcow2 check function detects a refcount block located beyond the > image end, grow the image appropriately. This cannot break anything and > is the logical fix for such a case. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 62 > +

Re: [Qemu-devel] [PATCH v3] vmdk: improve streamOptimized vmdk support

2014-08-29 Thread Milos Vyletel
On Mon, Aug 18, 2014 at 2:52 AM, Fam Zheng wrote: > On Wed, 08/06 17:24, Milos Vyletel wrote: >> VMDK's streamOptimized format is different from regular sparse format. >> L1(GD) and L2(GT) tables are not predefined but rather generated and >> written during image creation mainly because there is n

Re: [Qemu-devel] [PATCH v7 2/7] tests: Add virtio device initialization

2014-08-29 Thread Marc Marí
El Fri, 29 Aug 2014 17:59:37 +0200 Paolo Bonzini escribió: > Il 29/08/2014 17:49, Stefan Hajnoczi ha scritto: > > for (i = 0; i < 8; ++i) { > > quad.bytes[i] = qpci_io_readb(dev->pdev, addr + i); > > } > > if (qtest_big_endian() != qtest_host_endian()) { > > quad.u64 = bswap64(quad.u64); >

Re: [Qemu-devel] [PATCH v7 2/7] tests: Add virtio device initialization

2014-08-29 Thread Marc Marí
El Fri, 29 Aug 2014 16:49:36 +0100 Stefan Hajnoczi escribió: > On Fri, Aug 29, 2014 at 12:40:43PM +0200, Marc Marí wrote: > > +static uint64_t qvirtio_pci_config_readq(QVirtioDevice *d, void > > *addr) +{ > > +QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d; > > +int i; > > +union { > >

Re: [Qemu-devel] [PATCH v4 07/10] qcow2: Rebuild refcount structure during check

2014-08-29 Thread Max Reitz
On 28.08.2014 18:08, Benoît Canet wrote: On Wed, Aug 27, 2014 at 10:18:23PM +0200, Max Reitz wrote: The previous commit introduced the "rebuild" variable to qcow2's implementation of the image consistency check. Now make use of this by adding a function which creates a completely new refcount st

Re: [Qemu-devel] [PATCH] AHCI read/write corruption with int13h

2014-08-29 Thread John Snow
On 07/30/2014 02:11 PM, Eniac Zhang wrote: The AHCI controller code in Qemu has a bug that it will use the wrong LBA address when Seabios tries to access LBA>128GB (aka 127.5GB limit http://www.hardwaresecrets.com/printpage/Hard-Disk-Drives-Capacity-Limits/482). When we needs to access t

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-29 Thread Benoît Canet
The Friday 29 Aug 2014 à 11:38:14 (-0700), Andy Grover wrote : > On 08/29/2014 10:22 AM, Benoît Canet wrote: > >The truth is that QEMU block drivers don't know how to do much on their own > >so we probably must bring the whole QEMU block layer in a tcmu-runner > >handler plugin. > > Woah! Really

Re: [Qemu-devel] tcmu-runner and QEMU

2014-08-29 Thread Andy Grover
On 08/29/2014 10:22 AM, Benoît Canet wrote: The truth is that QEMU block drivers don't know how to do much on their own so we probably must bring the whole QEMU block layer in a tcmu-runner handler plugin. Woah! Really? ok... Another reason to do this is that the QEMU block layer brings fea

Re: [Qemu-devel] [PATCH 12/17] ppc: use movcond for isel

2014-08-29 Thread Richard Henderson
On 08/28/2014 10:15 AM, Paolo Bonzini wrote: > +TCGv t1, true_op, zero; ... > +tcg_temp_free_i32(t1); Not _i32 for the free. r~

Re: [Qemu-devel] [PATCH v6 02/15] target-tricore: Add board for systemmode

2014-08-29 Thread Peter Maydell
On 29 August 2014 20:00, Bastian Koppelmann wrote: > Hi Peter, > > > On 08/29/2014 03:30 PM, Peter Maydell wrote: >> Don't use pflash_cfi01_register() in new code, it gives you a >> weird not-like-hardware flash device that we only have for >> backwards compatibility with existing board models. In

Re: [Qemu-devel] linux-user: enabling binfmt P flag

2014-08-29 Thread Peter Maydell
[cc'ing MJT for more distro opinion since I think fundamentally the choice we ought to make upstream is "what's not going to screw over distros"... Paolo, is there a RedHat QEMU maintainer who would have an opinion here?] On 25 August 2014 10:09, Riku Voipio wrote: > After weekend, I think the so

Re: [Qemu-devel] [PATCH v6 02/15] target-tricore: Add board for systemmode

2014-08-29 Thread Bastian Koppelmann
Hi Peter, On 08/29/2014 03:30 PM, Peter Maydell wrote: + +dinfo = drive_get(IF_PFLASH, 0, 0); +if (!pflash_cfi01_register(TRICORE_FLASH_ADDR, NULL, + "tricore_testboard.flash", + TRICORE_FLASH_SIZE, dinfo ? dinfo->bdrv : NULL, +

[Qemu-devel] [PATCH] KVM_CAP_IRQFD and KVM_CAP_IRQFD_RESAMPLE checks

2014-08-29 Thread Eric Auger
Compute kvm_irqfds_allowed by checking the KVM_CAP_IRQFD extension. Remove direct settings in architecture specific files. Add a new kvm_resamplefds_allowed variable, initialized by checking the KVM_CAP_IRQFD_RESAMPLE extension. Add a corresponding kvm_resamplefds_enabled() function. Signed-off-b

[Qemu-devel] tcmu-runner and QEMU

2014-08-29 Thread Benoît Canet
Hi list, Listening at Palo's suggestion I started discussing privately with Andy about integrating LIO and the QEMU block layer together using tcmu-runner: https://github.com/agrover/tcmu-runner. The rationale is that it would be very handy to be able to export one of the numerous QEMU image fo

Re: [Qemu-devel] [Qemu-trivial] [PATCH] MAINTAINERS: Add VMWare devices maintainer

2014-08-29 Thread Dmitry Fleytman
> On 29 באוג 2014, at 19:24, Michael Tokarev wrote: > > Applied to -trivial, dunno if it'll be picked up by anyone else ;) This patch is pretty trivial indeed ;) > > Thank you! > > /mjt

Re: [Qemu-devel] [PATCH 00/10] Implement ARM architectural watchpoints

2014-08-29 Thread Richard Henderson
On 08/29/2014 04:21 AM, Peter Maydell wrote: > Peter Maydell (10): > exec.c: Relax restrictions on watchpoint length and alignment > exec.c: Provide full set of dummy wp remove functions in user-mode > exec.c: Record watchpoint fault address and direction > cpu-exec: Make debug_excp_handler

Re: [Qemu-devel] [PULL 09/35] block/quorum: add simple read pattern support

2014-08-29 Thread Benoît Canet
The Friday 29 Aug 2014 à 17:29:37 (+0100), Stefan Hajnoczi wrote : > From: Liu Yuan > > This patch adds single read pattern to quorum driver and quorum vote is > default > pattern. > > For now we do a quorum vote on all the reads, it is designed for unreliable > underlying storage such as non-r

Re: [Qemu-devel] [PATCH 05/10] target-arm: Implement setting of watchpoints

2014-08-29 Thread Richard Henderson
On 08/29/2014 04:21 AM, Peter Maydell wrote: > +/* Watchpoint covers an aligned area up to 2GB in size */ > +len = 1ULL << mask; > +/* If masked bits in WVR are not zero it's CONSTRAINED UNPREDICTABLE > + * whether the watchpoint fires when the unmasked bits match; w

Re: [Qemu-devel] [PATCH v2] curl: Allow a cookie or cookies to be sent with http/https requests.

2014-08-29 Thread Matthew Booth
On 29/08/14 16:10, Eric Blake wrote: > On 08/29/2014 09:03 AM, Richard W.M. Jones wrote: >> In order to access VMware ESX efficiently, we need to send a session >> cookie. This patch is very simple and just allows you to send that >> session cookie. It punts on the question of how you get the ses

[Qemu-devel] [PULL 33/35] nfs: Fix leak of opts in nfs_file_open

2014-08-29 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Benoît Canet Signed-off-by: Stefan Hajnoczi --- block/nfs.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 93d87f3..194f301 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -393,

Re: [Qemu-devel] IO accounting overhaul

2014-08-29 Thread Benoît Canet
The Friday 29 Aug 2014 à 17:04:46 (+0100), Stefan Hajnoczi wrote : > On Thu, Aug 28, 2014 at 04:38:09PM +0200, Benoît Canet wrote: > > I collected some items of a cloud provider wishlist regarding I/O accouting. > > > > In a cloud I/O accouting can have 3 purpose: billing, helping the customers >

[Qemu-devel] [PULL 31/35] curl: Allow a cookie or cookies to be sent with http/https requests.

2014-08-29 Thread Stefan Hajnoczi
From: "Richard W.M. Jones" In order to access VMware ESX efficiently, we need to send a session cookie. This patch is very simple and just allows you to send that session cookie. It punts on the question of how you get the session cookie in the first place, but in practice you can just run a `c

Re: [Qemu-devel] [PATCH 05/10] target-arm: Implement setting of watchpoints

2014-08-29 Thread Peter Maydell
On 29 August 2014 17:42, Richard Henderson wrote: > On 08/29/2014 04:21 AM, Peter Maydell wrote: >> +/* Watchpoint covers an aligned area up to 2GB in size */ >> +len = 1ULL << mask; >> +/* If masked bits in WVR are not zero it's CONSTRAINED UNPREDICTABLE >> + * whe

[Qemu-devel] [PULL 32/35] curl: Don't deref NULL pointer in call to aio_poll.

2014-08-29 Thread Stefan Hajnoczi
From: "Richard W.M. Jones" In commit 63f0f45f2e89b60ff8245fec81328ddfde42a303 the following mechanical change was made: if (!state) { -qemu_aio_wait(); +aio_poll(state->s->aio_context, true); } The new code now checks if state is NULL and then dereferen

[Qemu-devel] [PULL 24/35] block: Add AIO context notifiers

2014-08-29 Thread Stefan Hajnoczi
From: Max Reitz If a long-running operation on a BDS wants to always remain in the same AIO context, it somehow needs to keep track of the BDS changing its context. This adds a function for registering callbacks on a BDS which are called whenever the BDS is attached or detached from an AIO contex

Re: [Qemu-devel] [PATCH] curl: Allow a cookie or cookies to be sent with http/https requests.

2014-08-29 Thread Matthew Booth
Looks good to me. 1 inline nit. Matt On 28/08/14 14:55, Richard W.M. Jones wrote: > In order to access VMware ESX efficiently, we need to send a session > cookie. This patch is very simple and just allows you to send that > session cookie. It punts on the question of how you get the session > c

[Qemu-devel] [PULL 30/35] virtio-blk: allow drive_del with dataplane

2014-08-29 Thread Stefan Hajnoczi
Now that drive_del acquires the AioContext we can safely allow deleting the drive. As with non-dataplane mode, all I/Os submitted by the guest after drive_del will return EIO. This patch makes hot unplug work with virtio-blk dataplane. Previously drive_del reported an error because the device wa

[Qemu-devel] [PULL 21/35] aio-win32: add support for sockets

2014-08-29 Thread Stefan Hajnoczi
From: Paolo Bonzini Uses the same select/WSAEventSelect scheme as main-loop.c. WSAEventSelect() is edge-triggered, so it cannot be used directly, but it is still used as a way to exit from a blocking g_poll(). Before g_poll() is called, we poll sockets with a non-blocking select() to achieve the

[Qemu-devel] [PULL 28/35] linux-aio: avoid deadlock in nested aio_poll() calls

2014-08-29 Thread Stefan Hajnoczi
If two Linux AIO request completions are fetched in the same io_getevents() call, QEMU will deadlock if request A's callback waits for request B to complete using an aio_poll() loop. This was reported to happen with the mirror blockjob. This patch moves completion processing into a BH and makes i

Re: [Qemu-devel] [PATCH v2] curl: Allow a cookie or cookies to be sent with http/https requests.

2014-08-29 Thread Matthew Booth
Looks good. Please add: Reviewed-by: Matthew Booth Matt On 29/08/14 16:03, Richard W.M. Jones wrote: > In order to access VMware ESX efficiently, we need to send a session > cookie. This patch is very simple and just allows you to send that > session cookie. It punts on the question of how yo

[Qemu-devel] [PULL 35/35] quorum: Fix leak of opts in quorum_open

2014-08-29 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Benoît Canet Signed-off-by: Stefan Hajnoczi --- block/quorum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/quorum.c b/block/quorum.c index 0160fe3..093382e 100644 --- a/block/quorum.c +++ b/block/quorum.c @@

[Qemu-devel] [PULL 17/35] test-aio: test timers on Windows too

2014-08-29 Thread Stefan Hajnoczi
From: Paolo Bonzini Use EventNotifier instead of a pipe, which makes it trivial to test timers on Windows. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- tests/test-aio.c | 48 +++- 1 file changed, 11 insertions(+), 37 deletions(-)

[Qemu-devel] [PULL 25/35] nbd: Follow the BDS' AIO context

2014-08-29 Thread Stefan Hajnoczi
From: Max Reitz Keep the NBD server always in the same AIO context as the exported BDS by calling bdrv_add_aio_context_notifier() and implementing the required callbacks. Signed-off-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- nbd.c | 31 +

[Qemu-devel] [PULL 34/35] blkverify: Fix leak of opts in blkverify_open

2014-08-29 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: Benoît Canet Signed-off-by: Stefan Hajnoczi --- block/blkverify.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/blkverify.c b/block/blkverify.c index 7c78ca4..163064c 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -1

[Qemu-devel] [PULL 29/35] block: acquire AioContext in do_drive_del()

2014-08-29 Thread Stefan Hajnoczi
Make drive_del safe for dataplane where another thread may be running the BlockDriverState's AioContext. Note the assumption that AioContext's lifetime exceeds DriveInfo and BlockDriverState. We release AioContext after DriveInfo and BlockDriverState are potentially freed. This is clearly safe w

[Qemu-devel] [PULL 16/35] AioContext: export and use aio_dispatch

2014-08-29 Thread Stefan Hajnoczi
From: Paolo Bonzini So far, aio_poll's scheme was dispatch/poll/dispatch, where the first dispatch phase was used only in the GSource case in order to avoid a blocking poll. Earlier patches changed it to dispatch/prepare/poll/dispatch, where prepare is aio_compute_timeout. By making aio_dispatc

[Qemu-devel] [PULL 26/35] block: fix overlapping multiwrite requests

2014-08-29 Thread Stefan Hajnoczi
When request A is a strict superset of request B: multiwrite_merge() merges them as follows: AA The tail of request A should have been included: AAAA This patch fixes data loss but this code path is probably rare. Since guests cannot assume ordering between in

[Qemu-devel] [PULL 23/35] nbd: Drop nbd_can_read()

2014-08-29 Thread Stefan Hajnoczi
From: Max Reitz There is no variant of aio_set_fd_handler() like qemu_set_fd_handler2(), so we cannot give a can_read() callback function. Instead, unregister the nbd_read() function whenever we cannot read and re-register it as soon as we can read again. All this is hidden behind the functions

[Qemu-devel] [PULL 27/35] qemu-iotests: add multiwrite test cases

2014-08-29 Thread Stefan Hajnoczi
This test case covers the basic bdrv_aio_multiwrite() scenarios: 1. Single request 2. Sequential requests (AABB) 3. Superset overlapping requests (AABBAA) 4. Subset overlapping requests (BBAABB) 5. Head overlapping requests (AABB) 6. Tail overlapping requests (BBAA) 7. Disjoint requests (AA BB) Si

[Qemu-devel] [PULL 06/35] sheepdog: adopting protocol update for VDI locking

2014-08-29 Thread Stefan Hajnoczi
From: Hitoshi Mitake The update is required for supporting iSCSI multipath. It doesn't affect behavior of QEMU driver but adding a new field to vdi request struct is required. Cc: Kevin Wolf Cc: Stefan Hajnoczi Cc: Liu Yuan Cc: MORITA Kazutaka Signed-off-by: Hitoshi Mitake Signed-off-by: St

[Qemu-devel] [PULL 15/35] AioContext: run bottom halves after polling

2014-08-29 Thread Stefan Hajnoczi
From: Paolo Bonzini Make the dispatching phase the same before blocking and afterwards. The next patch will make aio_dispatch public and use it directly for the GSource case, instead of aio_poll. aio_poll can then be simplified heavily. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoc

[Qemu-devel] [PULL 13/35] aio-win32: Evaluate timers after handles

2014-08-29 Thread Stefan Hajnoczi
From: Paolo Bonzini This is similar to what aio_poll does in the stand-alone case. Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- aio-win32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aio-win32.c b/aio-win32.c index fe7ee5b..7b28411 100644 ---

[Qemu-devel] [PULL 20/35] qemu-coroutine-io: fix for Win32

2014-08-29 Thread Stefan Hajnoczi
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- nbd.c | 2 +- qemu-coroutine-io.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nbd.c b/nbd.c index e7d1cee..5c28f71 100644 --- a/nbd.c +++ b/nbd.c @@ -156,7 +156,7 @@ s

[Qemu-devel] [PULL 22/35] sheepdog: fix a core dump while do auto-reconnecting

2014-08-29 Thread Stefan Hajnoczi
From: Liu Yuan We should reinit local_err as NULL inside the while loop or g_free() will report corrupption and abort the QEMU when sheepdog driver tries reconnecting. This was broken in commit 356b4ca. qemu-system-x86_64: failed to get the header, Resource temporarily unavailable qemu-system-x

  1   2   3   >