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

2015-12-18 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 --- target-ppc/translate_init.c

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

2015-12-18 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 --- target-ppc/translate_init.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_i

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

2015-12-18 Thread Greg Kurz
, for both system and user mode. Signed-off-by: Greg Kurz --- 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 100644 --- a/targe

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

2015-12-18 Thread Greg Kurz
From: Anton Blanchard Add the XML and functions to get and set VSX registers. Signed-off-by: Anton Blanchard (fixed little-endian guests) Signed-off-by: Greg Kurz --- configure |6 +++--- gdb-xml/power-vsx.xml | 44

Re: [Qemu-devel] 9pfs is broken in 2.5 (SIGSEGV) (bisected)

2015-12-19 Thread Greg Kurz
On Sat, 19 Dec 2015 12:16:58 +0300 Michael Tokarev wrote: > 19.12.2015 11:15, Michael Tokarev wrote: > >> commit ebac1202c95a4f1b76b6ef3f0f63926fa76e753e > >> Author: Paolo Bonzini > >> Date: Fri Nov 27 12:43:06 2015 +0100 > >> virtio-9p: use QEMU thread pool > > > > Program received sign

[Qemu-devel] [PATCH] virtio-9p: use accessor to get thread_pool

2015-12-20 Thread Greg Kurz
: ebac1202c95a4f1b76b6ef3f0f63926fa76e753e Signed-off-by: Greg Kurz --- Michael, I did not have time to reproduce the issue, and therefore to effectively test this patch fixes it. Maybe you can do it ? Thanks. -- Greg hw/9pfs/virtio-9p-coth.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio

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

2015-12-21 Thread Greg Kurz
On Mon, 21 Dec 2015 12:56:24 +1100 David Gibson wrote: > On Thu, Dec 17, 2015 at 09:43:29AM +0100, Greg Kurz wrote: > > On Thu, 3 Dec 2015 15:53:17 +0100 > > Greg Kurz wrote: > > > > > On Tue, 1 Dec 2015 22:48:38 +0100 > > > Thomas Huth wrote: > >

[Qemu-devel] [PULL] 9p fix

2015-12-23 Thread Greg Kurz
m for you to fetch changes up to 4b3a4f2d458ca5a7c6c16ac36a8d9ac22cc253d6: virtio-9p: use accessor to get thread_pool (2015-12-23 10:56:58 +0100) Fix a 2.5 regression. ---

[Qemu-devel] [PULL] virtio-9p: use accessor to get thread_pool

2015-12-23 Thread Greg Kurz
: ebac1202c95a4f1b76b6ef3f0f63926fa76e753e Reviewed-by: Michael Tokarev Tested-by: Michael Tokarev Cc: qemu-sta...@nongnu.org Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-coth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-coth.c b/hw/9pfs/virtio-9p-coth.c index fb6e8f80e0f4

Re: [Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2015-12-23 Thread Greg Kurz
On Wed, 23 Dec 2015 15:47:00 +0200 "Michael S. Tsirkin" wrote: > On Thu, Dec 17, 2015 at 09:52:46AM +0100, Greg Kurz wrote: > > This series tries to rework cross-endian helpers for better clarity. > > It does not change behaviour, except perhaps patch 3/3 even if I

Re: [Qemu-devel] [PATCH 0/7] target-ppc: endian fixes for KVM and gdbstub

2016-01-04 Thread Greg Kurz
On Fri, 18 Dec 2015 11:18:16 +0100 Greg Kurz wrote: > Hi, > > This series is a sequel to Anton's tentative at bringing VSX support in > our gdbstub: > > http://patchwork.ozlabs.org/patch/453758/ > > Indeed, FP, SPE and Altivec registers need to be copied to

[Qemu-devel] [PATCH] linux-user: fix typo in trace formats

2016-01-05 Thread Greg Kurz
); Fixes: c8ee0a445a6a85635e962c0346bc7b1259c1a3f5 Signed-off-by: Greg Kurz --- trace-events | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/trace-events b/trace-events index 6f036384a84f..ea5872dd72e2 100644 --- a/trace-events +++ b/trace-events @@ -1799,15

Re: [Qemu-devel] [PATCH] linux-user: fix typo in trace formats

2016-01-05 Thread Greg Kurz
On Tue, 5 Jan 2016 08:52:39 -0700 Eric Blake wrote: > On 01/05/2016 08:29 AM, Greg Kurz wrote: > > When building all targets, I get tons of warnings like below: > > > > ./trace/generated-tracers.h: In function ‘trace_user_s390x_restore_sigregs’: > > ./trace/generated-

Re: [Qemu-devel] [PATCH v2] trace-events: fix broken format strings

2016-01-05 Thread Greg Kurz
Cc'ing Peter because we'd like this patch to go directly to the master branch. On Tue, 5 Jan 2016 16:37:35 +0100 Andrew Jones wrote: > Fixes compiling with --enable-trace-backends > > Signed-off-by: Andrew Jones > --- > v2: also remove trailing null strings [Laurent]

Re: [Qemu-devel] [PATCH v2 0/3] virtio: cross-endian helpers fixes

2016-01-05 Thread Greg Kurz
On Wed, 23 Dec 2015 17:28:23 +0100 Greg Kurz wrote: > On Wed, 23 Dec 2015 15:47:00 +0200 > "Michael S. Tsirkin" wrote: > > > On Thu, Dec 17, 2015 at 09:52:46AM +0100, Greg Kurz wrote: > > > This series tries to rework cross-endian helpers for better clarity.

Re: [Qemu-devel] [PATCH] virtio serial port: fix to incomplete QOMify

2016-01-06 Thread Greg Kurz
On Wed, 6 Jan 2016 16:22:55 +0800 Cao jin wrote: > Signed-off-by: Cao jin > --- Reviewed-by: Greg Kurz > hw/char/virtio-serial-bus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c > i

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-06 Thread Greg Kurz
On Tue, 5 Jan 2016 18:29:56 +0100 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- Acked-by: Greg Kurz Just some minor comments on the form below. > hw/ipmi/ipmi_bmc_sim.c | 51 > -- > 1 file changed, 49 i

Re: [Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-06 Thread Greg Kurz
On Tue, 5 Jan 2016 18:29:57 +0100 Cédric Le Goater wrote: > This is a simulator. Just return an unknown cause (0). > > Signed-off-by: Cédric Le Goater > --- Acked-by: Greg Kurz > hw/ipmi/ipmi_bmc_sim.c | 20 ++-- > 1 file changed, 18 insertions(+), 2 dele

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

2016-01-07 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 Reviewed-by: Cornelia Huck --- hw/virtio/vhost.c |

[Qemu-devel] [PATCH 3/6] virtio: drop the virtio_needs_swap() helper

2016-01-07 Thread Greg Kurz
It is not used anymore. Signed-off-by: Greg Kurz --- include/hw/virtio/virtio-access.h |9 - 1 file changed, 9 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index 8aec843c8ff3..a01fff2e51d7 100644 --- a/include/hw/virtio/virtio

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

2016-01-07 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 Reviewed-by: Cornelia Huck --- hw/virtio/vhost.c | 17 +++-- include/hw/v

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

2016-01-07 Thread Greg Kurz
added 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 --- in

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

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 20:52:04 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. > > > > Cross-endian is now configured by the core virtio-net code. We simply > > fall

Re: [Qemu-devel] [PATCH 3/6] virtio: drop the virtio_needs_swap() helper

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 20:55:50 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > It is not used anymore. > > > > Signed-off-by: Greg Kurz > > --- > > include/hw/virtio/virtio-access.h |9 - > > 1 file changed,

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

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 21:07:26 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, 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. This > &g

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

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 21:25:19 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > When adding cross-endian support, we introduced the TARGET_IS_BIENDIAN macro > > and the virtio_access_is_big_endian() helper to have a branchless fast path >

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

2016-01-08 Thread Greg Kurz
On Fri, 8 Jan 2016 11:11:20 +0100 Cornelia Huck wrote: > On Thu, 07 Jan 2016 12:32:08 +0100 > Greg Kurz wrote: > > > This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. > > > > Cross-endian is now configured by the core virtio-net code. We simply > &g

[Qemu-devel] [PATCH v3 1/2] spapr: skip configuration section during migration of older machines

2016-02-18 Thread Greg Kurz
anyway because QEMU 2.3 is likely to be more widely deployed than newer QEMU versions. Fixes: 61964c23e5ddd5a33f15699e45ce126f879e3e33 Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 5bd8fd3ef842..bca7cb8a5d27

[Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-18 Thread Greg Kurz
v2: it now fully fixes migration of old pseries from/to QEMU 2.3 and provides a manual workaround for the QEMU 2.4/2.4.1/2.5 case. With this series, I could migrate the same pseries-2.3 instance in a full 2.3->2.6->2.5->2.6->2.4->2.6->2.3 cycle. --- Greg Kurz (2): spapr:

[Qemu-devel] [PATCH v3 2/2] migration: allow machine to enforce configuration section migration

2016-02-18 Thread Greg Kurz
don't have one. It can be set at startup: -machine enforce-config-section=on or later from the QEMU monitor: qom-set /machine enforce-config-section on It is up to the tooling to set or unset this property according to the version of the QEMU at the other end of the pipe. Signed-off-by:

[Qemu-devel] [PATCH] spapr: initialize local Error pointer

2016-02-18 Thread Greg Kurz
This fixes a crash in the target QEMU during migration. Fixes: c5f54f3e31bf693f70a98d4d73ea5dbe05689857 Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e214a34257b3..c119f5582429 100644

Re: [Qemu-devel] [PATCH] spapr: initialize local Error pointer

2016-02-18 Thread Greg Kurz
On Thu, 18 Feb 2016 16:02:53 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > This fixes a crash in the target QEMU during migration. > > > > Fixes: c5f54f3e31bf693f70a98d4d73ea5dbe05689857 > > Suggest to word that as "Broken in commit c5f54f3

Re: [Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-18 Thread Greg Kurz
On Thu, 18 Feb 2016 21:00:38 +0100 Laurent Vivier wrote: > On 18/02/2016 12:32, Greg Kurz wrote: > > QEMU 2.4 broke the migration of old pseries machine with the addition > > of configuration sections, which are sent unconditionally. > > > > We assume that QEMU 2.

Re: [Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-19 Thread Greg Kurz
On Fri, 19 Feb 2016 11:11:47 +1100 David Gibson wrote: > On Thu, Feb 18, 2016 at 12:32:11PM +0100, Greg Kurz wrote: > > QEMU 2.4 broke the migration of old pseries machine with the addition > > of configuration sections, which are sent unconditionally. > > > > We a

Re: [Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-19 Thread Greg Kurz
On Fri, 19 Feb 2016 15:41:10 +0100 Laurent Vivier wrote: > On 18/02/2016 12:32, Greg Kurz wrote: > > QEMU 2.4 broke the migration of old pseries machine with the addition > > of configuration sections, which are sent unconditionally. > > > > We assume that QEMU 2.

Re: [Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-23 Thread Greg Kurz
On Tue, 23 Feb 2016 09:31:10 +0100 Juan Quintela wrote: > Greg Kurz wrote: > > On Fri, 19 Feb 2016 11:11:47 +1100 > > David Gibson wrote: > > > >> On Thu, Feb 18, 2016 at 12:32:11PM +0100, Greg Kurz wrote: > >> > QEMU 2.4 broke the migratio

Re: [Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-23 Thread Greg Kurz
On Tue, 23 Feb 2016 11:01:00 +0100 Greg Kurz wrote: > On Tue, 23 Feb 2016 09:31:10 +0100 > Juan Quintela wrote: > > Greg Kurz wrote: > > > On Fri, 19 Feb 2016 11:11:47 +1100 > > > David Gibson wrote: > > > > > >> On Thu

Re: [Qemu-devel] [PATCH v3 0/2] Fix migration of old pseries

2016-02-23 Thread Greg Kurz
On Fri, 19 Feb 2016 17:27:33 +0100 Greg Kurz wrote: > On Fri, 19 Feb 2016 15:41:10 +0100 > Laurent Vivier wrote: > > > On 18/02/2016 12:32, Greg Kurz wrote: > > > QEMU 2.4 broke the migration of old pseries machine with the addition > > > of confi

[Qemu-devel] [PATCH] spapr: disable vmdesc submission for old machines

2016-02-23 Thread Greg Kurz
vmdesc as well for older pseries, like it is already done for pc's. This can only be observed with -cpu POWER7 because POWER8 cannot migrate from QEMU 2.2 to 2.3 (insns_flags2 mismatch). Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |1 + 1 file changed, 1 insertion(+) diff --git a/h

Re: [Qemu-devel] [Qemu-ppc] [PATCH] hw/intc: fix failure return for xics_alloc_block()

2016-02-23 Thread Greg Kurz
On Wed, 10 Feb 2016 10:41:16 +0100 Greg Kurz wrote: > On Mon, 8 Feb 2016 09:31:49 +0100 > Greg Kurz wrote: > > > On Mon, 8 Feb 2016 11:45:19 +1000 > > David Gibson wrote: > > > > > On Fri, Feb 05, 2016 at 09:43:40AM +0100, Greg Kurz wr

Re: [Qemu-devel] [Qemu-ppc] [PATCH] hw/intc: fix failure return for xics_alloc_block()

2016-02-23 Thread Greg Kurz
Just pinging Alexey as well. :) On Tue, 23 Feb 2016 18:46:44 +0100 Greg Kurz wrote: > On Wed, 10 Feb 2016 10:41:16 +0100 > Greg Kurz wrote: > > > On Mon, 8 Feb 2016 09:31:49 +0100 > > Greg Kurz wrote: > > > > > On Mon, 8 Feb 2016 11:4

Re: [Qemu-devel] [Qemu-ppc] [PATCH] hw/intc: fix failure return for xics_alloc_block()

2016-02-24 Thread Greg Kurz
On Wed, 24 Feb 2016 11:36:49 +1100 David Gibson wrote: > On Tue, Feb 23, 2016 at 06:46:44PM +0100, Greg Kurz wrote: > > On Wed, 10 Feb 2016 10:41:16 +0100 > > Greg Kurz wrote: > > > > > On Mon, 8 Feb 2016 09:31:49 +0100 > > > Greg Kurz wrote: >

[Qemu-devel] [PATCH] spapr_rng: disable hotpluggability

2016-02-25 Thread Greg Kurz
y disables hotpluggability for the spapr-rng class. Signed-off-by: Greg Kurz --- hw/ppc/spapr_rng.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_rng.c b/hw/ppc/spapr_rng.c index 8484fcf54774..a39d472b66fd 100644 --- a/hw/ppc/spapr_rng.c +++ b/hw/ppc/spapr_rng.c @@ -170,6 +170,7 @@ s

[Qemu-devel] [PATCH 1/3] spapr_pci: kill useless variable in rtas_ibm_change_msi()

2016-02-25 Thread Greg Kurz
The num local variable is initialized to zero and has no writer. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index cca9257fecc5..19dd6dbeb943 100644 --- a/hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH 2/3] spapr_pci: fix irq leak in RTAS ibm, change-msi

2016-02-25 Thread Greg Kurz
when a new allocation succeeds. Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 19dd6dbeb943..9b2b546b541c 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -305,9

[Qemu-devel] [PATCH 0/3] spapr_pci and xics fixes

2016-02-25 Thread Greg Kurz
Hi, This series fixes some issues when sPAPR allocates interrupts. Especially a potential IRQ leak (patch 2) and bogus interrupt numbers stored in the MSI table because of poor error reporting from the XICS layer (patch 3). Please review. I'd like to have this fixes in 2.6. --- Greg Ku

[Qemu-devel] [PATCH 3/3] xics: report errors with the QEMU Error API

2016-02-25 Thread Greg Kurz
on previous work from Brian W. Hart. Signed-off-by: Greg Kurz --- hw/intc/xics.c| 22 ++ hw/ppc/spapr_events.c |2 +- hw/ppc/spapr_pci.c| 18 +++--- hw/ppc/spapr_vio.c|8 +--- include/hw/ppc/xics.h |6 -- trace-eve

[Qemu-devel] [PATCH v2] xics: report errors with the QEMU Error API

2016-02-26 Thread Greg Kurz
W. Hart. Signed-off-by: Greg Kurz --- v2: - reverted to non-void xics_alloc() and xics_alloc_block() - consolidated error message in xics_alloc() - pass &error_fatal instead of NULL in spapr_events_init() --- hw/intc/xics.c| 13 + hw/ppc/spapr_events.c |

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/2] Fix migration of old pseries

2016-02-26 Thread Greg Kurz
On Mon, 22 Feb 2016 12:09:12 +1100 David Gibson wrote: > On Fri, Feb 19, 2016 at 08:59:44AM +0100, Greg Kurz wrote: > > On Fri, 19 Feb 2016 11:11:47 +1100 > > David Gibson wrote: > > > > > On Thu, Feb 18, 2016 at 12:32:11PM +0100, Greg Kurz wrote: > >

[Qemu-devel] [PATCH] target-ppc: fix sync of SPR_SDR1 with KVM

2016-03-01 Thread Greg Kurz
Signed-off-by: Greg Kurz --- target-ppc/kvm.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index d67c169ba324..dbc37f25af2b 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1190,7 +1190,7 @@ int kvm_arch_get_registers

[Qemu-devel] [PATCH] dataplane: drop copy_in_vring_desc()

2015-06-25 Thread Greg Kurz
268435456 A solution could be to revert f5a5628cf0b6, but dropping copy_in_vring_desc() is equivalent and gives a smaller patch. Signed-off-by: Greg Kurz --- hw/virtio/dataplane/vring.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hw/virtio/dataplane/vring.c

[Qemu-devel] [PATCH] dataplane: endian fix in host notification

2015-06-25 Thread Greg Kurz
This field comes either LE with virtio 1.0, either guest endian with legacy. It must only be accessed with an accessor that knows about the appropriate endianness. Signed-off-by: Greg Kurz --- hw/virtio/dataplane/vring.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw

Re: [Qemu-devel] [PATCH] dataplane: endian fix in host notification

2015-06-25 Thread Greg Kurz
On Thu, 25 Jun 2015 18:34:47 +0200 Cornelia Huck wrote: > On Thu, 25 Jun 2015 17:26:21 +0200 > Greg Kurz wrote: > > > This field comes either LE with virtio 1.0, either guest endian with legacy. > > It must only be accessed with an accessor that knows about the appro

Re: [Qemu-devel] [PATCH] dataplane: endian fix in host notification

2015-06-25 Thread Greg Kurz
On Thu, 25 Jun 2015 18:41:31 +0200 Cornelia Huck wrote: > On Thu, 25 Jun 2015 18:34:47 +0200 > Cornelia Huck wrote: > > > On Thu, 25 Jun 2015 17:26:21 +0200 > > Greg Kurz wrote: > > > > > This field comes either LE with virtio 1.0, either guest endian wi

[Qemu-devel] [PATCH 0/2] dataplane: cross-endian fixes

2015-06-26 Thread Greg Kurz
some minor changes in the commit message. This series was tested with ppc64 and ppc64le hosts. No regression was observed on x86_64. --- Greg Kurz (2): dataplane: drop copy_in_vring_desc() dataplane: fix cross-endian issues hw/virtio/dataplane/vring.c | 20 ++-- 1

[Qemu-devel] [PATCH 2/2] dataplane: fix cross-endian issues

2015-06-26 Thread Greg Kurz
Accesses to vring_avail_event and vring_used_event must honor the queue endianness. This patch allows cross-endian setups to use dataplane (tested with ppc64 on ppc64le, and vice-versa). Suggested-by: Cornelia Huck Signed-off-by: Greg Kurz --- hw/virtio/dataplane/vring.c |6 -- 1 file

[Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc()

2015-06-26 Thread Greg Kurz
descriptor addr 0x18e2517e len 268435456 A solution could be to revert f5a5628cf0b6, but dropping copy_in_vring_desc() is equivalent and result in a smaller patch. This patch allows SLOF to boot the OS. Signed-off-by: Greg Kurz --- hw/virtio/dataplane/vring.c | 14 ++ 1 file

Re: [Qemu-devel] [PATCH] dataplane: drop copy_in_vring_desc()

2015-06-26 Thread Greg Kurz
On Fri, 26 Jun 2015 11:00:45 +0100 Stefan Hajnoczi wrote: > On Thu, Jun 25, 2015 at 05:26:09PM +0200, Greg Kurz wrote: > > During early virtio 1.0 devel, there were several proposals about how to > > deal endianness of the vring descriptor fields: > > - convert the decript

Re: [Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc()

2015-06-26 Thread Greg Kurz
On Fri, 26 Jun 2015 12:28:45 +0200 Cornelia Huck wrote: > On Fri, 26 Jun 2015 09:32:21 +0200 > Greg Kurz wrote: > > > During early virtio 1.0 devel, there were several proposals about how to > > deal with the endianness of the vring descriptor fields: > > - co

Re: [Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc()

2015-06-26 Thread Greg Kurz
On Fri, 26 Jun 2015 18:28:42 +0200 "Michael S. Tsirkin" wrote: > On Fri, Jun 26, 2015 at 02:18:38PM +0200, Greg Kurz wrote: > > On Fri, 26 Jun 2015 12:28:45 +0200 > > Cornelia Huck wrote: > > > > > On Fri, 26 Jun 2015 09:32:21 +0200 > > > Gre

Re: [Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc()

2015-06-28 Thread Greg Kurz
On Sun, 28 Jun 2015 15:03:20 +0200 "Michael S. Tsirkin" wrote: > On Fri, Jun 26, 2015 at 07:05:07PM +0200, Greg Kurz wrote: > > On Fri, 26 Jun 2015 18:28:42 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Jun 26, 2015 at 02:18:38PM +020

Re: [Qemu-devel] [PATCH 1/2] dataplane: drop copy_in_vring_desc()

2015-06-29 Thread Greg Kurz
On Sun, 28 Jun 2015 15:03:20 +0200 "Michael S. Tsirkin" wrote: > On Fri, Jun 26, 2015 at 07:05:07PM +0200, Greg Kurz wrote: > > On Fri, 26 Jun 2015 18:28:42 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Jun 26, 2015 at 02:18:38PM +020

[Qemu-devel] [PATCH] spapr_vty: lookup should only return valid VTY objects

2015-06-30 Thread Greg Kurz
lement the RTAS call display-character. Signed-off-by: Greg Kurz --- hw/char/spapr_vty.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c index 4e464bd15a54..7eeacde31d27 100644 --- a/hw/char/spapr_vty.c +++ b/hw/char/spapr_vty.c

Re: [Qemu-devel] [PATCH] spapr_vty: lookup should only return valid VTY objects

2015-06-30 Thread Greg Kurz
On Tue, 30 Jun 2015 14:04:31 +0200 Greg Kurz wrote: > If a guest passes the reg property of a valid VIO object that is not a VTY > to either H_GET_TERM_CHAR or H_PUT_TERM_CHAR, QEMU hits a dynamic cast > assertion and aborts. > > PAPR+ says "Hypervisor checks the termno pa

[Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers.

2013-09-09 Thread Greg Kurz
Follow-up to Rusty's virtio endianness serie: enough to get a working virtfs mount. Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] net: don't set native endianness

2015-10-14 Thread Greg Kurz
ders"); } } return r; } Cheers. -- Greg > Reported-by: Marcel Apfelbaum > Cc: Greg Kurz > Cc: qemu-sta...@nongnu.org > Signed-off-by: Michael S. Tsirkin > --- > net/net.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/net/n

Re: [Qemu-devel] [PATCH] net: don't set native endianness

2015-10-14 Thread Greg Kurz
On Wed, 14 Oct 2015 17:02:28 +0300 "Michael S. Tsirkin" wrote: > On Wed, Oct 14, 2015 at 03:54:32PM +0200, Greg Kurz wrote: > > On Wed, 14 Oct 2015 12:26:58 +0300 > > "Michael S. Tsirkin" wrote: > > > > > commit 5be7d9f1b1452613b95c6ba70b8d

Re: [Qemu-devel] [PATCH v2 2/5] qdev: add the HotUnpluggable handler

2015-10-15 Thread Greg Kurz
On Thu, 15 Oct 2015 17:14:36 +0200 Cornelia Huck wrote: > On Mon, 12 Oct 2015 11:00:13 +0200 > Greg Kurz wrote: > > > This handler allows to ask a device instance if it can be hot-unplugged. It > > is to be defined in device classes where hot-unpluggability depends on the

[Qemu-devel] [PATCH v3 5/5] virtio-9p: add savem handlers

2015-10-20 Thread Greg Kurz
gling device... This patch simply registers migration handlers for virtio-9p-device. Whether migration is possible or not still depends on the migration blocker. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/9pfs/virt

[Qemu-devel] [PATCH v3 4/5] virtio-9p: add unrealize handler

2015-10-20 Thread Greg Kurz
reached if the 9p share is mounted in the guest. No need to bother about in-flight I/O requests in this case. This patch fixes a QEMU crash on the source node if the user device_add a virtio-9p device and then migrate. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-coth.c | 15

[Qemu-devel] [PATCH v3 2/5] qdev: add the @unplug_is_blocked handler

2015-10-20 Thread Greg Kurz
This handler allows to ask a device instance if it can be hot-unplugged. It is to be defined in device classes where hot-unpluggability depends on the device state (for example, virtio-9p devices cannot be unplugged if the 9p share is mounted in the guest). Signed-off-by: Greg Kurz --- hw/core

[Qemu-devel] [PATCH v3 3/5] virtio-9p: block hot-unplug when device is active

2015-10-20 Thread Greg Kurz
apted accordingly. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p.c| 14 ++ hw/9pfs/virtio-9p.h|2 ++ hw/s390x/virtio-ccw.c |8 hw/virtio/virtio-pci.c |8 4 files changed, 32 insertions(+) diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c

[Qemu-devel] [PATCH v3 0/5] virtio-9p: hotplug and migration support

2015-10-20 Thread Greg Kurz
ble to @unplug_is_blocked (patches 2/5 and 3/5) v1->v2: - introduced unplug blocker (patches 2/5 and 3/5) - moved fixes to separate patches (see individual changelogs) --- Greg Kurz (5): virtio-9p-coth: fix init function qdev: add the @unplug_is_blocked handler virtio-9p:

[Qemu-devel] [PATCH v3 1/5] virtio-9p-coth: fix init function

2015-10-20 Thread Greg Kurz
The v9fs thread pool is a singleton, shared by all virtio-9p devices. The current code leaks underlying glib pointers each time a new virtio-9p device gets realized. Let's fix that ! While we're here, we also fix the trivial error path when memory allocation is failing. Signed-off-by:

Re: [Qemu-devel] [PATCH v3 3/5] virtio-9p: block hot-unplug when device is active

2015-10-20 Thread Greg Kurz
On Tue, 20 Oct 2015 15:42:03 +0300 "Michael S. Tsirkin" wrote: > On Tue, Oct 20, 2015 at 11:17:00AM +0200, Greg Kurz wrote: > > Hot-unplug of an active virtio-9p device is not currently supported. Until > > we have that, let's block hot-unplugging when the 9p sha

Re: [Qemu-devel] [PATCH v3 0/5] virtio-9p: hotplug and migration support

2015-10-20 Thread Greg Kurz
On Tue, 20 Oct 2015 15:53:08 +0300 "Michael S. Tsirkin" wrote: > On Tue, Oct 20, 2015 at 11:16:40AM +0200, Greg Kurz wrote: > > We already have a blocker to prevent migration of an active virtio-9p > > device. > > But in fact, there is no migration support at

[Qemu-devel] [PATCH] virtio-9p: add savem handlers

2015-10-22 Thread Greg Kurz
gling device... This patch simply registers migration handlers for virtio-9p-device. Whether migration is possible or not still depends on the migration blocker. Signed-off-by: Greg Kurz --- Michael, Aneesh, This is the same patch minus the call to unregister_savevm() since we don't have an

Re: [Qemu-devel] [PATCH] virtio-net: unbreak self announcement and guest offloads after migration

2015-09-16 Thread Greg Kurz
teed to be set. Other virtio devices looks fine. > > Fixes: 019a3edbb25f1571e876f8af1ce4c55412939e5d >("virtio: make features 64bit wide") > Cc: qemu-sta...@nongnu.org > Cc: Gerd Hoffmann > Signed-off-by: Jason Wang > --- Reviewed-by: Greg Kurz > hw/net

Re: [Qemu-devel] [PATCH] virtio-net: unbreak self announcement and guest offloads after migration

2015-09-16 Thread Greg Kurz
On Fri, 11 Sep 2015 10:30:21 +0200 Cornelia Huck wrote: > On Fri, 11 Sep 2015 16:01:56 +0800 > Jason Wang wrote: > > > After commit 019a3edbb25f1571e876f8af1ce4c55412939e5d ("virtio: make > > features 64bit wide"). Device's guest_features was actually set after > > vdc->load(). This breaks the

Re: [Qemu-devel] [PATCH] virtio: add some migration doc

2015-09-17 Thread Greg Kurz
look at that code :) > > Feedback welcome. Excellent ! This is a very good to start with. Reviewed-by: Greg Kurz Just a thought below... > --- > docs/virtio-migration.txt | 101 > ++ > 1 file changed, 101 insertions(+) > create mode 100

Re: [Qemu-devel] [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-18 Thread Greg Kurz
On Thu, 17 Sep 2015 10:49:41 +0200 Thomas Huth wrote: > The PAPR interface defines a hypercall to pass high-quality > hardware generated random numbers to guests. Recent kernels can > already provide this hypercall to the guest if the right hardware > random number generator is available. But in

[Qemu-devel] [PATCH] virtio-9p: migrate virtio subsections

2015-09-18 Thread Greg Kurz
In a cross-endian setup, the virtio-9p device has state in @device_endian. It must be migrated. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 93a407c45926

Re: [Qemu-devel] [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-21 Thread Greg Kurz
On Mon, 21 Sep 2015 12:10:00 +1000 David Gibson wrote: > On Fri, Sep 18, 2015 at 11:05:52AM +0200, Greg Kurz wrote: > > On Thu, 17 Sep 2015 10:49:41 +0200 > > Thomas Huth wrote: > > > > > The PAPR interface defines a hypercall to pass high-quality > > &g

Re: [Qemu-devel] [PATCH] virtio-9p: migrate virtio subsections

2015-09-21 Thread Greg Kurz
On Sat, 19 Sep 2015 15:34:02 +0530 "Aneesh Kumar K.V" wrote: > Greg Kurz writes: > > > In a cross-endian setup, the virtio-9p device has state in @device_endian. > > It > > must be migrated. > > > > Signed-off-by: Greg Kurz > > With

Re: [Qemu-devel] [PATCH v4] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-21 Thread Greg Kurz
On Mon, 21 Sep 2015 10:26:52 +0200 Thomas Huth wrote: > On 21/09/15 10:01, Greg Kurz wrote: > > On Mon, 21 Sep 2015 12:10:00 +1000 > > David Gibson wrote: > > > >> On Fri, Sep 18, 2015 at 11:05:52AM +0200, Greg Kurz wrote: > >>> On Thu, 17 Sep 20

Re: [Qemu-devel] [PATCH] virtio-9p: migrate virtio subsections

2015-09-24 Thread Greg Kurz
On Mon, 21 Sep 2015 10:09:34 +0200 Greg Kurz wrote: > On Sat, 19 Sep 2015 15:34:02 +0530 > "Aneesh Kumar K.V" wrote: > > > Greg Kurz writes: > > > > > In a cross-endian setup, the virtio-9p device has state in > > > @device_endian. It > &

Re: [Qemu-devel] [PATCH] virtio: right size for virtio_queue_get_avail_size

2015-09-03 Thread Greg Kurz
On Wed, 2 Sep 2015 19:57:25 +0200 Greg Kurz wrote: > On Wed, 2 Sep 2015 17:50:55 +0200 > Cornelia Huck wrote: > > > On Wed, 2 Sep 2015 17:23:49 +0200 > > Pierre Morel wrote: > > > > > Being working on dataplane I notice something strange: > > >

Re: [Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-03 Thread Greg Kurz
On Wed, 2 Sep 2015 18:53:44 +0200 Pierre Morel wrote: > Let dataplane allocate different region for the desc/avail/used > ring regions. > Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail > rings accordingly. > > Signed-off-by: Pierre Morel > I'll re-run tests after people

Re: [Qemu-devel] [PATCH v4] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-03 Thread Greg Kurz
On Wed, 2 Sep 2015 18:53:44 +0200 Pierre Morel wrote: > Let dataplane allocate different region for the desc/avail/used > ring regions. > Take VIRTIO_RING_F_EVENT_IDX into account to increase the used/avail > rings accordingly. > > Signed-off-by: Pierre Morel > > --- Yet another remark, see

Re: [Qemu-devel] [PATCH v5] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-07 Thread Greg Kurz
anged __virtio16 into uint16_t, > map descriptor table and available ring read-only) > Signed-off-by: Greg Kurz > --- > I have tested it works on ppc64. Tested-by: Greg Kurz > Changes from V4: > - added comments for VIRTIO_RING_F_EVENT_IDX and mapping > - use uint16_t as in ring

Re: [Qemu-devel] [PATCH v5] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-08 Thread Greg Kurz
anged __virtio16 into uint16_t, > map descriptor table and available ring read-only) > Signed-off-by: Greg Kurz > --- > As suggested by Michael during the review of v2. Cc: qemu-sta...@nongnu.org -- Greg > Changes from V4: > - added comments for VIRTIO_RING_F_EVENT_IDX and mapping

Re: [Qemu-devel] [PATCH v5] virtio dataplane: adapt dataplane for virtio Version 1

2015-09-09 Thread Greg Kurz
used/avail > > rings accordingly. > > > > Signed-off-by: Pierre Morel > > (changed __virtio16 into uint16_t, > > map descriptor table and available ring read-only) > > Signed-off-by: Greg Kurz > > --- > > > > Changes from V4: > > - add

Re: [Qemu-devel] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-09 Thread Greg Kurz
On Mon, 31 Aug 2015 20:46:01 +0200 Thomas Huth wrote: > From: Michael Ellerman > > Some powerpc systems have support for a hardware random number generator > (hwrng). If such a hwrng is present the host kernel can provide access > to it via the H_RANDOM hcall. > > The kernel advertises the pre

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-09-10 Thread Greg Kurz
On Wed, 9 Sep 2015 10:54:20 +1000 Sam Bobroff wrote: > On Tue, Sep 08, 2015 at 07:38:12AM +0200, Thomas Huth wrote: > > On 08/09/15 07:03, Sam Bobroff wrote: > > > On Tue, Sep 01, 2015 at 12:53:26PM +0200, Thomas Huth wrote: > > >> On 01/09/15 02:38, David Gibson wrote: > > >>> On Mon, Aug 31, 20

Re: [Qemu-devel] [PATCH 5/6] virtio-pci: introduce pio notification capability for modern device

2015-08-24 Thread Greg Kurz
On Fri, 21 Aug 2015 17:05:49 +0800 Jason Wang wrote: > We used to use mmio for notification. This could be slow on some arch > (e.g on x86 without EPT). So this patch introduces pio bar and a pio > notification cap for modern device. This ability is enabled through > property "modern-pio-notify"

Re: [Qemu-devel] [PATCH 4/6] virtio-pci: use wildcard mmio eventfd for 1.0 notification cap

2015-08-24 Thread Greg Kurz
On Fri, 21 Aug 2015 17:05:48 +0800 Jason Wang wrote: > We use data match eventfd for 1.0 notification currently. This could > be slow since software decoding is needed for mmio exit. To speed this > up, we can switch to use wild card mmio eventfd for 1.0 notification > since we can examine the qu

Re: [Qemu-devel] [PATCH 5/6] virtio-pci: introduce pio notification capability for modern device

2015-08-24 Thread Greg Kurz
On Mon, 24 Aug 2015 16:52:45 +0200 Greg Kurz wrote: > On Fri, 21 Aug 2015 17:05:49 +0800 > Jason Wang wrote: > > > We used to use mmio for notification. This could be slow on some arch > > (e.g on x86 without EPT). So this patch introduces pio bar and a pio > >

Re: [Qemu-devel] [PATCH] virtio dataplane: adapt dataplane for virtio Version 1

2015-08-26 Thread Greg Kurz
on name, we can simplify further with a macro. I have pasted a patch below. You may fold it directly into your patch if people agree, In any case, you have: Acked-by: Greg Kurz Tested-by: Greg Kurz Merci Pierre ! -- Greg > hw/virtio/dataplane/vring.c | 54 --

Re: [Qemu-devel] [PATCH v2] virtio dataplane: adapt dataplane for virtio Version 1

2015-08-26 Thread Greg Kurz
On Wed, 26 Aug 2015 15:24:42 +0200 Pierre Morel wrote: > Let dataplane allocate different region for the desc/avail/used > ring regions. > > Signed-off-by: Pierre Morel > Acked-by: Greg Kurz Stefan, In case SoB is more appropriate, here it is: Signed-off-by: Greg Kurz C

Re: [Qemu-devel] [PATCH 1/2] memory: allow zero size for adjust_endianness()

2015-08-26 Thread Greg Kurz
On Wed, 26 Aug 2015 15:21:59 +0100 Peter Maydell wrote: > On 26 August 2015 at 11:04, Jason Wang wrote: > > Wildcard mmio eventfd use zero size, but it will lead abort() since it > > was illegal in adjust_endianness(). Fix this by allowing zero size. > > > > Cc: Greg

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