Re: [Qemu-devel] [PATCH v2 33/45] ivshmem-server: fix hugetlbfs support

2015-07-28 Thread Andrew Jones
On Tue, Jul 28, 2015 at 08:02:54PM +0200, Marc-André Lureau wrote: > Hi > > On Tue, Jul 28, 2015 at 9:33 AM, Andrew Jones wrote: > > On Tue, Jul 28, 2015 at 02:32:45AM +0200, Marc-André Lureau wrote: > >> + > >> +return fs.f_bsize; > >> +} > >> + > >> + > >> + > > few extra lines here > > cu

Re: [Qemu-devel] Debian 7.8.0 SPARC64 on qemu - anything i can do to speedup the emulation?

2015-07-28 Thread Dennis Luehring
Am 28.07.2015 um 11:54 schrieb Artyom Tarasenko: >anything i can do to speedup the emulation? Maybe try the fresh tcg optimizer improvements from Aurelien: https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05133.html it don't seems to target sparc (or isn't ready) many x86/x64 only etc.

Re: [Qemu-devel] [PATCH 01/18] slirp: goto bad in udp_input if sosendto fails

2015-07-28 Thread Wen Congyang
On 07/29/2015 06:57 AM, Samuel Thibault wrote: > Before this patch, if sosendto fails, udp_input is executed as if the > packet was sent, recording the packet for icmp errors, which does not > makes sense since the packet was not actually sent, errors would be > related to a previous packet. > > T

Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: fix overlapping metadata update

2015-07-28 Thread Hitoshi Mitake
At Wed, 29 Jul 2015 12:02:35 +0800, Liu Yuan wrote: > > From: Liu Yuan > > Current sheepdog driver use a range update_inode(min_idx, max_idx) for > batching > the updates. But there is subtle problem by determining min_idx and max_idx: > > for a single create request, min_idx == max_idx, so ac

Re: [Qemu-devel] qemu 2.4rc2 : iothread hanging vm (2.4rc1 works fine)

2015-07-28 Thread Alexandre DERUMIER
seem to come from this commit: http://git.qemu.org/?p=qemu.git;a=commit;h=eabc977973103527bbb8fed69c91cfaa6691f8ab "AioContext: fix broken ctx->dispatching optimization" - Mail original - De: "aderumier" À: "qemu-devel" Envoyé: Mercredi 29 Juillet 2015 06:15:48 Objet: [Qemu-devel] qemu

[Qemu-devel] [PATCH v2 10/11] block: Replace nested aio_poll with bdrv_aio_poll

2015-07-28 Thread Fam Zheng
Just a manual search and replace. No semantic change here. Signed-off-by: Fam Zheng --- block.c | 2 +- block/curl.c | 2 +- block/io.c| 18 +- block/nfs.c | 2 +- block/qed-table.c | 8 blockjob.c| 2 +- qemu-img.c| 2 +

[Qemu-devel] [PATCH v2 11/11] block: Only poll block layer fds in bdrv_aio_poll

2015-07-28 Thread Fam Zheng
So that external events are not processed in nested event loops. Signed-off-by: Fam Zheng --- block/io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/io.c b/block/io.c index 3d255e0..84047fe 100644 --- a/block/io.c +++ b/block/io.c @@ -2613,6 +2613,8 @@ bool bdrv_aio_poll(AioConte

[Qemu-devel] [PATCH v2 09/11] block: Introduce bdrv_aio_poll

2015-07-28 Thread Fam Zheng
This call is introduced simply as a wrapper of aio_poll, but it makes it is easy to change the polled client types. Signed-off-by: Fam Zheng --- block/io.c| 8 include/block/aio.h | 2 +- include/block/block.h | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PATCH v2 06/11] dataplane: Mark host notifiers' client type as "dataplane"

2015-07-28 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 4 ++-- hw/scsi/virtio-scsi-dataplane.c | 16 include/block/aio.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c

[Qemu-devel] [PATCH v2 08/11] aio-win32: Implement aio_{disable, enable}_clients

2015-07-28 Thread Fam Zheng
Signed-off-by: Fam Zheng --- aio-win32.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/aio-win32.c b/aio-win32.c index f5ecf57..1f6a3f0 100644 --- a/aio-win32.c +++ b/aio-win32.c @@ -28,6 +28,7 @@ struct AioHandler { GPollFD pfd; int deleted;

[Qemu-devel] [PATCH v2 04/11] nbd: Mark fd handlers client type as "nbd server"

2015-07-28 Thread Fam Zheng
So we could distinguish it from "protocol" to avoid handling in nested aio polls. Signed-off-by: Fam Zheng --- include/block/aio.h | 1 + nbd.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/block/aio.h b/include/block/aio.h index d02ddfa..8b15105

[Qemu-devel] [PATCH v2 02/11] aio: Save type to AioHandler

2015-07-28 Thread Fam Zheng
So it can be used by aio_poll later. Signed-off-by: Fam Zheng --- aio-posix.c | 2 ++ aio-win32.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/aio-posix.c b/aio-posix.c index 56f2bce..d25fcfc 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -25,6 +25,7 @@ struct AioHandler IOHandler

[Qemu-devel] [PATCH v2 03/11] block: Mark fd handlers as "protocol"

2015-07-28 Thread Fam Zheng
The "protocol" type includes all the fd handlers and event notifiers used by block layer, especially those that should be polled in a nested event loop. Signed-off-by: Fam Zheng --- block/curl.c| 8 block/iscsi.c | 4 ++-- block/linux-aio.c | 4 ++-- block/nbd-client.

[Qemu-devel] [PATCH v2 07/11] aio-posix: introduce aio_{disable, enable}_clients

2015-07-28 Thread Fam Zheng
Signed-off-by: Fam Zheng --- aio-posix.c | 17 - include/block/aio.h | 24 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/aio-posix.c b/aio-posix.c index d25fcfc..840b769 100644 --- a/aio-posix.c +++ b/aio-posix.c @@ -26,6 +26,7 @@

[Qemu-devel] [PATCH v2 01/11] aio: Introduce "type" in aio_set_fd_handler and aio_set_event_notifier

2015-07-28 Thread Fam Zheng
The parameter is added but not used. The callers are converted with following coccinelle semantic patch: @@ expression E1, E2, E3, E4, E5; @@ ( -aio_set_event_notifier(E1, E2, E3) +aio_set_event_notifier(E1, E2, AIO_CLIENT_UNSPECIFIED, E3) | -aio_set_fd_handler(E1,

[Qemu-devel] [PATCH v2 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-28 Thread Fam Zheng
v2: Switch to disable/enable model. [Paolo] Most existing nested aio_poll()'s in block layer are inconsiderate of dispatching potential new r/w requests from ioeventfds and nbd exports, which might result in responsiveness issues (e.g. bdrv_drain_all will not return when new requests keep coming),

[Qemu-devel] [PATCH v2 05/11] aio: Mark ctx->notifier's client type as "context"

2015-07-28 Thread Fam Zheng
It is important to include this for any blocking poll, on the other hand it is also OK to exclude it otherwise. Signed-off-by: Fam Zheng --- async.c | 4 ++-- include/block/aio.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/async.c b/async.c index 43f9425..0b

[Qemu-devel] qemu 2.4rc2 : iothread hanging vm (2.4rc1 works fine)

2015-07-28 Thread Alexandre DERUMIER
Hi, since qemu 2.4rc2, when I'm using iothreads, the vm is hanging, qmp queries are not working, vnc not working. (qemu process don't crash). qemu 2.4 rc1 works fine. (don't have bisect it yet) qemu command line: qemu -chardev socket,id=qmp,path=/var/run/qemu-server/150.qmp,server,nowait -mo

[Qemu-devel] [PATCH] sheepdog: fix overlapping metadata update

2015-07-28 Thread Liu Yuan
From: Liu Yuan Current sheepdog driver use a range update_inode(min_idx, max_idx) for batching the updates. But there is subtle problem by determining min_idx and max_idx: for a single create request, min_idx == max_idx, so actually we just update one one bit as expected. Suppose we have 2 crea

Re: [Qemu-devel] [PATCH v2 for-2.5] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-07-28 Thread Wen Congyang
On 07/29/2015 12:14 AM, Paolo Bonzini wrote: > > > On 28/07/2015 15:29, Wen Congyang wrote: >>> >>> If you call it just once, you have the same problem as before. In fact, >>> it's worse because instead of having an overflow every 2^31 periods, you >>> have one every 2 periods. Instead, by

Re: [Qemu-devel] [RFC PATCH qemu 0/4] vfio: SPAPR IOMMU v2 (memory preregistration support)

2015-07-28 Thread Alexey Kardashevskiy
Oh, just noticed, this is missing "v4" in the subject line. On 07/20/2015 05:46 PM, Alexey Kardashevskiy wrote: Yet another try, reworked the whole patchset. Here are few patches to prepare an existing listener for handling memory preregistration for SPAPR guests running on POWER8. This used

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-28 Thread Eric Blake
On 07/01/2015 02:22 PM, Markus Armbruster wrote: > To eliminate the temptation for clients to look up types by name > (which are not ABI), replace all type names by meaningless strings. > > Reduces output of query-schema by 9 out of 80KiB. Among other things, it replaced all instances of 'str' wi

[Qemu-devel] [PATCH 10/18] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2015-07-28 Thread Samuel Thibault
This patch adds the functions needed to handle IPv6 packets. ICMPv6 and NDP headers are implemented. Slirp is now able to send NDP Router or Neighbor Advertisement when it receives Router or Neighbor Solicitation. Using a 64bit-sized IPv6 prefix, the guest is now able to perform stateless autoconf

[Qemu-devel] [PATCH 11/18] slirp: Adding ICMPv6 error sending

2015-07-28 Thread Samuel Thibault
Disambiguation : icmp_error is renamed into icmp_send_error, since it doesn't manage errors, but only sends ICMP Error messages. Adding icmp6_send_error to send ICMPv6 Error messages. This function is simpler than the v4 version. Adding some calls in various functions to send ICMP errors, when a r

[Qemu-devel] [PATCH 14/18] slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff

2015-07-28 Thread Samuel Thibault
Basically, this patch adds some switch in various TCP functions to prepare them for the IPv6 case. To have something to "switch" in tcp_input() and tcp_respond(), a new argument is used to give them the sa_family of the addresses they are working on. Signed-off-by: Guillaume Subiron --- slirp/i

[Qemu-devel] [PATCH 13/18] slirp: Factorizing tcpiphdr structure with an union

2015-07-28 Thread Samuel Thibault
This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin computation in various functions, and makes them comp

[Qemu-devel] [PATCH 15/18] slirp: Reindent after refactoring

2015-07-28 Thread Samuel Thibault
No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/slirp.h | 3 +- slirp/tcp_input.c | 95 +++--- slirp/tcp_output.c | 29 - slirp/tcp_subr.c | 50 ++-- 4 file

[Qemu-devel] [PATCH 04/18] slirp: Make Socket structure IPv6 compatible

2015-07-28 Thread Samuel Thibault
This patch replaces foreign and local address/port couples in Socket structure by 2 sockaddr_storage which can be casted in sockaddr_in. Direct access to address and port is still possible thanks to some \#define, so retrocompatibility of the existing code is assured. The ss_family field of sockad

[Qemu-devel] [PATCH 05/18] slirp: Factorizing address translation

2015-07-28 Thread Samuel Thibault
This patch factorizes some duplicate code into a new function, sotranslate_out(). This function perform the address translation when a packet is transmitted to the host network. If the paquet is destinated to the host, the loopback address is used, and if the paquet is destinated to the virtual DNS

[Qemu-devel] [PATCH 06/18] slirp: Factorizing and cleaning solookup()

2015-07-28 Thread Samuel Thibault
This patch makes solookup() compatible with varying address families. Also, this function was only compatible with TCP. Having the socket list in argument, it is now compatible with UDP too. Finally, some optimization code is factorized inside the function (the function look at the last returned re

[Qemu-devel] [PATCH 03/18] slirp: Reindent after refactoring

2015-07-28 Thread Samuel Thibault
No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/slirp.c | 117 +- 1 file changed, 59 insertions(+), 58 deletions(-) diff --git a/slirp/slirp.c b/slirp/slirp.c index 380ddc3..66c4196 100644 --- a/s

[Qemu-devel] [PATCH 18/18] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2015-07-28 Thread Samuel Thibault
This patch adds parameters to manage some new options in the qemu -net command. Slirp IPv6 address, network prefix, and DNS IPv6 address can be given in argument to the qemu command. Defaults parameters are respectively fec0::2, fec0::, /64 and fec0::3. Signed-off-by: Yann Bordenave Signed-off-by

[Qemu-devel] [PATCH 17/18] slirp: Adding IPv6 address for DNS relay

2015-07-28 Thread Samuel Thibault
This patch adds an IPv6 address to the DNS relay. in6_equal_dns() is developed using this Slirp attribute. sotranslate_in/out/accept() are also updated to manage the IPv6 case so the guest can be able to join the host using one of the Slirp addresses. Signed-off-by: Guillaume Subiron Signed-off-b

[Qemu-devel] [PATCH 12/18] slirp: Adding IPv6 UDP support

2015-07-28 Thread Samuel Thibault
This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron --- slirp/Makefile.objs | 2 +- slirp/ip6_input.c | 3 +-

[Qemu-devel] [PATCH 01/18] slirp: goto bad in udp_input if sosendto fails

2015-07-28 Thread Samuel Thibault
Before this patch, if sosendto fails, udp_input is executed as if the packet was sent, recording the packet for icmp errors, which does not makes sense since the packet was not actually sent, errors would be related to a previous packet. This patch adds a goto bad to cut the execution of this func

[Qemu-devel] [PATCH 07/18] slirp: Make udp_attach IPv6 compatible

2015-07-28 Thread Samuel Thibault
A sa_family_t is now passed in argument to udp_attach instead of using a hardcoded "AF_INET" to call qemu_socket(). Signed-off-by: Guillaume Subiron --- slirp/ip_icmp.c | 2 +- slirp/udp.c | 7 --- slirp/udp.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sli

[Qemu-devel] [PATCH 16/18] slirp: Handle IPv6 in TCP functions

2015-07-28 Thread Samuel Thibault
This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/ip6_input.c | 4 ++-- slirp/tcp.h

[Qemu-devel] [PATCH 02/18] slirp: Generalizing and neutralizing code before adding IPv6 stuff

2015-07-28 Thread Samuel Thibault
Basically, this patch replaces "arp" by "resolution" every time "arp" means "mac resolution" and not specifically ARP. Some indentation problems are solved in functions that will be modified in the next patches (ip_input…). In if_encap, a switch is added to prepare for the IPv6 case. Some code is

[Qemu-devel] [PATCH 09/18] qemu/timer.h : Adding function to second scale

2015-07-28 Thread Samuel Thibault
This patch adds SCALE_S, timer_new_s(), and qemu_clock_get_s in qemu/timer.h to manage second-scale timers. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- include/qemu/timer.h | 32 1 file changed, 32 insertions(+) diff --git a/include/qemu

[Qemu-devel] [PATCH 08/18] slirp: Adding family argument to tcp_fconnect()

2015-07-28 Thread Samuel Thibault
This patch simply adds a sa_family_t argument to remove the hardcoded "AF_INET" in the call of qemu_socket(). Signed-off-by: Guillaume Subiron --- slirp/slirp.h | 2 +- slirp/tcp_input.c | 3 ++- slirp/tcp_subr.c | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/slir

[Qemu-devel] [PATCHv4 00/18] slirp: Adding IPv6 support to Qemu -net user mode

2015-07-28 Thread Samuel Thibault
Samuel Thibault, le Wed 29 Jul 2015 00:13:57 +0200, a écrit : > I can rebase the patch series over the current master and submit again > the patches. Here it is: Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, and make UDP and TCP compatible with IPv

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-28 Thread Samuel Thibault
zhanghailiang, le Tue 21 Jul 2015 09:59:22 +0800, a écrit : > I didn't find any news since that version, are you still trying to > push them to qemu upstream ? I'd still be trying if I had any actual answer other than "we need to find time to deal about it" :) I can rebase the patch series over t

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-28 Thread Samuel Thibault
Hello, Jan Kiszka, le Mon 27 Jul 2015 15:33:27 +0200, a écrit : > Of course, I'm fine with handing this over to someone who'd like to > pick up. Do we have volunteers? > > Samuel, would you like to do this? As a subsystem maintainer, you are > already familiar with QEMU processes. I can help wit

[Qemu-devel] Logging number of translated instructions per basic block

2015-07-28 Thread Anthony Carno
Hi there, As the subject of my email suggests, is there a way to log the number of translated instructions per basic block? I've dug into the debug code a bit (specifically *target_disas *and the arch-specific *print_insn_**) and haven't found anything that would suggest this is doable, but befor

Re: [Qemu-devel] Using the one disk image file on 2 virtual machines at the same time

2015-07-28 Thread Eric Blake
On 07/28/2015 11:06 AM, 한만종 wrote: > Hi, > > I'm facing a weird behavior when I used the one disk image file on 2 virtual > machines at the same time. > > I made the instance of a virtual machine, using the below command. > $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm > > When

Re: [Qemu-devel] [PATCH RFC v2 33/47] qapi: Clean up after recent conversions to QAPISchemaVisitor

2015-07-28 Thread Eric Blake
On 07/28/2015 03:13 PM, Eric Blake wrote: > -def generate_command_decl(name, args, ret_type): -arglist="" +def gen_command_decl(name, args, rets): >>> >>> I can see how 'args' is plural (even if it is a single string for the >>> name of a type containing the args), but should i

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-28 Thread Eric Blake
On 07/28/2015 12:24 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> To eliminate the temptation for clients to look up types by name >>> (which are not ABI), replace all type names by meaningless strings. >>> >>> Reduces output of query-

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-28 Thread Eric Blake
On 07/28/2015 12:39 PM, Markus Armbruster wrote: > > Could do plain integer. I guess I started down the base32 road to > squeeze out a few more characters, then sabotaged myself by always using > three base32 characters. > > > In the introspection schema, every 'str' that's really a type name

Re: [Qemu-devel] [PATCH RFC v2 33/47] qapi: Clean up after recent conversions to QAPISchemaVisitor

2015-07-28 Thread Eric Blake
On 07/28/2015 03:18 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> Drop helper functions that are now unused. >>> >>> Make pylint reasonably happy. >>> >>> Rename generate_FOO() functions to gen_FOO() for consistency. >>> >>> Use more c

Re: [Qemu-devel] [PATCH RFC v2 27/47] qapi-visit: Convert to QAPISchemaVisitor, fixing bugs

2015-07-28 Thread Eric Blake
On 07/28/2015 12:44 AM, Markus Armbruster wrote: >> >>> +def gen_visit_union(name, base, variants): >>> +ret = '' >>> >>> if base: >>> -assert discriminator >>> -base_fields = find_struct(base)['data'].copy() >>> -del base_fields[discriminator] >>> -ret +

Re: [Qemu-devel] [PULL for-2.4 0/2] Net patches

2015-07-28 Thread Peter Maydell
On 28 July 2015 at 13:26, Stefan Hajnoczi wrote: > The following changes since commit f8787f8723eaca1be99e3b1873e54de163fffa93: > > Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20150727' into > staging (2015-07-27 19:37:09 +0100) > > are available in the git repository at: > > git:

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-28 Thread Eric Blake
On 07/01/2015 02:21 PM, Markus Armbruster wrote: > The struct generated for a flat union is weird: the members of its > base are at the end, except for the union tag, which is renamed to > 'kind' and put at the beginning. The renaming to 'kind' was a bug waiting to happen. Consider this example,

Re: [Qemu-devel] [PATCH RFC v2 45/47] qapi: New QMP command query-schema for QMP schema introspection

2015-07-28 Thread Eric Blake
On 07/28/2015 08:33 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> Caution, rough edges. >> >> No joke. It doesn't even compile without this fixup to a rebase snafu >> (see [0] below): > > Uh, how did that happen? I compiled it a mill

Re: [Qemu-devel] [PATCH rebased for-2.4] target-i386: add ABM to Haswell* and Broadwell* CPU models

2015-07-28 Thread Eduardo Habkost
On Tue, Jul 07, 2015 at 12:42:01PM +0200, Paolo Bonzini wrote: > ABM is only implemented as a single instruction set by AMD; all AMD > processors support both instructions or neither. Intel considers POPCNT > as part of SSE4.2, and LZCNT as part of BMI1, but Intel also uses AMD's > ABM flag to indi

[Qemu-devel] [PATCH] net/vmxnet3: Fix incorrect debug message

2015-07-28 Thread Shmulik Ladkani
From: Dana Rubin From: Dana Rubin In commit 80da311d81, "net/vmxnet3: Fix RX TCP/UDP checksum on partially summed packets" a debug message was introduced in vmxnet3_rx_need_csum_calculate() for an unlikely input condition. The message accidentally printed 'len' variable instead of 'pkt_len'

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/23/2015 09:44 PM, Eric Blake wrote: >> On 07/01/2015 02:22 PM, Markus Armbruster wrote: >>> To eliminate the temptation for clients to look up types by name >>> (which are not ABI), replace all type names by meaningless strings. >>> >>> Reduces output of query-schema by

Re: [Qemu-devel] [PATCH RFC v2 47/47] qapi-introspect: Hide type names

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> To eliminate the temptation for clients to look up types by name >> (which are not ABI), replace all type names by meaningless strings. >> >> Reduces output of query-schema by 9 out of 80KiB. > > I'm not sure whether I like

[Qemu-devel] Using the one disk image file on 2 virtual machines at the same time

2015-07-28 Thread 한만종
Hi, I'm facing a weird behavior when I used the one disk image file on 2 virtual machines at the same time. I made the instance of a virtual machine, using the below command. $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm When the OS(Ubuntu 14.04 64bit) was booted up, I made an

[Qemu-devel] Using the one disk image file on 2 virtual machines at the same time

2015-07-28 Thread Manjong Han
Hi, I was facing a weird behavior when I used the one disk image file on 2 virtual machines at the same time. I made the instance of a virtual machine, using the below command. $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm When the OS(Ubuntu 14.04 64bit) was booted up, I made an

[Qemu-devel] Using the one disk image file on 2 virtual machines at the same time

2015-07-28 Thread Manjong Han
Hi, I was facing a weird behavior when I used the one disk image file on 2 virtual machines at the same time. I made the instance of a virtual machine, using the below command. $ qemu-system-x86_64 -smp 2 -m 1024 -hda 10G.qcow2 -enable-kvm When the OS(Ubuntu 14.04 64bit) was booted up, I made an

Re: [Qemu-devel] [PATCH v2 42/45] ivshmem: add hostmem backend

2015-07-28 Thread Marc-André Lureau
Hi On Tue, Jul 28, 2015 at 9:47 AM, Andrew Jones wrote: > Just warn instead? "size argument ignored with hostmem" Otherwise > "hostmem must not specify a size argument" would be more clear agree, fixed -- Marc-André Lureau

Re: [Qemu-devel] QEMU developers on DebConf15?

2015-07-28 Thread Aurelien Jarno
On 2015-07-28 19:22, Stefan Weil wrote: > Hi, Hi, > are there QEMU developers at the Debian Conference 2015 in Heidelberg > (Germany) > (http://debconf15.debconf.org/)? I'll be there for one or two days. I'll be there for the whole Debcamp and Debconf. I will be happy to meet other QEMU people,

Re: [Qemu-devel] [PATCH v2 33/45] ivshmem-server: fix hugetlbfs support

2015-07-28 Thread Marc-André Lureau
Hi On Tue, Jul 28, 2015 at 9:33 AM, Andrew Jones wrote: > On Tue, Jul 28, 2015 at 02:32:45AM +0200, Marc-André Lureau wrote: >> + >> +return fs.f_bsize; >> +} >> + >> + >> + > few extra lines here cut, thanks >> /* open shm, create and bind to the unix socket */ >> int >> ivshmem_server_

Re: [Qemu-devel] [PULL 18/19] macio: move unaligned DMA write code into separate pmac_dma_write() function

2015-07-28 Thread Aurelien Jarno
On 2015-07-28 09:52, Mark Cave-Ayland wrote: > On 27/07/15 23:00, Aurelien Jarno wrote: > > > On 2015-05-22 15:59, John Snow wrote: > >> From: Mark Cave-Ayland > >> > >> Similarly switch the macio IDE routines over to use the new function and > >> tidy-up the remaining code as required. > >> > >>

Re: [Qemu-devel] [PULL 00/10] virtio fixes for 2.4

2015-07-28 Thread Peter Maydell
On 28 July 2015 at 10:57, Michael S. Tsirkin wrote: > The following changes since commit b69b30532e0a80e25449244c01b0cbed000c99a3: > > Update version for v2.4.0-rc2 release (2015-07-22 18:17:19 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/mst/qem

Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation

2015-07-28 Thread Eric Blake
On 07/28/2015 05:15 AM, Markus Armbruster wrote: >> Yeah, avoiding line wraps consumes fewer source bytes (fewer runs of >> spaces), but the space isn't being wasted by storing generated files in >> git, nor does the C compiler care which layout we use. And honestly, >> it's easier to spot change

[Qemu-devel] [PATCH v2 9/9] vhost-user: document migration log

2015-07-28 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 42 ++ 1 file changed, 42 insertions(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 0062baa..2cf9ab4 100644 --- a/docs/specs/vhost-user.txt +++ b/docs/specs/vhost

Re: [Qemu-devel] [PATCH v7 4/6] Introduce irqchip type specification for KVM

2015-07-28 Thread Peter Maydell
On 26 July 2015 at 14:46, Pavel Fedin wrote: > Unfortunately, this is how qemu is designed. kvm_irqchip_create() is > called long before machine model's init code (machvirt_init() in our > case) is called. So, if we want to check for the right thing, we have > to know it before machine model actu

[Qemu-devel] [PATCH v2 6/9] vhost: use variable arguments for vhost_call()

2015-07-28 Thread Marc-André Lureau
It is useful to pass extra arguments to the funtions, for various backend needs. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-backend.c | 4 ++-- hw/virtio/vhost-user.c| 4 ++-- include/hw/virtio/vhost-backend.h | 6 -- 3 files changed, 8 insertions(+), 6 deletion

[Qemu-devel] [PATCH v2 3/9] osdep: add memfd helpers

2015-07-28 Thread Marc-André Lureau
Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal a memfd, and implements an open/unlink/mmap fallback for system that do not support memfd. Signed-off-by: Marc-André Lureau --- include/qemu/memfd.h | 4 +++ util/memfd.c | 74 +

[Qemu-devel] [PATCH v2 2/9] posix: add linux-only memfd fallback

2015-07-28 Thread Marc-André Lureau
Implement memfd_create() fallback if not available in system libc. memfd_create() is still not included in glibc today, atlhough it's been available since Linux 3.17 in Oct 2014. memfd has numerous advantages over traditional shm/mmap for ipc memory sharing with fd handler, which we are going to m

[Qemu-devel] [PATCH v2 7/9] vhost-user: start and end the va_list

2015-07-28 Thread Marc-André Lureau
Use a common start and exit branch to open and cleanup the va_list. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 8b6d7e7..21

[Qemu-devel] [PATCH v2 5/9] vhost: document log resizing

2015-07-28 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 862e786..057d548 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -357,6 +357,8 @@ static inline void vhost_dev_log_resize(struct vhost

[Qemu-devel] [PATCH v2 8/9] vhost-user: send log shm fd along with log_base

2015-07-28 Thread Marc-André Lureau
Send the shm for the dirty pages logging if the backend support VHOST_USER_PROTOCOL_F_LOG_SHMFD. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 16 ++-- hw/virtio/vhost.c | 5 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost-u

[Qemu-devel] [PATCH v2 0/9] vhost-user: add migration log support (for 2.5)

2015-07-28 Thread Marc-André Lureau
Hi, The following series implement shareable log for vhost-user to support memory tracking during live migration. On qemu-side, the solution is fairly straightfoward since vhost already supports the dirty log, only vhost-user couldn't access the log memory until then. The series is based on top o

[Qemu-devel] [PATCH v2 1/9] configure: probe for memfd

2015-07-28 Thread Marc-André Lureau
Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 704b34c..c754700 100755 --- a/configure +++ b/configure @@ -3406,6 +3406,22 @@ if compile_prog "" ""

[Qemu-devel] [PATCH v2 4/9] vhost: alloc shareable log

2015-07-28 Thread Marc-André Lureau
If the backend is of type VHOST_BACKEND_TYPE_USER, allocate shareable memory. Note: vhost_log_get() can use a global "vhost_log" that can be shared by several vhost devices. We may want instead a common shareable log and a common non-shareable one. Signed-off-by: Marc-André Lureau --- hw/virtio

Re: [Qemu-devel] QEMU developers on DebConf15?

2015-07-28 Thread Paolo Bonzini
On 28/07/2015 19:22, Stefan Weil wrote: > are there QEMU developers at the Debian Conference 2015 in Heidelberg > (Germany) > (http://debconf15.debconf.org/)? I'll be there for one or two days. Unlikely, because of the near-perfect overlap with KVM Forum. Paolo

Re: [Qemu-devel] [PATCH RFC v2 36/47] qapi: Rename qmp_marshal_input_FOO() to qmp_marshal_FOO()

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> These functions marshal both input and output. >> >> Signed-off-by: Markus Armbruster >> --- >> docs/qapi-code-gen.txt| 4 +- >> docs/writing-qmp-commands.txt | 8 +- >> monitor.c | 2 +-

Re: [Qemu-devel] [PATCH RFC v2 45/47] qapi: New QMP command query-schema for QMP schema introspection

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Caution, rough edges. > > No joke. It doesn't even compile without this fixup to a rebase snafu > (see [0] below): Uh, how did that happen? I compiled it a million times... (except for the last time, obviously). > diff --

Re: [Qemu-devel] [PATCH RFC v2 30/47] qapi: De-duplicate enum code generation

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Duplicated in commit 21cd70d. Yes, we can't import qapi-types, but >> that's no excuse. Move the helpers from qapi-types.py to qapi.py, and >> replace the duplicates in qapi-event.py. >> >> The generated event enumeration

Re: [Qemu-devel] [PATCH RFC v2 35/47] qapi-commands: Rearrange code

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Rename gen_marshal_input() to gen_marshal(), because the generated >> function marshals both arguments and results. >> >> Rename gen_visitor_input_containers_decl() to gen_marshal_vars(), and >> move the other variable decl

[Qemu-devel] QEMU developers on DebConf15?

2015-07-28 Thread Stefan Weil
Hi, are there QEMU developers at the Debian Conference 2015 in Heidelberg (Germany) (http://debconf15.debconf.org/)? I'll be there for one or two days. Regards Stefan

Re: [Qemu-devel] [PATCH RFC v2 33/47] qapi: Clean up after recent conversions to QAPISchemaVisitor

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Drop helper functions that are now unused. >> >> Make pylint reasonably happy. >> >> Rename generate_FOO() functions to gen_FOO() for consistency. >> >> Use more consistent and sensible variable names. >> >> Consistently

Re: [Qemu-devel] [PATCH RFC v2 32/47] qapi-event: Convert to QAPISchemaVisitor, fixing data with base

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Fixes events whose data is struct with base to include the struct's >> base members. Test case is qapi-schema-test.json's event >> __org.qemu_x-command: >> >> { 'event': '__ORG.QEMU_X-EVENT', 'data': '__org.qemu_x-Stru

Re: [Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specification of netdev_add

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> It doesn't take a 'props' argument, let alone one in the format >> "NAME=VALUE,..." >> >> The bogus arguments specification doesn't matter due to 'gen': false. >> Clean it up to be incomplete rather than wrong, and document

Re: [Qemu-devel] [PATCH RFC v2 38/47] qapi-commands: De-duplicate output marshaling functions

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> gen_marshal_output() uses its parameter name only for name of the >> generated function. Name it after the type being marshaled instead of >> its caller, and drop duplicates. >> >> Saves 7 copies of qmp_marshal_output_int(

Re: [Qemu-devel] [PATCH RFC v2 44/47] qapi: Pseudo-type '**' is now unused, drop it

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> 'gen': false needs to stay for now, because netdev_add is still using >> it. >> >> Signed-off-by: Markus Armbruster >> --- >> docs/qapi-code-gen.txt | 15 --- >> scripts/qapi.py

Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Generated qapi-event.[ch] lose line breaks. No change otherwise. > > For example, > > -void qapi_event_send_block_image_corrupted(const char *device, > - bool has_node_name, > -

Re: [Qemu-devel] [PATCH RFC v2 40/47] qapi: Introduce a first class 'any' type

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> It's first class, because unlike '**', it actually works, i.e. doesn't >> require 'gen': false. > > Generated code grows in order to accommodate visiting the new anyList type: > > qapi-types.c| 15

Re: [Qemu-devel] [PATCH RFC v2 41/47] qom: Don't use 'gen': false for qom-get, qom-set, object-add

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> With the previous commit, the generated marshalers just work, and save >> us a bit of handwritten code. >> > > Generated code grows, because you are now generating the hook :) > > qmp-commands.h |6 ++ > qmp-marshal.c

Re: [Qemu-devel] [PATCH RFC v2 29/47] qapi: Replace dirty is_c_ptr() by method c_null()

2015-07-28 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> is_c_ptr() looks whether the end of the C text for the type looks like >> a pointer. Works, but is fragile. >> >> We now have a better tool: use QAPISchemaType method c_null(). The >> initializers for non-pointers become

Re: [Qemu-devel] [PATCH] migration: yet more possible state transitions

2015-07-28 Thread Juan Quintela
Paolo Bonzini wrote: > On 28/07/2015 17:19, Juan Quintela wrote: >>> > On destination, we move from INMIGRATE to FINISH_MIGRATE. Add that to >>> > the list of allowed states. >>> > >>> > Signed-off-by: Juan Quintela >> Self-NAK. >> >> Somewhere I was able to test old + new qemu given this weird

Re: [Qemu-devel] [PATCH RFC 2/6] posix: add linux-only memfd fallback

2015-07-28 Thread Paolo Bonzini
On 28/07/2015 16:25, Marc-André Lureau wrote: > > Can the inline function stay in util/memfd.c? > I see little benefits in that, only the qemu_memfd_alloc helpers would > then be exported. Then the inline is probably unnecessary if moved in > the memfd.c. That's just a matter of taste, I agree.

[Qemu-devel] [PATCH for-2.4 v3 3/3] AioContext: force event loop iteration using BH

2015-07-28 Thread Paolo Bonzini
From: Stefan Hajnoczi The notify_me optimization introduced in commit eabc97797310 ("AioContext: fix broken ctx->dispatching optimization") skips event_notifier_set() calls when the event loop thread is not blocked in ppoll(2). This optimization causes a deadlock if two aio_context_acquire() cal

[Qemu-devel] [PATCH for-2.4 v3 2/3] AioContext: avoid leaking BHs on cleanup

2015-07-28 Thread Paolo Bonzini
From: Stefan Hajnoczi BHs are freed during aio_bh_poll(). This leads to memory leaks if there is no aio_bh_poll() between qemu_bh_delete() and aio_ctx_finalize(). Suggested-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi Message-Id: <1438014819-18125-2-git-send-email-stefa...@redhat.com> Sig

[Qemu-devel] [PATCH for-2.4 v3 0/3] AioContext: fix deadlock after aio_context_acquire() race

2015-07-28 Thread Paolo Bonzini
v3: same as v1, but include virtio-blk-dataplane fix and move thread_pool_free before the loop. Same result as applying in order: [PATCH for-2.4 1/2] AioContext: avoid leaking BHs on cleanup [PATCH for-2.4 2/2] AioContext: force event loop iteration using BH [PATCH for-2.4] block: delete bottom h

[Qemu-devel] [PATCH for-2.4 v3 1/3] virtio-blk-dataplane: delete bottom half before the AioContext is freed

2015-07-28 Thread Paolo Bonzini
Other uses of aio_bh_new are safe as long as all scheduled bottom halves are run before an iothread is destroyed, which bdrv_drain will ensure: - archipelago_finish_aiocb: BH deletes itself - inject_error: BH deletes itself - blkverify_aio_bh: BH deletes itself - abort_aio_request: BH deletes i

[Qemu-devel] [PATCH] sdhci: Pass drive parameter to sdhci-pci via qdev property

2015-07-28 Thread Kevin O'Connor
Commit 19109131 disabled the sdhci-pci support because it used drive_get_next(). This patch reenables sdhci-pci and changes it to pass the drive via a qdev property - for example: -device sdhci-pci,drive=drive0 -drive id=drive0,if=sd,file=myimage Signed-off-by: Kevin O'Connor --- This patch on

Re: [Qemu-devel] [PATCH v2 0/2] AioContext: fix deadlock after aio_context_acquire() race

2015-07-28 Thread Paolo Bonzini
On 28/07/2015 16:08, Stefan Hajnoczi wrote: >> > v2: >> > * Free BHs after thread_pool_free(), which calls qemu_bh_delete() >> > [Cornelia] >> > * Remove assert for leaked BHs since we don't know how many existing cases >> >there are yet and QEMU 2.4-rc3 is a poor time to risk assertion fa

  1   2   3   >