[Qemu-devel] [PATCH v8 08/12] block: Parse backing option to reference existing BDS

2013-12-13 Thread Fam Zheng
Now it's safe to allow reference for backing_hd in the interface. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/block.c b/block.c index b3993d7..fba7148 100644 --- a/block.c +++ b/block.c @@

Re: [Qemu-devel] Debugging with printf

2013-12-13 Thread Fam Zheng
On 2013年12月13日 15:47, Mar Tsan wrote: I understand that they're not one and the same but there are similarities. After all the Emulator is based on QEMU. How would someone go about editing QEMU source to display messages? There are also similarities in editing any C program to display

Re: [Qemu-devel] Debugging with printf

2013-12-13 Thread Mar Tsan
My problem is how do I read the information I want to print. From where? What do I do? 2013/12/13 Fam Zheng f...@redhat.com On 2013年12月13日 15:47, Mar Tsan wrote: I understand that they're not one and the same but there are similarities. After all the Emulator is based on QEMU. How would

Re: [Qemu-devel] Occasional clockjump in Win2012 after Live Migration

2013-12-13 Thread Peter Lieven
Am 13.12.2013 05:12, schrieb Vadim Rozenfeld: Does your VM belong to domain or workgroup? We had 2 vServers where this happened. One was a Domain Controller and the second was an independent Workgroup Server. Do you have evidence how the DateTime Clock is driven in Windows 2012? Peter

Re: [Qemu-devel] controlling qemu

2013-12-13 Thread Stefan Hajnoczi
On Mon, Dec 09, 2013 at 05:59:32PM +0100, lukass.va...@seznam.cz wrote: I want to implement library in c++, that will start and control QEMU. But I dont know how to handle qemu and how to send signals to QEMU. Could you give me at least some hint how to do that? Most management stacks and

Re: [Qemu-devel] [RFC 3/7] iothread: add I/O thread object

2013-12-13 Thread Stefan Hajnoczi
On Thu, Dec 12, 2013 at 12:00:12PM -0600, Michael Roth wrote: Quoting Stefan Hajnoczi (2013-12-12 07:19:40) +static void *iothread_run(void *opaque) +{ +IOThread *iothread = opaque; + +for (;;) { +/* TODO can we optimize away acquire/release to only happen when +

Re: [Qemu-devel] [PATCH] target-sh4: Use new qemu_ld/st opcodes

2013-12-13 Thread Alex Bennée
aurel...@aurel32.net writes: Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- target-sh4/translate.c | 167 ++-- 1 file changed, 90 insertions(+), 77 deletions(-) diff --git a/target-sh4/translate.c b/target-sh4/translate.c index

Re: [Qemu-devel] [PATCH] trace: add glib 2.32+ static GMutex support

2013-12-13 Thread Stefan Hajnoczi
On Thu, Dec 12, 2013 at 07:36:18PM +0400, Michael Tokarev wrote: 12.12.2013 18:52, Stefan Hajnoczi wrote: The GStaticMutex API was deprecated in glib 2.32. We cannot switch over to GMutex unconditionally since we would drop support for older glib versions. But the deprecated API warnings

Re: [Qemu-devel] [Spice-devel] Vdagent not working on xen linux hvm DomUs

2013-12-13 Thread Fabio Fantoni
Il 12/12/2013 17:05, Fabio Fantoni ha scritto: Il 12/12/2013 16:23, Wei Liu ha scritto: On Thu, Dec 12, 2013 at 02:10:23PM +0100, Fabio Fantoni wrote: [...] I did some other tests, I narrowed down the commit range to the one between: commit c9fea5d701f8fd33f0843728ec264d95cee3ed37 Mon, 22

[Qemu-devel] [PATCH v2] inet_listen_opts: add error checking

2013-12-13 Thread Gerd Hoffmann
Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v2: use parse_uint_full instead of strtol ] Signed-off-by: Gerd Hoffmann kra...@redhat.com --- util/qemu-sockets.c | 14 -- 1 file changed,

Re: [Qemu-devel] [PATCH 5/7] hw/arm/boot: Allow easier swapping in of different loader code

2013-12-13 Thread Peter Maydell
On 13 December 2013 03:19, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: Why do we need blobs at all? Cant we just fix arm/boot to directly setup the CPU state to the desired? Rather than complex blobs that execute ARM instructions just manipulate the regs directly. We could in theory

[Qemu-devel] [PATCH v3] inet_listen_opts: add error checking

2013-12-13 Thread Gerd Hoffmann
Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v3: oops, v2 didn't build ] [ v2: use parse_uint_full instead of strtol ] Signed-off-by: Gerd Hoffmann kra...@redhat.com --- util/qemu-sockets.c | 14

Re: [Qemu-devel] Occasional clockjump in Win2012 after Live Migration

2013-12-13 Thread Vadim Rozenfeld
On Fri, 2013-12-13 at 09:27 +0100, Peter Lieven wrote: Am 13.12.2013 05:12, schrieb Vadim Rozenfeld: Does your VM belong to domain or workgroup? We had 2 vServers where this happened. One was a Domain Controller and the second was an independent Workgroup Server. Do you have evidence

[Qemu-devel] [PATCH v4] inet_listen_opts: add error checking

2013-12-13 Thread Gerd Hoffmann
Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v4: didn't commit buildfix. -ENOCOFFEE. sorry for the spam ] [ v3: oops, v2 didn't build ] [ v2: use parse_uint_full instead of strtol ]

Re: [Qemu-devel] [PATCH] inet_listen_opts: add error checking

2013-12-13 Thread Gerd Hoffmann
Hi, rant WHY is strtol() such a PAINFUL interface to use correctly? And WHY can't qemu copy libvirt's lead of writing a SANE wrapper function, and then mandating that the rest of the code base use the sane wrapper instead of strtol()? /rant Turns out there already is one, just /me

[Qemu-devel] [PATCH v3 1/7] Add -mem-share option

2013-12-13 Thread Antonios Motakis
This option complements -mem-path. It implies -mem-prealloc. If specified, the guest RAM is allocated as a shared memory object. If both -mem-path and -mem-share are provided, the memory is allocated from the HugeTLBFS supplied path, and then mmapped with MAP_SHARED. Signed-off-by: Antonios

[Qemu-devel] [PATCH v3 0/7] host and vhost-net support for userspace based backends

2013-12-13 Thread Antonios Motakis
In this patch series we would like to introduce our approach for putting a virtio-net backend in an external userspace process. Our eventual target is to run the network backend in the Snabbswitch ethernet switch, while receiving traffic from a guest inside QEMU/KVM which runs an unmodified

[Qemu-devel] [PATCH v3 5/7] Add vhost-user calls implementation

2013-12-13 Thread Antonios Motakis
Each ioctl request of vhost-kernel has a vhost-user message equivalent, which is sent it over the control socket. The general approach is to copy the data from the supplied argument pointer to a designated field in the message. If a file descriptor is to be passed it should be placed also in the

[Qemu-devel] [PATCH v3 4/7] Add domain socket communication for vhost-user backend

2013-12-13 Thread Antonios Motakis
Add structures for passing vhost-user messages over a unix domain socket. This is the equivalent of the existing vhost-kernel ioctls. Connect to the named unix domain socket. The system call sendmsg is used for communication. To be able to pass file descriptors between processes - we use

[Qemu-devel] [PATCH v3 7/7] Add vhost-user reconnection

2013-12-13 Thread Antonios Motakis
At runtime vhost-user netdev will detect if the vhost backend is up or down. Upon disconnection it will set link_down accordingly and notify virtio-net. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev n.nikol...@virtualopensystems.com ---

[Qemu-devel] [PATCH v3 3/7] Add vhost-user skeleton

2013-12-13 Thread Antonios Motakis
Add empty vhost_call, init and cleanup for the vhost-user backend. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev n.nikol...@virtualopensystems.com --- hw/net/vhost_net.c| 57 ++-

[Qemu-devel] [PATCH v3 6/7] Add new vhost-user netdev backend

2013-12-13 Thread Antonios Motakis
Add a new QEMU netdev backend that is intended to invoke vhost_net with the vhost-user backend. Also decouple virtio-net from the tap backend. Signed-off-by: Antonios Motakis a.mota...@virtualopensystems.com Signed-off-by: Nikolay Nikolaev n.nikol...@virtualopensystems.com --- hmp-commands.hx

[Qemu-devel] [PATCH v3 2/7] Decouple vhost from kernel interface

2013-12-13 Thread Antonios Motakis
We introduce the concept of vhost-backend, which can be either vhost-kernel or vhost-user. The existing vhost interface to the kernel is abstracted behind the vhost-kernel backend. We replace all direct ioctls to the kernel with a vhost_call to the backend. vhost dev-control is referenced only in

[Qemu-devel] [PATCH] inet_listen_opts: add error checking

2013-12-13 Thread Gerd Hoffmann
Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v2: use parse_uint_full instead of strtol ] Signed-off-by: Gerd Hoffmann kra...@redhat.com --- util/qemu-sockets.c | 16 ++-- 1 file

[Qemu-devel] [PATCH v2] trace: add glib 2.32+ static GMutex support

2013-12-13 Thread Stefan Hajnoczi
The GStaticMutex API was deprecated in glib 2.32. We cannot switch over to GMutex unconditionally since we would drop support for older glib versions. But the deprecated API warnings during build are annoying so use static GMutex when possible. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com

Re: [Qemu-devel] Occasional clockjump in Win2012 after Live Migration

2013-12-13 Thread Peter Lieven
Am 13.12.2013 11:10, schrieb Vadim Rozenfeld: On Fri, 2013-12-13 at 09:27 +0100, Peter Lieven wrote: Am 13.12.2013 05:12, schrieb Vadim Rozenfeld: Does your VM belong to domain or workgroup? We had 2 vServers where this happened. One was a Domain Controller and the second was an independent

[Qemu-devel] [PATCH 1/5] net: extend NetClientInfo for offloading manipulations

2013-12-13 Thread Vincenzo Maffione
A set of new callbacks has been added to the NetClientInfo struct in order to abstract the operations done by virtio-net and vmxnet3 frontends to manipulate TAP offloadings. The net.h API has been extended with functions that access those abstract operations, providing frontends with a way to

[Qemu-devel] [PATCH 2/5] net: TAP uses NetClientInfo offloading callbacks

2013-12-13 Thread Vincenzo Maffione
The TAP NetClientInfo structure is inizialized with the TAP-specific callbacks that manipulates backend offloading features. Signed-off-by: Vincenzo Maffione v.maffi...@gmail.com --- net/tap.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/tap.c b/net/tap.c index 39c1cda..175fcb3

[Qemu-devel] [PATCH 5/5] net: virtio-net and vmxnet3 can use netmap offloadings

2013-12-13 Thread Vincenzo Maffione
With this patch we remove the existing checks in the virtio-net and vmxnet3 frontends that prevents them from using offloadings with backends different from TAP (e.g. netmap). Signed-off-by: Vincenzo Maffione v.maffi...@gmail.com --- hw/net/virtio-net.c | 4 hw/net/vmxnet3.c| 4 +--- 2

[Qemu-devel] [PATCH 0/5] Add netmap backend offloadings support

2013-12-13 Thread Vincenzo Maffione
The purpose of this patch series is to add offloadings support (TSO/UFO/CSUM) to the netmap network backend, and make it possible for the paravirtual network frontends (virtio-net and vmxnet3) to use it. In order to achieve this, these patches extend the existing net.h interface to add abstract

[Qemu-devel] [PATCH 3/5] net: virtio-net and vmxnet3 use offloading API

2013-12-13 Thread Vincenzo Maffione
With this patch, virtio-net and vmxnet3 frontends make use of the qemu_peer_* API for backend offloadings manipulations, instead of calling TAP-specific functions directly. Signed-off-by: Vincenzo Maffione v.maffi...@gmail.com --- hw/net/virtio-net.c | 12 ++-- hw/net/vmxnet3.c| 14

[Qemu-devel] [PATCH 4/5] net: add offloadings support to netmap backend

2013-12-13 Thread Vincenzo Maffione
Whit this patch, the netmap backend supports TSO/UFO/CSUM offloadings, and accepts the virtio-net header, similarly to what happens with TAP. The offloading callbacks in the NetClientInfo interface have been implemented. Signed-off-by: Vincenzo Maffione v.maffi...@gmail.com --- net/netmap.c | 64

Re: [Qemu-devel] [PATCH 4/5] monitor: add object-add (QMP) and object_add (HMP) command

2013-12-13 Thread Paolo Bonzini
Il 13/12/2013 03:55, Wenchao Xia ha scritto: 于 2013/12/11 2:15, Paolo Bonzini 写道: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 10/12/2013 19:00, Eric Blake ha scritto: + 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'}, + 'gen': 'no' } This feels VERY open-coded. No where

Re: [Qemu-devel] [PATCH v3] inet_listen_opts: add error checking

2013-12-13 Thread Eric Blake
On 12/13/2013 03:08 AM, Gerd Hoffmann wrote: Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v3: oops, v2 didn't build ] [ v2: use parse_uint_full instead of strtol ] Patch changelog belongs...

Re: [Qemu-devel] [PATCH v2] roms: Flush icache when writing roms to guest memory

2013-12-13 Thread Paolo Bonzini
Il 12/12/2013 10:29, Alexander Graf ha scritto: We use the rom infrastructure to write firmware and/or initial kernel blobs into guest address space. So we're basically emulating the cache off phase on very early system bootup. That phase is usually responsible for clearing the instruction

[Qemu-devel] [Bug 1259499] Re: QEmu 1.7.0 cannot restore a 1.6.0 live snapshot made in qemu-system-x86_64

2013-12-13 Thread Dr. David Alan Gilbert
Hi Francois, I've managed to reproduce this, in my log file (/var/log/libvirt/qemu/machinename.log) I see: Unknown ramblock :02.0/qxl.vram, cannot accept migration qemu: warning: error while loading state for instance 0x0 of device 'ram' qemu-system-x86_64: Error -22 while loading VM state

Re: [Qemu-devel] [PATCH v4] inet_listen_opts: add error checking

2013-12-13 Thread Eric Blake
On 12/13/2013 03:12 AM, Gerd Hoffmann wrote: Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v4: didn't commit buildfix. -ENOCOFFEE. sorry for the spam ] [ v3: oops, v2 didn't build ] [ v2:

[Qemu-devel] [PATCH 01/11] qom: do not register interface types in the type table

2013-12-13 Thread Igor Mammedov
From: Paolo Bonzini pbonz...@redhat.com There should be no need to look them up nor enumerate the interface types, whose classes are really just vtables. Just create the types and add them to the interface list of the parent type. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by:

[Qemu-devel] [PATCH 00/11 v3] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API

2013-12-13 Thread Igor Mammedov
changes since v2: * s/hotplugable/hotpluggable/ * move hotplug check to an earlier patch: qdev: add hotpluggable property to Device -- Refactor PCI specific hotplug API to a more generic/reusable one. Model it after SCSI-BUS like hotplug API replacing single hotplug callback with

[Qemu-devel] [PATCH 08/11] acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API

2013-12-13 Thread Igor Mammedov
Split piix4_device_hotplug() into hotplug/unplug callbacks and register them as hotplug-handler interface implementation of PIIX4_PM device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS hotplug-handler property to PIIX4_PM device. Signed-off-by: Igor Mammedov imamm...@redhat.com

[Qemu-devel] [PATCH 06/11] hw/acpi: move typeinfo to the file end

2013-12-13 Thread Igor Mammedov
do so to avoid not necessary forward declarations and place typeinfo registration at the file end where it's usualy expected. Signed-off-by: Igor Mammedov imamm...@redhat.com --- hw/acpi/piix4.c | 80 - 1 file changed, 40 insertions(+), 40

Re: [Qemu-devel] [PATCH v2 00/19] bsd-user: Add system call and mips/arm support.

2013-12-13 Thread Paolo Bonzini
Il 12/12/2013 20:57, Ed Maste ha scritto: This is a large change in an area that hasn't had a lot of activity of late; what are the next steps here? We're now in hard freeze, so the next step is to wait for 1.8 to be released. I reviewed the parts out of bsd-user, and had only one

[Qemu-devel] [PATCH 02/11] qom: detect bad reentrance during object_class_foreach

2013-12-13 Thread Igor Mammedov
From: Hervé Poussineau hpous...@reactos.org We should not modify the type hash table while it is being iterated on. Assert that it does not happen. Signed-off-by: Hervé Poussineau hpous...@reactos.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH 11/11] hw/pci: switch to a generic hotplug handling for PCIDevice

2013-12-13 Thread Igor Mammedov
make qdev_unplug()/device_set_realized() to call hotplug handler's plug/unplug methods if available and remove not needed anymore hot(un)plug handling from PCIDevice. In case if hotplug handler is not available, revert to the legacy hotplug method. Signed-off-by: Igor Mammedov

Re: [Qemu-devel] [PATCH v3] inet_listen_opts: add error checking

2013-12-13 Thread Gerd Hoffmann
Hi, parse_uint_full takes an 'unsigned long long *', but you are passing an 'int *'. I'm surprised it compiled for you. It causes a buffer overflow if the pointer is assigned to, and gives different results depending on platform endianness. Fixed in v4. +error_setg(errp,

Re: [Qemu-devel] [PATCH v4] inet_listen_opts: add error checking

2013-12-13 Thread Eric Blake
On 12/13/2013 05:42 AM, Eric Blake wrote: On 12/13/2013 03:12 AM, Gerd Hoffmann wrote: Don't use atoi() function which doesn't detect errors, switch to strtol and error out on failures. Also add a range check while being at it. [ v4: didn't commit buildfix. -ENOCOFFEE. sorry for the spam

[Qemu-devel] [PATCH 07/11] qdev:pci: refactor PCIDevice to use generic hotpluggable property

2013-12-13 Thread Igor Mammedov
Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and use generic DeviceClass.hotpluggable field instead. Signed-off-by: Igor Mammedov imamm...@redhat.com --- v2: * move generic hotplug checks to qdev: add hotpluggable property to Device patch * s/hotplugable/hotpluggable/ ---

[Qemu-devel] [PATCH 05/11] qdev: add hotpluggable property to Device

2013-12-13 Thread Igor Mammedov
Currently it's possible to make PCIDevice not hotpluggable by using no_hotplug field of PCIDeviceClass. However it limits this only to PCI devices and prevents from generalizing hotplug code. So add similar field to DeviceClass so it could be reused with other Devices and would allow to replace

[Qemu-devel] [PATCH 09/11] pci/shpc: convert SHPC hotplug to use hotplug-handler API

2013-12-13 Thread Igor Mammedov
Split shpc_device_hotplug() into hotplug/unplug callbacks and register them as hotplug-handler interface implementation of PCI_BRIDGE_DEV device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS hotplug-handler property to PCI_BRIDGE_DEV device. Signed-off-by: Igor Mammedov

Re: [Qemu-devel] [PATCH 00/13] Freescale mxs/imx23 + Olimex Olinuxino support

2013-12-13 Thread M P
Can someone give me a pointer on how the review (if any) is done for these patches? I have to say I'm rather amazed at the rate of submission on the mailing list, and I worried to see these patches buried further and further down in such a short timescale :-) Michael On Wed, Dec 11, 2013 at

Re: [Qemu-devel] Occasional clockjump in Win2012 after Live Migration

2013-12-13 Thread Vadim Rozenfeld
On Fri, 2013-12-13 at 12:50 +0100, Peter Lieven wrote: Am 13.12.2013 11:10, schrieb Vadim Rozenfeld: On Fri, 2013-12-13 at 09:27 +0100, Peter Lieven wrote: Am 13.12.2013 05:12, schrieb Vadim Rozenfeld: Does your VM belong to domain or workgroup? We had 2 vServers where this happened. One

Re: [Qemu-devel] Occasional clockjump in Win2012 after Live Migration

2013-12-13 Thread Peter Lieven
Am 13.12.2013 13:53, schrieb Vadim Rozenfeld: On Fri, 2013-12-13 at 12:50 +0100, Peter Lieven wrote: Am 13.12.2013 11:10, schrieb Vadim Rozenfeld: On Fri, 2013-12-13 at 09:27 +0100, Peter Lieven wrote: Am 13.12.2013 05:12, schrieb Vadim Rozenfeld: Does your VM belong to domain or workgroup?

[Qemu-devel] [PATCH 10/11] pci/pcie: convert PCIE hotplug to use hotplug-handler API

2013-12-13 Thread Igor Mammedov
Split pcie_cap_slot_hotplug() into hotplug/unplug callbacks and register them as hotplug-handler interface implementation of PCIE_SLOT device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS hotplug-handler property to PCI_BRIDGE_DEV device. Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH v2 07/24] block: rename buffer_alignment to guest_block_size

2013-12-13 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com The alignment field is now set to the value that is promised to the guest, rather than required by the host. The next patches will make QEMU aware of the host-provided values, so make this clear. The alignment is also not about memory buffers, but about

[Qemu-devel] [PATCH v2 00/24] block: Support for 512b-on-4k emulatio

2013-12-13 Thread Kevin Wolf
This patch series adds code to the block layer that allows performing I/O requests in smaller granularities than required by the host backend (most importantly, O_DIRECT restrictions). It achieves this for reads by rounding the request to host-side block boundary, and for writes by performing a

[Qemu-devel] [PATCH v2 02/24] block: Inherit opt_transfer_length

2013-12-13 Thread Kevin Wolf
When there is a format driver between the backend, it's not guaranteed that exposing the opt_transfer_length for the format driver results in the optimal requests (because of fragmentation etc.), but it can't make things worse, so let's just do it. Signed-off-by: Kevin Wolf kw...@redhat.com

[Qemu-devel] [PATCH v2 03/24] block: Update BlockLimits when they might have changed

2013-12-13 Thread Kevin Wolf
When reopening with different flags, or when backing files disappear from the chain, the limits may change. Make sure they get updated in these cases. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c | 5 -

[Qemu-devel] [PATCH v2 04/24] qemu_memalign: Allow small alignments

2013-12-13 Thread Kevin Wolf
The functions used by qemu_memalign() require an alignment that is at least sizeof(void*). Adjust it if it is too small. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- util/oslib-posix.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Qemu-devel] [PATCH v2 01/24] block: Move initialisation of BlockLimits to bdrv_refresh_limits()

2013-12-13 Thread Kevin Wolf
This function separates filling the BlockLimits from bdrv_open(), which allows it to call it from other operations which may change the limits (e.g. modifications to the backing file chain or bdrv_reopen) Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 19

[Qemu-devel] [PATCH v2 05/24] block: Detect unaligned length in bdrv_qiov_is_aligned()

2013-12-13 Thread Kevin Wolf
For an O_DIRECT request to succeed, it's not only necessary that all base addresses in the qiov are aligned, but also that each length in it is aligned. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block.c | 3 +++ 1 file changed, 3

[Qemu-devel] [PATCH v2 08/24] raw: Probe required direct I/O alignment

2013-12-13 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com Add a bs-request_alignment field that contains the required offset/length alignment for I/O requests and fill it in the raw block drivers. Use ioctls if possible, else see what alignment it takes for O_DIRECT to succeed. While at it, also expose the memory

[Qemu-devel] [PATCH v2 10/24] block: Introduce bdrv_co_do_preadv()

2013-12-13 Thread Kevin Wolf
Similar to bdrv_pread(), which aligns byte-aligned request to 512 byte sectors, bdrv_co_do_preadv() takes a byte-aligned request and aligns it to the alignment specified in bs-request_alignment. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 63

[Qemu-devel] [PATCH v2 09/24] block: Introduce bdrv_aligned_preadv()

2013-12-13 Thread Kevin Wolf
This separates the part of bdrv_co_do_readv() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 61

[Qemu-devel] [PATCH v2 06/24] block: Don't use guest sector size for qemu_blockalign()

2013-12-13 Thread Kevin Wolf
bs-buffer_alignment is set by the device emulation and contains the logical block size of the guest device. This isn't something that the block layer should know, and even less something to use for determining the right alignment of buffers to be used for the host. The new BlockLimits field

[Qemu-devel] [PATCH v2 17/24] block: Generalise and optimise COR serialisation

2013-12-13 Thread Kevin Wolf
Change the API so that specific requests can be marked serialising. Only these requests are checked for overlaps then. This means that during a Copy on Read operation, not all requests overlapping other requests are serialised any more, but only those that actually overlap with the specific COR

[Qemu-devel] [PATCH v2 11/24] block: Introduce bdrv_aligned_pwritev()

2013-12-13 Thread Kevin Wolf
This separates the part of bdrv_co_do_writev() that needs to happen before the request is modified to match the backend alignment, and a part that needs to be executed afterwards and passes the request to the BlockDriver. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 62

[Qemu-devel] [PATCH v2 13/24] block: Introduce bdrv_co_do_pwritev()

2013-12-13 Thread Kevin Wolf
This is going to become the bdrv_co_do_preadv() equivalent for writes. In this patch, however, just a function taking byte offsets is created, it doesn't align anything yet. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 23 +-- 1 file changed, 17 insertions(+), 6

[Qemu-devel] [PATCH v2 12/24] block: write: Handle COR dependency after I/O throttling

2013-12-13 Thread Kevin Wolf
First waiting for all COR requests to complete and calling the throttling function afterwards means that the request could be delayed and we still need to wait for the COR request even if it was issued only after the throttled write request. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c

[Qemu-devel] [PATCH v2 14/24] block: Switch BdrvTrackedRequest to byte granularity

2013-12-13 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 52 +++ block/backup.c| 7 ++- include/block/block_int.h | 4 ++-- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH v2 24/24] iscsi: Set bs-request_alignment

2013-12-13 Thread Kevin Wolf
From: Paolo Bonzini pbonz...@redhat.com The iSCSI backend already gets the block size from the READ CAPACITY command it sends. Save it so that the generic block layer gets it too. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block/iscsi.c | 1

[Qemu-devel] [PATCH v2 19/24] block: Allow wait_serialising_requests() at any point

2013-12-13 Thread Kevin Wolf
We can only have a single wait_serialising_requests() call per request because otherwise we can run into deadlocks where requests are waiting for each other. The same is true when wait_serialising_requests() is not at the very beginning of a request, so that other requests can be issued between

[Qemu-devel] [PATCH v2 16/24] block: Make zero-after-EOF work with larger alignment

2013-12-13 Thread Kevin Wolf
Odd file sizes could make bdrv_aligned_preadv() shorten the request in non-aligned ways. Fix it by rounding to the required alignment instead of 512 bytes. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH v2 22/24] block: Make bdrv_pread() a bdrv_prwv_co() wrapper

2013-12-13 Thread Kevin Wolf
Instead of implementing the alignment adjustment here, use the now existing functionality of bdrv_co_do_preadv(). Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 49 + 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH v2 20/24] block: Align requests in bdrv_co_do_pwritev()

2013-12-13 Thread Kevin Wolf
This patch changes bdrv_co_do_pwritev() to actually be what its name promises. If requests aren't properly aligned, it performs a RMW. Requests touching the same block are serialised against the RMW request. Further optimisation of this is possible by differentiating types of requests (concurrent

[Qemu-devel] [PATCH v2 23/24] block: Make bdrv_pwrite() a bdrv_prwv_co() wrapper

2013-12-13 Thread Kevin Wolf
Instead of implementing the alignment adjustment here, use the now existing functionality of bdrv_co_do_pwritev(). Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 64 +--- 1 file changed, 9 insertions(+), 55 deletions(-) diff

Re: [Qemu-devel] [PATCH RFC 1/3] os-posix: include sys/time.h

2013-12-13 Thread Eric Blake
On 11/12/2013 06:44 PM, Wenchao Xia wrote: Since gettimeofday() is used in this header file as a macro define, include the function's define header file, to avoid compile warning when other file include os-posix.h. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com ---

[Qemu-devel] [PATCH v2 21/24] block: Change coroutine wrapper to byte granularity

2013-12-13 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c | 48 ++-- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/block.c b/block.c index bfa2233..5b00d23 100644 --- a/block.c +++ b/block.c @@ -69,11 +69,11 @@ static int coroutine_fn

Re: [Qemu-devel] [PATCH 00/13] Freescale mxs/imx23 + Olimex Olinuxino support

2013-12-13 Thread Peter Maydell
On 13 December 2013 12:53, M P buser...@gmail.com wrote: Can someone give me a pointer on how the review (if any) is done for these patches? I have to say I'm rather amazed at the rate of submission on the mailing list, and I worried to see these patches buried further and further down in such

Re: [Qemu-devel] [PATCH RFC 3/3] tests: add test cases for qapi event support

2013-12-13 Thread Eric Blake
On 11/12/2013 06:44 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- +++ b/tests/qapi-schema/qapi-schema-test.json @@ -93,3 +93,15 @@ '*u16' : [ 'uint16' ], '*i64x': 'int' , '*u64x': 'uint64' } } + +# testing event +{ 'type':

Re: [Qemu-devel] [PATCH] target-sh4: Use new qemu_ld/st opcodes

2013-12-13 Thread Aurelien Jarno
On Fri, Dec 13, 2013 at 09:36:13AM +, Alex Bennée wrote: aurel...@aurel32.net writes: Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- target-sh4/translate.c | 167 ++-- 1 file changed, 90 insertions(+), 77 deletions(-)

Re: [Qemu-devel] [PATCH RFC 2/3] qapi script: add support of event

2013-12-13 Thread Kevin Wolf
Am 13.12.2013 um 14:31 hat Eric Blake geschrieben: On 11/12/2013 06:44 PM, Wenchao Xia wrote: +++ b/scripts/qapi-event.py @@ -0,0 +1,355 @@ +# +# QAPI event generator +# +# Copyright IBM, Corp. 2013 +# +# Authors: +# Wenchao Xia xiaw...@linux.vnet.ibm.com +# +# This work is

Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert

2013-12-13 Thread Eric Blake
On 12/08/2013 08:43 PM, Wenchao Xia wrote: convert -s snapshot.name=name1 Previous I planned to use -l for internal snapshot in all possible program, since -s is taken as external snapshot in qemu, qemu-nbd. Consistency in command line options between different tools is nice, but is less

[Qemu-devel] [PATCH 03/11] define hotplug interface

2013-12-13 Thread Igor Mammedov
Provide generic hotplug interface for devices. Intended for replacing hotplug mechanism used by PCI/PCIE/SHPC code and will be used for memory hotplug. Signed-off-by: Igor Mammedov imamm...@redhat.com --- v2: * s/device/handler/ * add hotplug_handler_plug/hotplug_handler_unplug API v1: it's

Re: [Qemu-devel] [PATCH 00/13] Freescale mxs/imx23 + Olimex Olinuxino support

2013-12-13 Thread M P
Thanks Peter, very helpful -- and err, sorry to land you more work than you already had :-) Would I contribute anything by also reviewing and/or testing the sus mentioned patches? I can at least test the A10 and raspi if this helps... M On Fri, Dec 13, 2013 at 1:29 PM, Peter Maydell

[Qemu-devel] [PATCH v2 18/24] block: Make overlap range for serialisation dynamic

2013-12-13 Thread Kevin Wolf
Copy on Read wants to serialise with all requests touching the same cluster, so wait_serialising_requests() rounded to cluster boundaries. Other users like alignment RMW will have different requirements, though (requests touching the same sector), so make it dynamic. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH RFC 2/3] qapi script: add support of event

2013-12-13 Thread Eric Blake
On 11/12/2013 06:44 PM, Wenchao Xia wrote: Nested structure is not supported now, so following define is not valid: { 'event': 'EVENT_C', 'data': { 'a': { 'a_a', 'str', 'a_b', 'str' }, 'b': 'int' } But what IS valid? You need to document this in docs/qapi-code-gen.txt at a bare minimum.

[Qemu-devel] [PATCH v2 15/24] block: Allow waiting for overlapping requests between begin/end

2013-12-13 Thread Kevin Wolf
Previously, it was not possible to use wait_for_overlapping_requests() between tracked_request_begin()/end() because it would wait for itself. Ignore the current request in the overlap check and run more of the bdrv_co_do_preadv/pwritev code with a BdrvTrackedRequest present. Signed-off-by:

Re: [Qemu-devel] [PATCH V4 6/9] qapi script: support pre-defined enum type as discriminator in union

2013-12-13 Thread Eric Blake
On 12/10/2013 10:48 PM, Wenchao Xia wrote: By default, any union will automatically generate a enum type as [UnionName]Kind in C code, and it is duplicated when the discriminator is specified as a pre-defined enum type in schema. After this patch, the pre-defined enum type will be really used

[Qemu-devel] [PATCH 04/11] qdev: add to BusState hotplug-handler link

2013-12-13 Thread Igor Mammedov
It will allow to reuse field with different BUSes, reducing code duplication. Field is intended fot replacing 'hotplug_qdev' field in PCIBus and also will allow to avoid adding equivalent field to DimmBus with possiblitity to refactor other BUSes to use it instead of custom field. In addition once

Re: [Qemu-devel] [PATCH v2 1/8] target-arm: A64: add support for ld/st pair

2013-12-13 Thread Peter Maydell
On 12 December 2013 12:14, C Fontana claudio.font...@linaro.org wrote: I think that there is more than the missing return: we need to handle the case 0 as well, as it's a perfectly valid form of a load/store pair: it's the Load/Store no-allocate pair (offset) (LDNP, STNP). So in my view we

[Qemu-devel] How to Learn Qemu for Development?

2013-12-13 Thread Hossein Zabolzadeh
Dear All, Hi, I traverse qemu website, to find out  some useful documents for learning qemu basics, and concepts. But, all available documents require so in-depth technical knowledge and no one found to be self-instructive. I need a book or any other tutorial-like resources, to learn Qemu and

Re: [Qemu-devel] [PULL 00/30] virtio conversion to realize and hotplug/unplug fixes

2013-12-13 Thread Paolo Bonzini
Il 11/12/2013 08:45, Paolo Bonzini ha scritto: Anthony, the following changes since commit 7dc65c02fe3fb8f3146ce0b9ff5fec5945329f0e: Open 2.0 development tree (2013-11-27 14:02:45 -0800) This also conflicts badly. This doesn't conflict here either. What files are conflicting

Re: [Qemu-devel] [PATCH v3 04/21] qapi: extend qdict_flatten() for QLists

2013-12-13 Thread Max Reitz
On 12.12.2013 07:17, Fam Zheng wrote: On 2013年12月12日 02:10, Max Reitz wrote: Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This allows bringing QDicts with QLists from QMP commands to the same

Re: [Qemu-devel] [PATCH v3 04/21] qapi: extend qdict_flatten() for QLists

2013-12-13 Thread Max Reitz
On 12.12.2013 07:21, Fam Zheng wrote: On 2013年12月12日 02:10, Max Reitz wrote: Reversing qdict_array_split(), qdict_flatten() should flatten QLists as well by interpreting them as QDicts where every entry's key is its index. This allows bringing QDicts with QLists from QMP commands to the same

Re: [Qemu-devel] [PATCH v3 08/21] block: Allow reference for bdrv_file_open()

2013-12-13 Thread Max Reitz
On 12.12.2013 09:01, Fam Zheng wrote: On 2013年12月12日 02:11, Max Reitz wrote: Allow specifying a reference to an existing block device (by name) for bdrv_file_open() instead of a filename and/or options. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 27 ---

Re: [Qemu-devel] [PATCH] qemu-img: make progress output more accurate during convert

2013-12-13 Thread Kevin Wolf
Am 05.12.2013 um 15:54 hat Peter Lieven geschrieben: the progress output is very bumpy if the input images contains a significant portion of unallocated sectors. This patch checks how much sectors are allocated a priori if progress output is selected. Signed-off-by: Peter Lieven

Re: [Qemu-devel] [PATCH v3 21/21] iotests: Test new blkdebug/blkverify interface

2013-12-13 Thread Max Reitz
On 12.12.2013 11:41, Fam Zheng wrote: On 2013年12月12日 02:11, Max Reitz wrote: Add a test for the new blkdebug/blkverify interface. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/071 | 201 + tests/qemu-iotests/071.out | 73

Re: [Qemu-devel] detecting -enable-fips

2013-12-13 Thread Eric Blake
On 12/05/2013 02:04 PM, Eric Blake wrote: Commit 0f66998 added the command line option -enable-fips for qemu 1.2; but as of at least qemu 1.6, the 'query-command-line-options' QMP monitor command does not report it. This is particularly annoying since the command line option is conditional -

Re: [Qemu-devel] [libvirt] [PATCH] qemu: always ask for -enable-fips

2013-12-13 Thread Eric Blake
On 12/13/2013 08:06 AM, Jiri Denemark wrote: On Fri, Dec 13, 2013 at 15:58:55 +0100, Michal Privoznik wrote: On 05.12.2013 22:54, Eric Blake wrote: On a system that is enforcing FIPS, most libraries honor the current mode by default. Qemu, on the other hand, refused to honor FIPS mode unless

Re: [Qemu-devel] [PATCH] blkdebug: Use QLIST_FOREACH_SAFE to resume IO

2013-12-13 Thread Kevin Wolf
Am 13.12.2013 um 08:25 hat Fam Zheng geschrieben: Qemu-iotest 030 was broken. When the coroutine runs and finishes, it will remove itself from the req list, so let's use safe version of foreach to avoid use after free. Signed-off-by: Fam Zheng f...@redhat.com Thanks, applied to the block

  1   2   3   >