Re: [Qemu-devel] [PATCH] virtio-pci: fix migration for pci bus master

2014-09-17 Thread Greg Kurz
ely. > > As reset makes the device quiescent, in the future we'll be able to drop > checking OK bit in a bunch of places. > > Cc: Jason Wang > Cc: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --- Hi Michael, I am not quite sure how to test this patch with my

Re: [Qemu-devel] [Qemu-stable] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages

2014-09-18 Thread Greg Kurz
On Thu, 28 Aug 2014 09:39:30 -0500 Michael Roth wrote: > Quoting Greg Kurz (2014-08-28 05:18:06) > > On Wed, 27 Aug 2014 12:36:03 -0500 > > Michael Roth wrote: > > > From: Jan Kiszka > > > > > > The spec says (and real HW confirms this) that, if the

Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master

2014-09-22 Thread Greg Kurz
ely. > > As reset makes the device quiescent, in the future we'll be able to drop > checking OK bit in a bunch of places. > > Cc: Jason Wang > Cc: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --- Hi, This commit prevents pseries to boot. SLOF complains with

Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master

2014-09-24 Thread Greg Kurz
On Tue, 23 Sep 2014 07:26:32 +0300 "Michael S. Tsirkin" wrote: > On Mon, Sep 22, 2014 at 07:28:57PM +0200, Greg Kurz wrote: > > On Thu, 18 Sep 2014 21:54:58 +0300 > > "Michael S. Tsirkin" wrote: > > > > > Current support for bus master (cleari

Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap

2014-09-24 Thread Greg Kurz
On Thu, 25 Sep 2014 16:29:31 +1000 Tony Breeds wrote: > On Thu, Sep 25, 2014 at 08:21:27AM +0200, Markus Armbruster wrote: > > Please copy Kevin & Stefan for block patches. Doing that for you. I > > also copy Max, who left his fingerprints on commit 4f11aa8. > > Sorry. > > Is there a qemu ver

Re: [Qemu-devel] [PULL v3 14/15] virtio-pci: fix migration for pci bus master

2014-09-29 Thread Greg Kurz
On Mon, 29 Sep 2014 19:15:05 +0300 "Michael S. Tsirkin" wrote: > On Mon, Sep 22, 2014 at 07:28:57PM +0200, Greg Kurz wrote: > > On Thu, 18 Sep 2014 21:54:58 +0300 > > "Michael S. Tsirkin" wrote: > > > > > Current support for bus master (cleari

Re: [Qemu-devel] [PATCH] virtio-pci: fix migration for pci bus master

2014-10-06 Thread Greg Kurz
On Wed, 17 Sep 2014 20:39:25 +0300 "Michael S. Tsirkin" wrote: > On Wed, Sep 17, 2014 at 07:21:09PM +0200, Greg Kurz wrote: > > On Sun, 14 Sep 2014 21:30:36 +0300 > > "Michael S. Tsirkin" wrote: > > > > > Current support for bus master (cleari

Re: [Qemu-devel] [PATCH] virtio-pci: fix migration for pci bus master

2014-10-06 Thread Greg Kurz
On Mon, 6 Oct 2014 19:26:21 +0300 "Michael S. Tsirkin" wrote: > On Mon, Oct 06, 2014 at 04:51:35PM +0200, Greg Kurz wrote: > > On Wed, 17 Sep 2014 20:39:25 +0300 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Sep 17, 2014 at 07:21:09PM +020

Re: [Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-06-12 Thread Greg Kurz
On Thu, 29 May 2014 12:16:26 +0200 Paolo Bonzini wrote: > Il 29/05/2014 11:12, Greg Kurz ha scritto: > > int virtio_load(VirtIODevice *vdev, QEMUFile *f) > > { > > [...] > > nheads = vring_avail_idx(&vdev->vq[i])

Re: [Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-06-12 Thread Greg Kurz
On Thu, 12 Jun 2014 10:54:48 +0300 "Michael S. Tsirkin" wrote: > On Thu, Jun 12, 2014 at 09:43:51AM +0200, Greg Kurz wrote: > > On Thu, 29 May 2014 12:16:26 +0200 > > Paolo Bonzini wrote: > > > Il 29/05/2014 11:12, Greg Kurz ha scritto: > > > > i

Re: [Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-06-12 Thread Greg Kurz
On Thu, 12 Jun 2014 10:55:42 +0200 Paolo Bonzini wrote: > Il 12/06/2014 09:43, Greg Kurz ha scritto: > > Since we know that 0 < max_nr_ports < 32, is it acceptable to guess > > the correct endianness with a heuristic ? > > > > if (max_nr_ports

Re: [Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-06-12 Thread Greg Kurz
On Thu, 12 Jun 2014 11:43:20 +0200 Alexander Graf wrote: > > On 12.06.14 11:39, Paolo Bonzini wrote: > > Il 12/06/2014 11:37, Michael S. Tsirkin ha scritto: > >> Maybe just drop unnecessary stuff for new machine types? > >> Then we won't need hacks to migrate it. > > > > For any machine type it'

Re: [Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-06-12 Thread Greg Kurz
On Thu, 12 Jun 2014 12:39:27 +0200 Alexander Graf wrote: > > > > Am 12.06.2014 um 12:14 schrieb Greg Kurz : > > > > On Thu, 12 Jun 2014 11:43:20 +0200 > > Alexander Graf wrote: > > > >> > >>> On 12.06.14 11:39, Paolo Bonzini wrote:

Re: [Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-06-12 Thread Greg Kurz
On Thu, 12 Jun 2014 13:59:59 +0300 "Michael S. Tsirkin" wrote: > On Thu, Jun 12, 2014 at 12:50:56PM +0200, Greg Kurz wrote: > > On Thu, 12 Jun 2014 12:39:27 +0200 > > Alexander Graf wrote: > > > > > > > > > > > > Am 12.06.2014 um 1

[Qemu-devel] [PATCH v8 00/20] virtio endian-ambivalent target

2014-06-13 Thread Greg Kurz
(compatibility friendly) You'll find more detailed changelog in each patch. Please comment and hopefully apply. Thanks ! --- Greg Kurz (14): virtio-serial: don't migrate the config space virtio: introduce device specific migration calls virtio-net: implement

[Qemu-devel] [PATCH v8 02/20] virtio: introduce device specific migration calls

2014-06-13 Thread Greg Kurz
In order to migrate virtio subsections, they should be streamed after the device itself. We need the device specific code to be called from the common migration code to achieve this. This patch introduces load and save methods for this purpose. Suggested-by: Andreas Färber Signed-off-by: Greg

[Qemu-devel] [PATCH v8 01/20] virtio-serial: don't migrate the config space

2014-06-13 Thread Greg Kurz
The device configuration is set at realize time and never changes. It should not be migrated as it is done today. For the sake of compatibility, let's just skip them at load time. Signed-off-by: Alexander Graf [ added missing casts to uint16_t *, added SoB and commit message, Greg

[Qemu-devel] [PATCH v8 06/20] virtio-balloon: implement per-device migration calls

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/virtio/virtio-balloon.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index f35d883..84d1733 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio

[Qemu-devel] [PATCH v8 03/20] virtio-net: implement per-device migration calls

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/net/virtio-net.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index fc24bcc..58e7b73 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1285,7 +1285,6 @@ static

[Qemu-devel] [PATCH v8 09/20] exec: introduce target_words_bigendian() helper

2014-06-13 Thread Greg Kurz
e the TARGET_WORDS_BIGENDIAN bits out to a new helper and have virtio_is_big_endian() implemented on top of it. This patch doesn't change any functionality. Signed-off-by: Greg Kurz --- exec.c | 11 +-- hw/virtio/virtio-pci.c |3 --- include/exec/cpu-common.h |1 +

[Qemu-devel] [PATCH v8 13/20] virtio: allow byte swapping for vring

2014-06-13 Thread Greg Kurz
From: Rusty Russell Quoting original text from Rusty: "This is based on a simpler patch by Anthony Liguouri". Signed-off-by: Rusty Russell [ add VirtIODevice * argument to most helpers, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth --- hw/virtio/virti

[Qemu-devel] [PATCH v8 11/20] virtio: add endian-ambivalent support to VirtIODevice

2014-06-13 Thread Greg Kurz
As a consequence, the vring sanity checks had to be moved after the call to vmstate_load_state(). We enforce paranoia by poisoning the property at the begining of virtio_load(). Signed-off-by: Greg Kurz --- Changes since last version (virtio migration RFC): - endianness cached at device reset time - rew

[Qemu-devel] [PATCH v8 12/20] virtio: memory accessors for endian-ambivalent targets

2014-06-13 Thread Greg Kurz
macro. Signed-off-by: Rusty Russell [ relicensed virtio-access.h to GPLv2+ on Rusty's request, pass &address_space_memory to physical memory accessors, per-device endianness, virtio tswap16 and tswap64 helpers, faspath for fixed endian targets, Greg Kurz ] Cc: Cédric Le Goa

[Qemu-devel] [PATCH v8 18/20] virtio-serial-bus: use virtio wrappers to access headers

2014-06-13 Thread Greg Kurz
From: Rusty Russell We also fix max_nr_ports at reset time as the device endianness may have changed. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, fix max_nr_ports at reset time, Greg Kurz ] Signed-off-by: Greg Kurz --- Changes

[Qemu-devel] [PATCH v8 14/20] virtio-net: use virtio wrappers to access headers

2014-06-13 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, TCP checksums fix by Cédric Le Goater, Greg Kurz ] Cc: Cédric Le Goater Signed-off-by: Greg Kurz --- hw/net/virtio-net.c | 34 +++--- 1

[Qemu-devel] [PATCH v8 20/20] target-ppc: enable virtio endian ambivalent support

2014-06-13 Thread Greg Kurz
The device endianness is the cpu endianness at device reset time. Signed-off-by: Greg Kurz --- target-ppc/cpu.h|2 ++ target-ppc/translate_init.c | 13 + 2 files changed, 15 insertions(+) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 75ed5fa..b076a14

[Qemu-devel] [PATCH v8 15/20] virtio-balloon: use virtio wrappers to access page frame numbers

2014-06-13 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/virtio/virtio-balloon.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio

[Qemu-devel] [PATCH v8 16/20] virtio-blk: use virtio wrappers to access headers

2014-06-13 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c | 38

[Qemu-devel] [PATCH v8 17/20] virtio-scsi: use virtio wrappers to access headers

2014-06-13 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, fix missing tswap32 in virtio_scsi_push_event() by Cédric Le Goater, Greg Kurz ] Cc: Cédric

[Qemu-devel] [PATCH v8 19/20] virtio-9p: use virtio wrappers to access headers

2014-06-13 Thread Greg Kurz
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 a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 653762a..2572747 100644 --- a

[Qemu-devel] [PATCH v8 08/20] virtio: add subsections to the migration stream

2014-06-13 Thread Greg Kurz
start of the next sections. This allows an older QEMU to complain and exit when fed with subsections: Unknown savevm section type 5 load of migration failed Suggested-by: Alexander Graf Signed-off-by: Greg Kurz --- Changes since last version (RFC): - use the VMState framework as suggested by

[Qemu-devel] [PATCH v8 05/20] virtio-serial: implement per-device migration calls

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/char/virtio-serial-bus.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 9f1df84..3989722 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw

Re: [Qemu-devel] [PATCH v8 09/20] exec: introduce target_words_bigendian() helper

2014-06-13 Thread Greg Kurz
On Fri, 13 Jun 2014 13:41:42 +0200 Alexander Graf wrote: > > On 13.06.14 13:21, Greg Kurz wrote: > > We currently have a virtio_is_big_endian() helper that provides the target > > endianness to the virtio code. As of today, the helper returns a fixed > > compile-time val

Re: [Qemu-devel] [PATCH v8 10/20] cpu: introduce CPUClass::virtio_is_big_endian()

2014-06-13 Thread Greg Kurz
On Fri, 13 Jun 2014 13:42:04 +0200 Alexander Graf wrote: > > On 13.06.14 13:22, Greg Kurz wrote: > > If we want to support targets that can change endianness (modern PPC and > > ARM for the moment), we need to add a per-CPU class method to be called > > from the virtio

[Qemu-devel] [PATCH v8 04/20] virtio-blk: implement per-device migration calls

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 49f58cd..e432bcd 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -601,12

Re: [Qemu-devel] [PATCH v8 11/20] virtio: add endian-ambivalent support to VirtIODevice

2014-06-13 Thread Greg Kurz
On Fri, 13 Jun 2014 13:46:39 +0200 Alexander Graf wrote: > > On 13.06.14 13:23, Greg Kurz wrote: > > Some CPU families can dynamically change their endianness. This means we > > can have little endian ppc or big endian arm guests for example. This has > > an impa

[Qemu-devel] [PATCH v8 10/20] cpu: introduce CPUClass::virtio_is_big_endian()

2014-06-13 Thread Greg Kurz
behaviour is to return the compile-time default target endianness. Suggested-by: Peter Maydell Signed-off-by: Greg Kurz --- include/qom/cpu.h | 10 ++ qom/cpu.c |6 ++ 2 files changed, 16 insertions(+) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 4b352a2..30e8fe3

[Qemu-devel] [PATCH v8 07/20] virtio-rng: implement per-device migration calls

2014-06-13 Thread Greg Kurz
While we are here, we also check virtio_load() return value. Signed-off-by: Greg Kurz --- hw/virtio/virtio-rng.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 025de81..1356aca 100644 --- a/hw/virtio

Re: [Qemu-devel] [PATCH v8 14/20] virtio-net: use virtio wrappers to access headers

2014-06-13 Thread Greg Kurz
On Fri, 13 Jun 2014 14:24:47 +0200 Cedric Le Goater wrote: > On 06/13/2014 01:52 PM, Alexander Graf wrote: > > > > On 13.06.14 13:24, Greg Kurz wrote: > >> From: Rusty Russell > >> > >> Signed-off-by: Rusty Russell > >> Reviewed-by: An

Re: [Qemu-devel] [PATCH v8 11/20] virtio: add endian-ambivalent support to VirtIODevice

2014-06-13 Thread Greg Kurz
On Fri, 13 Jun 2014 14:41:30 +0200 Alexander Graf wrote: > > On 13.06.14 14:14, Greg Kurz wrote: > > On Fri, 13 Jun 2014 13:46:39 +0200 > > Alexander Graf wrote: > > > >> On 13.06.14 13:23, Greg Kurz wrote: > >>> Some CPU families can dynam

Re: [Qemu-devel] [PATCH v8 00/20] virtio endian-ambivalent target

2014-06-16 Thread Greg Kurz
On Fri, 13 Jun 2014 13:56:13 +0200 Alexander Graf wrote: > > On 13.06.14 13:18, Greg Kurz wrote: > > Hi, > > > > This version merges the changes requested during the v7 review, remarks from > > ppc64 dump support review (yes, we talked about virtio there) a

Re: [Qemu-devel] [PATCH 1/1 V2] target-ppc: Adding Functionality to rtas_ibm_get_system_parameter.

2014-06-17 Thread Greg Kurz
On Thu, 17 Apr 2014 10:33:44 -0500 Tomohiro B Berry wrote: > Hi, > > I was just wondering if anything else needed to be done to get this pushed > upstream? > > Thanks, > > Tomo > Hi Tomo, A good start would be to also Cc: qemu-...@nongnu.org : this is mandatory for all PPC specific patch

Re: [Qemu-devel] [RFC] qemu VGA endian swap low level drawing changes

2014-06-17 Thread Greg Kurz
On Tue, 17 Jun 2014 19:18:11 +1000 Alexey Kardashevskiy wrote: > On 06/17/2014 03:36 PM, Paolo Bonzini wrote: > > Il 17/06/2014 06:59, Benjamin Herrenschmidt ha scritto: > >> Thanks. I've tried the other approach of adding new functions which > >> means no overhead (hopefully) for the non-swap ca

Re: [Qemu-devel] [RFC] qemu VGA endian swap low level drawing changes

2014-06-17 Thread Greg Kurz
On Tue, 17 Jun 2014 20:09:18 +1000 Benjamin Herrenschmidt wrote: > On Tue, 2014-06-17 at 12:00 +0200, Greg Kurz wrote: > > There has been a discussion already about virtio endianness: relying on > > a guest system wide setting such as LPCR_ILE has been strongly rejected > &g

Re: [Qemu-devel] [PATCH v8 00/20] virtio endian-ambivalent target

2014-06-18 Thread Greg Kurz
On Wed, 18 Jun 2014 18:38:14 +0800 Stefan Hajnoczi wrote: > On Tue, Jun 17, 2014 at 09:40:19AM +0200, Alexander Graf wrote: > > > > On 17.06.14 09:36, Stefan Hajnoczi wrote: > > >On Fri, Jun 13, 2014 at 01:18:00PM +0200, Greg Kurz wrote: > > >>This version

Re: [Qemu-devel] [PATCH v8 00/20] virtio endian-ambivalent target

2014-06-18 Thread Greg Kurz
On Wed, 18 Jun 2014 16:42:04 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jun 18, 2014 at 01:53:15PM +0100, Peter Maydell wrote: > > On 18 June 2014 11:38, Stefan Hajnoczi wrote: > > > What bothers me is that real hardware can't do this. > > > > Real hardware doesn't have "endianness matches gues

Re: [Qemu-devel] [PATCH v8 01/20] virtio-serial: don't migrate the config space

2014-06-19 Thread Greg Kurz
On Thu, 19 Jun 2014 16:10:15 +0530 Amit Shah wrote: > On (Fri) 13 Jun 2014 [13:18:42], Greg Kurz wrote: > > The device configuration is set at realize time and never changes. It > > should not be migrated as it is done today. For the sake of compatibility, > > let's j

Re: [Qemu-devel] [PATCH v8 17/20] virtio-scsi: use virtio wrappers to access headers

2014-06-19 Thread Greg Kurz
On Fri, 13 Jun 2014 13:24:59 +0200 Greg Kurz wrote: > From: Rusty Russell > > Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. > > Signed-off-by: Rusty Russell > Reviewed-by: Anthony Liguori > [ pass VirtIODevice * to memory accessors, >

Re: [Qemu-devel] [PATCH v8 17/20] virtio-scsi: use virtio wrappers to access headers

2014-06-20 Thread Greg Kurz
On Fri, 20 Jun 2014 10:24:43 +0200 Paolo Bonzini wrote: > Il 13/06/2014 13:24, Greg Kurz ha scritto: > > From: Rusty Russell > > > > Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. > > > > Signed-off-by: Rusty Russell > > R

[Qemu-devel] [PATCH v9 00/22] legacy virtio support for cross-endian targets

2014-06-24 Thread Greg Kurz
since v8 are provided in each patch. Cheers. --- Alexander Graf (1): virtio-serial: don't migrate the config space Cédric Le Goater (1): virtio-net: byteswap virtio-net header Greg Kurz (14): virtio: introduce device specific migration calls virtio-net: implement per-d

[Qemu-devel] [PATCH v9 01/22] virtio-net: byteswap virtio-net header

2014-06-24 Thread Greg Kurz
hypervisor. Signed-off-by: Cédric Le Goater [ Ported from PowerKVM, Greg Kurz ] Signed-off-by: Greg Kurz --- This patch had been mistakenly folded into patch 14/20 in v8 hw/net/virtio-net.c | 17 + 1 file changed, 17 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio

[Qemu-devel] [PATCH v9 02/22] virtio-serial: don't migrate the config space

2014-06-24 Thread Greg Kurz
B and commit message, Greg Kurz ] Reviewed-by: Michael S. Tsirkin Signed-off-by: Greg Kurz --- Changes since v8: - fixed From: in header hw/char/virtio-serial-bus.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/v

[Qemu-devel] [PATCH v9 03/22] virtio: introduce device specific migration calls

2014-06-24 Thread Greg Kurz
In order to migrate virtio subsections, they should be streamed after the device itself. We need the device specific code to be called from the common migration code to achieve this. This patch introduces load and save methods for this purpose. Suggested-by: Andreas Färber Signed-off-by: Greg

[Qemu-devel] [PATCH v9 04/22] virtio-net: implement per-device migration calls

2014-06-24 Thread Greg Kurz
Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/net/virtio-net.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 151d220..699201f 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c

[Qemu-devel] [PATCH v9 05/22] virtio-blk: implement per-device migration calls

2014-06-24 Thread Greg Kurz
Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/block/virtio-blk.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 3b34ce9..fd32a6a 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block

[Qemu-devel] [PATCH v9 06/22] virtio-serial: implement per-device migration calls

2014-06-24 Thread Greg Kurz
Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/char/virtio-serial-bus.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 9f1df84..3989722 100644 --- a/hw/char

[Qemu-devel] [PATCH v9 07/22] virtio-balloon: implement per-device migration calls

2014-06-24 Thread Greg Kurz
Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/virtio/virtio-balloon.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 165592e..e0ed5ee 100644 --- a/hw/virtio/virtio

[Qemu-devel] [PATCH v9 08/22] virtio-rng: implement per-device migration calls

2014-06-24 Thread Greg Kurz
While we are here, we also check virtio_load() return value. Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/virtio/virtio-rng.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 025de81..1356aca

[Qemu-devel] [PATCH v9 09/22] virtio: add subsections to the migration stream

2014-06-24 Thread Greg Kurz
start of the next sections. This allows an older QEMU to complain and exit when fed with subsections: Unknown savevm section type 5 load of migration failed Suggested-by: Alexander Graf Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/virtio/virtio.c | 21 +++-- 1

[Qemu-devel] [PATCH v9 10/22] exec: introduce target_words_bigendian() helper

2014-06-24 Thread Greg Kurz
e the TARGET_WORDS_BIGENDIAN bits out to a new helper and have virtio_is_big_endian() implemented on top of it. This patch doesn't change any functionality. Signed-off-by: Greg Kurz --- Changes since v8: - target_words_bigendian() removed from include/exec/cpu-common.h exec.c |8 ++

[Qemu-devel] [PATCH v9 11/22] cpu: introduce CPUClass::virtio_is_big_endian()

2014-06-24 Thread Greg Kurz
behaviour is to return the compile-time default target endianness. Suggested-by: Peter Maydell Signed-off-by: Greg Kurz --- Changes since v8: - removed the globally visible cpu_virtio_is_big_endian() helper (code is now called directly from virtio, see next patch) include/qom/cpu.h |1 + qom

[Qemu-devel] [PATCH v9 12/22] virtio: add endian-ambivalent support to VirtIODevice

2014-06-24 Thread Greg Kurz
As a consequence, the vring sanity checks had to be moved after the call to vmstate_load_state(). We enforce paranoia by poisoning the property at the begining of virtio_load(). Signed-off-by: Greg Kurz --- Changes since v8: - introduced a new virtio_current_cpu_endian() helper - reworked the code acco

[Qemu-devel] [PATCH v9 13/22] virtio: memory accessors for endian-ambivalent targets

2014-06-24 Thread Greg Kurz
macro. Signed-off-by: Rusty Russell [ relicensed virtio-access.h to GPLv2+ on Rusty's request, pass &address_space_memory to physical memory accessors, per-device endianness, virtio tswap16 and tswap64 helpers, faspath for fixed endian targets, Greg Kurz ] Cc: Cédric Le Goa

[Qemu-devel] [PATCH v9 14/22] virtio: allow byte swapping for vring

2014-06-24 Thread Greg Kurz
From: Rusty Russell Quoting original text from Rusty: "This is based on a simpler patch by Anthony Liguouri". Signed-off-by: Rusty Russell [ add VirtIODevice * argument to most helpers, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth Reviewed-by: Alexander Gra

[Qemu-devel] [PATCH v9 16/22] virtio-balloon: use virtio wrappers to access page frame numbers

2014-06-24 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/virtio/virtio-balloon.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PATCH v9 15/22] virtio-net: use virtio wrappers to access headers

2014-06-24 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, converted new tswap locations to virtio_tswap, Greg Kurz ] Signed-off-by: Greg Kurz --- Changes since v8: - moved some lines to patch 1 because it was a separate

[Qemu-devel] [PATCH v9 17/22] virtio-blk: use virtio wrappers to access headers

2014-06-24 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/block/virtio-blk.c

[Qemu-devel] [PATCH v9 18/22] virtio-scsi: use virtio wrappers to access headers

2014-06-24 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, converted new tswap locations to virtio_tswap, Greg Kurz ] Signed-off-by: Greg Kurz

[Qemu-devel] [PATCH v9 19/22] virtio-serial-bus: use virtio wrappers to access headers

2014-06-24 Thread Greg Kurz
From: Rusty Russell We also fix max_nr_ports at reset time as the device endianness may have changed. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, fix max_nr_ports at reset time, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by

[Qemu-devel] [PATCH v9 20/22] virtio-9p: use virtio wrappers to access headers

2014-06-24 Thread Greg Kurz
Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- hw/9pfs/virtio-9p-device.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index

[Qemu-devel] [PATCH v9 21/22] target-ppc: enable virtio endian ambivalent support

2014-06-24 Thread Greg Kurz
The device endianness is the cpu endianness at device reset time. Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- Changes since v8: - added missing register sync target-ppc/cpu.h|2 ++ target-ppc/translate_init.c | 15 +++ 2 files changed, 17

[Qemu-devel] [PATCH v9 22/22] vhost-net: disable when cross-endian

2014-06-24 Thread Greg Kurz
cross-endian qemu-system-ppc64: unable to start vhost net: 38: falling back on userspace virtio This way users can continue to run VMs without changing their setup and have a chance to know that performance will impacted. Suggested-by: Michael S. Tsirkin Signed-off-by: Greg Kurz --- h

Re: [Qemu-devel] [PATCH v9 00/22] legacy virtio support for cross-endian targets

2014-06-24 Thread Greg Kurz
On Tue, 24 Jun 2014 20:25:41 +0300 "Michael S. Tsirkin" wrote: > On Tue, Jun 24, 2014 at 07:06:58PM +0200, Greg Kurz wrote: > > The current legacy virtio devices have a fundamental flaw: they all share > > data between host and guest with guest endianness ordering. This

[Qemu-devel] [PATCH] spapr_pci: turn IOMMU root into an I/O region

2014-08-26 Thread Greg Kurz
most visible effect is that all virtio devices are non-fonctionnal on sPAPR. :( This patch plugs the MSI memory ops to the root IOMMU region, and virtio devices work again. I am not sure this is the right way to fix: please comment and enlight ! Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c

[Qemu-devel] [PATCH] spapr_pci: map the MSI window in each PHB

2014-08-27 Thread Greg Kurz
: Greg Kurz --- hw/ppc/spapr.c |1 - hw/ppc/spapr_pci.c | 53 +++ include/hw/pci-host/spapr.h |2 +- include/hw/ppc/spapr.h |2 -- 4 files changed, 25 insertions(+), 33 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc

Re: [Qemu-devel] [PATCH] spapr_pci: map the MSI window in each PHB

2014-08-27 Thread Greg Kurz
On Wed, 27 Aug 2014 18:17:12 +0200 Greg Kurz wrote: > On sPAPR, virtio devices are connected to the PCI bus and use MSI-X. > Commit cc943c36faa192cd4b32af8fe5edb31894017d35 has modified MSI-X > so that writes are made using the bus master address space. ...and follow the I

Re: [Qemu-devel] [Qemu-stable] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages

2014-08-28 Thread Greg Kurz
d4b32af8fe5edb31894017d35) > Signed-off-by: Michael Roth > --- Hi Michael, This commit breaks virtio for spapr. A fix is available in Alex's ppc-next: From: Greg Kurz spapr_pci: map the MSI window in each PHB https://github.com/agraf/qemu/commit/7af2868fc76857e19c232bbe9e99a9

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 2/4] ppc64-dump: Support dump for little endian ppc64

2014-05-08 Thread Greg Kurz
On Wed, 07 May 2014 15:54:10 -0500 Tom Musta wrote: > On 5/7/2014 2:02 PM, Tom Musta wrote: > > > It feels like there is an endianness issue here but I have not yet been able > > to put my finger on it. > > OK ... after more thought and scribbling ... here is what I mean > > Suppose I hav

[Qemu-devel] [PATCH RFC 0/8] virtio: migrate new properties

2014-05-14 Thread Greg Kurz
suggestion from Alex: - patches 1 to 7 adds optional subsections in the virtio migration stream - patch 8 belongs to the virtio endianness serie, it is sent as an example Thanks for your comments. --- Greg Kurz (8): virtio: add subsections to the migration stream virtio-net: migrate

[Qemu-devel] [PATCH RFC 2/8] virtio-net: migrate subsections

2014-05-14 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/net/virtio-net.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index fd23c46..4004d02 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1300,6 +1300,8 @@ static void virtio_net_save(QEMUFile *f

[Qemu-devel] [PATCH RFC 6/8] virtio-balloon: migrate subsections

2014-05-14 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/virtio/virtio-balloon.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a470a0b..41f7ae1 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -316,6

[Qemu-devel] [PATCH RFC 7/8] virtio-rng: migrate subsections

2014-05-14 Thread Greg Kurz
While we are here, we also check virtio_load() return value. Signed-off-by: Greg Kurz --- hw/virtio/virtio-rng.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index b6ab361..0371103 100644 --- a/hw/virtio

[Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-14 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/virtio/virtio.c | 65 include/hw/virtio/virtio.h |4 +++ 2 files changed, 69 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index aeabf3a..f4eaa3f 100644 --- a/hw/virtio/virtio.c +++ b/hw

[Qemu-devel] [PATCH RFC 8/8] virtio: add endian-ambivalent support to VirtIODevice

2014-05-14 Thread Greg Kurz
is restored (virtio_load_device_endian) We enforce some paranoia by making the endianness a 3-value enum so that we can poison it when it should not be used. Signed-off-by: Greg Kurz --- exec.c |8 +- hw/virtio/virtio-pci.c | 11 +++- hw/virtio/virtio.c |

[Qemu-devel] [PATCH RFC 3/8] virtio-blk: migrate subsections

2014-05-14 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 8a568e5..5a0d224 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -600,6 +600,8 @@ static void

[Qemu-devel] [PATCH RFC 4/8] virtio-scsi: migrate subsections

2014-05-14 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index b0d7517..989e4ed 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -471,6 +471,7 @@ static void

[Qemu-devel] [PATCH RFC 5/8] virtio-serial: migrate subsections

2014-05-14 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/char/virtio-serial-bus.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 2b647b6..98f32fd 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-14 Thread Greg Kurz
On Thu, 15 May 2014 11:34:25 +0530 Amit Shah wrote: > On (Wed) 14 May 2014 [17:41:38], Greg Kurz wrote: > > There is a need to add some more fields to VirtIODevice that should be > > migrated (broken status, endianness). The problem is that we do not > > want to break compa

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-15 Thread Greg Kurz
On Thu, 15 May 2014 12:16:35 +0530 Amit Shah wrote: > On (Thu) 15 May 2014 [09:23:51], Michael S. Tsirkin wrote: > > On Thu, May 15, 2014 at 11:34:25AM +0530, Amit Shah wrote: > > > On (Wed) 14 May 2014 [17:41:38], Greg Kurz wrote: > > > > There is a need to add so

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-15 Thread Greg Kurz
On Thu, 15 May 2014 11:20:18 +0200 Andreas Färber wrote: > Am 15.05.2014 09:04, schrieb Greg Kurz: > > On Thu, 15 May 2014 12:16:35 +0530 > > Amit Shah wrote: > >> On (Thu) 15 May 2014 [09:23:51], Michael S. Tsirkin wrote: > >>> On Thu, May 15, 2014

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-15 Thread Greg Kurz
On Thu, 15 May 2014 12:08:26 +0200 Greg Kurz wrote: > On Thu, 15 May 2014 11:20:18 +0200 > Andreas Färber wrote: > > Am 15.05.2014 09:04, schrieb Greg Kurz: > > > On Thu, 15 May 2014 12:16:35 +0530 > > > Amit Shah wrote: > > >> On (Thu) 15 May

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-15 Thread Greg Kurz
On Thu, 15 May 2014 13:12:12 +0300 "Michael S. Tsirkin" wrote: > On Thu, May 15, 2014 at 12:08:26PM +0200, Greg Kurz wrote: > > On Thu, 15 May 2014 11:20:18 +0200 > > Andreas Färber wrote: > > > Am 15.05.2014 09:04, schrieb Greg Kurz: > > > > On Thu

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-15 Thread Greg Kurz
On Thu, 15 May 2014 15:58:16 +0300 "Michael S. Tsirkin" wrote: > On Thu, May 15, 2014 at 02:33:47PM +0200, Markus Armbruster wrote: > > "Michael S. Tsirkin" writes: > > > > > On Thu, May 15, 2014 at 11:20:18AM +0200, Andreas Färber wrote: &

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-15 Thread Greg Kurz
:58:25AM +0200, Andreas Färber wrote: > >>>> Am 15.05.2014 11:52, schrieb Michael S. Tsirkin: > >>>>> On Thu, May 15, 2014 at 11:20:18AM +0200, Andreas Färber wrote: > >>>>>> Am 15.05.2014 09:04, schrieb Greg Kurz: > >>>>>>&

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Greg Kurz
On Fri, 16 May 2014 14:24:16 +0800 Jun Koi wrote: > Hi, > > Anybody please help me on this dump-guest-memory command? How does the > virtual memory map to the dumped file? > > For example, if x86 register RIP points to 0x12345, how does that map to > the dump file? Meaning how can I find where t

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-16 Thread Greg Kurz
On Fri, 16 May 2014 17:40:00 +0800 Fam Zheng wrote: > On Fri, 05/16 11:22, Andreas Färber wrote: > > Am 16.05.2014 11:14, schrieb Fam Zheng: > > > On Thu, 05/15 12:08, Greg Kurz wrote: > > >>>> The main problem I see is that virtio sucks: as you see in patch

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Greg Kurz
On Fri, 16 May 2014 16:40:23 +0800 Jun Koi wrote: > On Fri, May 16, 2014 at 3:03 PM, Greg Kurz wrote: > > > On Fri, 16 May 2014 14:24:16 +0800 > > Jun Koi wrote: > > > Hi, > > > > > > Anybody please help me on this dump-guest-memory command? How do

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Greg Kurz
On Fri, 16 May 2014 16:51:36 +0800 Jun Koi wrote: > On Fri, May 16, 2014 at 4:45 PM, Andreas Färber wrote: > > > Am 16.05.2014 10:40, schrieb Jun Koi: > > > What I want > > > to know is how to map 0x12345 (virtual address) back to the dump file. > > > > > > For example, if 0x12345 was executing

Re: [Qemu-devel] dump-guest-memory command?

2014-05-16 Thread Greg Kurz
On Fri, 16 May 2014 17:59:25 +0800 Jun Koi wrote: > On Fri, May 16, 2014 at 5:51 PM, Greg Kurz wrote: > > > On Fri, 16 May 2014 16:40:23 +0800 > > Jun Koi wrote: > > > On Fri, May 16, 2014 at 3:03 PM, Greg Kurz > > wrote: > > > > > > &

[Qemu-devel] [PATCH RFC V2 0/8] virtio: migrate new properties

2014-05-19 Thread Greg Kurz
/save methods to VirtioDeviceClass. - virtio subsections now implement a "needed" concept with the same semantics as in the VMState code. I haven't looked at compat mode issues yet, but it is on my TODO list. Cheers. --- Greg Kurz (8): virtio: introduce device specific

  1   2   3   4   5   6   7   8   9   10   >