Re: [Qemu-devel] [Qemu-ppc] [RFC] QEMU/KVM PowerPC: virtio and guest endianness

2013-10-04 Thread Greg Kurz
On Fri, 4 Oct 2013 13:43:38 +0200 Alexander Graf ag...@suse.de wrote: CC'ing qemu-devel - please use qemu-ppc@ only as a tag, every mail needs to go to qemu-devel as well. Sure I will. On 03.10.2013, at 16:29, Greg Kurz wrote: [...] I have searched for an appropriate place to add

Re: [Qemu-devel] [Qemu-ppc] [RFC] QEMU/KVM PowerPC: virtio and guest endianness

2013-10-04 Thread Greg Kurz
Answering to both Paul and Alex. On Fri, 4 Oct 2013 13:54:25 +0200 Alexander Graf ag...@suse.de wrote: On 04.10.2013, at 13:53, Paul Mackerras wrote: I don't mind particularly whether H_SET_MODE for the endianness setting gets handled in the kernel or in QEMU, but I don't think it

[Qemu-devel] [PATCH 0/2] virtio: guest endianness support

2013-10-07 Thread Greg Kurz
KVM_REG_PPC_LPCR defined. It is not needed unless you wish to build and do not already have KVM_REG_PPC_LPCR in linux-headers/asm-powerpc/kvm.h. The interesting code is in the second patch. Cheers. --- Greg Kurz (2): linux-headers: POWER8 partial update virtio: refresh registers at reset time

[Qemu-devel] [PATCH 1/2] linux-headers: POWER8 partial update

2013-10-07 Thread Greg Kurz
Add definition for KVM_REG_PPC_LPCR, taken from: https://github.com/agraf/linux-2.6/commit/1a87967d4c Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- linux-headers/asm-powerpc/kvm.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers

[Qemu-devel] [PATCH 2/2] virtio: refresh registers at reset time

2013-10-07 Thread Greg Kurz
We need to support the guest endianness as soon as a virtio device shows up. Alex suggested this can achieved by calling cpu_synchronize_state(). To have it working on PowerPC, we need to add LPCR in the sync register functions. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/virtio

[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 gk...@linux.vnet.ibm.com --- hw/9pfs/virtio-9p-device.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion

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

2013-11-25 Thread Greg Kurz
Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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] target-ppc: ppc64 target's virtio can be either endian.

2013-11-25 Thread Greg Kurz
in the linux headers: $ grep LPCR linux-headers/asm-powerpc/kvm.h #define KVM_REG_PPC_LPCR(KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb5) Suggested-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com

[Qemu-devel] [PATCH] spapr-pci: remove io ports workaround

2013-12-09 Thread Greg Kurz
: File exists Aborted This will prevent to use virtio and VFIO passthrough at the same time, since VFIO needs a dedicated PHB to work on ppc. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/ppc/spapr_pci.c | 13 ++--- 1 file

Re: [Qemu-devel] [PATCH] target-ppc: ppc64 target's virtio can be either endian.

2013-12-09 Thread Greg Kurz
On Mon, 9 Dec 2013 16:33:59 +0100 Alexander Graf ag...@suse.de wrote: On 25.11.2013, at 16:35, Greg Kurz gk...@linux.vnet.ibm.com wrote: We base it on the OS endian, as reflected by the endianness of the interrupt vectors (handled through the ILE bit in the LPCR register). This patch

Re: [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround

2013-12-09 Thread Greg Kurz
On Tue, 10 Dec 2013 13:43:05 +1100 Alexey Kardashevskiy a...@ozlabs.ru wrote: On 12/10/2013 03:33 AM, Greg Kurz wrote: In the past, IO space could not be mapped into the memory address space so we introduced a workaround for that. Nowadays it does not look necessary so we can remove

Re: [Qemu-devel] [PATCH] target-ppc: ppc64 target's virtio can be either endian.

2013-12-10 Thread Greg Kurz
On Mon, 9 Dec 2013 18:18:26 +0100 Alexander Graf ag...@suse.de wrote: On 09.12.2013, at 18:11, Greg Kurz gk...@linux.vnet.ibm.com wrote: On Mon, 9 Dec 2013 16:33:59 +0100 Alexander Graf ag...@suse.de wrote: On 25.11.2013, at 16:35, Greg Kurz gk...@linux.vnet.ibm.com wrote: We

Re: [Qemu-devel] [PATCH] target-ppc: ppc64 target's virtio can be either endian.

2013-12-10 Thread Greg Kurz
On Tue, 10 Dec 2013 18:48:45 +0100 Alexander Graf ag...@suse.de wrote: Yeah, but so far LE switching code is not upstream in KVM - and for TCG we don't need the cpu_synchronize_state() call at all. Alex Sure, but for TCG, cpu_synchronize_state() does nothing since KVM is not

Re: [Qemu-devel] [PULL 1/5] linux-headers: Update from v3.13-rc3

2013-12-11 Thread Greg Kurz
On Fri, 06 Dec 2013 13:48:25 -0700 Alex Williamson alex.william...@redhat.com wrote: Update to tag v3.13-rc3 (374b105797c3d4f29c685f3be535c35f5689b30e) Signed-off-by: Alex Williamson alex.william...@redhat.com --- linux-headers/asm-arm/kvm.h |3 +

[Qemu-devel] [PATCH] target-ppc: add stubs for KVM breakpoints

2013-12-11 Thread Greg Kurz
. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- target-ppc/kvm.c | 28 1 file changed, 28 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 10d0cd9..781b72f 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -1906,3 +1906,31 @@ int

[Qemu-devel] [PATCH V2] target-ppc: ppc64 target's virtio can be either endian.

2013-12-11 Thread Greg Kurz
-by: Greg Kurz gk...@linux.vnet.ibm.com --- Alex, If you are interested, I can resend the whole virtio+endian serie or setup a git tree for you to pull from. -- Greg target-ppc/kvm.c |4 target-ppc/misc_helper.c | 12 2 files changed, 16 insertions(+) diff --git

Re: [Qemu-devel] [PATCH V2] target-ppc: ppc64 target's virtio can be either endian.

2013-12-11 Thread Greg Kurz
On Wed, 11 Dec 2013 17:11:49 +0100 Alexander Graf ag...@suse.de wrote: I think this patch should really go in after / with the virtio-endian series, since as it is it would be dead code. So I'll just give you my ack here and hope whoever gets the virtio-endianness bits in also includes that

Re: [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround

2013-12-16 Thread Greg Kurz
On Wed, 11 Dec 2013 18:07:58 +1100 Alexey Kardashevskiy a...@ozlabs.ru wrote: Hm. Nack. This fails: ./qemu-system-ppc64 \ -trace events=qemu_trace_events \ -L qemu-ppc64-bios/ \ -nographic \ -vga none \ -device \

Re: [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround

2014-01-06 Thread Greg Kurz
On Fri, 03 Jan 2014 09:08:21 +1100 Alexey Kardashevskiy a...@ozlabs.ru wrote: Please read the rest of this thread. It does not visibly break things but with this patch QEMU starts calling unassigned_mem_accepts() (normally silent) which is not a good sign. Hmm... this is only because

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] PPC: KVM: fix set one register

2014-01-06 Thread Greg Kurz
/kvm_arch_put_registers run a loop for all 1024 SPR and LPCR is one of them. Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Greg Kurz gk...@linux.vnet.ibm.com --- target-ppc/translate_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-ppc/translate_init.c

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] target-ppc: fix Authority Mask Register init value

2014-01-06 Thread Greg Kurz
to be fixed by a separate patch). Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Greg Kurz gk...@linux.vnet.ibm.com --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index

[Qemu-devel] [RFC] PPC: KVM: add support for LPCR

2014-01-06 Thread Greg Kurz
The LPCR special purpose register was introduced with the PowerPC 970MP family. This patch initializes LPCR for the following families: - 970 MP - POWER5+ - POWER7 - POWER8 Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Along with Alexey's fixes for the get/put one reg API, I could drop

[Qemu-devel] [PATCH] target-ppc: ppc64 target's virtio can be either endian. (v3)

2014-01-17 Thread Greg Kurz
...@kernel.crashing.org Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com Reviewed-by: Alexander Graf ag...@suse.de --- target-ppc/misc_helper.c | 12 1 file changed, 12 insertions(+) diff --git a/target-ppc/misc_helper.c b/target-ppc

[Qemu-devel] [PATCH v6 0/8] virtio endian-ambivalent target fixes

2014-03-28 Thread Greg Kurz
- pass VirtIODevice to virtio memory accessors so they can use the per-device property - migration support - fix SCSI event endianness issue in virtio-scsi Thank you for your comments. --- Greg Greg Kurz (1): virtio-9p: use virtio wrappers to access headers Rusty Russell (7

[Qemu-devel] [PATCH v6 1/8] virtio_legacy_get_byteswap: endian-ambivalent targets using legacy virtio

2014-03-28 Thread Greg Kurz
-device needs_byteswap flag, add VirtIODevice * arg to virtio helpers, rename virtio_get_byteswap to virtio_legacy_get_byteswap, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/virtio/virtio.c|5 + include/hw/virtio/virtio-access.h

[Qemu-devel] [PATCH v6 7/8] virtio-serial-bus: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ use per-device needs_byteswap flag, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/char/virtio-serial

[Qemu-devel] [PATCH v6 4/8] virtio-balloon: use virtio wrappers to access page frame numbers

2014-03-28 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ use per-device needs_byteswap flag, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/virtio/virtio

[Qemu-devel] [PATCH v6 3/8] virtio-net: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ use per-device needs_byteswap flag, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/net/virtio-net.c

[Qemu-devel] [PATCH v6 5/8] virtio-blk: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ use per-device needs_byteswap flag, Greg Kurz gk...@linux.vnet.ibm.com

[Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
in virtio_scsi_push_event(), Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/scsi/virtio-scsi.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index b0d7517

[Qemu-devel] [PATCH v6 8/8] virtio-9p: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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 v4] target-ppc: ppc64 target's virtio can be either endian

2014-03-28 Thread Greg Kurz
-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Rusty Russell ru...@rustcorp.com.au [ rename virtio_get_byteswap to virtio_legacy_get_byteswap, support both LE and BE host, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com Reviewed-by: Alexander

[Qemu-devel] [PATCH v6 2/8] virtio: allow byte swapping for vring and config access

2014-03-28 Thread Greg Kurz
change, use per-device needs_byteswap flag, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/virtio/virtio.c | 93 ++-- 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/hw/virtio/virtio.c b

Re: [Qemu-devel] [PATCH v6 1/8] virtio_legacy_get_byteswap: endian-ambivalent targets using legacy virtio

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 15:15:46 +0100 Thomas Huth th...@linux.vnet.ibm.com wrote: On Fri, 28 Mar 2014 11:57:17 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 11:57:56 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 18:21:43 +0100 Andreas Färber afaer...@suse.de wrote: Am 28.03.2014 18:13, schrieb Greg Kurz: On Fri, 28 Mar 2014 11:57:56 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, SCSIDevice *dev

Re: [Qemu-devel] [PATCH v6 2/8] virtio: allow byte swapping for vring and config access

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 17:07:31 +0100 Thomas Huth th...@linux.vnet.ibm.com wrote: On Fri, 28 Mar 2014 11:57:25 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: From: Rusty Russell ru...@rustcorp.com.au This is based on a simpler patch by Anthony Liguouri, which only handled the vring

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 17:43:07 + Peter Maydell peter.mayd...@linaro.org wrote: On 28 March 2014 17:37, Greg Kurz gk...@linux.vnet.ibm.com wrote: And while we are at it, since we pass address_space_memory to all occurences of virtio_*_phys() and I don't see why we would change that, maybe

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 18:14:55 + Peter Maydell peter.mayd...@linaro.org wrote: On 28 March 2014 18:04, Greg Kurz gk...@linux.vnet.ibm.com wrote: Ok, I am now convinced. Let's make struct VirtIODevice* be the first argument for all helpers and kill the AddressSpace* one. Unless you

Re: [Qemu-devel] [PATCH v6 1/8] virtio_legacy_get_byteswap: endian-ambivalent targets using legacy virtio

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 18:59:22 +0100 Andreas Färber afaer...@suse.de wrote: Am 28.03.2014 11:57, schrieb Greg Kurz: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact, that actually means it's

Re: [Qemu-devel] [PATCH v6 1/8] virtio_legacy_get_byteswap: endian-ambivalent targets using legacy virtio

2014-04-01 Thread Greg Kurz
On Mon, 31 Mar 2014 16:50:55 +0200 Alexander Graf ag...@suse.de wrote: On 03/28/2014 11:57 AM, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact, that actually means it's platform

Re: [Qemu-devel] [PATCH v6 2/8] virtio: allow byte swapping for vring and config access

2014-04-01 Thread Greg Kurz
On Mon, 31 Mar 2014 18:26:54 +0200 Andreas Färber afaer...@suse.de wrote: Am 31.03.2014 18:24, schrieb Alexander Graf: On 03/28/2014 11:57 AM, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au This is based on a simpler patch by Anthony Liguouri, which only handled the vring

[Qemu-devel] [PATCH v7 0/8] virtio endian-ambivalent target fixes

2014-04-14 Thread Greg Kurz
checksums and virtio PCI. It introduces an alternative way to support migrations without the need to change the current layout. Please comment and/or apply. :) --- Greg Greg Kurz (1): virtio-9p: use virtio wrappers to access headers Rusty Russell (7): virtio: endian-ambivalent targets

[Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-14 Thread Greg Kurz
it platform independant, migration support, Greg Kurz gk...@linux.vnet.ibm.com ] Cc: Cédric Le Goater c...@fr.ibm.com Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v6: - merge the virtio_needs_byteswap() helper from v6 and existing virtio_is_big_endian() - virtio-pci: now

[Qemu-devel] [PATCH v7 2/8] virtio: allow byte swapping for vring and config access

2014-04-14 Thread Greg Kurz
* argument to most helpers, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com --- Changes since v6: - argument re-ordering hw/virtio/virtio.c | 88 1 file

[Qemu-devel] [PATCH v7 3/8] virtio-net: use virtio wrappers to access headers

2014-04-14 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au virtio-net gets target independant. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ pass VirtIODevice * to memory accessors, TCP checksums fix by Cédric Le Goater, target independant, Greg Kurz

[Qemu-devel] [PATCH v7 4/8] virtio-balloon: use virtio wrappers to access page frame numbers

2014-04-14 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au This one can't get target independant because of TARGET_PAGE_SIZE. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ pass VirtIODevice * to memory accessors, Greg Kurz gk...@linux.vnet.ibm.com

[Qemu-devel] [PATCH v7 5/8] virtio-blk: use virtio wrappers to access headers

2014-04-14 Thread Greg Kurz
, target independant, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v6: - target independant hw/block/Makefile.objs |2 +- hw/block/virtio-blk.c | 38 +- 2 files changed, 22 insertions

[Qemu-devel] [PATCH v7 6/8] virtio-scsi: use virtio wrappers to access headers

2014-04-14 Thread Greg Kurz
, fix missing tswap32 in virtio_scsi_push_event() by Cédric Le Goater, target independant, Greg Kurz gk...@linux.vnet.ibm.com ] Cc: Cédric Le Goater c...@fr.ibm.com Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v6: - target independant hw/scsi/Makefile.objs |2

[Qemu-devel] [PATCH v7 7/8] virtio-serial-bus: use virtio wrappers to access headers

2014-04-14 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au virtio-serial-bus gets platform independant. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ pass VirtIODevice * to memory accessors, platform independant, Greg Kurz gk...@linux.vnet.ibm.com

[Qemu-devel] [PATCH v7 8/8] virtio-9p: use virtio wrappers to access headers

2014-04-14 Thread Greg Kurz
Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. virtio-9p-device gets platform independant. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v6: - target independant hw/9pfs/Makefile.objs |3 +-- hw/9pfs/virtio-9p-device.c |3 ++- 2

[Qemu-devel] [PATCH v5] target-ppc: ppc64 target's virtio can be either endian

2014-04-14 Thread Greg Kurz
Herrenschmidt b...@kernel.crashing.org Signed-off-by: Rusty Russell ru...@rustcorp.com.au [ re-use the existing virito_is_big_endian() helper, check we have LPCR, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com Reviewed-by: Alexander Graf ag...@suse.de --- Changes

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-14 Thread Greg Kurz
On Mon, 14 Apr 2014 14:16:03 +0200 Alexander Graf ag...@suse.de wrote: On 14.04.14 13:58, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact, that actually means it's platform

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-14 Thread Greg Kurz
On Mon, 14 Apr 2014 14:22:36 +0200 Alexander Graf ag...@suse.de wrote: On 14.04.14 13:58, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact, that actually means it's platform

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-14 Thread Greg Kurz
wrote: On Mon, Apr 14, 2014 at 02:16:03PM +0200, Alexander Graf wrote: On 14.04.14 13:58, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact, that actually means it's platform

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-14 Thread Greg Kurz
On Mon, 14 Apr 2014 14:53:03 +0200 Alexander Graf ag...@suse.de wrote: On 14.04.14 14:50, Greg Kurz wrote: On Mon, 14 Apr 2014 14:22:36 +0200 Alexander Graf ag...@suse.de wrote: On 14.04.14 13:58, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-14 Thread Greg Kurz
: On 14.04.14 13:58, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact, that actually means it's platform-specific. The OASIS virtio 1.0 spec will fix this, by making it all little

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-15 Thread Greg Kurz
: On 14.04.14 14:24, Michael S. Tsirkin wrote: On Mon, Apr 14, 2014 at 02:16:03PM +0200, Alexander Graf wrote: On 14.04.14 13:58, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au virtio data structures are defined as target endian, which assumes that's a fixed value. In fact

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-15 Thread Greg Kurz
On Tue, 15 Apr 2014 13:35:03 +0200 Alexander Graf ag...@suse.de wrote: On 04/15/2014 10:40 AM, Greg Kurz wrote: On Mon, 14 Apr 2014 15:08:23 +0200 Alexander Graf ag...@suse.de wrote: On 14.04.14 14:55, Michael S. Tsirkin wrote: On Mon, Apr 14, 2014 at 02:40:04PM +0200, Alexander Graf

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-17 Thread Greg Kurz
On Wed, 16 Apr 2014 20:32:07 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Apr 16, 2014 at 05:42:22PM +0100, Peter Maydell wrote: On 16 April 2014 17:34, Michael S. Tsirkin m...@redhat.com wrote: so it looks like virtio is currently compiled per-target. So why isn't it

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-17 Thread Greg Kurz
On Wed, 16 Apr 2014 17:42:22 +0100 Peter Maydell peter.mayd...@linaro.org wrote: On 16 April 2014 17:34, Michael S. Tsirkin m...@redhat.com wrote: so it looks like virtio is currently compiled per-target. So why isn't it reasonable to keep it per-target for purpose of this enhancement?

Re: [Qemu-devel] [PATCH v7 1/8] virtio: endian-ambivalent targets using legacy virtio

2014-04-17 Thread Greg Kurz
On Thu, 17 Apr 2014 11:00:26 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Apr 17, 2014 at 08:54:12AM +0200, Greg Kurz wrote: On Wed, 16 Apr 2014 20:32:07 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Apr 16, 2014 at 05:42:22PM +0100, Peter Maydell wrote: On 16

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

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

2014-06-13 Thread Greg Kurz
-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/block/virtio-blk.c |2 +- hw/char/virtio-serial-bus.c |2 +- hw/net/virtio-net.c |2 +- hw/scsi/virtio-scsi.c |2 +- hw/virtio/virtio-balloon.c |2 +- hw/virtio/virtio-rng.c |2 +- hw/virtio

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

2014-06-13 Thread Greg Kurz
, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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/virtio-serial-bus.c index 2b647b6..ee1ba16 100644

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

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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

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

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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

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

2014-06-13 Thread Greg Kurz
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 gk...@linux.vnet.ibm.com --- exec.c | 11 +-- hw/virtio/virtio-pci.c |3 --- include/exec/cpu-common.h

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

2014-06-13 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Quoting original text from Rusty: This is based on a simpler patch by Anthony Liguouri. Signed-off-by: Rusty Russell ru...@rustcorp.com.au [ add VirtIODevice * argument to most helpers, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk

[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 gk...@linux.vnet.ibm.com --- Changes since last version (virtio migration RFC): - endianness cached

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

2014-06-13 Thread Greg Kurz
-off-by: Rusty Russell ru...@rustcorp.com.au [ 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 gk...@linux.vnet.ibm.com ] Cc

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

2014-06-13 Thread Greg Kurz
time, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since version 7: - fixed migration (load part) hw/char/virtio-serial-bus.c | 46 +-- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git

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

2014-06-13 Thread Greg Kurz
From: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ pass VirtIODevice * to memory accessors, TCP checksums fix by Cédric Le Goater, Greg Kurz gk...@linux.vnet.ibm.com ] Cc: Cédric Le Goater c

[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 gk...@linux.vnet.ibm.com --- 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

[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 ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ pass VirtIODevice * to memory accessors, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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 ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu...@us.ibm.com [ pass VirtIODevice * to memory accessors, Greg Kurz gk...@linux.vnet.ibm.com

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

2014-06-13 Thread Greg Kurz
in virtio_scsi_push_event() by Cédric Le Goater, Greg Kurz gk...@linux.vnet.ibm.com ] Cc: Cédric Le Goater c...@fr.ibm.com Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- hw/scsi/virtio-scsi.c | 38 -- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git

[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 gk...@linux.vnet.ibm.com --- 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 v8 08/20] virtio: add subsections to the migration stream

2014-06-13 Thread Greg Kurz
and the 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 ag...@suse.de Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since last version (RFC): - use

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

2014-06-13 Thread Greg Kurz
Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- 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

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 ag...@suse.de 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 value. Of course

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 ag...@suse.de 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 code. 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 gk...@linux.vnet.ibm.com --- 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

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 ag...@suse.de 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 impact on legacy virtio data

[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 peter.mayd...@linaro.org Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- include/qom/cpu.h | 10 ++ qom/cpu.c |6 ++ 2 files changed, 16 insertions(+) diff --git a/include/qom

[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 gk...@linux.vnet.ibm.com --- 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

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 c...@fr.ibm.com wrote: On 06/13/2014 01:52 PM, Alexander Graf wrote: On 13.06.14 13:24, Greg Kurz wrote: From: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori

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 ag...@suse.de wrote: On 13.06.14 14:14, Greg Kurz wrote: On Fri, 13 Jun 2014 13:46:39 +0200 Alexander Graf ag...@suse.de wrote: On 13.06.14 13:23, Greg Kurz wrote: Some CPU families can dynamically change their endianness. This means

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 ag...@suse.de 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) and the work on virtio

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 tbbe...@us.ibm.com 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

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 a...@ozlabs.ru 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

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 b...@kernel.crashing.org 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

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 stefa...@gmail.com 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 merges the changes requested

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 m...@redhat.com wrote: On Wed, Jun 18, 2014 at 01:53:15PM +0100, Peter Maydell wrote: On 18 June 2014 11:38, Stefan Hajnoczi stefa...@gmail.com wrote: What bothers me is that real hardware can't do this. Real hardware doesn't have

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 amit.s...@redhat.com 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 just skip them

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 gk...@linux.vnet.ibm.com wrote: From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Reviewed-by: Anthony Liguori aligu

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 pbonz...@redhat.com wrote: Il 13/06/2014 13:24, Greg Kurz ha scritto: From: Rusty Russell ru...@rustcorp.com.au Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. Signed-off-by: Rusty Russell ru...@rustcorp.com.au

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

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

2014-06-24 Thread Greg Kurz
ppc64 TCG hypervisor. Signed-off-by: Cédric Le Goater c...@fr.ibm.com [ Ported from PowerKVM, Greg Kurz gk...@linux.vnet.ibm.com ] Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- This patch had been mistakenly folded into patch 14/20 in v8 hw/net/virtio-net.c | 17 + 1

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

2014-06-24 Thread Greg Kurz
*, added From, SoB and commit message, Greg Kurz gk...@linux.vnet.ibm.com ] Reviewed-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes since v8: - fixed From: in header hw/char/virtio-serial-bus.c | 16 ++-- 1 file changed, 6

  1   2   3   4   5   6   7   8   9   10   >