Re: [Qemu-devel] [PATCH 01/40] 9pfs: allocate pdus with g_malloc/g_free

2015-11-30 Thread Greg Kurz
On Tue, 24 Nov 2015 19:00:52 +0100 Paolo Bonzini wrote: > Prepare for moving the allocation to virtqueue_pop. > > Signed-off-by: Paolo Bonzini > --- And aside from this series goal, it makes the code nicer :) > hw/9pfs/virtio-9p-device.c | 7

[Qemu-devel] [PULL 1/2] fsdev-proxy-helper: avoid TOC/TOU race

2015-11-30 Thread Greg Kurz
From: Paolo Bonzini <pbonz...@redhat.com> There is a minor time of check/time of use race between statfs and chroot. It can be fixed easily by stat-ing the root after it has been changed. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Greg Kurz <gk...@linux.vnet.

[Qemu-devel] [PULL 0/2] virtio-9p fixes for 2.5

2015-11-30 Thread Greg Kurz
The following changes since commit 714487515dbe0c65d5904251e796cd3a5b3579fb: Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging (2015-11-27 10:44:42 +) are available in the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for you

[Qemu-devel] [PATCH] MAINTAINERS: add maintainer to virtio-9p

2015-11-30 Thread Greg Kurz
As suggested by Paolo, I add myself as maintainer for virtio-9p. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index bb1f3e40622b..e8cee1e2668f 100644 --- a/MAINTAINERS +++ b/MAINT

[Qemu-devel] [PULL 2/2] virtio-9p: use QEMU thread pool

2015-11-30 Thread Greg Kurz
plaint about an unchecked return value for event_notifier_init. Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Greg Kurz <gk...@linux.vnet.ibm.com> (removed no more needed #include from virtio-9p-coth.h) Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> ---

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-12-01 Thread Greg Kurz
On Mon, 30 Nov 2015 18:59:23 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Mon, Nov 30, 2015 at 02:46:31PM +0100, Greg Kurz wrote: > > On Mon, 30 Nov 2015 15:06:33 +0200 > > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > >

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-12-01 Thread Greg Kurz
On Mon, 30 Nov 2015 15:12:08 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Mon, Nov 30, 2015 at 11:53:41AM +0100, Paolo Bonzini wrote: > > > > > > On 30/11/2015 11:51, Greg Kurz wrote: > > > Since commit 8561c9244ddf1122d "

[Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-11-30 Thread Greg Kurz
appings. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- This is a bug fix for 2.5 util/mmap-alloc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c index c37acbe58ede..0ff221dd94f4 100644 --- a/util/mmap-alloc.c +++ b/

[Qemu-devel] [PATCH] spapr/pci: populate PCI DT in reverse order

2015-11-30 Thread Greg Kurz
of the way fdt_add_subnode() inserts new elements to the front of the FDT rather than adding them to the tail. This patch reverts to the historical SLOF ordering by walking PCI devices in reverse order. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- Repost with Cc: to qemu-de

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-11-30 Thread Greg Kurz
On Mon, 30 Nov 2015 15:06:33 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Mon, Nov 30, 2015 at 11:51:57AM +0100, Greg Kurz wrote: > > Since commit 8561c9244ddf1122d "exec: allocate PROT_NONE pages on top of > > RAM", > > it is no l

Re: [Qemu-devel] [PATCH] mmap-alloc: use same backend for all mappings

2015-12-01 Thread Greg Kurz
On Tue, 1 Dec 2015 12:57:47 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Tue, Dec 01, 2015 at 04:23:11PM +0530, Aneesh Kumar K.V wrote: > > "Michael S. Tsirkin" <m...@redhat.com> writes: > > > > > On Mon, Nov 30, 2015 at 02:46

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] spapr: Add /system-id

2015-11-26 Thread Greg Kurz
On Thu, 26 Nov 2015 15:29:07 +1100 Alexey Kardashevskiy wrote: > On 11/26/2015 11:49 AM, David Gibson wrote: > > On Wed, Nov 25, 2015 at 04:15:01PM +0100, Alexander Graf wrote: > >> > >> > >> On 18.11.15 11:49, David Gibson wrote: > >>> On Wed, Nov 18, 2015 at 06:45:39PM +1100,

Re: [Qemu-devel] [PATCH for 2.9 v8 0/10] dataplane snapshot fixes

2015-11-18 Thread Greg Kurz
t Juan does not like aio_context being used in migration code, but in case this series gets applied anyway: Tested-by: Greg Kurz <gk...@linux.vnet.ibm.com> > Anyway, I think that the construction like > assert(aio_context_is_locked(aio_context)); > should be widely used to ensure prop

Re: [Qemu-devel] [PATCH 11/11] migration: normalize locking in migration/savevm.c

2015-11-18 Thread Greg Kurz
On Tue, 17 Nov 2015 12:08:31 +0300 "Denis V. Lunev" wrote: > basically all bdrv_* operations must be called under aio_context_acquire > except ones with bdrv_all prefix. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi >

Re: [Qemu-devel] [PATCH v3 0/3] virtio-net/vhost-net: share cross-endian enablement

2015-11-18 Thread Greg Kurz
On Wed, 18 Nov 2015 22:48:06 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Wed, Nov 18, 2015 at 05:23:00PM +0100, Greg Kurz wrote: > > Since QEMU 2.4.0, vhost-net uses the cross-endian support of TAP devices to > > fix vnet headers. In fact, vir

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 19:32:37 +0100 Laurent Vivier <lviv...@redhat.com> wrote: > Sorry for the late answer to this one, I got diverted :) > > On 07/01/2016 12:32, Greg Kurz wrote: > > When running a fully emulated device in cross-endian conditions, including > >

Re: [Qemu-devel] [PATCH v2 4/5] vhost: move virtio 1.0 check to cross-endian helper

2016-01-12 Thread Greg Kurz
On Tue, 12 Jan 2016 01:23:56 +0100 Laurent Vivier <lviv...@redhat.com> wrote: > On 11/01/2016 17:13, Greg Kurz wrote: > > Indeed vhost doesn't need to ask for vring endian fixing if the device is > > virtio 1.0, since it is already handled by the in-kernel vhost driver.

Re: [Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-13 Thread Greg Kurz
On Wed, 13 Jan 2016 10:53:11 +0100 Laurent Vivier <lviv...@redhat.com> wrote: > On 13/01/2016 10:06, Greg Kurz wrote: > > On Tue, 12 Jan 2016 18:24:28 +0100 > > Laurent Vivier <lviv...@redhat.com> wrote: > > > >> On 11/01/2016 17:12, Greg Kurz wr

Re: [Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-13 Thread Greg Kurz
On Tue, 12 Jan 2016 18:24:28 +0100 Laurent Vivier <lviv...@redhat.com> wrote: > On 11/01/2016 17:12, Greg Kurz wrote: > > When running a fully emulated device in cross-endian conditions, including > > a virtio 1.0 device offered to a big endian guest, we need to fix

[Qemu-devel] [PATCH v3 0/6] virtio/vhost cross-endian cleanup

2016-01-12 Thread Greg Kurz
virtio_access_is_big_endian() for little-endian targets - various cleanups This v3 does the following: - fixes spelling mistake in patch 1 - adds Laurent's R-b tag to patches 1, 2, 3, 5 - adds Cornelia's R-b tag to patches 1, 5 - introduces patch 4 to simplify the vhost code a bit more --- Greg Kurz (6

[Qemu-devel] [PATCH v3 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-12 Thread Greg Kurz
edhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/net/virtio-net.c | 49 +++-- include/hw/virtio/virtio-access.h |9 --- include/hw/virtio/virtio-net.h|1 + 3 files changed, 48 insertions(+), 11 deletions(-) d

[Qemu-devel] [PATCH v3 2/6] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-12 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now handled by the core virtio-net code. Reviewed-by: Laurent Vivier <lviv...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/net/vhost_net.c | 33 +

[Qemu-devel] [PATCH v3 3/6] virtio: move cross-endian helper to vhost

2016-01-12 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com> Reviewed-by: Laurent Vivier <lviv...@redhat.com> Signed-off-by: G

[Qemu-devel] [PATCH v3 4/6] vhost: move virtio 1.0 check to cross-endian helper

2016-01-12 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com> Signed-off-by: Greg Ku

[Qemu-devel] [PATCH v3 5/6] vhost: simplify vhost_needs_vring_endian()

2016-01-12 Thread Greg Kurz
the assert() either. This open codes the device_endian checking in vhost_needs_vring_endian(). It also adds a comment to explain the logic, as recent reviews showed the cross-endian tweaks aren't that obvious. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/virtio/vhost.c

[Qemu-devel] [PATCH v3 6/6] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2016-01-12 Thread Greg Kurz
a.h...@de.ibm.com> Reviewed-by: Laurent Vivier <lviv...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- include/hw/virtio/virtio-access.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/includ

Re: [Qemu-devel] [PATCH 3/3] KVM: use KVM_CAP_MAX_VCPU_ID

2016-06-07 Thread Greg Kurz
On Fri, 27 May 2016 13:16:49 +0200 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > On Fri, 27 May 2016 13:58:28 +1000 > David Gibson <da...@gibson.dropbear.id.au> wrote: > > > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > > As stated in lin

[Qemu-devel] [PULL 1/7] 9p: some more cleanup in #include directives

2016-06-06 Thread Greg Kurz
The "9p-attr.h" header isn't needed by 9p synth and virtio 9p. While here, also drop last references to virtio from 9p synth since it is now transport agnostic code. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p-synth.c | 4 +--- hw/9pfs/virtio-9p-d

[Qemu-devel] [PULL 4/7] 9p: drop useless out: label

2016-06-06 Thread Greg Kurz
Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index a71d44dc7420..42ac4d79fbe3 100644 --- a/hw/9pfs/9p.c +++ b/

[Qemu-devel] [PULL 2/7] 9p/fsdev: remove obsolete references to virtio

2016-06-06 Thread Greg Kurz
Most of the 9p code is now virtio agnostic. This patch does a final cleanup: - drop references to Virtio from the header comments - fix includes Also drop a couple of leading empty lines while here. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- fsdev/file-op-9p.h | 2 +-

[Qemu-devel] [PULL 3/7] 9p: drop useless inclusion of hw/i386/pc.h

2016-06-06 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p.c | 1 - hw/9pfs/virtio-9p-device.c | 1 - 2 files changed, 2 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index f5e30125fcfd..a71d44dc7420 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -13,7

[Qemu-devel] [PULL 0/7] 9p patch queue

2016-06-06 Thread Greg Kurz
to 635324e83e238598e86628dba5ab62ce910e6f72: 9p: switch back to readdir() (2016-06-06 11:52:34 +0200) readdir_r() to readdir() conversion, various minor cleanups Greg Kurz (7

[Qemu-devel] [PULL 5/7] 9p: introduce the V9fsDir type

2016-06-06 Thread Greg Kurz
If we are to switch back to readdir(), we need a more complex type than DIR * to be able to serialize concurrent accesses to the directory stream. This patch introduces a placeholder type and fixes all users. Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Ku

[Qemu-devel] [PULL 7/7] 9p: switch back to readdir()

2016-06-06 Thread Greg Kurz
This patch changes the 9p code to use readdir() again instead of readdir_r(), which is deprecated in glibc 2.24. All the locking was put in place by a previous patch. Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- fsdev/file-o

[Qemu-devel] [PULL 6/7] 9p: add locking to V9fsDir

2016-06-06 Thread Greg Kurz
be achieved with a mutex like below: lock_mutex(); readdir(); // work with the dirent unlock_mutex(); This patch adds all the locking, to prepare the switch to readdir(). Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9p

Re: [Qemu-devel] [PULL 0/7] 9p patch queue

2016-06-06 Thread Greg Kurz
On Mon, 6 Jun 2016 15:51:31 +0100 Peter Maydell <peter.mayd...@linaro.org> wrote: > On 6 June 2016 at 13:32, Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > > The following changes since commit de5dca1b792ada25c29a95c8f84e01f4300aef9c: > > > > e1000e: Fix bui

Re: [Qemu-devel] Adding throttling to virtio-9p

2016-06-07 Thread Greg Kurz
On Tue, 7 Jun 2016 10:20:51 +0200 Pradeep Kiruvale wrote: > Hi All, > > I am trying to add the throttle to the virtio-9p devices using the throttle > APIs that are already exists in the qemu. > > I need help to understand the device model and where to add the

Re: [Qemu-devel] [PATCH V3] tap: vhost busy polling support

2016-06-07 Thread Greg Kurz
On Tue, 31 May 2016 12:43:11 +0800 Jason Wang wrote: > On 2016年05月31日 12:19, Michael S. Tsirkin wrote: > > On Tue, May 31, 2016 at 11:04:18AM +0800, Jason Wang wrote: > >> > >> On 2016年05月31日 02:07, Michael S. Tsirkin wrote: > >>> On Thu, Apr 07, 2016 at 12:56:24PM

[Qemu-devel] [PATCH v2 2/4] 9p: introduce the V9fsDir type

2016-06-03 Thread Greg Kurz
If we are to switch back to readdir(), we need a more complex type than DIR * to be able to serialize concurrent accesses to the directory stream. This patch introduces a placeholder type and fixes all users. Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Ku

[Qemu-devel] [PATCH v2 0/4] 9p: get rid of readdir_r()

2016-06-03 Thread Greg Kurz
next week, or even before if possible. Please comment ! Thanks. --- Greg Kurz (4): 9p: drop useless out: label 9p: introduce the V9fsDir type 9p: add locking to V9fsDir 9p: switch back to readdir() fsdev/file-op-9p.h |3 +- hw/9pfs/9p-handl

[Qemu-devel] [PATCH v2 1/4] 9p: drop useless out: label

2016-06-03 Thread Greg Kurz
Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- v2: added Eric's r-b --- hw/9pfs/9p.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 587e901f81cc..12bd688f37d3 100

Re: [Qemu-devel] [PATCH 4/4] 9p: switch back to readdir()

2016-06-03 Thread Greg Kurz
On Thu, 2 Jun 2016 15:00:26 -0600 Eric Blake <ebl...@redhat.com> wrote: > On 06/02/2016 02:52 AM, Greg Kurz wrote: > > This patch changes the 9p code to use readdir() again instead of > > readdir_r(), which is deprecated in glibc 2.24. > > > > All the locking was

[Qemu-devel] [PATCH v2 4/4] 9p: switch back to readdir()

2016-06-03 Thread Greg Kurz
This patch changes the 9p code to use readdir() again instead of readdir_r(), which is deprecated in glibc 2.24. All the locking was put in place by a previous patch. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- v2: set errno to 0 before calling readdir() --- fsdev/file-o

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-03 Thread Greg Kurz
On Fri, 3 Jun 2016 11:16:04 +1000 David Gibson <da...@gibson.dropbear.id.au> wrote: > On Thu, Jun 02, 2016 at 06:04:37PM +0200, Greg Kurz wrote: > > On Wed, 1 Jun 2016 12:33:28 +1000 > > David Gibson <da...@gibson.dropbear.id.au> wrote: > > > > > On Tu

[Qemu-devel] [PATCH v2 3/4] 9p: add locking to V9fsDir

2016-06-03 Thread Greg Kurz
be achieved with a mutex like below: lock_mutex(); readdir(); // work with the dirent unlock_mutex(); This patch adds all the locking, to prepare the switch to readdir(). Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- v2: - s/call

[Qemu-devel] [PATCH] 9p: getattr: use fstat if we have a fd

2016-05-25 Thread Greg Kurz
If we have an opened fd, it is better to call fstat() as the underlying file may have been unlinked and lstat() will fail. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- This QEMU patch goes with the create-unlink-getattr fix at: http://git.kernel.org/cgit/linux/kernel/git/

Re: [Qemu-devel] [PATCH 3/3] KVM: use KVM_CAP_MAX_VCPU_ID

2016-06-13 Thread Greg Kurz
On Fri, 27 May 2016 13:16:49 +0200 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > On Fri, 27 May 2016 13:58:28 +1000 > David Gibson <da...@gibson.dropbear.id.au> wrote: > > > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > > As stated in lin

[Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
ing_endian() is not called on a hot path and non bi-endian targets will return false anyway. While here, also rename TARGET_IS_BIENDIAN to be more precise: it is only for legacy virtio and bi-endian guests. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/virtio/vhost.c

Re: [Qemu-devel] [PATCH 3/3] KVM: use KVM_CAP_MAX_VCPU_ID

2016-05-27 Thread Greg Kurz
On Fri, 27 May 2016 13:58:28 +1000 David Gibson <da...@gibson.dropbear.id.au> wrote: > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > As stated in linux/Documentation/virtual/kvm/api.txt: > > > > The maximum possible value for max_vcp

Re: [Qemu-devel] [PATCH 0/4] 9p: get rid of readdir_r()

2016-06-02 Thread Greg Kurz
On Thu, 2 Jun 2016 10:33:06 +0100 Peter Maydell <peter.mayd...@linaro.org> wrote: > On 2 June 2016 at 09:51, Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > > The readdir_r() function has a broken design and should not be used anymore. > > It is expected to be obsoleted i

[Qemu-devel] [PATCH] 9p: drop useless inclusion of hw/i386/pc.h

2016-06-02 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p.c |1 - hw/9pfs/virtio-9p-device.c |1 - 2 files changed, 2 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index aab1da116894..587e901f81cc 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -13,7

[Qemu-devel] [PATCH 2/4] 9p: introduce the V9fsDir type

2016-06-02 Thread Greg Kurz
If we are to switch back to readdir(), we need a more complex type than DIR * to be able to serialize concurrent accesses to the directory stream. This patch introduces a placeholder type and fixes all users. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p-handle.c

[Qemu-devel] [PATCH 0/4] 9p: get rid of readdir_r()

2016-06-02 Thread Greg Kurz
he locking/unlocking hasn't any noticeable impact on performance. Since early glibc-2.24 users are already encountering build breaks, I guess this should go upstream sooner than later. I plan to issue a pull request next week, or even before if possible. Please comment ! Thanks. --- Greg Kurz (4)

[Qemu-devel] [PATCH 4/4] 9p: switch back to readdir()

2016-06-02 Thread Greg Kurz
This patch changes the 9p code to use readdir() again instead of readdir_r(), which is deprecated in glibc 2.24. All the locking was put in place by a previous patch. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- fsdev/file-op-9p.h |3 +-- hw/9pfs/9p-handle.c |8 +++---

[Qemu-devel] [PATCH 1/4] 9p: drop useless out: label

2016-06-02 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 587e901f81cc..12bd688f37d3 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1646,15 +1646,15 @@ stat

[Qemu-devel] [PATCH 3/4] 9p: add locking to V9fsDir

2016-06-02 Thread Greg Kurz
be achieved with a mutex like below: lock_mutex(); readdir(); // work with the dirent unlock_mutex(); This patch adds all the locking, to prepare the switch to readdir(). Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p.c | 21 + hw/9pfs/9p.h

[Qemu-devel] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files

2016-06-02 Thread Greg Kurz
Latest work on the subject seems to be: https://github.com/ericvh/linux/commit/eaf70223eac094291169f5a6de580351890162a2 I could verify that this patch still applies to the upstream kernel tree and fixes the issue. The fix was verified with upstream QEMU + the following patch:

Re: [Qemu-devel] [PATCH 0/4] 9p: get rid of readdir_r()

2016-06-02 Thread Greg Kurz
On Thu, 2 Jun 2016 15:59:29 +0200 Michael Fritscher <michael.fritsc...@telematik-zentrum.de> wrote: > Am 02.06.2016 um 11:42 schrieb Greg Kurz: > > On Thu, 2 Jun 2016 10:33:06 +0100 > > Peter Maydell <peter.mayd...@linaro.org> wrote: > > > >&

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-06-02 Thread Greg Kurz
On Wed, 1 Jun 2016 12:33:28 +1000 David Gibson <da...@gibson.dropbear.id.au> wrote: > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > > > > > > On 31/05/2016 15:10, Greg Kurz wrote: > > >>> > > +#if defined(TARGET_PP

[Qemu-devel] [PATCH 2/3] linux-headers: update to Linux 4.6

2016-05-26 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- include/standard-headers/linux/pci_regs.h | 20 +++- include/standard-headers/linux/virtio_config.h |2 ++ linux-headers/asm-arm/unistd.h |2 ++ linux-headers/asm-arm64/un

[Qemu-devel] [PATCH 0/3] PPC/KVM support higher vCPU ids

2016-05-26 Thread Greg Kurz
nth, but since it hasn't been pushed to an official tree yet, I resend it so that the series applies against master. --- Greg Kurz (3): PPC/KVM: early validation of vcpu id linux-headers: update to Linux 4.6 KVM: use KVM_CAP_MAX_VCPU_ID include/standard-headers/linux/pci_reg

[Qemu-devel] [PATCH 3/3] KVM: use KVM_CAP_MAX_VCPU_ID

2016-05-26 Thread Greg Kurz
returned from KVM_CAP_MAX_VCPUS. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- kvm-all.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kvm-all.c b/kvm-all.c index e56f38527815..e74e0c6e2352 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1459,10 +1

[Qemu-devel] [PATCH 1/3] PPC/KVM: early validation of vcpu id

2016-05-26 Thread Greg Kurz
sly bogus vcpu id. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- include/sysemu/kvm.h|2 ++ kvm-all.c |6 ++ target-ppc/translate_init.c |8 3 files changed, 16 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kv

Re: [Qemu-devel] [PULL 4/5] savevm: fail if migration blockers are present

2016-05-26 Thread Greg Kurz
On Mon, 23 May 2016 22:49:46 +0530 Amit Shah <amit.s...@redhat.com> wrote: > From: Greg Kurz <gk...@linux.vnet.ibm.com> > > QEMU has currently two ways to prevent migration to occur: > - migration blocker when it depends on runtime state > - VMStateDescription.

Re: [Qemu-devel] [PULL 5/5] migration: regain control of images when migration fails to complete

2016-05-26 Thread Greg Kurz
On Mon, 23 May 2016 22:49:47 +0530 Amit Shah <amit.s...@redhat.com> wrote: > From: Greg Kurz <gk...@linux.vnet.ibm.com> > > We currently have an error path during migration that can cause > the source QEMU to abort: > > migration_thread() > migration_compl

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
On Tue, 31 May 2016 13:54:11 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote: > On 31/05/2016 10:09, Greg Kurz wrote: > > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c > > index 440071815408..81cc5b0ae35c 100644 > > --- a/hw/virtio/vhost.c > > +++ b/hw/virt

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
On Tue, 31 May 2016 15:15:21 +0200 Paolo Bonzini <pbonz...@redhat.com> wrote: > On 31/05/2016 15:10, Greg Kurz wrote: > >>> > > +#if defined(TARGET_PPC64) || defined(TARGET_ARM) > >>> > > +#define LEGACY_VIRTIO_IS_BIENDIAN 1 > >>>

Re: [Qemu-devel] [PATCH] virtio: move bi-endian target support to a single location

2016-05-31 Thread Greg Kurz
On Tue, 31 May 2016 14:14:15 +0100 Peter Maydell <peter.mayd...@linaro.org> wrote: > On 31 May 2016 at 14:10, Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > > Hence my tentative to put all the details in one place... would it > > be ok if I include "config-target

[Qemu-devel] [PATCH 3/3] fs/9p: search open fids first

2016-06-22 Thread Greg Kurz
alls, since file permissions are checked earlier in the VFS layer. With this patch, we get: open("./test.txt", O_RDWR|O_CREAT, 0666) = 4 chmod("./test.txt", 0) = 0 truncate("./test.txt", 0) = -1 EACCES (Permission denied) ftruncate(4, 0)

[Qemu-devel] [PATCH 2/3] fs/9p: track open fids

2016-06-22 Thread Greg Kurz
From: Greg Kurz <gk...@linux.vnet.ibm.com> This patch adds accounting of open fids in a list hanging off the i_private field of the corresponding inode. This allows faster lookups compared to searching the full 9p client list. The lookup code is modified accordingly. Signed-off-by: Gre

[Qemu-devel] [PATCH 0/3] fs/9p: fix setattr/getattr issues with open files

2016-06-22 Thread Greg Kurz
in the guest, with the notable exception of xattr related ones because more code is needed in QEMU. Please comment. Test reports will also be appreciated :) --- Eric Van Hensbergen (1): fs/9p: fix create-unlink-getattr idiom Greg Kurz (2): fs/9p: track open fids fs/9p: search

[Qemu-devel] [PATCH 1/3] fs/9p: fix create-unlink-getattr idiom

2016-06-22 Thread Greg Kurz
: Eric Van Hensbergen <eri...@gmail.com> (changed v9fs_fid_find_global to v9fs_fid_find_inode in comment) Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- fs/9p/fid.c | 30 ++ fs/9p/vfs_inode.c |4 net/9p/client.c |5 - 3

Re: [Qemu-devel] [PULL 14/30] linux-headers: update to Linux 4.6

2016-06-16 Thread Greg Kurz
On Thu, 16 Jun 2016 18:09:05 +0200 Christian Borntraeger <borntrae...@de.ibm.com> wrote: > On 06/16/2016 04:16 PM, Paolo Bonzini wrote: > > From: Greg Kurz <gk...@linux.vnet.ibm.com> > > > > Signed-off-by: Greg Kurz <gk..

[Qemu-devel] [PATCH] MAINTAINERS: update email address for Greg Kurz

2016-06-17 Thread Greg Kurz
While here, also add a section for the tree I use for 9p. Signed-off-by: Greg Kurz <gr...@kaod.org> --- MAINTAINERS |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index fe2279e64828..21014f459517 100644 --- a/MAINTAINERS +++ b/MAINT

Re: [Qemu-devel] [PATCH 1/6] virtio-net: use the backend cross-endian capabilities

2016-01-08 Thread Greg Kurz
On Fri, 8 Jan 2016 16:25:18 +0100 Laurent Vivier <lviv...@redhat.com> wrote: > > > On 08/01/2016 15:19, Greg Kurz wrote: > > On Thu, 7 Jan 2016 19:32:37 +0100 > > Laurent Vivier <lviv...@redhat.com> wrote: > >> > > > >

[Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-11 Thread Greg Kurz
network connectivity if rebooted into a different endianness. The current vhost-net code also tries to configure net backends. This will be no more needed and will be reverted in a subsequent patch. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- v2: - dropped useless check in the

[Qemu-devel] [PATCH v2 2/5] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-11 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now handled by the core virtio-net code. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- v2: - moved changes not belonging to the revert to patch 1 - updated changelog accordingly --- hw/net/vhost_net.c

[Qemu-devel] [PATCH v2 0/5] virtio/vhost cross-endian cleanup

2016-01-11 Thread Greg Kurz
virtio_access_is_big_endian() for little-endian targets - various cleanups This v2 addresses Laurent Vivier's comments. --- Greg Kurz (5): virtio-net: use the backend cross-endian capabilities Revert "vhost-net: tell tap backend about the vnet endianness" virtio: move cross-end

[Qemu-devel] [PATCH v2 4/5] vhost: move virtio 1.0 check to cross-endian helper

2016-01-11 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> Reviewed-by: Corneli

[Qemu-devel] [PATCH] trace: drop trailing empty strings

2016-01-11 Thread Greg Kurz
Also fix a typo in the virtio_balloon_handle_output() trace while here. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- trace-events | 64 +- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/trace-events b

[Qemu-devel] [PATCH v2 5/5] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2016-01-11 Thread Greg Kurz
a runtime check for virtio 1.0, which ruins the benefit of the virtio_access_is_big_endian() helper for always little-endian targets. With this patch, always little-endian targets stop checking for virtio 1.0, since the result is little-endian in all cases. Signed-off-by: Greg Kurz <

[Qemu-devel] [PATCH v2 3/5] virtio: move cross-endian helper to vhost

2016-01-11 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.h...@de.ibm.com> --- hw/vi

[Qemu-devel] [PATCH v2 1/5] virtio-net: use the backend cross-endian capabilities

2016-01-11 Thread Greg Kurz
virtio_net_vhost_status() change from patch 2 - use semicolon in "backend does no support..." error message - merged patch 3 (drop the virtio_needs_swap() helper) - provided some more details in changelog and comments Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/net/virtio-net.c

[Qemu-devel] [PATCH v2 0/5] virtio/vhost cross-endian cleanup

2016-01-11 Thread Greg Kurz
virtio_access_is_big_endian() for little-endian targets - various cleanups This v2 addresses Laurent Vivier's comments. --- Greg Kurz (5): virtio-net: use the backend cross-endian capabilities Revert "vhost-net: tell tap backend about the vnet endianness" virtio: move cross-end

[Qemu-devel] [PATCH v2 2/5] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-11 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now handled by the core virtio-net code. - moved changes not belonging to the revert to patch 1 - updated changelog accordingly Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/net/vhost_net.c

Re: [Qemu-devel] [PATCH v2 0/5] virtio/vhost cross-endian cleanup

2016-01-11 Thread Greg Kurz
Realized I had misplaced changelog in the patches... some of them were sent before I could hit ^C :) I'll resend the whole series. On Mon, 11 Jan 2016 17:02:01 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > This series brings some improvements to the cross-endian support in the

[Qemu-devel] [PATCH 7/7] target-ppc: gdbstub: Add VSX support

2016-01-15 Thread Greg Kurz
From: Anton Blanchard <an...@samba.org> Add the XML and functions to get and set VSX registers. Signed-off-by: Anton Blanchard <an...@samba.org> (fixed little-endian guests) Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- configure |6 +++--- gdb

[Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-15 Thread Greg Kurz
for little-endian hosts. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- target-ppc/kvm.c | 12 1 file changed, 12 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 9940a9046220..45249990bda1 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@

[Qemu-devel] [PATCH 5/7] target-ppc: gdbstub: fix altivec registers for little-endian guests

2016-01-15 Thread Greg Kurz
, for both system and user mode. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- target-ppc/translate_init.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 18e9e561561f..80d53e4dcf5a

[Qemu-devel] [PATCH 3/7] target-ppc: gdbstub: fix float registers for little-endian guests

2016-01-15 Thread Greg Kurz
Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- target-ppc/translate_init.c |4 1 file changed, 4 insertions(+) diff --git a/target-ppc/translate_init.c b/targ

[Qemu-devel] [PATCH 4/7] target-ppc: gdbstub: introduce avr_need_swap()

2016-01-15 Thread Greg Kurz
This helper will be used to support Altivec registers in little-endian guests. This patch does not change functionnality. Note: I had to put the helper some lines away from the gdb_*_avr_reg() routines to get a more readable patch. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> ---

[Qemu-devel] [PATCH 6/7] target-ppc: gdbstub: fix spe registers for little-endian guests

2016-01-15 Thread Greg Kurz
Let's reuse the ppc_maybe_bswap_register() helper, like we already do with the general registers. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- target-ppc/translate_init.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target-ppc/translate_in

[Qemu-devel] [PATCH 2/7] target-ppc: rename and export maybe_bswap_register()

2016-01-15 Thread Greg Kurz
This helper will be used to support FP, Altivec and VSX registers when the guest is little-endian. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- target-ppc/cpu.h |1 + target-ppc/gdbstub.c | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/

[Qemu-devel] [PATCH 0/7] target-ppc: gdbstub: endiannes fixes and VSX support

2016-01-15 Thread Greg Kurz
: gdbstub: Add VSX support Greg Kurz (6): target-ppc: kvm: fix floating point registers sync on little-endian hosts target-ppc: rename and export maybe_bswap_register() target-ppc: gdbstub: fix float registers for little-endian guests target-ppc: gdbstub: introduce

Re: [Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-14 Thread Greg Kurz
d backport this to 2.4 and 2.5. Cc'ing stable. Reviewed-by: Greg Kurz <gk...@linux.vnet.ibm.com> > hw/net/vhost_net.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) > > diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c > index 318c3e6..10

Re: [Qemu-devel] [PATCH v3 0/6] virtio/vhost cross-endian cleanup

2016-01-13 Thread Greg Kurz
On Tue, 12 Jan 2016 18:21:05 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > This series brings some improvements to the cross-endian support in the > virtio and vhost code: > - use qemu_set_vnet_be() and qemu_set_vnet_le() directly from virtio-net, > so that ba

[Qemu-devel] [PATCH 0/2] 9pfs: fsdev: use error_report() instead of fprintf(stderr)

2016-01-18 Thread Greg Kurz
Hi, This series moves all the 9pfs/fsdev code to use error_report(), with the notable exception of virtfs-proxy-helper, which doesn't need it. Markus, Should this patches go through your tree ? Or can they go through my 9p tree if you ack them ? Cheers. -- Greg --- Greg Kurz (2): 9pfs

[Qemu-devel] [PATCH 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-18 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- hw/9pfs/9p-handle.c |5 +++-- hw/9pfs/9p-local.c | 15 --- hw/9pfs/9p-proxy.c | 12 ++-- hw/9pfs/9p.c|2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/9pfs/9p-handle.

[Qemu-devel] [PATCH 2/2] fsdev: use error_report() instead of fprintf(stderr)

2016-01-18 Thread Greg Kurz
Only fix the code that gets built into QEMU. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- fsdev/qemu-fsdev.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ccfec139ab2b..55e2f7a0fb58 100644 --- a/fsde

Re: [Qemu-devel] [PATCH 1/7] target-ppc: kvm: fix floating point registers sync on little-endian hosts

2016-01-18 Thread Greg Kurz
On Mon, 18 Jan 2016 13:16:44 +1100 David Gibson <da...@gibson.dropbear.id.au> wrote: > On Fri, Jan 15, 2016 at 04:00:12PM +0100, Greg Kurz wrote: > > On VSX capable CPUs, the 32 FP registers are mapped to the high-bits > > of the 32 first VSX registers. So if you have: >

<    1   2   3   4   5   6   7   8   9   10   >