Re: [Qemu-devel] [PATCH RFC 08/11] virtio_blk: use virtio v1.0 endian

2014-10-12 Thread Rusty Russell
Cornelia Huck writes: > Note that we care only about the fields still in use for virtio v1.0. > > Reviewed-by: Thomas Huth > Reviewed-by: David Hildenbrand > Signed-off-by: Cornelia Huck Hi Cornelia, These patches all look good; I'm a bit nervous about our testing missing some convers

Re: [Qemu-devel] [PATCH RFC 03/11] virtio: support more feature bits

2014-10-12 Thread Rusty Russell
Cornelia Huck writes: > With virtio-1, we support more than 32 feature bits. Let's make > vdev->guest_features depend on the number of supported feature bits, > allowing us to grow the feature bits automatically. It's a judgement call, but I would say that simply using uint64_t will be sufficient

Re: [Qemu-devel] [question] is it possible that big-endian l1 tableoffset referenced by other I/O while updating l1 table offset in qcow2_update_snapshot_refcount?

2014-10-12 Thread Max Reitz
Am 13.10.2014 um 05:17 schrieb Zhang Haoyu: Hi, I encounter a problem that after deleting snapshot, the qcow2 image size is very larger than that it should be displayed by ls command, but the virtual disk size is okay via qemu-img info. I suspect that during updating l1 table offset, other I/O j

Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image

2014-10-12 Thread Alexandre DERUMIER
>>Lack of bdrv_co_write_zeroes is why detect-zeroes does not work. >> >>Lack of bdrv_get_block_status is why sparse->sparse does not work >>without detect-zeroes. Ok, thanks Paolo ! Both are missing in rbd block driver. @ceph-devel . Could it be possible to implement them ? Also, about drive-

[Qemu-devel] [PATCH V3] net: don't use set/get_pointer() in set/get_netdev()

2014-10-12 Thread Jason Wang
Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue support) tries to use set_pointer() and get_pointer() to set and get NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This trick works but result a unclean and fragile implementation (e.g print_netdev and parse_netdev).

[Qemu-devel] [PATCH v3 2/2] qcow2: add update refcount table realization for update_refcount

2014-10-12 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. At the same time, put this cluster to s->free_cluster_index. Signed-off-by: Jun Li --- This version adding handle self-describing refcount blocks. --- block/qcow2-refcount

[Qemu-devel] [PATCH v3 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-12 Thread Jun Li
This patch is the realization of new function qcow2_shrink_l1_and_l2_table. This function will shrink/discard l1 and l2 table when do qcow2 shrinking. Signed-off-by: Jun Li --- Compared to v2, v3 fixed host cluster leak. --- block/qcow2-cluster.c | 173 +++

[Qemu-devel] [PATCH v3 0/2] qcow2: Patch for shrinking qcow2 disk image

2014-10-12 Thread Jun Li
This is the third version for qcow2 shrinking. In this version, fixed host cluster leak when shrinking a disk image. Such as: Step 1, # /opt/qemu-git-arm/bin/qemu-img info /home/lijun/Work/tmp/shrink.qcow2 image: /home/lijun/Work/tmp/shrink.qcow2 file format: qcow2 virtual size: 2.0G (2147483648 by

Re: [Qemu-devel] [PATCH V2] net: don't use set/get_pointer() in set/get_netdev()

2014-10-12 Thread Jason Wang
On 10/13/2014 11:31 AM, Jason Wang wrote: > On 10/10/2014 09:03 PM, Markus Armbruster wrote: >> Jason Wang writes: >> >>> Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue >>> support) tries to use set_pointer() and get_pointer() to set and get >>> NICPeers which is not a pointer de

Re: [Qemu-devel] [PATCH V2] net: don't use set/get_pointer() in set/get_netdev()

2014-10-12 Thread Jason Wang
On 10/10/2014 09:03 PM, Markus Armbruster wrote: > Jason Wang writes: > >> Commit 1ceef9f27359cbe92ef124bf74de6f792e71f6fb (net: multiqueue >> support) tries to use set_pointer() and get_pointer() to set and get >> NICPeers which is not a pointer defined in DEFINE_PROP_NETDEV. This >> trick works

Re: [Qemu-devel] [question] is it possible that big-endian l1 tableoffset referenced by other I/O while updating l1 table offset in qcow2_update_snapshot_refcount?

2014-10-12 Thread Zhang Haoyu
Hi, I encounter a problem that after deleting snapshot, the qcow2 image size is very larger than that it should be displayed by ls command, but the virtual disk size is okay via qemu-img info. I suspect that during updating l1 table offset, other I/O job reference th

Re: [Qemu-devel] [Patch v4 6/8] target_arm: Change the reset values based on the ELF entry

2014-10-12 Thread Alistair Francis
On Wed, Oct 8, 2014 at 1:03 AM, Martin Galvan wrote: > On Tue, Oct 7, 2014 at 11:13 AM, Alistair Francis > wrote: >> The Netduino 2 machine won't run unless the reset_pc is based >> on the ELF entry point. >> >> Signed-off-by: Alistair Francis >> Signed-off-by: Peter Crosthwaite >> --- >> V2:

Re: [Qemu-devel] [question] is it possible that big-endian l1 table offset referenced by other I/O while updating l1 table offset in qcow2_update_snapshot_refcount?

2014-10-12 Thread Max Reitz
Am 10.10.2014 um 03:54 schrieb Zhang Haoyu: Hi, I encounter a problem that after deleting snapshot, the qcow2 image size is very larger than that it should be displayed by ls command, but the virtual disk size is okay via qemu-img info. I suspect that during updating l1 table offset, other I/O j

Re: [Qemu-devel] [PATCH] qcow2: fix leak of Qcow2DiscardRegion in update_refcount_discard

2014-10-12 Thread Max Reitz
Am 11.10.2014 um 10:35 schrieb Zhang Haoyu: When the Qcow2DiscardRegion is adjacent to another one referenced by "d", free this Qcow2DiscardRegion metadata referenced by "p" after it was removed from s->discards queue. Signed-off-by: Zhang Haoyu --- block/qcow2-refcount.c | 1 + 1 file chang

Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image

2014-10-12 Thread Paolo Bonzini
Il 08/10/2014 13:15, Alexandre DERUMIER ha scritto: > Hi, > > I'm currently planning to migrate our storage to ceph/rbd through qemu > drive-mirror > > and It seem that drive-mirror with rbd block driver, don't create a sparse > image. (all zeros are copied to the target rbd). > > Also note, t

Re: [Qemu-devel] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-12 Thread Chen Gang
On 10/12/14 15:50, Peter Maydell wrote: > On 12 October 2014 01:32, Chen Gang wrote: >> On 10/12/14 5:25, Peter Maydell wrote: >>> Some other approaches to this that would confine the >>> fix to the makefiles rather than requiring us to modify >>> the vixl source itself: >>> a) add a -Wno- option

Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image

2014-10-12 Thread Alexandre DERUMIER
>>These don't tell me much. Maybe it's better to show the actual commands and >>how >>you tell sparse from no sparse? Well, I create 2 empty source images files of 10G. (source.qcow2 and source.raw) then: du -sh source.qcow2 : 2M du -sh source.raw : 0M then I convert them with qemu-img co

Re: [Qemu-devel] qemu drive-mirror to rbd storage : no sparse rbd image

2014-10-12 Thread Alexandre DERUMIER
>>Just a wild guess - Alexandre, did you tried detect-zeroes blk option >>for mirroring targets? Hi, yes, I have also tried with detect-zeroes (on or discard) with virtio and virtio-scsi, doesn't help. (I'm not sure that is implemtend in drive-mirror). As workaround currently, after drive-mirror

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-12 Thread Michael S. Tsirkin
On Thu, Oct 09, 2014 at 01:53:16PM +0800, Chen, Tiejun wrote: > > > On 2014/10/7 15:26, Michael S. Tsirkin wrote: > >On Tue, Sep 30, 2014 at 10:43:09AM +0800, Chen, Tiejun wrote: > >>On 2014/9/29 18:01, Michael S. Tsirkin wrote: > >>>On Sun, Sep 28, 2014 at 10:59:05AM +0800, Chen, Tiejun wrote: >

Re: [Qemu-devel] [PATCH] qcow2: fix double-free of Qcow2DiscardRegion in qcow2_process_discards

2014-10-12 Thread Zhang Haoyu
On 2014-10-12 15:34, Kevin Wolf wrote: Am 11.10.2014 um 09:14 hat Zhang Haoyu geschrieben: In qcow2_update_snapshot_refcount -> qcow2_process_discards() -> bdrv_discard() may free the Qcow2DiscardRegion which is referenced by "next" pointer in qcow2_process_discards() now, in next iteration, d

Re: [Qemu-devel] [Bug?] qemu abort when trying to passthrough BCM5719 Gigabit Ethernet

2014-10-12 Thread Michael S. Tsirkin
On Sat, Oct 11, 2014 at 01:41:48AM -0600, Alex Williamson wrote: > On Sat, 2014-10-11 at 13:58 +0800, zhanghailiang wrote: > > Hi all, > > > > When i try to passthrough BCM5719 Gigabit Ethernet to guest using the qemu > > master branch, it aborted, > > and show kvm_set_phys_mem:error registering

Re: [Qemu-devel] [PATCH v2] libvixl: a64: Skip "-Wunused-variable" for gcc 5.0.0 or higher

2014-10-12 Thread Peter Maydell
On 12 October 2014 01:32, Chen Gang wrote: > On 10/12/14 5:25, Peter Maydell wrote: >> Some other approaches to this that would confine the >> fix to the makefiles rather than requiring us to modify >> the vixl source itself: >> a) add a -Wno- option for the affected .o files > > It is one way, b

Re: [Qemu-devel] [PATCH] oslib-posix: change free to g_free

2014-10-12 Thread Kevin Wolf
Am 11.10.2014 um 05:23 hat Eric Blake geschrieben: > On 10/10/2014 08:54 PM, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > The caller of qemu_vfree() maybe not check whether parameter > > ptr pointer is NULL or not, such as vpc_open(). > > Using g_free() is more safe. > > NACK. g_fre

Re: [Qemu-devel] [PATCH] qcow2: fix double-free of Qcow2DiscardRegion in qcow2_process_discards

2014-10-12 Thread Kevin Wolf
Am 11.10.2014 um 09:14 hat Zhang Haoyu geschrieben: > In qcow2_update_snapshot_refcount -> qcow2_process_discards() -> > bdrv_discard() > may free the Qcow2DiscardRegion which is referenced by "next" pointer in > qcow2_process_discards() now, in next iteration, d = next, so g_free(d) > will double

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

2014-10-12 Thread Max Reitz
Am 11.10.2014 um 20:56 schrieb BenoƮt Canet: +int64_t first_free_cluster = 0, rt_ofs = -1, cluster = 0; +int64_t rb_ofs, rb_start, rb_index; Everytime a few day pass and I read rb_ofs and rt_ofs again I found these names obfuscated. I know Linus says that C is a spartan language but thes