[Qemu-devel] [PATCH RFC 2/8] virtio-net: implement per-device migration calls

2014-05-19 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 e0dc544..d319ac2 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1263,7 +1263,6 @@ static

[Qemu-devel] [PATCH RFC 3/8] virtio-blk: implement per-device migration calls

2014-05-19 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 63d4ccd..a50be54 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -588,12

[Qemu-devel] [PATCH RFC 4/8] virtio-serial: implement per-device migration calls

2014-05-19 Thread Greg Kurz
Signed-off-by: Greg Kurz --- hw/char/virtio-serial-bus.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index b0f322a..ce336a0 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw

[Qemu-devel] [PATCH RFC 1/8] virtio: introduce device specific migration calls

2014-05-19 Thread Greg Kurz
In order to migrate virtio subsections, we need the device specific code to be called from the common migration code. This patch introduces load and save methods for this purpose. Suggested-by: Andreas Färber Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c |2 +- hw/char/virtio

[Qemu-devel] [PATCH RFC 5/8] virtio-balloon: implement per-device migration calls

2014-05-19 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 6d8ec72..a3a9ac1 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio

[Qemu-devel] [PATCH RFC 6/8] virtio-rng: implement per-device migration calls

2014-05-19 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

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

2014-05-19 Thread Greg Kurz
to be moved from virtio_load() to virtio_load_subsections() because of that. We enforce some paranoia by making the endianness a 3-value enum so that we can temporarily poison it while loading state. Signed-off-by: Greg Kurz --- exec.c |8 +--- hw/virtio/virtio-pci.c |

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

2014-05-19 Thread Greg Kurz
d-by: Alexander Graf Signed-off-by: Greg Kurz --- hw/virtio/virtio.c | 78 +++- 1 file changed, 77 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index cf87b44..7fbad29 100644 --- a/hw/virtio/virtio.c +++ b/hw/

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

2014-05-19 Thread Greg Kurz
On Mon, 19 May 2014 14:02:39 +0200 Alexander Graf wrote: > > On 19.05.14 10:38, Greg Kurz wrote: > > Hi, > > > > This patch set tries to address comments from the initial > > review. For this round, I have focused on two changes: > > - as suggested by Andr

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

2014-05-19 Thread Greg Kurz
On Mon, 19 May 2014 10:39:09 +0200 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 structures since they are target endian. &

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

2014-05-19 Thread Greg Kurz
On Mon, 19 May 2014 19:06:39 +0200 Andreas Färber wrote: > Am 19.05.2014 15:06, schrieb Greg Kurz: > > On Mon, 19 May 2014 10:39:09 +0200 > > Greg Kurz wrote: > >> diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > >> index 7fbad29..6578854 100644 > >&

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

2014-05-19 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 v4 0/4] little-endian dump for ppc64

2014-05-19 Thread Greg Kurz
et in case Alex feels like applying it right away :P Thanks. --- Bharata B Rao (3): dump: Make DumpState and endian conversion routines available for arch-specific dump code target-ppc: Support dump for little endian ppc64 target-ppc: Set the correct endianness in ELF dump heade

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

2014-05-19 Thread Greg Kurz
_dump{16,32,64} endian helpers, fix altivec support, Greg Kurz ] Reviewed-by: Alexander Graf Signed-off-by: Greg Kurz --- Changes since v3: Fixed AltiVec. target-ppc/arch_dump.c | 95 +++- 1 file changed, 62 insertions(+), 33 deletions(-) diff --

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

2014-05-19 Thread Greg Kurz
From: Bharata B Rao Signed-off-by: Bharata B Rao Reviewed-by: Alexander Graf Signed-off-by: Greg Kurz --- No change. target-ppc/arch_dump.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/target-ppc/arch_dump.c b/target-ppc/arch_dump.c index 5a3b40d

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

2014-05-19 Thread Greg Kurz
needed to write ELF headers using the kernel endianness. Suggested-by: Benjamin Herrenschmidt Reviewed-by: Alexander Graf Signed-off-by: Greg Kurz --- Changes since v3: updated description target-ppc/cpu-qom.h|1 + target-ppc/translate_init.c | 16 2 files

Re: [Qemu-devel] [Qemu-ppc] [PATCH 9/9] spapr_hcall: Add address-translation-mode-on-interrupt resource in H_SET_MODE

2014-05-21 Thread Greg Kurz
On Wed, 21 May 2014 16:20:28 +1000 Alexey Kardashevskiy wrote: > This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from > the H_SET_MODE, for POWER8 (PowerISA 2.07) only. > > This defines AIL flags for LPCR special register. > > This changes @excp_prefix according to the mode, takes e

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

2014-10-13 Thread Greg Kurz
On Mon, 6 Oct 2014 20:25:04 +0300 "Michael S. Tsirkin" wrote: > [...] > > BTW I reverted that patch, and to fix migration, I'm thinking > about applying the following patch on top of master. > Michael, I could force the migration issue with a rhel65 guest thanks to the following patch, applied

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

2014-10-13 Thread Greg Kurz
On Mon, 13 Oct 2014 12:01:07 +0300 "Michael S. Tsirkin" wrote: > On Mon, Oct 13, 2014 at 10:49:41AM +0200, Greg Kurz wrote: > > On Mon, 6 Oct 2014 20:25:04 +0300 > > "Michael S. Tsirkin" wrote: > > > [...] > > > > > > BTW I rever

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

2014-10-13 Thread Greg Kurz
On Mon, 13 Oct 2014 14:09:54 +0300 "Michael S. Tsirkin" wrote: > On Mon, Oct 13, 2014 at 10:49:41AM +0200, Greg Kurz wrote: > > On Mon, 6 Oct 2014 20:25:04 +0300 > > "Michael S. Tsirkin" wrote: > > > [...] > > > > > > BTW I rever

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

2014-10-15 Thread Greg Kurz
compat machine types, set PCI_COMMAND if DRIVER_OK > is set. > > As this is needed for 2.1 for both pc and ppc, move PC_COMPAT macros from pc.h > to a new common header. > > Cc: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --- Just a question, see below. Apart from

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

2014-10-20 Thread Greg Kurz
compat machine types, set PCI_COMMAND if DRIVER_OK > is set. > > As this is needed for 2.1 for both pc and ppc, move PC_COMPAT macros from pc.h > to a new common header. > > Reviewed-by: Greg Kurz > Tested-by: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --

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

2014-10-20 Thread Greg Kurz
VIRTIO_PCI_FLAG_BUS_MASTER_BUG > > so just drop it for latest machine type. > > - For compat machine types, set PCI_COMMAND if DRIVER_OK > > is set. > > > > As this is needed for 2.1 for both pc and ppc, move PC_COMPAT macros from > > pc.h > &

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

2014-10-21 Thread Greg Kurz
ER_OK. > > >>> > > >>> Rip out this code, and replace it: > > >>> - Modern QEMU doesn't need VIRTIO_PCI_FLAG_BUS_MASTER_BUG > > >>> so just drop it for latest machine type. > > >>> - For compat machine types, set

Re: [Qemu-devel] [PATCH] target-arm: Add guest cpu endianness determination for virtio in KVM ARM64

2014-10-28 Thread Greg Kurz
On Tue, 28 Oct 2014 12:08:01 +0530 Pranavkumar Sawargaonkar wrote: > This patch implements a fucntion pointer virtio_is_big_endian() > from "CPUClass" structure for arm64. > Function aarch64_cpu_virtio_endianness() is added to determine and > returns the guest cpu endianness to virtio. > This is

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

2014-10-28 Thread Greg Kurz
On Tue, 7 Oct 2014 16:40:03 +0200 Cornelia Huck wrote: > Handle endianness conversion for virtio-1 virtqueues correctly. > > Note that dataplane now needs to be built per-target. > It also affects hw/virtio/virtio-pci.c: In file included from include/hw/virtio/dataplane/vring.h:23:0,

Re: [Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-28 Thread Greg Kurz
On Tue, 7 Oct 2014 16:40:01 +0200 Cornelia Huck wrote: > Introduce a helper function to indicate whether a virtio device is > operating in legacy or virtio standard mode. > > It may be used to make decisions about the endianess of virtio accesses > and other virtio-1 specific changes, enabling

Re: [Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-31 Thread Greg Kurz
On Thu, 30 Oct 2014 19:02:01 +0100 Cornelia Huck wrote: > On Tue, 28 Oct 2014 16:40:18 +0100 > Greg Kurz wrote: > > > On Tue, 7 Oct 2014 16:40:01 +0200 > > Cornelia Huck wrote: > > > > > Introduce a helper function to indicate whether a virtio device is

Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu

2014-09-01 Thread Greg Kurz
On Sat, 30 Aug 2014 15:53:13 +0100 "Richard W.M. Jones" wrote: > I found out a few days ago that if you: > > (1) Open a qcow2 file that has lazy_refcounts = on and a backing file, and > > (2) Write lots of stuff, and > > (3) Kill qemu with SIGTERM [which I believed, maybe incorrectly, is a > "n

Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu

2014-09-01 Thread Greg Kurz
On Mon, 1 Sep 2014 15:19:28 +0100 "Richard W.M. Jones" wrote: > A test case, attached. > > Note that you have to look at the output of the final qemu-img info > command. In the case where it goes wrong, the 'backing file:' and > 'backing file format:' lines disappear completely. In the case wh

Re: [Qemu-devel] [PATCH v8 5/7] libqos: Added test case for configuration changes in virtio-blk test

2014-09-01 Thread Greg Kurz
On Mon, 1 Sep 2014 12:07:58 +0200 Marc Marí wrote: > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Marc Marí > --- Hi Marc, I gave it a try for various host/target combinations involving ppc64 and x86_64. Here is what I get: | x86_64 |ppc64| TARGET ++-

Re: [Qemu-devel] [PATCH v8 5/7] libqos: Added test case for configuration changes in virtio-blk test

2014-09-02 Thread Greg Kurz
On Mon, 1 Sep 2014 18:27:34 +0200 Marc Marí wrote: > El Mon, 1 Sep 2014 18:09:09 +0200 > Greg Kurz escribió: > > On Mon, 1 Sep 2014 12:07:58 +0200 > > Marc Marí wrote: > > > Reviewed-by: Stefan Hajnoczi > > > Signed-off-by: Marc Marí > > > --- &

[Qemu-devel] [PATCH] libqos: fix endianness bug in virtio-blk-test

2014-09-02 Thread Greg Kurz
The virtio block request header is in target cpu byte order, which may be different from the host cpu byte order. This patch allows the virtio-blk-test to run with a x86_64 (LE) target on a ppc64 (BE) host. Signed-off-by: Greg Kurz --- tests/virtio-blk-test.c | 18 ++ 1 file

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-02 Thread Greg Kurz
On Mon, 1 Sep 2014 18:52:48 +0800 Jun Li wrote: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li > --- > > The v2 do following change to modify some potential issue. > > +--

Re: [Qemu-devel] VFIO NATIVE_ENDIAN regions question

2014-09-07 Thread Greg Kurz
On Sat, 6 Sep 2014 12:49:47 +1000 Alexey Kardashevskiy wrote: > At the moment VFIO's BARs are NATIVE_ENDIAN. The idea is that since > it does not parse BARs content and just provides transport, it should > not do byte swaps, the guest does it anyway. That worked fine while > the host was big-end

Re: [Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-09 Thread Greg Kurz
ring for virtio PCI devices > > Old guests forgot to enable bus mastering, enable it > automatically on DRIVER_OK. > > Note: we should either back out the original patch from > stable or apply this one on top. > > Cc: qemu-sta...@nongnu.org > Reported-by: Greg Kurz &

Re: [Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-10 Thread Greg Kurz
On Wed, 10 Sep 2014 13:44:49 +0530 Nikunj A Dadhania wrote: > Greg Kurz writes: > > > On Mon, 8 Sep 2014 19:05:02 +0300 > > "Michael S. Tsirkin" wrote: > > > >> commit cc943c36faa192cd4b32af8fe5edb31894017d35 > >> pci: Use bus ma

Re: [Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-10 Thread Greg Kurz
On Wed, 10 Sep 2014 12:32:30 +0300 "Michael S. Tsirkin" wrote: > On Wed, Sep 10, 2014 at 01:44:49PM +0530, Nikunj A Dadhania wrote: > > Greg Kurz writes: > > > > > On Mon, 8 Sep 2014 19:05:02 +0300 > > > "Michael S. Tsirkin" wrote: > &g

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] Revert "vfio: Make BARs native endian"

2014-09-11 Thread Greg Kurz
On Tue, 9 Sep 2014 21:34:46 +1000 Alexey Kardashevskiy wrote: > This reverts commit c40708176a6b52b73bec14796b7c71b882ceb102. > > The idea not to swap bytes at all did not work out as MMIO interface > is defined as target host endian and it is always big-endian for PPC64 s/target host endian/t

Re: [Qemu-devel] [PATCH v2] virtio-pci: enable bus master for old guests

2014-09-11 Thread Greg Kurz
us mastering for virtio PCI devices > > Old guests forgot to enable bus mastering, enable it > automatically when driver discovers device. > > Cc: qemu-sta...@nongnu.org > Reported-by: Greg Kurz > Signed-off-by: Michael S. Tsirkin > --- > > OK, this should have better luc

[Qemu-devel] [PATCH] virtio-pci: enable bus master for old guests

2014-09-11 Thread Greg Kurz
so re-enable bus mastering after migration. Cc: qemu-sta...@nongnu.org Reported-by: Greg Kurz Signed-off-by: Michael S. Tsirkin [ old guest detection on DRIVER, squashed patch from Michael S. Tsirkin to re-enable bus mastering, Greg Kurz ] Tested-by: Cedric Le Goater Signed-off-by: Greg

Re: [Qemu-devel] [PATCH v5] virtio-pci: enable bus master for old guests

2014-09-11 Thread Greg Kurz
us mastering for virtio PCI devices. For the same reason, > rhel6.[56] ppc64 guests cannot boot on a virtio-blk disk anymore. > > Old guests forgot to enable bus mastering, enable it automatically on > DRIVER (guests use some devices before DRIVER_OK). > > Reported-by: Greg Kurz >

[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
ce a per-device needs_byteswap flag, add VirtIODevice * arg to virtio helpers, rename virtio_get_byteswap to virtio_legacy_get_byteswap, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/virtio/virtio.c|5 + include/hw/virtio/virtio-access.h | 139 +++

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

2014-03-28 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ use per-device needs_byteswap flag, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/char/virtio-serial-bus.c | 39 +++ 1 file changed, 23 insertions(+), 16 deletions(-) diff

[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 Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ use per-device needs_byteswap flag, 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

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

2014-03-28 Thread Greg Kurz
From: Rusty Russell Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ use per-device needs_byteswap flag, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/net/virtio-net.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/net/virtio-net.c b

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

2014-03-28 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 [ use per-device needs_byteswap flag, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c | 40

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

2014-03-28 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 [ use per-device needs_byteswap flag, fix missing tswap32 in virtio_scsi_push_event(), Greg Kurz ] Signed-off-by: Greg Kurz --- hw

[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 --- 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..c758500 100644 --- a

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

2014-03-28 Thread Greg Kurz
: Benjamin Herrenschmidt Signed-off-by: Rusty Russell [ rename virtio_get_byteswap to virtio_legacy_get_byteswap, support both LE and BE host, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- Alex, Welcome back ! :) Changes since v3: - rename the helper according to v6

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

2014-03-28 Thread Greg Kurz
, Greg Kurz ] Signed-off-by: Greg Kurz --- hw/virtio/virtio.c | 93 ++-- 1 file changed, 53 insertions(+), 40 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 24b565f..1877b46 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio

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 wrote: > On Fri, 28 Mar 2014 11:57:17 +0100 > Greg Kurz wrote: > > > From: Rusty Russell > > > > virtio data structures are defined as "target endian", which assumes > > that's a fixed value. In

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 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 > [ use per-device needs_byteswap flag, >

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 wrote: > Am 28.03.2014 18:13, schrieb Greg Kurz: > > On Fri, 28 Mar 2014 11:57:56 +0100 > > Greg Kurz 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 wrote: > On Fri, 28 Mar 2014 11:57:25 +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 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 wrote: > On 28 March 2014 17:37, Greg Kurz 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 we can a

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 wrote: > On 28 March 2014 18:04, Greg Kurz 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 envision we could end

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 wrote: > Am 28.03.2014 11:57, schrieb Greg Kurz: > > From: Rusty Russell > > > > virtio data structures are defined as "target endian", which assumes > > that's a fixed value. In fact, that actually m

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 wrote: > On 03/28/2014 11:57 AM, Greg Kurz wrote: > > From: Rusty Russell > > > > virtio data structures are defined as "target endian", which assumes > > that's a fixed value. In fact, that actually m

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 wrote: > Am 31.03.2014 18:24, schrieb Alexander Graf: > > On 03/28/2014 11:57 AM, Greg Kurz wrote: > >> From: Rusty Russell > >> > >> This is based on a simpler patch by Anthony Liguouri, which only handled &g

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

2014-04-14 Thread Greg Kurz
: TCP 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 ta

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

2014-04-14 Thread Greg Kurz
dependant, migration support, Greg Kurz ] Cc: Cédric Le Goater Signed-off-by: Greg Kurz --- Changes since v6: - merge the virtio_needs_byteswap() helper from v6 and existing virtio_is_big_endian() - virtio-pci: now supports endianness changes - virtio-access.h fixes

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

2014-04-14 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. Signed-off-by: Rusty Russell [ add VirtIODevice * argument to most helpers, Greg Kurz

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

2014-04-14 Thread Greg Kurz
From: Rusty Russell virtio-net gets target independant. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, TCP checksums fix by Cédric Le Goater, target independant, Greg Kurz ] Cc: Cédric Le Goater Signed-off-by: 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 This one can't get target independant because of TARGET_PAGE_SIZE. 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 ch

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

2014-04-14 Thread Greg Kurz
From: Rusty Russell Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. virtio-blk gets target independant. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, target independant, Greg Kurz ] Signed-off-by: Greg

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

2014-04-14 Thread Greg Kurz
Le Goater, target independant, Greg Kurz ] Cc: Cédric Le Goater Signed-off-by: Greg Kurz --- Changes since v6: - target independant hw/scsi/Makefile.objs |2 +- hw/scsi/virtio-scsi.c | 38 -- 2 files changed, 21 insertions(+), 19 deletions

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

2014-04-14 Thread Greg Kurz
From: Rusty Russell virtio-serial-bus gets platform independant. Signed-off-by: Rusty Russell Reviewed-by: Anthony Liguori [ pass VirtIODevice * to memory accessors, platform independant, Greg Kurz ] Signed-off-by: Greg Kurz --- Changes since v6: - target independant hw/char

[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 --- Changes since v6: - target independant hw/9pfs/Makefile.objs |3 +-- hw/9pfs/virtio-9p-device.c |3 ++- 2 files changed, 3

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

2014-04-14 Thread Greg Kurz
Herrenschmidt Signed-off-by: Rusty Russell [ re-use the existing virito_is_big_endian() helper, check we have LPCR, Greg Kurz ] Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- Changes since v5: - merged with the existing virtio_is_big_endian() helper - ensure cpu has LPCR exec.c

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 wrote: > > On 14.04.14 13:58, Greg Kurz wrote: > > From: Rusty Russell > > > > virtio data structures are defined as "target endian", which assumes > > that's a fixed value. In fact, that actuall

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 wrote: > > On 14.04.14 13:58, Greg Kurz wrote: > > From: Rusty Russell > > > > virtio data structures are defined as "target endian", which assumes > > that's a fixed value. In fact, that actuall

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

2014-04-14 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 > > >>>>> > > >>

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 wrote: > > On 14.04.14 14:50, Greg Kurz wrote: > > On Mon, 14 Apr 2014 14:22:36 +0200 > > Alexander Graf wrote: > > > >> On 14.04.14 13:58, Greg Kurz wrote: > >>> From: Rusty Russell > >>

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

2014-04-14 Thread Greg Kurz
:03PM +0200, Alexander Graf wrote: > >>>> On 14.04.14 13:58, Greg Kurz wrote: > >>>>> From: Rusty Russell > >>>>> > >>>>> virtio data structures are defined as "target endian", which assumes > >>>>> that&#

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

2014-04-15 Thread Greg Kurz
:20PM +0200, Alexander Graf wrote: > >>>> 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: > >>>>>>>

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 wrote: > On 04/15/2014 10:40 AM, Greg Kurz wrote: > > On Mon, 14 Apr 2014 15:08:23 +0200 > > Alexander Graf wrote: > > > >> On 14.04.14 14:55, Michael S. Tsirkin wrote: > >>> On Mon, Apr 14, 2014

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

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

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

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

2014-01-06 Thread Greg Kurz
ter() (which is going to be fixed > by a separate patch). > > Signed-off-by: Alexey Kardashevskiy Reviewed-by: Greg Kurz > --- > target-ppc/translate_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-ppc/translate_init.c b/target-ppc

[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 --- Along with Alexey's fixes for the get/put one reg API, I could drop the target-ppc/

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

2014-01-17 Thread Greg Kurz
-off-by: Rusty Russell Signed-off-by: Greg Kurz Reviewed-by: Alexander Graf --- target-ppc/misc_helper.c | 12 1 file changed, 12 insertions(+) diff --git a/target-ppc/misc_helper.c b/target-ppc/misc_helper.c index 616aab6..e8fc8a3 100644 --- a/target-ppc/misc_helper.c +++ b

Re: [Qemu-devel] [Qemu-ppc] [PATCH V9 2/5] target-ppc: Fix htab_mask calculation

2014-02-12 Thread Greg Kurz
On Wed, 12 Feb 2014 00:16:25 +0530 "Aneesh Kumar K.V" wrote: > > Hi Greg, > > can you try the below patch and see if it fix the TCG mode failure ? > > -aneesh > Hi Aneesh, The patche fixes the issue indeed. Maybe a helper could be factored out since we have 4 times the same magic formula :)

[Qemu-devel] [PATCH] target-ppc: fix 32 bit build break in the page table lookup code

2014-02-12 Thread Greg Kurz
page table lookup code. Signed-off-by: Greg Kurz --- hw/ppc/spapr_hcall.c|6 +++--- target-ppc/kvm.c| 10 +- target-ppc/kvm_ppc.h| 10 +- target-ppc/mmu-hash64.c | 28 +++- target-ppc/mmu-hash64.h | 25

[Qemu-devel] [PATCH] target-ppc: fix warn_unused_result build break with in-kernel HTAB support

2014-02-12 Thread Greg Kurz
_buf)); ^ Even though nothing is done for the moment if kvm_htab_write() fails, we obviously need to be explicit. Let's add an *empty* return path to please gcc. Signed-off-by: Greg Kurz --- target-ppc/kvm.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) dif

Re: [Qemu-devel] [Qemu-ppc] [PATCH V10] target-ppc: Fix htab_mask calculation

2014-02-13 Thread Greg Kurz
ab and if > found true, we don't need to update sdr1 > > Signed-off-by: Aneesh Kumar K.V Reviewed-by: Greg Kurz > --- > Changes from V9: > * Fix TCG breakage > Alex, This patch is a complete replacement for commit 1df2d6d900a9 in your ppc-next branch. Please apply

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: fix 32 bit build break in the page table lookup code

2014-02-13 Thread Greg Kurz
On Thu, 13 Feb 2014 15:53:16 +0100 Alexander Graf wrote: > > On 13.02.2014, at 04:00, Aneesh Kumar K.V > wrote: > > > Greg Kurz writes: > > > >> The 396bb9874 commit reworked page table lookup to support kvm. > >> Unfortunately this breaks 32 bit bui

Re: [Qemu-devel] [PATCH 0/7] virtio endian-ambivalent target fixes.

2014-02-14 Thread Greg Kurz
On Thu, 17 Oct 2013 14:23:35 +1030 Rusty Russell wrote: > This is a re-transmit of the core of the virtio endian code. Since > there seems to be some interest in ARM BE virtio, I've separated this from > the direct problem I was solving: PowerPC LE. > > Please apply! > Rusty. > Hi, This serie

Re: [Qemu-devel] [Qemu-ppc] [PATCH V10] target-ppc: Fix htab_mask calculation

2014-02-15 Thread Greg Kurz
On Fri, 14 Feb 2014 15:42:49 +0100 Alexander Graf wrote: > [...] > >> -M mac99 also fails miserably. It almost looks as if the mask cuts off > >> some bits, but please investigate this yourself. I'll remove the patch > >> from the queue meanwhile. > > > > Sigh, this whole series is just way too b

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

2014-02-17 Thread Greg Kurz
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/2014-01/msg00380.html All patches have been rebased on the current ppc-next head (72c798d7dccc). To e

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

2014-02-17 Thread Greg Kurz
tab_lookup() that caused TCG to fail, Greg Kurz ] Signed-off-by: Aneesh Kumar K.V Signed-off-by: Greg Kurz Signed-off-by: Alexander Graf --- hw/ppc/spapr.c |8 +++- hw/ppc/spapr_hcall.c | 19 +++ target-ppc/cpu.h |1 + target-ppc/kvm.c

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

2014-02-17 Thread Greg Kurz
olded fix for the "warn_unused_result" build break in kvmppc_hash64_write_pte(), Greg Kurz ] Signed-off-by: Aneesh Kumar K.V Signed-off-by: Greg Kurz Signed-off-by: Alexander Graf --- target-ppc/kvm.c| 36 target-ppc/kvm_

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

2014-02-17 Thread Greg Kurz
0xc0098660 (gdb) [ folded fixes for 32 bit build (casts!), ldq_phys() API change, Greg Kurz Signed-off-by: Greg Kurz Signed-off-by: Alexander Graf --- hw/ppc/spapr.c |1 + hw/ppc/spapr_hcall.c| 50 +++--- target-ppc/kvm.c| 53

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

2014-02-17 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 [ ldq_phys() API change, Greg Kurz ] Signed-off-by: Aneesh Kumar K.V Signed-off-by: Greg Kurz Signed-off-by: Alexander Graf --- hw/ppc

[Qemu-devel] [PATCH 0/8] virtio endian-ambivalent target fixes (rebased)

2014-02-18 Thread Greg Kurz
e is a rebased patchset. Only the two first patches ("virtio_get_byteswap:" and "virtio:") had to be updated actually. FWIW, this the very same patchset I use, along with some ppc64 specific enablement code, to have functionnal ppc64 LE guests. --- Greg Kurz (1): hw/9pfs/vir

[Qemu-devel] [PATCH 3/8] hw/net/virtio-net: 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/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/hw/net/virtio-net.c +++ b/hw

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

2014-02-18 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 --- hw/scsi/virtio-scsi.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/hw/scsi/

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

2014-02-18 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 --- hw/block/virtio-blk.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/blo

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

2014-02-18 Thread Greg Kurz
. This is called at device reset time (which is done before any driver is loaded) since it may involve a system call to get the status when running under kvm. [ fixed checkpatch.pl error with the virtio_byteswap initialisation, ldq_phys() API change, Greg Kurz ] Signed-off-by: Rusty Russell

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