Re: [Qemu-devel] [PULL 0/4] Fixes for 2.4.0-rc3

2015-07-28 Thread Peter Maydell
On 28 July 2015 at 09:04, Paolo Bonzini wrote: > The following changes since commit f793d97e454a56d17e404004867985622ca1a63b: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2015-07-24 13:07:10 +0100) > > are available in the git repository at: > > git://g

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

2015-07-28 Thread Marc-André Lureau
Hi On Tue, Jul 28, 2015 at 1:50 PM, Paolo Bonzini 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. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-28 Thread Liu Yuan
On Mon, Jul 27, 2015 at 11:23:02AM -0400, Jeff Cody wrote: > On Sat, Jul 18, 2015 at 01:44:24AM +0900, Hitoshi Mitake wrote: > > Current sheepdog driver only serializes create requests in oid > > unit. This mechanism isn't enough for handling requests to > > overwrapping area spanning multiple oids

Re: [Qemu-devel] [PATCH RFC 4/6] vhost: alloc shareable log

2015-07-28 Thread Marc-André Lureau
Hi On Tue, Jul 28, 2015 at 12:10 PM, Michael S. Tsirkin wrote: > I know why it's needed :) But this needs to be stated in the commit log. > Also, it only makes sense if remote supports getting the logfd. Thanks for pointing out this change. Actually, I think the current log overlap when resizing

[Qemu-devel] [Bug 821078] Re: virtio-serial-bus: Unexpected port id

2015-07-28 Thread Quwj
I met two bugs above.QEMU version is 2.1.3 and VM is Windows7. QEMU Log is: qemu-system-x86_64: virtio-serial-bus: Unexpected port id 15819934 for device virtio-serial0.0 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

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:41 AM, Markus Armbruster wrote: >> Like reserving ourselves a namespace based on single _ for internal use. >> We practically already have that - all user names either start with a >> letter or double underscore, so we could use single (and triple) >> underscore for internally-gen

Re: [Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-28 Thread Liu Yuan
On Tue, Jul 28, 2015 at 10:31:32PM +0800, Liu Yuan wrote: > On Mon, Jul 27, 2015 at 11:23:02AM -0400, Jeff Cody wrote: > > On Sat, Jul 18, 2015 at 01:44:24AM +0900, Hitoshi Mitake wrote: > > > Current sheepdog driver only serializes create requests in oid > > > unit. This mechanism isn't enough for

[Qemu-devel] [PATCH for-2.5 3/4] vhost: switch region lookup from linear to bsearch

2015-07-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/virtio/vhost.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 8bef43e..5b8598b 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -420,13 +420,11 @@ static struct vhost_memory_

[Qemu-devel] [PATCH for-2.5 0/4] vhost: cleanups and switching to sorted memory map

2015-07-28 Thread Igor Mammedov
making memory map a sorted array helps to simplify and speed up lookup/insertion and deletion ops on it. It also makes insertion/deteletion code easier to read. Igor Mammedov (4): vhost: codding style fix tab indents vhost: simplify/speedify vhost_dev_assign_memory() vhost: switch region loo

[Qemu-devel] [PATCH for-2.5 2/4] vhost: simplify/speedify vhost_dev_assign_memory()

2015-07-28 Thread Igor Mammedov
simplify memory map region insertion by making memory map a sorted array. That allows replace linear array scan with binary search to find an insertion position and simplifies code when new memory region merges into adjacent regions. It will also allow to simplify vhost_dev_unassign_memory() in fo

[Qemu-devel] [PATCH for-2.5 1/4] vhost: codding style fix tab indents

2015-07-28 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/virtio/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index e964004..2be269f 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -384,8 +384,8 @@ static int vhost_verify_ring_mappings(

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

2015-07-28 Thread Eric Blake
On 07/28/2015 01:34 AM, Markus Armbruster wrote: > Let me rephrase to make sure I understand. > > Ignore the (not rets) case, because retval doesn't exist then. > > qmp_marshal_output_FOO() visits retval twice. First, with a QMP output > visitor to do the actual marshalling. Second, with a QAPI

[Qemu-devel] [PATCH for-2.5 4/4] vhost: simplify/speedify vhost_dev_unassign_memory()

2015-07-28 Thread Igor Mammedov
beside reducing code size 2x times, it also makes function faster and easier to read. Signed-off-by: Igor Mammedov --- hw/virtio/vhost.c | 111 ++ 1 file changed, 37 insertions(+), 74 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vho

Re: [Qemu-devel] [PATCH 0/2] vhost: check if vhost has capacity for hotplugged memory

2015-07-28 Thread Igor Mammedov
On Mon, 20 Jul 2015 15:49:28 +0200 Igor Mammedov wrote: > it's defensive patchset which helps to avoid QEMU crashing > at memory hotplug time by checking that vhost has free capacity > for an additional memory slot. > > Igor Mammedov (2): > vhost: add vhost_has_free_slot() interface > pc-dim

Re: [Qemu-devel] Live migration hangs after migration to remote host

2015-07-28 Thread Dr. David Alan Gilbert
* Eduardo Otubo (eduardo.ot...@profitbricks.com) wrote: > Hello all, > > I'm facing a weird behavior on my tests: I am able to live migrate > between two virtual machines on my localhost, but not to another > machine, both using tcp. > > * I am using the same arguments on the command line; > * Bo

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

2015-07-28 Thread Juan Quintela
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 behaviour. behaviour makes no sense, and I am not able to reproduce

Re: [Qemu-devel] [PATCH] raw-posix.c: Make GetBSDPath() handle caching options

2015-07-28 Thread Programmingkid
On Jul 28, 2015, at 6:18 AM, Stefan Hajnoczi wrote: > On Mon, Jul 27, 2015 at 12:28:03PM -0400, Programmingkid wrote: >> Add support for caching options that can be specified from >> the command line. > > Please squash this into the commit message when merging: Is this message meant for Kevin

Re: [Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer error to guest

2015-07-28 Thread Alex Williamson
On Tue, 2015-07-28 at 07:48 +, Chen, Hanxiao wrote: > Hi, Alex > > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > To: Chen, Hanxiao > > Cc: qemu-devel@nongnu.org; Chen, Fan > > Subject: Re: [Qemu-devel] [PATCH v12 00/15] vfio-pci: pass the aer er

Re: [Qemu-devel] [PATCH] raw-posix.c: Make GetBSDPath() handle caching options

2015-07-28 Thread Stefan Hajnoczi
On Tue, Jul 28, 2015 at 4:26 PM, Programmingkid wrote: > > On Jul 28, 2015, at 6:18 AM, Stefan Hajnoczi wrote: > >> On Mon, Jul 27, 2015 at 12:28:03PM -0400, Programmingkid wrote: >>> Add support for caching options that can be specified from >>> the command line. >> >> Please squash this into the

[Qemu-devel] [PATCH RFC 2/3] migration: Fix global state with Xen.

2015-07-28 Thread Anthony PERARD
From: Anthony PERARD When doing migration via the QMP command xen_save_devices_state, the current runstate is not store into the global state section. Also the current runstate is not the one we want on the receiver side. During migration, the Xen toolstack paused QEMU before save the devices st

[Qemu-devel] [PATCH RFC 3/3] migration: Add configuration section to vmstate with xen.

2015-07-28 Thread Anthony PERARD
From: Anthony PERARD This adds the configuration section in the vmstate saved by xen_save_devices_state. Signed-off-by: Anthony PERARD --- migration/savevm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index 6071215..b3f605c 100644 --- a/mig

[Qemu-devel] [PATCH RFC 0/3] Migration regressions with Xen.

2015-07-28 Thread Anthony PERARD
Hi, We've spotted several regression which prevent migration with Xen using the same version of QEMU or from a previous version of QEMU (tryied with 2.2). Regression have been introduce by at least: - df4b1024526cae3479da3492d6371fd4a7324a03 migration: create new section to store global state -

[Qemu-devel] [PATCH RFC 1/3] migration: Fix regretion for xenfv machine.

2015-07-28 Thread Anthony PERARD
From: Anthony PERARD This fix migration from the same QEMU version and from previous QEMU version. >From the global state section, we don't need runstate with Xen. Right now, the way the Xen toolstack knows when QEMU is ready is when QEMU reach "running" runstate. The configuration sectin and t

Re: [Qemu-devel] [PULL 0/5] target-mips queue for 2.4

2015-07-28 Thread Peter Maydell
; > 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://github.c

Re: [Qemu-devel] [PATCH for-2.5 1/4] vhost: codding style fix tab indents

2015-07-28 Thread Peter Maydell
On 28 July 2015 at 15:52, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > hw/virtio/vhost.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Typo in subject line... -- PMM

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

2015-07-28 Thread Paolo Bonzini
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 checking that rcu_reader went >> through 1 _and_ 3 (or

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

2015-07-28 Thread Paolo Bonzini
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 behaviour. > behaviour makes

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

[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

[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 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 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 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

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.

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 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 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 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 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 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 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 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 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 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 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 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] 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

[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

[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 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 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 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 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 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 +

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 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 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

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] [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] [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] 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 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

[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

[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

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

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

[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 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

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 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] [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 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] [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 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 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 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] 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

[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] [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

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

[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

[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] [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 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 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 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 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 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 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 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 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 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

<    1   2   3   >