Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-27 Thread Thomas Huth
On 27.04.2016 08:43, Markus Armbruster wrote: > David Gibson writes: > >> On Tue, Apr 26, 2016 at 01:00:06PM +0200, Thomas Huth wrote: >>> On 20.04.2016 04:33, David Gibson wrote: [...] +/* + * Property functions + */ + +QDTProperty *qdt_new_property(const gchar *name, gc

Re: [Qemu-devel] [PATCH for 2.7 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-04-27 Thread Denis V. Lunev
On 04/26/2016 01:19 PM, Kevin Wolf wrote: [skipped] Did you ever talk to the kernel people? We can try to make the best out of suboptimal requests in qemu, but it looks to me as if the real fix was in the kernel, and if we don't get it fixed there, we'll see more and more of this kind of proble

[Qemu-devel] [PATCH for 2.7 v2 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-04-27 Thread Denis V. Lunev
There is a possibility that qcow2_co_write_zeroes() will be called by with the partial block. This could be synthetically triggered with qemu-io -c "write -z 32k 4k" and can happen in the real life in qemu-nbd. The latter happens under the following conditions: (1) qemu-nbd is started with

[Qemu-devel] [Bug 1569053] Re: Qemu crashes when I start a second VM from command line

2016-04-27 Thread Michael liu
when the second VM crashed,how about first VM? It seems like that you use vhost-user as your backend type.Does the backend of the 1st VM and 2nd VM connect the same switch ? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bu

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-27 Thread Markus Armbruster
Thomas Huth writes: > On 27.04.2016 08:43, Markus Armbruster wrote: >> David Gibson writes: >> >>> On Tue, Apr 26, 2016 at 01:00:06PM +0200, Thomas Huth wrote: On 20.04.2016 04:33, David Gibson wrote: > [...] > +/* > + * Property functions > + */ > + > +QDTProperty *qdt

Re: [Qemu-devel] [Qemu-discuss] iolimits for virtio-9p

2016-04-27 Thread Pradeep Kiruvale
On 26 April 2016 at 14:08, Alberto Garcia wrote: > On Tue 19 Apr 2016 02:09:24 PM CEST, Pradeep Kiruvale wrote: > > > We are planning to implement the io-limits for the virtio-9p driver > > i.e for fsdev devices. > > So, I am looking into the code base and how it has done for the block > > io dev

Re: [Qemu-devel] [PATCH v4 00/16] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-04-27 Thread Peter Xu
On Tue, Apr 26, 2016 at 04:19:00PM +0200, Radim Krčmář wrote: > 2016-04-26 15:34+0800, Peter Xu: > > Hi, Jan, > > > > The above issue should be caused by EOI missing of level-triggered > > interrupts. Before that, I was always using edge-triggered > > interrupts for test, so didn't encounter this

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-27 Thread Thomas Huth
On 27.04.2016 09:28, Markus Armbruster wrote: > Thomas Huth writes: > >> On 27.04.2016 08:43, Markus Armbruster wrote: >>> David Gibson writes: >>> On Tue, Apr 26, 2016 at 01:00:06PM +0200, Thomas Huth wrote: > On 20.04.2016 04:33, David Gibson wrote: >> [...] >> +/* >> + * Prop

Re: [Qemu-devel] [PATCH for 2.7 0/2] backup compression

2016-04-27 Thread Fam Zheng
On Wed, 04/27 09:32, Denis V. Lunev wrote: > On 04/26/2016 12:46 PM, Stefan Hajnoczi wrote: > > On Sat, Apr 23, 2016 at 11:41:51AM +0300, Denis V. Lunev wrote: > > > The idea is simple - backup is "written-once" data. It is written block > > > by block and it is large enough. It would be nice to sa

Re: [Qemu-devel] [PATCH for 2.7 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-04-27 Thread Kevin Wolf
Am 27.04.2016 um 09:07 hat Denis V. Lunev geschrieben: > On 04/26/2016 01:19 PM, Kevin Wolf wrote: > > [skipped] > >Did you ever talk to the kernel people? > > > >We can try to make the best out of suboptimal requests in qemu, but it > >looks to me as if the real fix was in the kernel, and if we d

Re: [Qemu-devel] [PATCH for 2.7 0/2] backup compression

2016-04-27 Thread Kevin Wolf
Am 27.04.2016 um 09:59 hat Fam Zheng geschrieben: > On Wed, 04/27 09:32, Denis V. Lunev wrote: > > On 04/26/2016 12:46 PM, Stefan Hajnoczi wrote: > > > On Sat, Apr 23, 2016 at 11:41:51AM +0300, Denis V. Lunev wrote: > > > > The idea is simple - backup is "written-once" data. It is written block > >

Re: [Qemu-devel] [PATCH for 2.7 0/2] backup compression

2016-04-27 Thread Denis V. Lunev
On 04/27/2016 10:59 AM, Fam Zheng wrote: On Wed, 04/27 09:32, Denis V. Lunev wrote: On 04/26/2016 12:46 PM, Stefan Hajnoczi wrote: On Sat, Apr 23, 2016 at 11:41:51AM +0300, Denis V. Lunev wrote: The idea is simple - backup is "written-once" data. It is written block by block and it is large en

[Qemu-devel] [Bug 1518969] Re: Instance of QEMU doesn't unplug virtio scsi disk after device_del and drive_del commands

2016-04-27 Thread Michael liu
Maybe you detach disk too fast.When you detach disk,the guest os maybe has not loaded the hotplug modules.So it can not detect your detach event.Can you test the situation when detaching disk after guest os starting up ? -- You received this bug notification because you are a member of qemu- de

[Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode

2016-04-27 Thread Xiao Guangrong
From: Eduardo Habkost Introduce Skylake-Client cpu mode which inherits the features from Broadwell and supports some additional features that are: MPX, XSAVEC, XSAVES and XGETBV1 Note: 1. As XSAVES is disabled in upstream linux kernel by commit e88221c50 (x86/fpu: Disable XSAVES* support for now

Re: [Qemu-devel] [PATCH for 2.7 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-04-27 Thread Denis V. Lunev
On 04/27/2016 11:12 AM, Kevin Wolf wrote: Am 27.04.2016 um 09:07 hat Denis V. Lunev geschrieben: On 04/26/2016 01:19 PM, Kevin Wolf wrote: [skipped] Did you ever talk to the kernel people? We can try to make the best out of suboptimal requests in qemu, but it looks to me as if the real fix wa

Re: [Qemu-devel] [RFC for-2.7 01/11] qdt: IEEE1275-style device tree utility code

2016-04-27 Thread Markus Armbruster
Thomas Huth writes: > On 27.04.2016 09:28, Markus Armbruster wrote: >> Thomas Huth writes: >> >>> On 27.04.2016 08:43, Markus Armbruster wrote: David Gibson writes: > On Tue, Apr 26, 2016 at 01:00:06PM +0200, Thomas Huth wrote: >> On 20.04.2016 04:33, David Gibson wrote: >>>

Re: [Qemu-devel] [Qemu-discuss] iolimits for virtio-9p

2016-04-27 Thread Alberto Garcia
On Wed, Apr 27, 2016 at 09:29:02AM +0200, Pradeep Kiruvale wrote: > Thanks for the reply. I am still in the early phase, I will let you > know if any changes are needed for the APIs. > > We might also have to implement throttle-group.c for 9p devices, if > we want to apply throttle for group of d

[Qemu-devel] [Bug 1495380] Re: Invalid parameter 'queues'. multi-queue vhost-user backends does not work.

2016-04-27 Thread Michael liu
You should use qemu 2.5.0. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1495380 Title: Invalid parameter 'queues'. multi-queue vhost-user backends does not work. Status in QEMU: New Bug desc

Re: [Qemu-devel] [PATCH for 2.7 v2 0/3] backup compression

2016-04-27 Thread Denis V. Lunev
On 04/27/2016 09:28 AM, Denis V. Lunev wrote: The idea is simple - backup is "written-once" data. It is written block by block and it is large enough. It would be nice to save storage space and compress it. These patches add the ability to compress data during backup. This functionality is imple

Re: [Qemu-devel] [RFC for-2.7 06/11] pseries: Consolidate RTAS loading

2016-04-27 Thread Thomas Huth
On 20.04.2016 04:33, David Gibson wrote: > At each system reset, the pseries machine needs to load RTAS, the run > time portion of the guest firmware, into the VM. This means copying > the actual RTAS code into guest memory, and also updating the device > tree so that the guest OS and boot firmwar

Re: [Qemu-devel] [PATCH qemu v15 14/17] spapr_iommu, vfio, memory: Notify IOMMU about starting/stopping being used by VFIO

2016-04-27 Thread Alexey Kardashevskiy
On 04/27/2016 04:39 PM, David Gibson wrote: On Thu, Apr 21, 2016 at 02:22:01PM +1000, Alexey Kardashevskiy wrote: On 04/21/2016 01:59 PM, David Gibson wrote: On Wed, Apr 20, 2016 at 07:15:15PM +1000, Alexey Kardashevskiy wrote: On 04/07/2016 10:40 AM, David Gibson wrote: On Mon, Apr 04, 2016

[Qemu-devel] [Bug 602336] Re: bad network performance with 10Gbit

2016-04-27 Thread Michael liu
You can do some performance optimization , such as isolating cpus, closing selinux, closing nmi_watchdog, disable intel_pstate and so on. You can try such grub cmdline: nmi_watchdog=0 selinux=0 intel_pstate=disable nosoftlockup isolcpus=4,5,6,7 nohz_full=4,5,6,7 -- You received this bug not

[Qemu-devel] [Bug 1485010] Re: qemu-guest-agent should support systemd in addition to pmutils

2016-04-27 Thread Michael liu
It's not safe for VM. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1485010 Title: qemu-guest-agent should support systemd in addition to pmutils Status in QEMU: New Bug description: Hello,

Re: [Qemu-devel] [RFC for-2.7 07/11] pseries: Move adding of fdt reserve map entries

2016-04-27 Thread Thomas Huth
On 20.04.2016 04:33, David Gibson wrote: > The flattened device tree passed to pseries guests contains a list of > reserved memory areas. Currently we construct this list early in > spapr_build_fdt() as we sequentially write out the fdt. > > This will be inconvenient for upcoming cleanups, so thi

[Qemu-devel] [Bug 1574572] Re: config 20 sriov direct bond ports,vm create failed.

2016-04-27 Thread Michael liu
http://patchwork.ozlabs.org/patch/293580/ In this patch,when KVM_CAP_NR_MEMSLOTS is implemented ,Convert the static slots array to be dynamically allocated, supporting more slots when available. But how many slots we can use,the number is limited by the host kernel?Do any one has the same probl

Re: [Qemu-devel] [PATCH v6 01/10] qom: add helpers for UserCreatable object types

2016-04-27 Thread Markus Armbruster
This commit regresses error message quality from $ qemu-system-x86_64 -nodefaults -display none -object secret,id=sec0,data=letmein,format=raw,foo=bar qemu-system-x86_64: -object secret,id=sec0,data=letmein,format=raw,foo=bar: Property '.foo' not found to just qemu-system-x86_64: P

[Qemu-devel] [Bug 584514] Re: Qemu-KVM 0.12.4 Guest entered Paused State

2016-04-27 Thread Michael liu
How about the qemu process,in which state? will it be blocking? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/584514 Title: Qemu-KVM 0.12.4 Guest entered Paused State Status in QEMU: New Bug de

[Qemu-devel] [PATCH 00/17] block: Convert .bdrv_read/write to .bdrv_preadv/pwritev

2016-04-27 Thread Kevin Wolf
This series introduces a new BlockDriver interface, which will hopefully be the final one, or at least good enough for another few years: .bdrv_preadv/pwritev. It is based on coroutines, vectored, has flags and uses a byte granularity. This is now the preferred interface for new drivers. All drive

[Qemu-devel] [PATCH 02/17] block: Introduce bdrv_driver_pwritev()

2016-04-27 Thread Kevin Wolf
This is a function that simply calls into the block driver for doing a write, providing the byte granularity interface we want to eventually have everywhere, and using whatever interface that driver supports. This one is a bit more interesting that the version for reads: It adds support for .bdrv_

[Qemu-devel] [PATCH 01/17] block: Introduce bdrv_driver_preadv()

2016-04-27 Thread Kevin Wolf
This is a function that simply calls into the block driver for doing a read, providing the byte granularity interface we want to eventually have everywhere, and using whatever interface that driver supports. For now, this is just a wrapper for calling bs->drv->bdrv_co_readv(). Signed-off-by: Kevi

[Qemu-devel] [PATCH 09/17] vdi: Implement .bdrv_co_preadv() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vdi.c | 55 --- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 75d4819..8295511 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -557,48 +557,57 @@ static int64_t

[Qemu-devel] [PATCH 07/17] cloop: Implement .bdrv_co_preadv() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/cloop.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/block/cloop.c b/block/cloop.c index a84f140..7289a80 100644 --- a/block/cloop.c +++ b/block/cloop.c @@ -66,6 +66,7 @@ static int cloop_open(BlockDriv

[Qemu-devel] [PATCH 06/17] bochs: Implement .bdrv_co_preadv() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/bochs.c | 46 +- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/block/bochs.c b/block/bochs.c index af8b7ab..d148454 100644 --- a/block/bochs.c +++ b/block/bochs.c @@ -104,6 +104,7 @@ static int bochs

[Qemu-devel] [PATCH 03/17] block: Support AIO drivers in bdrv_driver_preadv/pwritev()

2016-04-27 Thread Kevin Wolf
Instead of registering emulation functions as .bdrv_co_writev, just directly check whether the function is there or not, and use the AIO interface if it isn't. This makes the read/write functions more consistent with how things are done in other places (flush, discard, etc.) Signed-off-by: Kevin W

[Qemu-devel] [PATCH 04/17] block: Rename bdrv_co_do_preadv/writev to bdrv_co_preadv/writev

2016-04-27 Thread Kevin Wolf
It used to be an internal helper function just for implementing bdrv_co_do_readv/writev(), but now that it's a public interface, it deserves a name without "do" in it. Signed-off-by: Kevin Wolf --- block/block-backend.c | 4 ++-- block/io.c| 20 ++-- block/ra

[Qemu-devel] [PATCH 11/17] vmdk: Add vmdk_find_offset_in_cluster()

2016-04-27 Thread Kevin Wolf
This is a byte granularity version of vmdk_find_index_in_cluster(). Signed-off-by: Kevin Wolf --- block/vmdk.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 45f9d3c..f1e01f9 100644 --- a/block/vmdk.c +++ b/block/vmd

[Qemu-devel] [PATCH 10/17] vdi: Implement .bdrv_co_pwritev() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vdi.c | 72 +++-- 1 file changed, 41 insertions(+), 31 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 8295511..e5fe4e8 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -611,53 +611,55 @@ vdi_co_pr

[Qemu-devel] [PATCH 08/17] dmg: Implement .bdrv_co_preadv() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/dmg.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/block/dmg.c b/block/dmg.c index a496eb7..ca37c92 100644 --- a/block/dmg.c +++ b/block/dmg.c @@ -440,6 +440,8 @@ static int dmg_open(BlockDriverState

[Qemu-devel] [PATCH 05/17] block: Introduce .bdrv_co_preadv/pwritev BlockDriver function

2016-04-27 Thread Kevin Wolf
Many parts of the block layer are already byte granularity. The block driver interface, however, was still missing an interface that allows making use of this. This patch introduces a new BlockDriver interface, which is based on coroutines, vectored, has flags and uses a byte granularity. This is n

[Qemu-devel] [Bug 1575561] [NEW] config qemu virtio_queue_size to 1024,create vm boot from network failed

2016-04-27 Thread Michael liu
Public bug reported: config qemu virtio_queue_size to 1024,create vm boot from network failed。 in the vm vncviewer,see the error log: “ERROR queue size 1024 > 256 could not open net0: no such file or directory" ** Affects: qemu Importance: Undecided Status: New -- You received th

[Qemu-devel] [PATCH 13/17] vmdk: Implement .bdrv_co_pwritev() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vmdk.c | 209 ++- 1 file changed, 135 insertions(+), 74 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index d9b9b89..f177ffd 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1016,27 +1016,26 @@ st

[Qemu-devel] [PATCH 14/17] vpc: Implement .bdrv_co_preadv() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vpc.c | 79 - 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 3e2ea69..0099a80 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -454,22 +454,21 @@ static in

[Qemu-devel] [PATCH 12/17] vmdk: Implement .bdrv_co_preadv() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vmdk.c | 88 +++- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index f1e01f9..d9b9b89 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1381,8 +1381,8 @@ stati

Re: [Qemu-devel] [PATCH v6 01/10] qom: add helpers for UserCreatable object types

2016-04-27 Thread Daniel P. Berrange
On Wed, Apr 27, 2016 at 11:26:23AM +0200, Markus Armbruster wrote: > This commit regresses error message quality from > > $ qemu-system-x86_64 -nodefaults -display none -object > secret,id=sec0,data=letmein,format=raw,foo=bar > qemu-system-x86_64: -object > secret,id=sec0,data=letmein,fo

[Qemu-devel] [PATCH 15/17] vpc: Implement .bdrv_co_pwritev() interface

2016-04-27 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/vpc.c | 86 ++--- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 0099a80..61a8427 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -518,7 +518,7 @@ static int

[Qemu-devel] [PATCH 16/17] vvfat: Implement .bdrv_co_preadv/pwritev interfaces

2016-04-27 Thread Kevin Wolf
This doesn't really convert any of the actual vvfat logic to use vectored I/O (and it's doubtful whether that would make sense), but instead just adapts the wrappers to the modern interface. Signed-off-by: Kevin Wolf --- block/vvfat.c | 55 ++-

[Qemu-devel] [PATCH 17/17] block: Remove BlockDriver.bdrv_read/write

2016-04-27 Thread Kevin Wolf
There are no block drivers left that implement the old .bdrv_read/write interface, so it can be removed now. This gets us rid of the corresponding emulation functions, too. Signed-off-by: Kevin Wolf --- block.c | 2 -- block/io.c| 92 ---

[Qemu-devel] [PATCH v6 for-2.7 02/28] io: avoid double-free when closing QIOChannelBuffer

2016-04-27 Thread Daniel P. Berrange
The QIOChannelBuffer's close implementation will free the internal data buffer. It failed to reset the pointer to NULL though, so when the object is later finalized it will free it a second time with predictable crash. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- io

Re: [Qemu-devel] Is anyone able to load a web page from a guest operating system?

2016-04-27 Thread Laszlo Ersek
On 04/26/16 22:12, Thomas Huth wrote: > On 26.04.2016 21:25, Programmingkid wrote: >> On Apr 26, 2016, at 3:00 PM, Dr. David Alan Gilbert wrote: >>> Does ping work? >> I can ping the virtual router at 10.0.2.2. Any other ip address fails. > > That's normal for user-mode / slirp networking. You c

[Qemu-devel] [Bug 1575561] Re: config qemu virtio_queue_size to 1024,create vm boot from network failed

2016-04-27 Thread Michael liu
but vm by other boot type ,such as dev='hd', can use virtio_queue_size = 1024 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1575561 Title: config qemu virtio_queue_size to 1024,create vm boot from

[Qemu-devel] [PATCH v6 for-2.7 07/28] migration: force QEMUFile to blocking mode for outgoing migration

2016-04-27 Thread Daniel P. Berrange
Instead of relying on the default QEMUFile I/O blocking flag state, explicitly turn on blocking I/O for outgoing migration since it takes place in a background thread. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/migration.c | 1 + 1 file changed, 1 insert

[Qemu-devel] [PATCH v6 for-2.7 00/28] Convert migration to QIOChannel & support

2016-04-27 Thread Daniel P. Berrange
This is an update of patches that were previously posted FYI: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg00829.html v1: https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg01914.html v2: https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg03509.html v3: https://l

[Qemu-devel] [Bug 1575561] Re: config qemu virtio_queue_size to 1024,create vm boot from network failed

2016-04-27 Thread Michael liu
the vm bios is seabios. see the seabios,it queue size config 256,can not change. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1575561 Title: config qemu virtio_queue_size to 1024,create vm boot fr

[Qemu-devel] [PATCH v6 for-2.7 13/28] migration: rename unix.c to socket.c

2016-04-27 Thread Daniel P. Berrange
The unix.c file will be nearly the same as the tcp.c file, only differing in the initial SocketAddress creation code. Rename unix.c to socket.c and refactor it a little to prepare for merging the TCP code. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/Makef

[Qemu-devel] [PATCH v6 for-2.7 04/28] migration: ensure qemu_fflush() always writes full data amount

2016-04-27 Thread Daniel P. Berrange
The QEMUFile writev_buffer / put_buffer functions are expected to write out the full set of requested data, blocking until complete. The qemu_fflush() caller does not expect to deal with partial writes. Clarify the function comments and add a sanity check to the code to catch mistaken implementatio

[Qemu-devel] [PATCH v6 for-2.7 01/28] s390: use FILE instead of QEMUFile for creating text file

2016-04-27 Thread Daniel P. Berrange
The s390 skeys monitor command needs to write out a plain text file. Currently it is using the QEMUFile class for this, but work is ongoing to refactor QEMUFile and eliminate much code related to it. The only feature qemu_fopen() gives over fopen() is support for QEMU FD passing, but this can be ac

[Qemu-devel] [PATCH v6 for-2.7 06/28] migration: introduce set_blocking function in QEMUFileOps

2016-04-27 Thread Daniel P. Berrange
Remove the assumption that every QEMUFile implementation has a file descriptor available by introducing a new function in QEMUFileOps to change the blocking state of a QEMUFile. If not set, it will fallback to the original code using the get_fd method. Reviewed-by: Dr. David Alan Gilbert Signed-

[Qemu-devel] [PATCH v6 for-2.7 19/28] migration: delete QEMUFile buffer implementation

2016-04-27 Thread Daniel P. Berrange
The qemu_bufopen() method is no longer used, so the memory buffer based QEMUFile backend can be deleted entirely. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 6 --- migration/qemu-file-buf.c | 96

[Qemu-devel] [PATCH v6 for-2.7 15/28] migration: convert fd socket protocol to use QIOChannel

2016-04-27 Thread Daniel P. Berrange
Convert the fd socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built because the QIOChannel APIs it uses will take care to report suitable error messages if needed. Reviewed-by: Dr. David Alan Gilbert Signed-off-by:

[Qemu-devel] [PATCH v6 for-2.7 03/28] migration: remove use of qemu_bufopen from vmstate tests

2016-04-27 Thread Daniel P. Berrange
Some of the test-vmstate.c test cases use a temporary file while others use a memory buffer. To facilitate the future removal of the qemu_bufopen() function, convert all the tests to use a temporary file. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- tests/Makefile

[Qemu-devel] [PATCH v6 for-2.7 23/28] migration: move definition of struct QEMUFile back into qemu-file.c

2016-04-27 Thread Daniel P. Berrange
Now that the memory buffer based QEMUFile impl is gone, there is no need for any backend to be accessing internals of the QEMUFile struct, so it can be moved back into qemu-file.c Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/qemu-file-internal.h | 54 -

[Qemu-devel] [PATCH v6 for-2.7 28/28] migration: remove qemu_get_fd method from QEMUFile

2016-04-27 Thread Daniel P. Berrange
Now that there is a set_blocking callback in QEMUFileOps, and all users needing non-blocking support have been converted to QIOChannel, there is no longer any codepath requiring the qemu_get_fd() method for QEMUFile. Remove it to avoid further code being introduced with an expectation of direct fil

[Qemu-devel] [PATCH v6 for-2.7 08/28] migration: introduce a new QEMUFile impl based on QIOChannel

2016-04-27 Thread Daniel P. Berrange
Introduce a new QEMUFile implementation that is based on the QIOChannel objects. This impl is different from existing impls in that there is no file descriptor that can be made available, as some channels may be based on higher level protocols such as TLS. Although the QIOChannel based implementat

[Qemu-devel] [PATCH v6 for-2.7 26/28] migration: add support for encrypting data with TLS

2016-04-27 Thread Daniel P. Berrange
This extends the migration_set_incoming_channel and migration_set_outgoing_channel methods so that they will automatically wrap the QIOChannel in a QIOChannelTLS instance if TLS credentials are configured in the migration parameters. This allows TLS to work for tcp, unix, fd and exec migration pro

[Qemu-devel] [PATCH v6 for-2.7 12/28] migration: convert unix socket protocol to use QIOChannel

2016-04-27 Thread Daniel P. Berrange
Convert the unix socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of plain sockets APIs. It can be unconditionally built, since the socket impl of QIOChannel will report a suitable error on platforms where UNIX sockets are unavailable. Reviewed-by: Dr. David Alan Gil

[Qemu-devel] [PATCH v6 for-2.7 11/28] migration: convert post-copy to use QIOChannelBuffer

2016-04-27 Thread Daniel P. Berrange
The post-copy code does some I/O to/from an intermediate in-memory buffer rather than direct to the underlying I/O channel. Switch this code to use QIOChannelBuffer instead of QEMUSizedBuffer. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- docs/migration.txt | 4

[Qemu-devel] [PATCH v6 for-2.7 27/28] migration: remove support for non-iovec based write handlers

2016-04-27 Thread Daniel P. Berrange
All the remaining QEMUFile implementations provide an iovec based write handler, so the put_buffer callback can be removed to simplify the code. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 9 - migration/qemu-file.c

[Qemu-devel] [PATCH v6 for-2.7 09/28] migration: add helpers for creating QEMUFile from a QIOChannel

2016-04-27 Thread Daniel P. Berrange
Currently creating a QEMUFile instance from a QIOChannel is quite simple only requiring a single call to qemu_fopen_channel_input or qemu_fopen_channel_output depending on the end of migration connection. When QEMU gains TLS support, however, there will need to be a TLS negotiation done inbetween

[Qemu-devel] [PATCH v6 for-2.7 16/28] migration: convert exec socket protocol to use QIOChannel

2016-04-27 Thread Daniel P. Berrange
Convert the exec socket migration protocol driver to use QIOChannel and QEMUFileChannel, instead of the stdio popen APIs. It can be unconditionally built because the QIOChannelCommand class can report suitable error messages on platforms which can't fork processes. Reviewed-by: Dr. David Alan Gilb

[Qemu-devel] [PATCH v6 for-2.7 14/28] migration: convert tcp socket protocol to use QIOChannel

2016-04-27 Thread Daniel P. Berrange
Drop the current TCP socket migration driver and extend the new generic socket driver to cope with the TCP address format Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/Makefile.objs | 2 +- migration/socket.c | 31 +++ migration/tcp.c

[Qemu-devel] [PATCH v6 for-2.7 21/28] migration: delete QEMUFile sockets implementation

2016-04-27 Thread Daniel P. Berrange
Now that the tcp, unix and fd migration backends have converted to use the QIOChannel based QEMUFile, there is no user remaining for the sockets based QEMUFile impl and it can be deleted. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h |

Re: [Qemu-devel] Is anyone able to load a web page from a guest operating system?

2016-04-27 Thread Thomas Huth
On 27.04.2016 12:05, Laszlo Ersek wrote: > On 04/26/16 22:12, Thomas Huth wrote: >> On 26.04.2016 21:25, Programmingkid wrote: >>> On Apr 26, 2016, at 3:00 PM, Dr. David Alan Gilbert wrote: > Does ping work? >>> I can ping the virtual router at 10.0.2.2. Any other ip address fails. >> >> Tha

[Qemu-devel] [PATCH v6 for-2.7 17/28] migration: convert RDMA to use QIOChannel interface

2016-04-27 Thread Daniel P. Berrange
This converts the RDMA code to provide a subclass of QIOChannel that uses RDMA for the data transport. This implementation of RDMA does not correctly handle non-blocking mode. Reads might block if there was not already some pending data and writes will block until all data is sent. This flawed beh

[Qemu-devel] [PATCH v6 for-2.7 18/28] migration: convert savevm to use QIOChannel for writing to files

2016-04-27 Thread Daniel P. Berrange
Convert the exec savevm code to use QIOChannel and QEMUFileChannel, instead of the stdio APIs. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/savevm.c | 8 +--- tests/Makefile | 4 ++-- tests/test-vmstate.c | 11 ++- 3 files changed, 17

[Qemu-devel] [PATCH v6 for-2.7 20/28] migration: delete QEMUSizedBuffer struct

2016-04-27 Thread Daniel P. Berrange
Now that we don't have have a buffer based QemuFile implementation, the QEMUSizedBuffer code is also unused and can be deleted. A simpler buffer class also exists in util/buffer.c which other code can used as needed. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- incl

[Qemu-devel] [PATCH v6 for-2.7 24/28] migration: don't use an array for storing migrate parameters

2016-04-27 Thread Daniel P. Berrange
The MigrateState struct uses an array for storing migration parameters. This presumes that all future parameters will be integers too, which is not going to be the case. There is no functional reason why an array is used, if anything it makes the code less clear. The QAPI schema already defines a s

[Qemu-devel] [PATCH v6 for-2.7 22/28] migration: delete QEMUFile stdio implementation

2016-04-27 Thread Daniel P. Berrange
Now that the exec migration backend and savevm have converted to use the QIOChannel based QEMUFile, there is no user remaining for the stdio based QEMUFile impl and it can be deleted. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- include/migration/qemu-file.h | 2 -

[Qemu-devel] [PATCH v6 for-2.7 25/28] migration: define 'tls-creds' and 'tls-hostname' migration parameters

2016-04-27 Thread Daniel P. Berrange
Define two new migration parameters to be used with TLS encryption. The 'tls-creds' parameter provides the ID of an instance of the 'tls-creds' object type, or rather a subclass such as 'tls-creds-x509'. Providing these credentials will enable use of TLS on the migration data stream. If using x509

[Qemu-devel] [PATCH v6 for-2.7 05/28] migration: split migration hooks out of QEMUFileOps

2016-04-27 Thread Daniel P. Berrange
The QEMUFileOps struct contains the I/O subsystem callbacks and the migration stage hooks. Split the hooks out into a separate QEMUFileHooks struct to make it easier to refactor the I/O side of QEMUFile without affecting the hooks. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berr

[Qemu-devel] [PATCH v6 for-2.7 10/28] migration: add reporting of errors for outgoing migration

2016-04-27 Thread Daniel P. Berrange
Currently if an application initiates an outgoing migration, it may or may not, get an error reported back on failure. If the error occurs synchronously to the 'migrate' command execution, the client app will see the error message. This is the case for DNS lookup failures. If the error occurs async

Re: [Qemu-devel] Is anyone able to load a web page from a guest operating system?

2016-04-27 Thread Laszlo Ersek
On 04/27/16 12:26, Thomas Huth wrote: > On 27.04.2016 12:05, Laszlo Ersek wrote: >> On 04/26/16 22:12, Thomas Huth wrote: >>> On 26.04.2016 21:25, Programmingkid wrote: On Apr 26, 2016, at 3:00 PM, Dr. David Alan Gilbert wrote: >> > Does ping work? I can ping the virtual router at 10.

Re: [Qemu-devel] [PATCH] iotests: fix the redirection order in 083

2016-04-27 Thread Max Reitz
On 26.04.2016 12:13, Wei Jiangang wrote: > It should redirect stdout to /dev/null first, > then redirect stderr to whatever stdout currently points at. > > Signed-off-by: Wei Jiangang > --- > tests/qemu-iotests/083 | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Thanks, applied to m

[Qemu-devel] [Bug 1575607] [NEW] vm startup failed, qemu returned "kvm run failed Bad address"

2016-04-27 Thread Michael liu
Public bug reported: create a virtual machine and start by libvirt. vm startup failed, qemu returned "kvm run failed Bad address" the error log is : error: kvm run failed Bad address EAX=7ffc EBX=7ffbffd0 ECX=fff0 EDX=002c ESI=6f5c EDI=7ffbffd0 EBP=7ffc ESP=6f34 EI

Re: [Qemu-devel] [RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree

2016-04-27 Thread Michael S. Tsirkin
On Fri, Mar 25, 2016 at 10:34:33AM +0800, Jason Wang wrote: > Current pre-sorted memory region array has some limitations for future > device IOTLB conversion: > > 1) need extra work for adding and removing a single region, and it's >expected to be slow because of sorting or memory re-allocati

Re: [Qemu-devel] [PATCH v4 1/1] qemu-img: check block status of backing file when converting.

2016-04-27 Thread Max Reitz
On 23.04.2016 08:26, Ren Kimura wrote: > When converting images, check the block status of its backing file chain > to avoid needlessly reading zeros. > > Signed-off-by: Ren Kimura > --- > qemu-img.c | 31 +-- > 1 file changed, 29 insertions(+), 2 deletions(-) > > di

Re: [Qemu-devel] [RFC PATCH V2 2/2] vhost: device IOTLB API

2016-04-27 Thread Michael S. Tsirkin
On Fri, Mar 25, 2016 at 10:34:34AM +0800, Jason Wang wrote: > This patch tries to implement an device IOTLB for vhost. This could be > used with for co-operation with userspace(qemu) implementation of DMA > remapping. > > The idea is simple. When vhost meets an IOTLB miss, it will request > the as

Re: [Qemu-devel] [RFC PATCH V3 0/4] Introduce COLO-compare

2016-04-27 Thread Zhang Chen
Ping... This patch has been no news for a week~~~ Thanks zhang chen On 04/18/2016 07:11 PM, Zhang Chen wrote: COLO-compare is a part of COLO project. It is used to compare the network package to help COLO decide whether to do checkpoint. We rebase colo-compare to colo-frame v2.7 you can get th

Re: [Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode

2016-04-27 Thread Eduardo Habkost
On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: > From: Eduardo Habkost > > Introduce Skylake-Client cpu mode which inherits the features from > Broadwell and supports some additional features that are: MPX, > XSAVEC, XSAVES and XGETBV1 > > Note: > 1. As XSAVES is disabled in ups

Re: [Qemu-devel] [PATCH v9 01/11] block: keep a list of block jobs

2016-04-27 Thread Max Reitz
On 04.04.2016 15:43, Alberto Garcia wrote: > The current way to obtain the list of existing block jobs is to > iterate over all root nodes and check which ones own a job. > > Since we want to be able to support block jobs in other nodes as well, > this patch keeps a list of jobs that is updated ev

[Qemu-devel] [PATCH 1/1] mm: thp: kvm: fix memory corruption in KVM with THP enabled

2016-04-27 Thread Andrea Arcangeli
After the THP refcounting change, obtaining a compound pages from get_user_pages() no longer allows us to assume the entire compound page is immediately mappable from a secondary MMU. A secondary MMU doesn't want to call get_user_pages() more than once for each compound page, in order to know if i

Re: [Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all()

2016-04-27 Thread Max Reitz
On 04.04.2016 15:43, Alberto Garcia wrote: > bdrv_drain_all() pauses all block jobs by using bdrv_next() to iterate > over all top-level BlockDriverStates. Therefore the code is unable to > find block jobs in other nodes. > > This patch uses block_job_next() to iterate over all block jobs. > > Si

Re: [Qemu-devel] [PATCH v9 02/11] block: use the block job list in bdrv_drain_all()

2016-04-27 Thread Alberto Garcia
On Wed 27 Apr 2016 02:04:33 PM CEST, Max Reitz wrote: >> -bs = NULL; >> -while ((bs = bdrv_next(bs))) { >> -AioContext *aio_context = bdrv_get_aio_context(bs); >> +while ((job = block_job_next(job))) { >> +AioContext *aio_context = bdrv_get_aio_context(job->bs); > > Tech

Re: [Qemu-devel] [PATCH v9 03/11] block: use the block job list in qmp_query_block_jobs()

2016-04-27 Thread Max Reitz
On 04.04.2016 15:43, Alberto Garcia wrote: > qmp_query_block_jobs() uses bdrv_next() to look for block jobs, but > this function can only find those in top-level BlockDriverStates. > > This patch uses block_job_next() instead. > > Signed-off-by: Alberto Garcia > --- > blockdev.c | 19 --

Re: [Qemu-devel] [PATCH v9 04/11] block: use the block job list in bdrv_close()

2016-04-27 Thread Max Reitz
On 04.04.2016 15:43, Alberto Garcia wrote: > bdrv_close_all() cancels all block jobs by iterating over all > BlockDriverStates. This patch simplifies the code by iterating > directly over the block jobs using block_job_next(). > > Signed-off-by: Alberto Garcia > --- > block.c | 25 ++

Re: [Qemu-devel] [PATCH V2 RFC] fixup! virtio: convert to use DMA api

2016-04-27 Thread David Woodhouse
> > On some systems, including Xen and any system with a physical device > > that speaks virtio behind a physical IOMMU, we must use the DMA API > > for virtio DMA to work at all. > >  > > Add a feature bit to detect that: VIRTIO_F_IOMMU_PLATFORM. > >  > > If not there, we preserve historic behavi

Re: [Qemu-devel] [PATCH v14 13/19] qmp: Tighten output visitor rules

2016-04-27 Thread Eric Blake
On 04/27/2016 12:29 AM, Markus Armbruster wrote: @@ -455,6 +460,7 @@ static void test_visitor_out_alternate(TestOutputVisitorData *data, qapi_free_UserDefAlternate(tmp); qobject_decref(arg); +qmp_output_visitor_reset(data->qov); tmp = g_new0(U

[Qemu-devel] [PATCH 0/2] vvfat: Fix regressions introduced in 2.4

2016-04-27 Thread Kevin Wolf
Commit d5941dd added a little new feature and broke a few things (including the whole write support) while doing so. Let's fix this now and do a bit more careful testing when touching the driver in the future. Kevin Wolf (2): vvfat: Fix volume name assertion vvfat: Fix default volume label b

[Qemu-devel] [PATCH 1/2] vvfat: Fix volume name assertion

2016-04-27 Thread Kevin Wolf
Commit d5941dd made the volume name configurable, but it didn't consider that the rw code compares the volume name string to assert that the first directory entry is the volume name. This made vvfat crash in rw mode. This fixes the assertion to compare with the configured volume name instead of a

[Qemu-devel] [PATCH 2/2] vvfat: Fix default volume label

2016-04-27 Thread Kevin Wolf
Commit d5941dd documented that it leaves the default volume name as it was ("QEMU VVFAT"), but it doesn't actually implement this. You get an empty name (eleven space characters) instead. This fixes the implementation to apply the advertised default. Cc: qemu-sta...@nongnu.org Signed-off-by: Kevi

Re: [Qemu-devel] [PATCH v9 05/11] block: allow block jobs in any arbitrary node

2016-04-27 Thread Max Reitz
On 04.04.2016 15:43, Alberto Garcia wrote: > Currently, block jobs can only be owned by root nodes. This patch > allows block jobs to be in any arbitrary node, by making the following > changes: > > - Block jobs can now be identified by the node name of their > BlockDriverState in addition to th

  1   2   3   >