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

[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 --- hw/9pfs/9p-handle.c | 18 +- hw/9pfs

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

2016-06-02 Thread Greg Kurz
Signed-off-by: Greg Kurz --- 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 @@ static int v9fs_do_readdir_with_stat(V9fsPDU

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

2016-06-02 Thread Greg Kurz
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 --- hw/9pfs/9p.c | 21 + hw/9pfs/9p.h | 16 2 files changed, 37

[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 --- fsdev/file-op-9p.h |3 +-- hw/9pfs/9p-handle.c |8 +++- hw/9pfs/9p-local.c | 20

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 wrote: > On 2 June 2016 at 09:51, Greg Kurz wrote: > > The readdir_r() function has a broken design and should not be used anymore. > > It is expected to be obsoleted in a future version of POSIX.1: > > > > http://aust

[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: http://patchwork.o

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 wrote: > Am 02.06.2016 um 11:42 schrieb Greg Kurz: > > On Thu, 2 Jun 2016 10:33:06 +0100 > > Peter Maydell wrote: > > > >> On 2 June 2016 at 09:51, Greg Kurz wrote: > >>> The readdir_r() function

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 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_PPC64) || defined(TARGET_ARM) > &

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

2016-06-02 Thread Greg Kurz
On Fri, 3 Jun 2016 11:16:04 +1000 David Gibson 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 wrote: > > > > > On Tue, May 31, 2016 at 03:15:21PM +0200, Paolo Bonzini wrote: > >

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

2016-06-02 Thread Greg Kurz
On Thu, 2 Jun 2016 15:00:26 -0600 Eric Blake 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 put in place by a prev

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

2016-06-03 Thread Greg Kurz
Reviewed-by: Eric Blake Signed-off-by: Greg Kurz --- 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 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -16

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

2016-06-03 Thread Greg Kurz
quest 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-

[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 Signed-off-by: Greg Kurz --- v2: added Eric's r-b --

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

2016-06-03 Thread Greg Kurz
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 Signed-off-by: Greg Kurz --- v2: - s/call concurrently/concurrently call/ - added Eric's r-b --

[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 --- v2: set errno to 0 before calling readdir() --- fsdev/file-op-9p.h |3 +-- hw/9pfs/9p

[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 --- hw/9pfs/9p-synth.c | 4 +--- hw/9pfs/virtio-9p-device.c | 1 - 2 files chang

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

2016-06-06 Thread Greg Kurz
Reviewed-by: Eric Blake Signed-off-by: Greg Kurz --- 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/hw/9pfs/9p.c @@ -1642,15 +1642,15 @@ static int

[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 --- fsdev/file-op-9p.h | 2 +- fsdev/qemu-fsdev-dummy.c | 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 --- 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 +13,6 @@ #include "qemu/os

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

2016-06-06 Thread Greg Kurz
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 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 Signed-off-by: Greg Kurz --- fsdev/file-op-9p.h | 3 +-- hw/9pfs/9p-handle.c | 8 +++- hw/9pfs

[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 Signed-off-by: Greg Kurz --- hw/9pfs/9p-handle.c | 18

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

2016-06-06 Thread Greg Kurz
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 Signed-off-by: Greg Kurz --- hw/9pfs/9p.c | 21 + hw/9pfs/9p.h | 16

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 wrote: > On 6 June 2016 at 13:32, Greg Kurz wrote: > > The following changes since commit de5dca1b792ada25c29a95c8f84e01f4300aef9c: > > > > e1000e: Fix build with gcc 4.6.3 and ust tracing (2016-06-06 09:42:54 > > +

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 wrote: > On Fri, 27 May 2016 13:58:28 +1000 > David Gibson wrote: > > > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > > As stated in linux/Documentation/virtual/kvm/api.txt: > > > > > >

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 throttling. > I am digging through t

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 +0800, Jason Wang wrote:

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 wrote: > On Fri, 27 May 2016 13:58:28 +1000 > David Gibson wrote: > > > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > > As stated in linux/Documentation/virtual/kvm/api.txt: > > > > > >

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 wrote: > On 06/16/2016 04:16 PM, Paolo Bonzini wrote: > > From: Greg Kurz > > > > Signed-off-by: Greg Kurz > > Message-Id: <146424973656.5666.1543626214358208452.st...@bahia.huguette.org> > > Sign

[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 --- MAINTAINERS |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index fe2279e64828..21014f459517 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -888,12 +888,13

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

2016-06-22 Thread Greg Kurz
ng 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: s

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

2016-06-22 Thread Greg Kurz
ergen (changed v9fs_fid_find_global to v9fs_fid_find_inode in comment) Signed-off-by: Greg Kurz --- fs/9p/fid.c | 30 ++ fs/9p/vfs_inode.c |4 net/9p/client.c |5 - 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/fs/9p/fid.c b/

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

2016-06-22 Thread Greg Kurz
From: Greg Kurz 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: Greg Kurz --- fs/9p/fid.c

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

Re: [Qemu-devel] [PATCH v2] [WIP] [RFC ]Add initial 9pfs support for Windows hosts v2

2016-05-10 Thread Greg Kurz
On Mon, 9 May 2016 11:12:51 +0200 "Michael Fritscher" wrote: > Hello Greg, > Hi Michael ! > I commented your comments :-) > > To summerize: > * I didn't know where to put the win32 specific functions/wrappers - > thanks showing me the locations! > * Binary mode is needed by Windows - else

Re: [Qemu-devel] [PATCH] migration: introduce migrate_is_blocked()

2016-05-11 Thread Greg Kurz
On Wed, 04 May 2016 21:44:19 +0200 Greg Kurz wrote: > QEMU has currently two ways to prevent migration to occur: > - migration blocker when it depends on runtime state > - VMStateDescription.unmigratable when migration is not supported at all > > This patch gathers all the logi

Re: [Qemu-devel] [PATCH] migration: introduce migrate_is_blocked()

2016-05-11 Thread Greg Kurz
On Wed, 11 May 2016 13:59:19 +0200 Paolo Bonzini wrote: > On 04/05/2016 21:44, Greg Kurz wrote: > > QEMU has currently two ways to prevent migration to occur: > > - migration blocker when it depends on runtime state > > - VMStateDescription.unmigratable when migration is

[Qemu-devel] [PATCH] sysemu: support up to 1024 vCPUs

2016-05-11 Thread Greg Kurz
Some systems can already provide more than 255 hardware threads. Bumping the QEMU limit to 1024 seems reasonable: - it has no visible overhead in top - the limit itself has no effect on hot paths Signed-off-by: Greg Kurz --- This was tested with a pseries guest only. I'd like to know if

Re: [Qemu-devel] [PATCH] sysemu: support up to 1024 vCPUs

2016-05-11 Thread Greg Kurz
On Wed, 11 May 2016 16:20:08 +0200 Igor Mammedov wrote: > On Wed, 11 May 2016 16:00:04 +0200 > Greg Kurz wrote: > > > Some systems can already provide more than 255 hardware threads. > > > > Bumping the QEMU limit to 1024 seems reasonable: > > - it has no

Re: [Qemu-devel] [PATCH RFC 11/14] increase MAX_CPUMASK_BITS from 255 to 288

2016-05-11 Thread Greg Kurz
ems reasonable for pseries. Would it be a problem for the x86 target ? If it is okay for you, I'd rather try to push this separately from your series. Anyway, Reviewed-by: Greg Kurz > hw/arm/virt.c | 2 +- > hw/ppc/spapr.c | 2 +- > include/sysemu/sysemu.h | 2 +-

[Qemu-devel] [PATCH] virtio-pci: warn when both legacy and modern modes are disabled

2016-05-12 Thread Greg Kurz
Without presuming if we got there because of a user mistake or some more subtile bug in the tooling, it doesn't hurt to log somewhere that the device won't be functional. Signed-off-by: Greg Kurz --- hw/virtio/virtio-pci.c |4 1 file changed, 4 insertions(+) diff --git a

[Qemu-devel] [PATCH] migration: regain control of images when migration fails to complete

2016-05-18 Thread Greg Kurz
ibly do the same with precopy and leave the guest paused. But since the historical default for migration errors is to restart the source, this patch adds a call to bdrv_invalidate_cache_all() instead. Signed-off-by: Greg Kurz --- migration/migration.c |9 + 1 file changed, 9 inse

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

2016-05-18 Thread Greg Kurz
On Wed, 18 May 2016 13:42:08 +0200 Kevin Wolf wrote: > Am 18.05.2016 um 13:13 hat Dr. David Alan Gilbert geschrieben: > > * Greg Kurz (gk...@linux.vnet.ibm.com) wrote: > > > We currently have an error path during migration that can cause > > > the source QEMU to ab

[Qemu-devel] [PATCH v2] migration: regain control of images when migration fails to complete

2016-05-18 Thread Greg Kurz
ibly do the same with precopy and leave the guest paused. But since the historical default for migration errors is to restart the source, this patch adds a call to bdrv_invalidate_cache_all() instead. Signed-off-by: Greg Kurz --- v2: - follow the existing error handling patterns (Kevin)

[Qemu-devel] [PATCH v2] sysemu: support up to 1024 vCPUs

2016-05-18 Thread Greg Kurz
top - the limit itself has no effect on hot paths We only do that for pseries at the moment and keep a 255 limit for the ARM Virtual Machine. Signed-off-by: Greg Kurz --- v2: - updated changelog - keep 255 limit in hw/arm/virt.c --- hw/arm/virt.c |2 +- include/sysemu/sysemu.h

Re: [Qemu-devel] [PATCH v2] sysemu: support up to 1024 vCPUs

2016-05-18 Thread Greg Kurz
On Wed, 18 May 2016 16:31:31 +0100 Peter Maydell wrote: > On 18 May 2016 at 14:52, Greg Kurz wrote: > > Some PowerPC systems can already provide more than 255 hardware threads. > > Igor also posted a patch recently, to increase the the maxcpus limit to > > 288 for x86

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

2016-05-23 Thread Greg Kurz
On Thu, 7 Apr 2016 18:07:44 +0200 Greg Kurz wrote: > On Thu, 7 Apr 2016 12:56:24 +0800 > Jason Wang wrote: > > > This patch add the capability of basic vhost net busy polling which is > > supported by recent kernel. User could configure the maximum number of > > us

[Qemu-devel] [PATCH] 9p/fsdev: remove obsolete references to virtio

2016-05-23 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 --- fsdev/file-op-9p.h |2 +- fsdev/qemu-fsdev-dummy.c

Re: [Qemu-devel] [PATCH] migration: introduce migrate_is_blocked()

2016-05-23 Thread Greg Kurz
On Mon, 23 May 2016 21:42:23 +0530 Amit Shah wrote: > On (Wed) 11 May 2016 [14:10:34], Greg Kurz wrote: > > On Wed, 11 May 2016 13:59:19 +0200 > > Paolo Bonzini wrote: > > > > > On 04/05/2016 21:44, Greg Kurz wrote: > > > > QEMU has curren

[Qemu-devel] [PATCH RFC 0/7] vhost: cross-endian support (vhost-net only)

2015-05-06 Thread Greg Kurz
cross endian Greg Kurz (6): virtio: relax feature check linux-headers: sync vhost.h virtio: introduce virtio_legacy_is_cross_endian() vhost: set vring endianness for legacy virtio tap: add VNET_LE/VNET_BE operations vhost-net: tell tap backend about the vnet endia

[Qemu-devel] [PATCH RFC 2/7] linux-headers: sync vhost.h

2015-05-06 Thread Greg Kurz
This patch brings the cross-endian vhost API to QEMU. Signed-off-by: Greg Kurz --- linux-headers/linux/vhost.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h index c656f61..ead86db 100644 --- a/linux-headers/linux

[Qemu-devel] [PATCH RFC 6/7] vhost-net: tell tap backend about the vnet endianness

2015-05-06 Thread Greg Kurz
The default behaviour for TAP/MACVTAP is to consider vnet as native endian. This patch handles the cases when this is not true: - virtio 1.0: always little-endian - legacy cross-endian Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 33 - 1 file changed, 32

[Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-06 Thread Greg Kurz
features like VIRTIO_F_VERSION_1, even if they are still not implemented. Signed-off-by: Greg Kurz --- include/hw/virtio/virtio.h |1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index d95f8b6..6ef70f1 100644 --- a/include/hw/virtio/virtio

[Qemu-devel] [PATCH RFC 5/7] tap: add VNET_LE/VNET_BE operations

2015-05-06 Thread Greg Kurz
The linux tap and macvtap backends can be told to parse vnet headers according to little or big endian. This is done through the TUNSETVNETLE and TUNSETVNETBE ioctls. This patch brings all the plumbing for QEMU to use these APIs. Signed-off-by: Greg Kurz --- include/net/net.h |6

[Qemu-devel] [PATCH RFC 3/7] virtio: introduce virtio_legacy_is_cross_endian()

2015-05-06 Thread Greg Kurz
This helper will be used by vhost and tap to detect cross-endianness in the legacy virtio case. Signed-off-by: Greg Kurz --- include/hw/virtio/virtio-access.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio

[Qemu-devel] [PATCH RFC 4/7] vhost: set vring endianness for legacy virtio

2015-05-06 Thread Greg Kurz
Legacy virtio is native endian: if the guest and host endianness differ, we have to tell vhost so it can swap bytes where appropriate. This is done through a vhost ring ioctl. Signed-off-by: Greg Kurz --- hw/virtio/vhost.c | 50 +- 1 file

[Qemu-devel] [PATCH RFC 7/7] vhost_net: re-enable when cross endian

2015-05-06 Thread Greg Kurz
From: Cédric Le Goater Cross-endianness is now checked by the core vhost code. revert 371df9f5e0f1 "vhost-net: disable when cross-endian" Signed-off-by: Cédric Le Goater [ added commit message, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 19 -

Re: [Qemu-devel] [PATCH RFC 1/7] virtio: relax feature check

2015-05-12 Thread Greg Kurz
On Tue, 12 May 2015 15:14:53 +0200 Cornelia Huck wrote: > On Wed, 06 May 2015 14:07:37 +0200 > Greg Kurz wrote: > > > Unlike with add and clear, there is no valid reason to abort when checking > > for a feature. It makes more sense to return false (i.e. the feature bit &g

[Qemu-devel] [PATCH] spapr: ensure we have at least one XICS server

2015-05-13 Thread Greg Kurz
t more than 8 threads on PPC with KVM ... which is a lot more explicit than the XICS errors. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 35dca77..92916df 100644 --- a/hw/ppc/spapr.c +

Re: [PATCH for-8.0] hw: Add compat machines for 8.0

2022-11-15 Thread Greg Kurz
re/machine.c > index 8d34caa31dc8..f264fb53b46c 100644 > --- a/hw/core/machine.c > +++ b/hw/core/machine.c > @@ -40,6 +40,9 @@ > #include "hw/virtio/virtio-pci.h" > #include "qom/object_interfaces.h" > > +GlobalProperty hw_compat_7_2[] ={}; Missi

Re: [PATCH] target/ppc: Fix build warnings when building with 'disable-tcg'

2022-11-16 Thread Greg Kurz
t; they are only defined if qemu is compiled with '--enable-tcg' > > Reported-by: Kowshik Jois B S > Signed-off-by: Vaibhav Jain > --- Reviewed-by: Greg Kurz This was introduced by a recent commit. Fixes: 61bd1d29421a ("target/ppc: Convert to tcg_ops restore_state_to_op

Re: [PATCH] target/ppc: Fix build warnings when building with 'disable-tcg'

2022-11-17 Thread Greg Kurz
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1319 > Signed-off-by: Vaibhav Jain > Reviewed-by: Greg Kurz > Reviewed-by: Philippe Mathieu-Daudé > Tested-by: Kowshik Jois B S > > > Thanks, > > > Daniel > > On 11/16/22 10:

Re: [PATCH for-8.0] MAINTAINERS: downgrade PPC KVM/TCG CPUs and pSeries to 'Odd Fixes'

2022-11-17 Thread Greg Kurz
em. It'll also (hopefully) keep expectations under > check when/if these components are used in a customer product. > > Cc: Cédric Le Goater > Cc: David Gibson > Cc: Greg Kurz > Signed-off-by: Daniel Henrique Barboza > --- Reviewed-by: Greg Kurz > MAINTAINER

Re: [PATCH v2 02/19] hw/9pfs: Drop unnecessary *xattr wrapper API declarations

2022-11-18 Thread Greg Kurz
On Fri, 11 Nov 2022 12:22:08 +0800 Bin Meng wrote: > These are not used anywhere in the source tree. Drop them. > > Signed-off-by: Bin Meng > --- > This one could even go through the trivial tree right away IMHO. Reviewed-by: Greg Kurz > (no changes since v1) > >

Re: [PATCH v2 05/19] hw/9pfs: Update 9pfs to use the new QemuFd_t type

2022-11-18 Thread Greg Kurz
On Fri, 11 Nov 2022 12:22:11 +0800 Bin Meng wrote: > With this new QemuFd_t type, it significantly reduces the number of I cannot find the definition of this type, nor the definition of qemu_fd_invalid(). Missing patch ? Anyway, IIUC this type is an int for linux and a HANDLE for windows, right

Re: [PATCH v2 05/19] hw/9pfs: Update 9pfs to use the new QemuFd_t type

2022-11-19 Thread Greg Kurz
On Fri, 18 Nov 2022 14:38:00 +0100 Christian Schoenebeck wrote: > On Friday, November 18, 2022 10:29:51 AM CET Greg Kurz wrote: > > On Fri, 11 Nov 2022 12:22:11 +0800 > > Bin Meng wrote: > > > > > With this new QemuFd_t type, it significantly reduces the number

Re: [PATCH 2/3] i386: kvm: disable KVM_CAP_PMU_CAPABILITY if "pmu" is disabled

2022-11-21 Thread Greg Kurz
On Sat, 19 Nov 2022 04:29:00 -0800 Dongli Zhang wrote: > The "perf stat" at the VM side still works even we set "-cpu host,-pmu" in > the QEMU command line. That is, neither "-cpu host,-pmu" nor "-cpu EPYC" > could disable the pmu virtualization in an AMD environment. > > We still see below at V

Re: [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-24 Thread Greg Kurz
#x27;ll need to rebase on this fix for your patches to pass CI. Anyway, for 9p: Reviewed-by: Greg Kurz > Signed-off-by: Markus Armbruster > --- > scripts/coccinelle/return_directly.cocci | 5 +-- > include/hw/pci/pci.h | 7 +-- > target/avr/cpu.h

Re: [PATCH for-8.0 13/19] target/ppc: Convert to 3-phase reset

2022-11-24 Thread Greg Kurz
On Thu, 24 Nov 2022 11:50:16 + Peter Maydell wrote: > Convert the ppc CPU class to use 3-phase reset, so it doesn't > need to use device_class_set_parent_reset() any more. > > Signed-off-by: Peter Maydell > --- Reviewed-by: Greg Kurz > target/ppc/cpu-qom.h

Re: [PATCH v2 1/2] cleanup: Tweak and re-run return_directly.cocci

2022-11-24 Thread Greg Kurz
On Thu, 24 Nov 2022 16:15:11 +0100 Greg Kurz wrote: > On Tue, 22 Nov 2022 14:49:16 +0100 > Markus Armbruster wrote: > > > Tweak the semantic patch to drop redundant parenthesis around the > > return expression. > > > > Coccinelle drops a comment in h

[PATCH] 9pfs: Fix some return statements in the synth backend

2022-11-24 Thread Greg Kurz
: +return EAGAIN; Simply change the sign. This has no consequence since callers assert() the returned value to be equal to 0. While here also get rid of the uneeded ret variables as suggested by return_directly.cocci. Reported-by: Markus Armbruster Signed-off-by: Greg Kurz --- hw/9pfs/9p

Re: [PATCH for-8.0 5/7] hw/intc/xics: Reset TYPE_ICS objects with device_cold_reset()

2022-11-25 Thread Greg Kurz
her the classes are using legacy reset or 3-phase > > reset. This allows us to remove the reset function that the subclass > > currently has to set up. > > Nice ! > Seconded. Reviewed-by: Greg Kurz > > > > Signed-off-by: Peter Maydell > > Reviewed-by

Re: [PATCH for-8.0 6/7] hw/intc/xics: Convert TYPE_ICS to 3-phase reset

2022-11-25 Thread Greg Kurz
On Fri, 25 Nov 2022 11:52:39 + Peter Maydell wrote: > Convert the TYPE_ICS class to 3-phase reset; this will allow us > to convert the TYPE_PHB3_MSI class which inherits from it. > > Signed-off-by: Peter Maydell > --- Reviewed-by: Greg Kurz > hw/intc/xics.c | 9 +

Re: [PATCH] 9pfs: Fix some return statements in the synth backend

2022-11-28 Thread Greg Kurz
On Mon, 28 Nov 2022 08:35:22 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > The qemu_v9fs_synth_mkdir() and qemu_v9fs_synth_add_file() functions > > currently return a positive errno value on failure. This causes > > checkpatch.pl to spit several e

Re: [PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-28 Thread Greg Kurz
. Let's officially assign it to 9p > maintainers. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index cf24910249..4f156a99f1 100644 >

Re: [PATCH v2 for-8.0 2/2] pci: drop redundant PCIDeviceClass::is_bridge field

2022-11-30 Thread Greg Kurz
_downstream.c | 1 - > hw/pci-bridge/xio3130_upstream.c | 1 - > hw/pci-host/designware.c | 1 - > hw/pci-host/xilinx-pcie.c | 1 - > hw/pci/pci.c | 20 +--- > hw/ppc/spapr_pci.c | 15 +-- For ppc

[PATCH 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++

[PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386

[PATCH 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_fprintf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/h

[PATCH 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. Greg Kurz (3): hw/i386: Add `\n` to hint message hw/loongarch: Add `\n` to hint message hw/ar

[PATCH v2 2/3] hw/loongarch: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/loongarch/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/loongarch/acpi-build.c b/hw/loongarch/acpi-build.c index 730bc4a748c4..a1c419874123 100644 --- a/hw/loongarch/acpi-build.c +++

[PATCH v2 3/3] hw/arm: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/arm/virt-acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 17aeec7a6f56..48febde1ccd1 100644 --- a/hw/arm/virt-acpi-build.c +++ b/h

[PATCH v2 0/3] acpi-build: Fix hint messages

2024-01-30 Thread Greg Kurz
ACPI build for ARM, i386 and Loongarch all have the same warning report with a hint for the user. The hint is printed with error_printf() as expected but it lacks the terminating '\n'. v2: - s/error_fprintf/error_printf in commit logs (Ani) Greg Kurz (3): hw/i386: Add `\n` to hint me

[PATCH v2 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
error_printf() doesn't add newlines. Signed-off-by: Greg Kurz --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index edc979379c03..e990b0ae927f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386

Re: [PATCH 1/3] hw/i386: Add `\n` to hint message

2024-01-30 Thread Greg Kurz
On Tue, 30 Jan 2024 21:43:27 +0530 Ani Sinha wrote: > > > > On 30-Jan-2024, at 21:26, Greg Kurz wrote: > > > > error_fprintf() doesn't add newlines. > > ^ > > Should be error_printf(). Ditto for other patches. > Thanks. Pos

Re: [PATCH for-9.0 0/3] qtest/virtio-9p-test.c: fix slow tests

2024-03-26 Thread Greg Kurz
Bom dia Daniel ! On Tue, 26 Mar 2024 10:26:03 -0300 Daniel Henrique Barboza wrote: > Hi, > > Thomas reported in [1] a problem that happened with the RISC-V machine > where some tests from virtio-9p-test.c were failing with '-m slow', i.e. > enabling slow tests. > > In the end it wasn't a RISC-

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-26 Thread Greg Kurz
On Tue, 26 Mar 2024 10:26:04 -0300 Daniel Henrique Barboza wrote: > The local 9p driver in virtio-9p-test.c its temporary dir right at the > start of qos-test (via virtio_9p_create_local_test_dir()) and only > deletes it after qos-test is finished (via > virtio_9p_remove_local_test_dir()). > > T

Re: [PATCH for-9.0 1/3] qtest/virtio-9p-test.c: consolidate create dir, file and symlink tests

2024-03-27 Thread Greg Kurz
> wrote: > > >> On 3/27/24 05:47, Christian Schoenebeck wrote: > > >>> On Tuesday, March 26, 2024 6:47:17 PM CET Daniel Henrique Barboza wrote: > > >>>> On 3/26/24 14:05, Greg Kurz wrote: > > >>>>> On Tue, 26 Mar 2024 10:26:0

Re: [PATCH for-9.0 v3 0/2] qtest/virtio-9p-test.c: fix slow tests

2024-03-27 Thread Greg Kurz
On Wed, 27 Mar 2024 11:20:09 -0300 Daniel Henrique Barboza wrote: > Hi, > > In this new version we took a different approach after the discussions > we had in [1]. The tests are now untouched, and we're addressing the root > cause directly: the fact that we have a single temp dir for all the tes

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] ppc: Add dump-stack implementation

2019-05-02 Thread Greg Kurz
On Wed, 1 May 2019 15:35:22 +1000 Suraj Jitindar Singh wrote: > The monitor function dump-stack is used to dump the stack for a cpu. > This can be useful for debugging purposes when the stack cannot be > dumped by another means. > > Add a ppc implementation ppc_cpu_dump_stack(). > The stack poi

Re: [Qemu-devel] [PATCH] virtfs: Add missing "id" parameter in documentation

2019-05-05 Thread Greg Kurz
Hi Thomas, Thanks for the janitoring :) On Sun, 5 May 2019 16:45:27 +0200 Thomas Huth wrote: > ... and remove the square brackets from "path" and "security_model", > since these parameters are not optional. > Well this is only true when fsdriver == local, but the other fs drivers, ie. proxy

Re: [Qemu-devel] [PATCH] virtfs: Add missing "id" parameter in documentation

2019-05-05 Thread Greg Kurz
On Mon, 6 May 2019 05:49:40 +0200 Thomas Huth wrote: > On 05/05/2019 20.32, Greg Kurz wrote: > > Hi Thomas, > > > > Thanks for the janitoring :) > > > > On Sun, 5 May 2019 16:45:27 +0200 > > Thomas Huth wrote: > > > >> ... and remo

[Qemu-devel] [PATCH] spapr: Allow machine to dump dtb after SLOF update

2019-05-06 Thread Greg Kurz
hurt to let them dump the dtb and exit anyway, and it seems better to ensure a consistent behaviour for this feature. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 19 +++ hw/ppc/spapr_hcall.c | 22 ++ include/hw/ppc/spapr.h |1 + 3 files cha

[Qemu-devel] [PATCH 1/6] fsdev: Drop unused extern declaration

2019-05-07 Thread Greg Kurz
This is a leftover of the handle backend, removed in QEMU 4.0. Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.h |1 - 1 file changed, 1 deletion(-) diff --git a/fsdev/qemu-fsdev.h b/fsdev/qemu-fsdev.h index d9716b414492..844159d1e1ff 100644 --- a/fsdev/qemu-fsdev.h +++ b/fsdev/qemu-fsdev.h

[Qemu-devel] [PATCH 2/6] fsdev: Drop unused opaque field

2019-05-07 Thread Greg Kurz
This was introduced along with -fsdev but it never got used. Signed-off-by: Greg Kurz --- fsdev/file-op-9p.h |1 - 1 file changed, 1 deletion(-) diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h index 3fa062b39f1b..c757c8099f54 100644 --- a/fsdev/file-op-9p.h +++ b/fsdev/file-op-9p.h

[Qemu-devel] [PATCH 0/6] fsdev/virtfs: Assorted cleanups and fixes

2019-05-07 Thread Greg Kurz
/1095472/ but I'd appreciate your valuable feedback on the other ones as well :) Cheers, -- Greg --- Greg Kurz (6): fsdev: Drop unused extern declaration fsdev: Drop unused opaque field fsdev: Move some types definition to qemu-fsdev.c fsdev: Error out when unsupported opti

[Qemu-devel] [PATCH 5/6] vl: Deprecate -virtfs_synth

2019-05-07 Thread Greg Kurz
The synth fsdriver never got used for anything else but the QTest testcase for VirtIO 9P. And even there, QTest directly uses -fsdev synth and -device virtio-9p-{pci|device}. Signed-off-by: Greg Kurz --- This should be Cc'd to libvir-l...@redhat.com according to MAINTAINERS, but libvirt do

[Qemu-devel] [PATCH 3/6] fsdev: Move some types definition to qemu-fsdev.c

2019-05-07 Thread Greg Kurz
types to qemu-fsdev.c instead since they are only used there. Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c | 23 +++ fsdev/qemu-fsdev.h | 24 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c

[Qemu-devel] [PATCH 4/6] fsdev: Error out when unsupported option is passed

2019-05-07 Thread Greg Kurz
esn't know about he synth and proxy fsdrivers. Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c | 74 ++-- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index e972bd698cf5..077a8c4e2

<    3   4   5   6   7   8   9   10   11   12   >