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

2014-02-18 Thread Greg Kurz
From: Rusty Russell This is based on a simpler patch by Anthony Liguouri, which only handled the vring accesses. We also need some drivers to access these helpers, eg. for data which contains headers. [ ldq_phys() API change, Greg Kurz ] Signed-off-by: Rusty Russell Signed-off-by: Greg Kurz

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

2014-02-18 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori --- hw/virtio/virtio-balloon.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a470a0b..5e7f26f 100644 --- a/hw/virtio/virtio-bal

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

2014-02-18 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori --- hw/char/virtio-serial-bus.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 226e9f9..243b

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

2014-02-18 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 15a4983..b3161ec 100644 --- a

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

2014-02-18 Thread Greg Kurz
On Tue, 18 Feb 2014 14:08:35 +0100 Cornelia Huck wrote: > On Tue, 18 Feb 2014 13:38:54 +0100 > Greg Kurz wrote: > > > From: Rusty Russell > > > > This is based on a simpler patch by Anthony Liguouri, which only handled > > the vring accesses. We also need som

Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio.

2014-02-19 Thread Greg Kurz
On Tue, 18 Feb 2014 20:25:15 +0100 Andreas Färber wrote: > Am 18.02.2014 13:38, schrieb Greg Kurz: > > diff --git a/include/hw/virtio/virtio-access.h > > b/include/hw/virtio/virtio-access.h new file mode 100644 > > index 000..2e22a47 > > --- /dev/null > &g

[Qemu-devel] [PATCH 0/4] target-ppc: htab fixes (V2)

2014-02-20 Thread Greg Kurz
On Mon, 17 Feb 2014 14:22:14 +0100 Greg Kurz wrote: > Hi, > > This is a new tentative for the patches 2/5 to 5/5 from the "target-ppc: > Add support for dumping guest memory using qemu gdb server" patchset: > > https://lists.nongnu.org/archive/html/qemu-ppc/20

[Qemu-devel] [PATCH 3/4] target-ppc: Change the hpte store API

2014-02-20 Thread Greg Kurz
From: Aneesh Kumar K.V For updating in kernel htab we need to provide both pte0 and pte1, hence update the interface to take pte0 and pte1 together Signed-off-by: Aneesh Kumar K.V [ ldq_phys() API change, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/ppc/spapr_hcall.c| 20

[Qemu-devel] [PATCH 2/4] target-ppc: Fix page table lookup with kvm enabled

2014-02-20 Thread Greg Kurz
0xc0098660 (gdb) Signed-off-by: Aneesh Kumar K.V [ fixes for 32 bit build (casts!), ldq_phys() API change, Greg Kurz --- hw/ppc/spapr.c |1 + hw/ppc/spapr_hcall.c| 50 +++--- target-ppc/kvm.c| 54 + target

[Qemu-devel] [PATCH 4/4] target-ppc: Update ppc_hash64_store_hpte to support updating in-kernel htab

2014-02-20 Thread Greg Kurz
igned-off-by: Aneesh Kumar K.V [ folded fix for the "warn_unused_result" build break in kvmppc_hash64_write_pte(), Greg Kurz ] Signed-off-by: Greg Kurz --- target-ppc/kvm.c| 36 target-ppc/kvm_ppc.h| 10 ++ target-ppc/mmu-

[Qemu-devel] [PATCH 1/4] target-ppc: Fix htab_mask calculation

2014-02-20 Thread Greg Kurz
oup offset computation in ppc_hash64_htab_lookup() that caused TCG to fail, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |8 +++- hw/ppc/spapr_hcall.c | 19 +++ target-ppc/cpu.h |1 + target-ppc/kvm.c |4 +++- target-ppc

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

2014-02-21 Thread Greg Kurz
virtio_ in patch 2/8, spotted by Cornelia - relicensed virtio-access.h to GPLv2+ in patch 1/8, as requested by Rusty Thanks for your comments. Best Regards. -- Greg --- Greg Kurz (1): virtio-9p: use virtio wrappers to access headers Rusty Russell (7): virtio_get_byteswap: function

[Qemu-devel] [PATCH v5 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio

2014-02-21 Thread Greg Kurz
d virtio-access.h to GPLv2+ on Rusty's request, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/virtio/virtio.c|6 ++ include/hw/virtio/virtio-access.h | 134 + include/hw/virtio/virtio.h|2 + stubs/Makefile.objs

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

2014-02-21 Thread Greg Kurz
vring_used_flags_unset_bit(), Greg Kurz ] Signed-off-by: Greg Kurz --- hw/virtio/virtio.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 4fd6ac2..cecf9fc 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio

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

2014-02-21 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/net/virtio-net.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3626608..34d6b48 100644 --- a

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

2014-02-21 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 Signed-off-by: Greg Kurz --- hw/scsi/virtio-scsi.c | 33 + 1 file changed, 17 insertions(+), 16

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

2014-02-21 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 Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c | 35 ++- 1 file changed, 18 insertions(+), 17

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

2014-02-21 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/virtio/virtio-balloon.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index a470a0b..5e7f26f 100644

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

2014-02-21 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 15a4983..b3161ec 100644 --- a

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

2014-02-21 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori Signed-off-by: Greg Kurz --- hw/char/virtio-serial-bus.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: Introduce hypervisor call H_GET_TCE

2014-02-21 Thread Greg Kurz
kernel which is calling it to > retrieve the TCE set up by the panicing kernel. > > Signed-off-by: Laurent Dufour > --- FWIW, you can add this :) Reviewed-by: Greg Kurz > hw/ppc/spapr_iommu.c | 37 + > trace-events |1 +

Re: [Qemu-devel] [PATCH v5 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio

2014-02-25 Thread Greg Kurz
On Tue, 25 Feb 2014 16:21:21 +0100 Stefan Hajnoczi wrote: > On Fri, Feb 21, 2014 at 12:28:11PM +0100, Greg Kurz wrote: > > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > > index aeabf3a..4fd6ac2 100644 > > --- a/hw/virtio/virtio.c > > +++ b/hw/virtio/

Re: [Qemu-devel] [Qemu-ppc] KVM and variable-endianness guest CPUs

2014-01-23 Thread Greg Kurz
On Wed, 22 Jan 2014 20:25:05 -0800 Victor Kamensky wrote: > Hi Alex, > > Sorry, for delayed reply, I was focusing on discussion > with Peter. Hope you and other folks may get something > out of it :). > > Please see responses inline > > On 22 January 2014 02:52, Alexander Graf wrote: > > > >

Re: [Qemu-devel] 9pfs troubles (was Re: [PATCH 1/4] hw/9pfs: fix error handing in local_ioc_getversion())

2014-02-07 Thread Greg Kurz
On Wed, 5 Feb 2014 23:31:11 +0200 "Michael S. Tsirkin" wrote: > On Tue, Feb 04, 2014 at 12:51:25PM +0530, Aneesh Kumar K.V wrote: > > "Michael S. Tsirkin" writes: > > > > > On Mon, Feb 03, 2014 at 03:05:10PM +0530, Aneesh Kumar K.V wrote: > > >> "Michael S. Tsirkin" writes: > > >> > > >> > Hav

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

2014-02-07 Thread Greg Kurz
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 the workaround and make sPAPR PCI configuration simplier. Signed-off-by: Greg Kurz --- There has been a previous post for this

Re: [Qemu-devel] [Qemu-ppc] [PATCH V9 5/5] target-ppc: Update ppc_hash64_store_hpte to support updating in-kernel htab

2014-02-10 Thread Greg Kurz
On Tue, 28 Jan 2014 13:30:03 +0530 "Aneesh Kumar K.V" wrote: > This support updating htab managed by the hypervisor. Currently we don't > have any user for this feature. This actually bring the store_hpte > interface in-line with the load_hpte one. We may want to use this when we > want to emulate

Re: [Qemu-devel] [Qemu-ppc] [PATCH V9 3/5] target-ppc: Fix page table lookup with kvm enabled

2014-02-10 Thread Greg Kurz
On Tue, 28 Jan 2014 13:30:01 +0530 "Aneesh Kumar K.V" wrote: > With kvm enabled, we store the hash page table information in the > hypervisor. Use ioctl to read the htab contents. Without this we get the > below error when trying to read the guest address > > (gdb) x/10 do_fork > 0xc009

[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 Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions

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 wrote: > > On 25.11.2013, at 16:35, Greg Kurz 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). > > >

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

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 wrote: > > On 09.12.2013, at 18:11, Greg Kurz wrote: > > > On Mon, 9 Dec 2013 16:33:59 +0100 > > Alexander Graf wrote: > >> > >> On 25.11.2013, at 16:35, Greg Kurz wrote: > >> > >>>

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 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 i

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 wrote: > Update to tag v3.13-rc3 (374b105797c3d4f29c685f3be535c35f5689b30e) > > Signed-off-by: Alex Williamson > --- > linux-headers/asm-arm/kvm.h |3 + > linux-headers/asm-powerpc/epapr_hcalls.h |4 + > linux-headers/asm-p

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

2013-12-11 Thread Greg Kurz
points' We need stubs until something gets implemented. Signed-off-by: Greg Kurz --- 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

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

2013-12-11 Thread Greg Kurz
arbitrary and awkward, but it is okay because KVM sets/unsets the ILE bit on all CPUs. Changes in v2: - call cpu_synchronize_state() instead of kvm_arch_get_registers(). Suggested-by: Benjamin Herrenschmidt Signed-off-by: Rusty Russell Signed-off-by: Greg Kurz --- Alex, If you are interested, I

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 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 with my r

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 wrote: > > Hm. Nack. This fails: > > ./qemu-system-ppc64 \ > -trace "events=qemu_trace_events" \ > -L "qemu-ppc64-bios/" \ > -nographic \ > -vga "none" \ > -device \ > virtio-blk-pci,id=virtioiblk0,drive=drive0,bootindex=20,ioeventfd=

[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 --- 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 f0ffbe8..72ef60a 100644 --- a

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

2013-11-25 Thread Greg Kurz
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 Signed-off-by: Rusty Russell Signed-off-by: Greg Kurz --- target-ppc/kvm.c |4 target-ppc/misc_helper.c | 14

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

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

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 wrote: > On 16 April 2014 17:34, Michael S. Tsirkin 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? > > What am I missing? > > "virtio"

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" 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" wrote: > > > > > On Wed, Apr 16, 2014 at 05:42:22PM +0

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

2014-04-21 Thread Greg Kurz
On Mon, 21 Apr 2014 09:46:59 +0530 Bharata B Rao wrote: > On Mon, Apr 14, 2014 at 5:42 PM, Greg Kurz wrote: > > > > > + > > +#if !defined(CONFIG_USER_ONLY) > > +bool virtio_is_big_endian(void) > > +{ > > +PowerPCCPU *cp = POWERPC_CPU(first_

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

2014-04-21 Thread Greg Kurz
On Mon, 21 Apr 2014 09:56:48 +0200 Alexander Graf wrote: > > > > Am 21.04.2014 um 06:16 schrieb Bharata B Rao : > > > >> On Mon, Apr 14, 2014 at 5:42 PM, Greg Kurz > >> wrote: > >> > >> + > >> +#if

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

2014-04-22 Thread Greg Kurz
On Tue, 22 Apr 2014 09:19:48 -0400 (EDT) Dave Anderson wrote: > > > - Original Message - > > On Mon, Apr 21, 2014 at 4:48 PM, Greg Kurz wrote: > > > > > On Mon, 21 Apr 2014 09:56:48 +0200 > > > Alexander Graf wrote: > > > > >

Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken

2014-04-22 Thread Greg Kurz
On Tue, 22 Apr 2014 12:16:07 +0200 Andreas Färber wrote: > Am 22.04.2014 12:12, schrieb Fam Zheng: > > On Tue, 04/22 17:58, Jason Wang wrote: > >> On 04/22/2014 04:55 PM, Fam Zheng wrote: > >>> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > >>> index aeabf3a..222bb73 100644 > >>> --- a/hw/

[Qemu-devel] [PATCH 3/4] target-ppc: ppc can be either endian

2014-04-28 Thread Greg Kurz
legacy virtio support and crash dump support as well. Suggested-by: Benjamin Herrenschmidt Suggested-by: Alexander Graf Signed-off-by: Greg Kurz --- target-ppc/cpu-qom.h|2 ++ target-ppc/misc_helper.c|7 +++ target-ppc/translate_init.c | 16 3 files

[Qemu-devel] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-28 Thread Greg Kurz
ubs/dump.c by creating a separate dump-arch.h. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao [ rebased on top of current master branch, Greg Kurz ] Signed-off-by: Greg Kurz --- dump.c | 39 +++- include/sys

[Qemu-devel] [PATCH 0/4] little-endian dump for ppc64

2014-04-28 Thread Greg Kurz
dump code ppc64-dump: Support dump for little endian ppc64 ppc64 dump: Set the correct endianness in ELF dump header Greg Kurz (1): target-ppc: ppc can be either endian dump.c | 39 ++-- include/sysemu/dump-arch

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

2014-04-28 Thread Greg Kurz
From: Bharata B Rao Fix ppc64 arch specific dump code to work correctly for little endian guests. Signed-off-by: Bharata B Rao [ rebased on top of current master branch, Greg Kurz ] Signed-off-by: Greg Kurz --- target-ppc/arch_dump.c | 62

[Qemu-devel] [PATCH 4/4] ppc64 dump: Set the correct endianness in ELF dump header

2014-04-28 Thread Greg Kurz
From: Bharata B Rao Signed-off-by: Bharata B Rao [ use ppc_cpu_interrupts_big_endian(), Greg Kurz ] Signed-off-by: Greg Kurz --- target-ppc/arch_dump.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target-ppc/arch_dump.c b/target-ppc/arch_dump.c index

[Qemu-devel] [PATCH v2] target-ppc: ppc can be either endian

2014-04-29 Thread Greg Kurz
legacy virtio support and crash dump support as well. Suggested-by: Benjamin Herrenschmidt Suggested-by: Alexander Graf Signed-off-by: Greg Kurz --- Changes for v2: - the interrupts_big_endian method now takes a PowerPCCPU * arg - added the ppc_cpu_ prefix to the interrupts_big_endian_

Re: [Qemu-devel] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:16:51 +0200 Alexander Graf wrote: > > On 28.04.14 13:29, Greg Kurz wrote: > > From: Bharata B Rao > > > > Make DumpState and endian conversion routines available for arch-specific > > dump > > code by moving into dump.h. DumpState

Re: [Qemu-devel] [PATCH 3/4] target-ppc: ppc can be either endian

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:14:12 +0200 Alexander Graf wrote: > > On 28.04.14 14:47, Andreas Färber wrote: > > [fixing Bharata's address] > > > > Am 28.04.2014 13:29, schrieb Greg Kurz: > >> POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:35:46 +0200 Alexander Graf wrote: > > On 29.04.14 11:29, Greg Kurz wrote: > > On Tue, 29 Apr 2014 11:16:51 +0200 > > Alexander Graf wrote: > >> On 28.04.14 13:29, Greg Kurz wrote: > >>> From: Bharata B Rao > >>>

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 15:51:07 +0530 Bharata B Rao wrote: > On Tue, Apr 29, 2014 at 2:59 PM, Greg Kurz wrote: > > > On Tue, 29 Apr 2014 11:16:51 +0200 > > Alexander Graf wrote: > > > > > > On 28.04.14 13:29, Greg Kurz wrote: > > > > From: Bharata

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] target-ppc: ppc can be either endian

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:22:38 +0200 Alexander Graf wrote: > > On 29.04.14 11:15, Greg Kurz wrote: > > POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR > > special purpose register to decide the endianness to use when > > entering interrupt handlers. When run

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

2014-04-30 Thread Greg Kurz
On Tue, 29 Apr 2014 11:19:40 +0200 Alexander Graf wrote: > > On 28.04.14 13:29, Greg Kurz wrote: > > From: Bharata B Rao > > > > Fix ppc64 arch specific dump code to work correctly for little endian > > guests. > > > > Signed-off-by: Bharata B Rao >

[Qemu-devel] [PATCH v2 0/4] little-endian dump for ppc64

2014-04-30 Thread Greg Kurz
rrect endianness in ELF dump header Greg Kurz (1): target-ppc: ppc can be either endian dump.c | 239 ++- include/sysemu/dump-arch.h | 28 + include/sysemu/dump.h | 48 +++-- stubs/dump.c|

[Qemu-devel] [PATCH v2 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-30 Thread Greg Kurz
ubs/dump.c by creating a separate dump-arch.h. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao [ rebased on top of current master branch, added dump_ prefix and pass a DumpState * argument to helpers, Greg Kurz ] Signed-off-by: Greg Kurz --- Changes for v2: - add

[Qemu-devel] [PATCH v3 3/4] target-ppc: ppc can be either endian

2014-04-30 Thread Greg Kurz
legacy virtio support and crash dump support as well. Suggested-by: Benjamin Herrenschmidt Suggested-by: Alexander Graf Signed-off-by: Greg Kurz --- Changes in v3: - killed ppc_cpu_interrupts_big_endian() helper target-ppc/cpu-qom.h|1 + target-ppc/translate_init.c | 16

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

2014-04-30 Thread Greg Kurz
DumpState * argument to helpers, introduced NoteFuncArg, Greg Kurz ] Signed-off-by: Greg Kurz --- Changes for v2: - added dump_ prefix and pass a DumpState * argument to helpers - introduced NoteFuncArg target-ppc/arch_dump.c | 86 ++-- 1 file

[Qemu-devel] [PATCH v2 4/4] ppc64 dump: Set the correct endianness in ELF dump header

2014-04-30 Thread Greg Kurz
From: Bharata B Rao Signed-off-by: Bharata B Rao [ use PowerPCCPUClass::interrupts_big_endian(), Greg Kurz ] Signed-off-by: Greg Kurz --- Changes in v2: - use PowerPCCPUClass::interrupts_big_endian() target-ppc/arch_dump.c | 12 1 file changed, 8 insertions(+), 4 deletions

[Qemu-devel] [PATCH v3 0/4] little-endian dump for ppc64

2014-05-05 Thread Greg Kurz
st review. Cheers. --- Bharata B Rao (3): dump: Make DumpState and endian conversion routines available for arch-specific dump code ppc64-dump: Support dump for little endian ppc64 ppc64 dump: Set the correct endianness in ELF dump header Greg Kurz (1): target-ppc: ppc can

[Qemu-devel] [PATCH v3 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-05-05 Thread Greg Kurz
ubs/dump.c by creating a separate dump-arch.h. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao [ rebased on top of current master branch, renamed endian helpers to cpu_to_dump{16,32,64}, pass a DumpState * argument to endian helpers, Greg Kurz ] Signed-off-by: G

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

2014-05-05 Thread Greg Kurz
cpu_to_dump{16,32,64} endian helpers, Greg Kurz ] Reviewed-by: Alexander Graf Signed-off-by: Greg Kurz --- Changes in v3: - better taste with the endian helpers naming target-ppc/arch_dump.c | 82 +--- 1 file changed, 49 insertions(+), 33

[Qemu-devel] [PATCH v3 3/4] target-ppc: ppc can be either endian

2014-05-05 Thread Greg Kurz
legacy virtio support and crash dump support as well. Suggested-by: Benjamin Herrenschmidt Reviewed-by: Alexander Graf Signed-off-by: Greg Kurz --- No changes, resent in case it helps target-ppc/cpu-qom.h|1 + target-ppc/translate_init.c | 16 2 files changed

[Qemu-devel] [PATCH v2 4/4] ppc64 dump: Set the correct endianness in ELF dump header

2014-05-05 Thread Greg Kurz
From: Bharata B Rao Signed-off-by: Bharata B Rao [ use PowerPCCPUClass::interrupts_big_endian(), Greg Kurz ] Reviewed-by: Alexander Graf Signed-off-by: Greg Kurz --- No changes, resent in case it helps target-ppc/arch_dump.c | 12 1 file changed, 8 insertions(+), 4

Re: [Qemu-devel] [PATCH v3 3/4] target-ppc: ppc can be either endian

2014-05-07 Thread Greg Kurz
On Tue, 6 May 2014 19:37:22 +0100 Peter Maydell wrote: > On 5 May 2014 09:07, Greg Kurz wrote: > > POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR > > special purpose register to decide the endianness to use when > > entering interrupt handlers. When runnin

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

2014-05-07 Thread Greg Kurz
On Mon, 05 May 2014 13:04:35 +0200 Alexander Graf wrote: > On 05/05/2014 10:05 AM, Greg Kurz wrote: > > From: Bharata B Rao > > > > Fix ppc64 arch specific dump code to work correctly for little endian > > guests. > > > > We introduce a NoteFuncArg type

Re: [Qemu-devel] [PATCH v3 3/4] target-ppc: ppc can be either endian

2014-05-07 Thread Greg Kurz
On Wed, 7 May 2014 11:41:10 +0200 Alexander Graf wrote: > > > > Am 07.05.2014 um 11:26 schrieb Peter Maydell : > > > >> On 7 May 2014 10:09, Alexander Graf wrote: > >> I don't think we should overengineer hacks for legacy virtio. > > > > Agreed. So what's our final conclusion: virtio endiann

Re: [Qemu-devel] [PATCH v3 3/4] target-ppc: ppc can be either endian

2014-05-07 Thread Greg Kurz
On Wed, 07 May 2014 13:54:36 +0200 Alexander Graf wrote: > On 05/07/2014 12:19 PM, Greg Kurz wrote: > > On Wed, 7 May 2014 11:41:10 +0200 > > Alexander Graf wrote: > > > >> > >>> Am 07.05.2014 um 11:26 schrieb Peter Maydell : > >>> >

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 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 appropriat

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 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 > > should

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

2013-10-07 Thread Greg Kurz
ly here to have 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 register

[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 --- linux-headers/asm-powerpc/kvm.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h index

[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 --- hw/virtio/virtio.c |5

Re: [Qemu-devel] 9pfs troubles (was Re: [PATCH 1/4] hw/9pfs: fix error handing in local_ioc_getversion())

2014-03-17 Thread Greg Kurz
On Wed, 12 Mar 2014 13:34:44 +0200 "Michael S. Tsirkin" wrote: > On Fri, Feb 07, 2014 at 10:02:52AM +0100, Greg Kurz wrote: > > On Wed, 5 Feb 2014 23:31:11 +0200 > > "Michael S. Tsirkin" wrote: > > > On Tue, Feb 04, 2014 at 12:51:25PM +0530, Aneesh

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 1/3] target-ppc: introduce powerisa-207-server flag

2014-03-19 Thread Greg Kurz
; > Signed-off-by: Alexey Kardashevskiy > --- Reviewed-by: Greg Kurz > target-ppc/cpu.h| 2 ++ > target-ppc/translate_init.c | 3 ++- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h > index afab267..27a2c

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: reset SPRs on CPU reset

2014-03-19 Thread Greg Kurz
he guest kernel calls H_SET_MODE_RESOURCE_LE, we indeed have a window where the guest keeps the endianness from the previous kernel. In case the guest was running a LE kernel, when we reboot we end up running SLOF in a LE environment... but SLOF assumes BE and breaks. Reviewed-by: Greg Kurz An

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 2/3] spapr-hcall: fix little-endian resource handling in H_SET_MODE

2014-03-19 Thread Greg Kurz
> This adds a set_spr() helper to update an SPR in a CPU's context to avoid > possible races and makes use of it to change LPCR. > > Signed-off-by: Alexey Kardashevskiy > --- Reviewed-by: Greg Kurz > hw/ppc/spapr_hcall.c | 38 ++-

[Qemu-devel] [PATCH 0/2] vhost: support for cross endian

2015-02-20 Thread Greg Kurz
cross endian Greg Kurz (1): vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag hw/net/vhost_net.c | 19 --- hw/virtio/vhost.c | 10 +- include/hw/virtio/vhost.h |1 + linux-headers/linux/vhost.h |2 ++ 4 files changed, 12 insertions

[Qemu-devel] [PATCH 1/2] vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag

2015-02-20 Thread Greg Kurz
. Cc: Cédric Le Goater Signed-off-by: Greg Kurz --- hw/virtio/vhost.c | 10 +- include/hw/virtio/vhost.h |1 + linux-headers/linux/vhost.h |2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 5a12861

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

2015-02-20 Thread Greg Kurz
From: Cédric Le Goater revert 371df9f5e0f1 "vhost-net: disable when cross-endian" Signed-off-by: Cédric Le Goater Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c ind

Re: [Qemu-devel] [PATCH RFC v6 06/20] virtio: endianness checks for virtio 1.0 devices

2015-01-23 Thread Greg Kurz
On Thu, 22 Jan 2015 12:54:09 +1100 David Gibson wrote: > On Thu, Dec 11, 2014 at 02:25:08PM +0100, Cornelia Huck wrote: > > Add code that checks for the VERSION_1 feature bit in order to make > > decisions about the device's endianness. This allows us to support > > transitional devices. > > > >

[Qemu-devel] [PATCH] Fix name error in migration stream analyzation script

2015-02-07 Thread Greg Kurz
ipts/analyze-migration.py", line 250, in read self.file.readvar(n_valid * HASH_PTE_SIZE_64) NameError: global name 'HASH_PTE_SIZE_64' is not defined Signed-off-by: Greg Kurz --- scripts/analyze-migration.py |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH] QJSON: fix typo in author's email address

2015-02-07 Thread Greg Kurz
Signed-off-by: Greg Kurz --- qjson.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qjson.c b/qjson.c index b24..0cda269 100644 --- a/qjson.c +++ b/qjson.c @@ -4,7 +4,7 @@ * Copyright Alexander Graf * * Authors: - * Alexander Graf * * This work is licensed

Re: [Qemu-devel] [PULL 16/19] kvm: fix ioeventfd endianness on bi-endian architectures

2015-03-23 Thread Greg Kurz
On Wed, 18 Mar 2015 12:25:03 +0100 Paolo Bonzini wrote: > From: Greg Kurz > > KVM expects host endian values. Hosts that don't use the default endianness > need to negate the swap performed in adjust_endianness(). > > Suggested-by: Paolo Bonzini > Signed-off-b

[Qemu-devel] [PATCH] vhost: fix typo in vq_index description

2015-03-26 Thread Greg Kurz
Signed-off-by: Greg Kurz --- include/hw/virtio/vhost.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 71ef18f..88e1e56 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -36,7 +36,7

[Qemu-devel] [PATCH v2 0/3] vhost: set vring endianness for legacy virtio

2015-04-02 Thread Greg Kurz
friendly, and have thus been generated against MST's virtio-1.0 branch: https://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git Please note that some more work is needed though to have vhost_net working. It will me covered in another patchset. --- Greg Kurz (3): vhost: move cross-e

[Qemu-devel] [PATCH v2 1/3] vhost: move cross-endian check to vhost core

2015-04-02 Thread Greg Kurz
The cross-endian support isn't really a vhost_net affair: it affects any vhost device. This patch moves the checking to the vhost core code. While, we're here, let's give a meaningful name to the helper. Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 19 ---

[Qemu-devel] [PATCH v2 2/3] linux-headers: sync vhost.h

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

[Qemu-devel] [PATCH v2 3/3] vhost: set vring endianness for legacy virtio

2015-04-02 Thread Greg Kurz
detected. Of course, virtio 1.0 doesn't need this and will never ack the feature back to vhost. Signed-off-by: Greg Kurz --- hw/virtio/vhost.c | 46 +++-- include/hw/virtio/vhost.h |1 + 2 files changed, 37 insertions(+), 10 deletions(-)

Re: [Qemu-devel] [virtio] qemu vs vhost virtqueue consumer

2015-04-07 Thread Greg Kurz
On Tue, 7 Apr 2015 11:10:07 +0300 Catalin Vasile wrote: > I am using the virtio-net vhost-net model to make another virtio/vhost > solution. > I can't seem to find how does one make a virtqueue to only be consumed > by vhost when adding notifiers to vhost. > virtio_add_queue() seems to always as

Re: [Qemu-devel] [PATCH] include/qom/cpu.h: Add missing documentation for some CPUClass methods

2015-01-05 Thread Greg Kurz
: Peter Maydell > --- Thanks for this accurate description of virtio_is_big_endian. Acked-by: Greg Kurz > More informative phrasings for the elf note callbacks welcome... > > include/qom/cpu.h | 12 > 1 file changed, 12 insertions(+) > > diff --git a/include/qom/cpu.h

Re: [Qemu-devel] virtio_tswaps() vs virtio_ld/st_p()

2015-01-19 Thread Greg Kurz
On Mon, 19 Jan 2015 11:45:39 + Peter Maydell wrote: > On 19 January 2015 at 11:35, Stefan Hajnoczi wrote: > > What is the difference between the virtio_tswaps() and > > virtio_ld/st_p() families of functions? > > virtio_ld/st*_p() perform a load or store from memory pointed > to by the (hos

Re: [Qemu-devel] [PATCH 1/2] dataplane: move vring_more_avail() into vring.c

2015-01-21 Thread Greg Kurz
; built once per target. > > Signed-off-by: Stefan Hajnoczi > --- Yes, this function should definitely be declared in more appropriate scope. And BTW I remember Cornelia had the same concern in the virtio-1 serie. :) Reviewed-by: Greg Kurz > hw/virtio/dataplane/vring.c

Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 1/2] vhost: add VHOST_VRING_F_BYTESWAP flag

2014-11-03 Thread Greg Kurz
On Mon, 3 Nov 2014 16:29:31 +0100 Cornelia Huck wrote: > On Wed, 29 Oct 2014 09:42:09 +0100 > Cédric Le Goater wrote: > > > When the guest and the host have a different endian order, the data > > being accessed in the vring queues needs to be byteswapped. > > > > This patch adds a VHOST_VRING_

Re: [Qemu-devel] How to access guest memory from qemu device internal

2014-11-20 Thread Greg Kurz
On Thu, 20 Nov 2014 21:25:18 +0800 (GMT+08:00) Kaiyuan wrote: > Hello, all > > I added a custom device to qemu. This device is attached to sysbus by mmio > and has an address register in which device should access the guest memory > the register point to. > I write a bare-metal program that pa

Re: [Qemu-devel] [PATCH RFC v2 07/12] dataplane: allow virtio-1 devices

2014-11-25 Thread Greg Kurz
On Tue, 25 Nov 2014 14:24:18 +0100 Cornelia Huck wrote: > Handle endianness conversion for virtio-1 virtqueues correctly. > > Note that dataplane now needs to be built per-target. > > Signed-off-by: Cornelia Huck > --- We still have the same error as in your previous post... In file included

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