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

2014-11-26 Thread Greg Kurz
On Wed, 26 Nov 2014 18:28:38 +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 Build is ok now. Acked-by: Greg Kurz > --- > hw/b

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

2014-11-26 Thread Greg Kurz
On Wed, 26 Nov 2014 18:28:36 +0100 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] Fix for crash after migration in virtio-rng on bi-endian targets

2014-11-27 Thread Greg Kurz
t; This commit is indeed completely wrong: the load callback only makes sense when there's something to read which is obviously not the case here... This is definitely post load stuff :-\ Thanks ! :) Reviewed-by: Greg Kurz -- Greg > Did you try this on x86 guests, or with multiple

Re: [Qemu-devel] [PATCH] Fix for crash after migration in virtio-rng on bi-endian targets

2014-11-28 Thread Greg Kurz
On Fri, 28 Nov 2014 09:14:46 + Peter Maydell wrote: > On 27 November 2014 at 09:26, Markus Armbruster wrote: > > David Gibson writes: > > > >> VirtIO devices now remember which endianness they're operating in in order > >> to support targets which may have guests of either endianness, such a

Re: [Qemu-devel] [PATCH v3 1/7] Move target_words_bigendian() prototype to exec-all.h

2014-12-15 Thread Greg Kurz
On Fri, 12 Dec 2014 16:20:16 -0200 Eduardo Habkost wrote: > On Wed, Dec 10, 2014 at 07:44:04PM +, Peter Maydell wrote: > > On 10 December 2014 at 19:26, Eduardo Habkost wrote: > > > Signed-off-by: Eduardo Habkost > > > --- > > > exec.c | 1 - > > > hw/virtio/virtio.c

[Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Greg Kurz
not. Reported-by: Cédric Le Goater Suggested-by: Michael Roth Signed-off-by: Greg Kurz --- I guess it is also a fix for virtio-1 but I didn't check. hw/virtio/virtio-pci.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/vi

Re: [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Greg Kurz
On Wed, 11 Mar 2015 21:06:05 +0100 "Michael S. Tsirkin" wrote: > On Wed, Mar 11, 2015 at 07:04:38PM +0100, Greg Kurz wrote: > > vhost is seriously broken with ppc64le guests, even in the supposedly > > supported case where the host is ppc64le and we don't

Re: [Qemu-devel] [Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-11 Thread Greg Kurz
On Thu, 12 Mar 2015 09:18:38 +1100 Benjamin Herrenschmidt wrote: > On Wed, 2015-03-11 at 23:03 +0100, Greg Kurz wrote: > > > /* The host notifier will be swapped in adjust_endianness() according to the > > * target default endianness. We need to negate this swap if the dev

Re: [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures

2015-03-13 Thread Greg Kurz
On Thu, 12 Mar 2015 17:25:15 +0100 Paolo Bonzini wrote: > > > On 12/03/2015 08:08, Michael S. Tsirkin wrote: > > But common header format is simple, it's always LE. > > It does not depend on target. > > To me this looks like a bug in memory_region_add_eventfd, > > it should do the right thing de

[Qemu-devel] [PATCH 2/2] memory: fix the eventfd data endianness according to the host

2015-03-13 Thread Greg Kurz
se of TARGET_WORDS_BIGENDIAN). It doesn't change functionnality for fixed endian architectures (i.e. doesn't break x86). Reported-by: Cédric Le Goater Signed-off-by: Greg Kurz --- memory.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/memory.c b

[Qemu-devel] [PATCH 1/2] memory: make adjust_endianness() generic

2015-03-13 Thread Greg Kurz
This patch just moves the decision to swap up to the callers. It changes no functionnality and will allow a subsequent patch to perform host endianness based swapping. Signed-off-by: Greg Kurz --- memory.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH 2/2] memory: fix the eventfd data endianness according to the host

2015-03-13 Thread Greg Kurz
On Fri, 13 Mar 2015 12:06:06 +0100 Paolo Bonzini wrote: > > > On 13/03/2015 09:11, Greg Kurz wrote: > > The data argument is a host entity. It is not related to the target > > endianness. Let's introduce a HOST_WORDS_BIGENDIAN based helper for > > that. > &g

[Qemu-devel] [PATCH] kvm: fix ioeventfd endianness on bi-endian architectures

2015-03-13 Thread 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-by: Greg Kurz --- kvm-all.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff

Re: [Qemu-devel] [PATCH] kvm: fix ioeventfd endianness on bi-endian architectures

2015-03-17 Thread Greg Kurz
On Sun, 15 Mar 2015 10:14:18 +0100 Paolo Bonzini wrote: > > > On 13/03/2015 22:30, Patchew Tool wrote: > > This series passed Patchew automatic testing, but there are some warnings. > > > > Find the log fragments below, or open the following URL to see the full log: > > > > http://qemu.patche

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

2014-05-29 Thread Greg Kurz
On Tue, 27 May 2014 17:01:38 +0200 Paolo Bonzini wrote: > Il 14/05/2014 17:42, Greg Kurz ha scritto: > > +{ .name = "virtio/is_big_endian", > > + .version_id = 1, > > + .save = virtio_save_device_endian, > > + .load = virtio_load_device

Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 02/29] target-ppc: Merge 970FX and 970MP into a single 970 class

2014-06-03 Thread Greg Kurz
On Tue, 3 Jun 2014 19:27:37 +1000 Alexey Kardashevskiy wrote: > The differences between classes were: > 1. SLB size, was 32 for 970 and 64 for others, should be 64 for all; > 2. check_pow() callback, HID0 format is the same so should be the same > 0x01C0 which means "deep nap", "doze" and "n

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

2014-06-03 Thread Greg Kurz
On Tue, 3 Jun 2014 19:28:04 +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] [Qemu-ppc] [PATCH v3 0/4] cpus: Add generic NMI support

2014-06-04 Thread Greg Kurz
On Wed, 04 Jun 2014 11:50:53 +0200 Alexander Graf wrote: > > On 04.06.14 11:47, Peter Maydell wrote: > > On 4 June 2014 10:39, Paolo Bonzini wrote: > >> It's a kind of "emergency button" on real machines. On PCs it sends an NMI > >> and this results in some kind of crash dump if the OS is conf

[Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-28 Thread Greg Kurz
as already passed on the command line The default device is created at reset time to ensure devices specified on the command line have been created. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 17 + hw/ppc/spapr_rng.c |2 +- target-ppc/kvm.c |9 +

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-28 Thread Greg Kurz
Cc'ing qemu-ppc@ On Mon, 28 Sep 2015 12:13:47 +0200 Greg Kurz wrote: > A recent patch by Thomas Huth brought a new spapr-rng pseudo-device to > provide high-quality random numbers to guests. The device may either be > backed by a "RngBackend" or the in-kernel implem

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

2015-09-29 Thread Greg Kurz
-off-by: Greg Kurz --- v2: more detailed change log --- hw/9pfs/virtio-9p-device.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 93a407c45926..e3abcfaffb2a 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-30 Thread Greg Kurz
On Tue, 29 Sep 2015 15:01:09 +1000 David Gibson wrote: > On Mon, Sep 28, 2015 at 12:13:47PM +0200, Greg Kurz wrote: > > A recent patch by Thomas Huth brought a new spapr-rng pseudo-device to > > provide high-quality random numbers to guests. The device may either be > > ba

Re: [Qemu-devel] [PATCH] spapr: add a default rng device

2015-09-30 Thread Greg Kurz
On Wed, 30 Sep 2015 11:10:52 +0200 Thomas Huth wrote: > On 30/09/15 10:33, Greg Kurz wrote: > > On Tue, 29 Sep 2015 15:01:09 +1000 > > David Gibson wrote: > > > >> On Mon, Sep 28, 2015 at 12:13:47PM +0200, Greg Kurz wrote: > >>> A recent patch by

[Qemu-devel] [PATCH] ppc: drop useless register sync

2015-10-01 Thread Greg Kurz
Since msr is always synced, no need to read it from KVM. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c |2 -- 1 file changed, 2 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index b54147350d88..49611e8e41fe 100644 --- a/target-ppc

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

2015-10-02 Thread Greg Kurz
On Tue, 29 Sep 2015 14:06:43 +0200 Greg Kurz wrote: > In a cross-endian setup, the virtio-9p device has state in @device_endian. It > must be migrated. This patch just adds the minimal support to live migrate > generic virtio subsections where @device_endian is handled. > > P

Re: [Qemu-devel] [PATCH] ppc: drop useless register sync

2015-10-02 Thread Greg Kurz
On Fri, 2 Oct 2015 16:03:56 +0200 Thomas Huth wrote: > On 01/10/15 18:56, Greg Kurz wrote: > > Since msr is always synced, no need to read it from KVM. > > Out of curiosity: Where does that happen? > It does not happen in fact... and this patch indeed breaks LE guests... Not

[Qemu-devel] [PATCH 2/3] virtio-9p: add unrealize handler

2015-10-05 Thread Greg Kurz
above issues. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-device.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 93a407c45926..ed133c40493a 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c

[Qemu-devel] [PATCH 1/3] virtio-9p-coth: add release function and fix init error path

2015-10-05 Thread Greg Kurz
This is preliminary work to support hotplug/unplug of virtio-9p-device. Signed-off-by: Greg Kurz --- hw/9pfs/virtio-9p-coth.c | 13 + hw/9pfs/virtio-9p-coth.h |1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/virtio-9p-coth.c b/hw/9pfs/virtio-9p

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

2015-10-05 Thread Greg Kurz
This series brings both hoplug and migration support to virtio-9p devices. Patch 1 is preliminary work. Patch 2 brings hotplug and fixes a QEMU crash. Patch 3 brings migration (of course it still depends on the 9p to be unmounted) --- Greg Kurz (3): virtio-9p-coth: add release function

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

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

Re: [Qemu-devel] [PATCH 2/3] virtio-9p: add unrealize handler

2015-10-06 Thread Greg Kurz
On Tue, 6 Oct 2015 09:09:14 +0100 Stefan Hajnoczi wrote: > On Mon, Oct 05, 2015 at 11:07:23AM +0200, Greg Kurz wrote: > > If the user tries to hot unplug a virtio-9p device, it seems to succeed but > > in fact: > > - virtio-9p coroutines thread pool and async queue are leak

Re: [Qemu-devel] [PATCH 1/3] virtio-9p-coth: add release function and fix init error path

2015-10-06 Thread Greg Kurz
On Mon, 05 Oct 2015 11:07:16 +0200 Greg Kurz wrote: > This is preliminary work to support hotplug/unplug of virtio-9p-device. > > Signed-off-by: Greg Kurz > --- Hmm... still not good. Since this is shared by all virtio-9p devices, we need at least a refcount. > hw/9pfs/v

Re: [Qemu-devel] [PATCH 2/3] virtio-9p: add unrealize handler

2015-10-09 Thread Greg Kurz
On Wed, 07 Oct 2015 14:20:28 +0530 "Aneesh Kumar K.V" wrote: > Stefan Hajnoczi writes: > > > On Mon, Oct 05, 2015 at 11:07:23AM +0200, Greg Kurz wrote: > >> If the user tries to hot unplug a virtio-9p device, it seems to succeed but > >> in fact: >

Re: [Qemu-devel] [PATCH 2/3] virtio-9p: add unrealize handler

2015-10-09 Thread Greg Kurz
On Fri, 9 Oct 2015 10:36:56 +0300 "Michael S. Tsirkin" wrote: > On Fri, Oct 09, 2015 at 09:23:49AM +0200, Greg Kurz wrote: > > On Wed, 07 Oct 2015 14:20:28 +0530 > > "Aneesh Kumar K.V" wrote: > > > > > Stefan Hajnoczi writes: > > >

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

2015-10-12 Thread Greg Kurz
post is the introduction of an unplug blocker (patch 2/5 and 3/5). I also reworked the series so that some fixes appear in more appropriate patches (see individual changelogs). Please comment. -- Greg --- Greg Kurz (5): virtio-9p-coth: fix init function qdev: add the HotUnpluggable

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

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

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

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

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

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

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

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

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

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

Re: [Qemu-devel] [PATCH V3] hw/virtio: Add PCIe capability to virtio devices

2015-11-02 Thread Greg Kurz
On Thu, 29 Oct 2015 13:56:28 +0200 Marcel Apfelbaum wrote: > The virtio devices are converted to PCI-Express > if they are plugged into a PCI-Express bus and > the 'modern' protocol is enabled. > > Devices plugged directly into the Root Complex as > Integrated Endpoints remain PCI. > > Signed-o

Re: [Qemu-devel] [PATCH 01/11] snapshot: create helper to test that block drivers supports snapshots

2015-11-04 Thread Greg Kurz
| bdrv_is_read_only(bs)) { > -continue; > -} > - > -if (!bdrv_can_snapshot(bs)) { > -monitor_printf(mon, "Device '%s' is writable but does not > support snapshots.\n", > - bdrv_get_device_name(bs)); > -return; > -} > +if (!bdrv_all_can_snapshot(&bs)) { > +monitor_printf(mon, "Device '%s' is writable but does not " > + "support snapshots.\n", bdrv_get_device_name(bs)); > +return; > } > > bs = find_vmstate_bs(); Reviewed-by: Greg Kurz

Re: [Qemu-devel] [PATCH 02/11] snapshot: return error code from bdrv_snapshot_delete_by_id_or_name

2015-11-04 Thread Greg Kurz
On Wed, 4 Nov 2015 20:19:33 +0300 "Denis V. Lunev" wrote: > this will make code better in the next patch > This changelog is not very useful. IMHO this calls for squashing this patch into the next one: then we clearly see how the return value is used and why the code is better. > Signed-off-b

Re: [Qemu-devel] [PATCH 04/11] snapshot: create bdrv_all_goto_snapshot helper

2015-11-05 Thread Greg Kurz
On Wed, 4 Nov 2015 20:19:35 +0300 "Denis V. Lunev" wrote: > to switch to snapshot on all loaded block drivers. > > The patch also ensures proper locking. > > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Stefan Hajnoczi > CC: Kevin Wolf > -

[Qemu-devel] [PATCH] virtio-net: use the backend cross-endian capabilities

2015-11-06 Thread Greg Kurz
and will be addressed in a subsequent patch. Signed-off-by: Greg Kurz --- hw/net/virtio-net.c| 35 +-- include/hw/virtio/virtio-net.h |1 + 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index a

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

2015-11-06 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now configured by the core virtio-net code. We simply fall back on full emulation if the net backend cannot support the requested endianness for vnet headers. Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 33

Re: [Qemu-devel] [PATCH] virtio-net: use the backend cross-endian capabilities

2015-11-09 Thread Greg Kurz
On Fri, 06 Nov 2015 18:45:04 +0100 Greg Kurz wrote: > When running a fully emulated device in cross-endian conditions, including > a virtio 1.0 device offered to a big endian guest, we need to fix the vnet > headers. This is currently handled by the virtio_net_hdr_swap() function >

[Qemu-devel] [PATCH v2 1/2] virtio-net: use the backend cross-endian capabilities

2015-11-09 Thread Greg Kurz
also tries to configure net backends. This will be no more needed and will be addressed in a subsequent patch. Signed-off-by: Greg Kurz --- v2: - introduced virtio_net_needs_hdr_swap() to consolidate the logic in one place --- hw/net/virtio-net.c| 43

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

2015-11-09 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now configured by the core virtio-net code. We simply fall back on full emulation if the net backend cannot support the requested endianness for vnet headers. Signed-off-by: Greg Kurz --- v2: - display unsupported

[Qemu-devel] [PATCH v2 0/2] virtio-net/vhost-net: share cross-endian enablement

2015-11-09 Thread Greg Kurz
full emulation can now benefit from it. Of course we keep the current hack to fall back on when the backend doesn't support cross-endian. --- Greg Kurz (2): virtio-net: use the backend cross-endian capabilities Revert "vhost-net: tell tap backend about the vnet endianness&

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

2015-11-09 Thread Greg Kurz
it is clear it is optimized for fast paths. Signed-off-by: Greg Kurz --- include/hw/virtio/virtio-access.h | 43 - 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index ba15306

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

2015-11-09 Thread Greg Kurz
This series tries to rework cross-endian helpers for better clarity. It does not change behaviour, except perhaps patch 3/3 even if I could not measure any performance gain. --- Greg Kurz (3): virtio: move cross-endian helper to vhost vhost: move virtio 1.0 check to cross-endian

[Qemu-devel] [PATCH 1/3] virtio: move cross-endian helper to vhost

2015-11-09 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Signed-off-by: Greg Kurz --- hw/virtio/vhost.c | 17 +++-- include/hw/virtio/virtio-access.h |

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

2015-11-09 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |9 + 1 file chang

Re: [Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Greg Kurz
excessive as a > minimum response len is currently 300 bytes and the patch checks that > at least 3 are available. > > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > hw/ipmi/ipmi_bmc_sim.c | 140 > +++-- >

Re: [Qemu-devel] [PATCH v2 3/9] ipmi: replace *_MAXCMD defines

2016-01-22 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:48 +0100 Cédric Le Goater wrote: > ARRAY_SIZE() is simple to use and removes the need to pre-define > the size of the command arrays. > > Signed-off-by: Cédric Le Goater > --- Much nicer ! Reviewed-by: Greg Kurz > hw/ipmi/i

Re: [Qemu-devel] [PATCH v2 4/9] ipmi: introduce a struct ipmi_sdr_compact

2016-01-22 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:49 +0100 Cédric Le Goater wrote: > Currently, sdr attributes are identified using byte offsets and this > can be a bit confusing. > > This patch adds a struct ipmi_sdr_compact conforming to the IPMI specs > and replaces byte offsets with names. It also introduces and us

Re: [Qemu-devel] [PATCH v2 5/9] ipmi: fix SDR length value

2016-01-22 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:50 +0100 Cédric Le Goater wrote: > The IPMI BMC simulator populates the SDR table with a set of initial > SDRs. The length of each SDR is taken from the record itself (byte 4) > which does not include the size of the header. But, the full length > (header + data) is requi

Re: [Qemu-devel] [PATCH v2 6/9] ipmi: add get and set SENSOR_TYPE commands

2016-01-22 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:51 +0100 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > Acked-by: Corey Minyard > --- Reviewed-by: Greg Kurz Just two nits below. > hw/ipmi/ipmi_bmc_sim.c | 45 - > 1 file changed, 44 i

Re: [Qemu-devel] [PATCH v2 7/9] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-22 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:52 +0100 Cédric Le Goater wrote: > This is a simulator. Just return an unknown cause (0). > > Signed-off-by: Cédric Le Goater > Acked-by: Corey Minyard > --- Reviewed-by: Greg Kurz > hw/ipmi/ipmi_bmc_sim.c | 16 +++- > 1 file c

Re: [Qemu-devel] [PATCH v2 8/9] ipmi: add ACPI power and GUID commands

2016-01-22 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:53 +0100 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > > Changes since v1: > - added ACPI to command names. > > hw/ipmi/ipmi_bmc_sim.c | 49 + > 1 file changed, 49 insertions(+) > > diff --git a/hw

Re: [Qemu-devel] [PATCH v2 9/9] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-22 Thread Greg Kurz
ed on this platform to set the "System Firmware Progress" sensor and > the "Boot Count" sensor. > > Signed-off-by: Cédric Le Goater > Acked-by: Corey Minyard > --- Reviewed-by: Greg Kurz Just one "parenthesitis" attack... > hw/ipmi/ipmi_bmc_sim.

[Qemu-devel] [PULL 0/2] 9p minor cleanup

2016-01-22 Thread Greg Kurz
Greg Kurz (2): 9pfs: use error_report() instead of fprintf(stderr) fsdev: use error_report() instead of fprintf(stderr) fsdev/qemu-fsdev.c | 7 --- hw/9pfs/9p-handle.c | 5 +++-- hw/9pfs/9p-local.c | 15

[Qemu-devel] [PULL 1/2] 9pfs: use error_report() instead of fprintf(stderr)

2016-01-22 Thread Greg Kurz
Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- hw/9pfs/9p-handle.c | 5 +++-- hw/9pfs/9p-local.c | 15 --- hw/9pfs/9p-proxy.c | 12 ++-- hw/9pfs/9p.c| 2 +- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/hw/9pfs/9p-handle.c b/hw

[Qemu-devel] [PULL 2/2] fsdev: use error_report() instead of fprintf(stderr)

2016-01-22 Thread Greg Kurz
Only fix the code that gets built into QEMU. Reviewed-by: Markus Armbruster Signed-off-by: Greg Kurz --- fsdev/qemu-fsdev.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c index ccfec139ab2b..55e2f7a0fb58 100644 --- a/fsdev

Re: [Qemu-devel] [PATCH] net: set endianness on all backend devices

2016-01-26 Thread Greg Kurz
On Tue, 26 Jan 2016 11:53:21 +0100 Laurent Vivier wrote: > On 22/01/2016 07:44, Jason Wang wrote: > > > > > > On 01/21/2016 04:42 PM, Laurent Vivier wrote: > >> ping > >> > >> [added Jason in cc:] > >> > >> On 13/01/2016 20:26, Laurent Vivier wrote: > >>> commit 5be7d9f1b1452613b95c6ba70b8d

Re: [Qemu-devel] [PATCH] remove libtool support

2016-01-27 Thread Greg Kurz
gt; > Signed-off-by: Michael Tokarev > --- Very good idea ! Reviewed-by: Greg Kurz Just a few remarks: [greg@palmb qemu-master]$ grep -r libtool qemu-doc.texi:@item libtool: @uref{http://www.gnu.org/software/libtool/} Maybe we should drop that line as well ? Also, when reading http:

Re: [Qemu-devel] [PATCH] remove libtool support

2016-01-27 Thread Greg Kurz
On Wed, 27 Jan 2016 15:36:38 +0300 Michael Tokarev wrote: > 27.01.2016 15:15, Greg Kurz wrote: > [] > > Just a few remarks: > > > > [greg@palmb qemu-master]$ grep -r libtool > > qemu-doc.texi:@item libtool: @uref{http://www.gnu.org/software/libtool/} > > &

[Qemu-devel] [PATCH] migration: fix bad string passed to error_report()

2016-02-04 Thread Greg Kurz
state->name does not contain a terminating '\0' and you may get: Machine type received is 'pseries-2.3y�?' and local is 'pseries-2.4' load of migration failed: Invalid argument Let's add a precision modifier to fix this. Signed-off-by: Greg Kurz ---

Re: [Qemu-devel] [PATCH] migration: fix bad string passed to error_report()

2016-02-04 Thread Greg Kurz
On Thu, 4 Feb 2016 15:30:11 +0530 Amit Shah wrote: > On (Thu) 04 Feb 2016 [10:20:07], Greg Kurz wrote: > > state->name does not contain a terminating '\0' and you may get: > > > > Machine type received is 'pseries-2.3y�?' and local is 'pseries-2.

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

2015-11-12 Thread Greg Kurz
On Thu, 22 Oct 2015 19:38:42 +0200 Greg Kurz wrote: > We don't support migration of mounted 9p shares. This is handled by a > migration blocker. > > One would expect, however, to be able to migrate if the share is unmounted. > Unfortunately virtio-9p-device does not registe

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

2015-11-12 Thread Greg Kurz
On Thu, 12 Nov 2015 13:50:20 +0100 Cornelia Huck wrote: > On Thu, 12 Nov 2015 09:28:21 +0100 > Greg Kurz wrote: > > > On Thu, 22 Oct 2015 19:38:42 +0200 > > Greg Kurz wrote: > > > > > We don't support migration of mounted 9p shares. Thi

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

2015-11-12 Thread Greg Kurz
On Thu, 12 Nov 2015 15:39:02 +0100 Cornelia Huck wrote: > On Thu, 12 Nov 2015 15:25:33 +0100 > Greg Kurz wrote: > > > On Thu, 12 Nov 2015 13:50:20 +0100 > > Cornelia Huck wrote: > > > > > On Thu, 12 Nov 2015 09:28:21 +0100 > > > Greg Kurz wrote

Re: [Qemu-devel] [PATCH v2 1/2] virtio-net: use the backend cross-endian capabilities

2015-11-13 Thread Greg Kurz
On Thu, 12 Nov 2015 18:52:55 +0100 Cornelia Huck wrote: > On Mon, 09 Nov 2015 18:41:33 +0100 > Greg Kurz wrote: > > > When running a fully emulated device in cross-endian conditions, including > > a virtio 1.0 device offered to a big endian guest, we need to fix the vnet

Re: [Qemu-devel] [PATCH 1/3] virtio: move cross-endian helper to vhost

2015-11-13 Thread Greg Kurz
On Thu, 12 Nov 2015 19:00:54 +0100 Cornelia Huck wrote: > On Mon, 09 Nov 2015 18:58:16 +0100 > Greg Kurz wrote: > > > If target is bi-endian (ppc64, arm), the virtio_legacy_is_cross_endian() > > indeed returns the runtime state of the virtio device. However, it returns >

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

2015-11-13 Thread Greg Kurz
On Thu, 12 Nov 2015 19:08:59 +0100 Cornelia Huck wrote: > On Mon, 09 Nov 2015 18:58:34 +0100 > Greg Kurz wrote: > > > When adding cross-endian support, we introduced the TARGET_IS_BIENDIAN macro > > and the virtio_access_is_big_endian() helper to have a branchless fast p

Re: [Qemu-devel] [PATCH v2 1/2] virtio-net: use the backend cross-endian capabilities

2015-11-13 Thread Greg Kurz
On Fri, 13 Nov 2015 15:46:06 +0100 Cornelia Huck wrote: > On Fri, 13 Nov 2015 09:26:26 +0100 > Greg Kurz wrote: > > > On Thu, 12 Nov 2015 18:52:55 +0100 > > Cornelia Huck wrote: > > > > > On Mon, 09 Nov 2015 18:41:33 +0100 > > &

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

2015-11-13 Thread Greg Kurz
On Fri, 13 Nov 2015 15:42:53 +0100 Cornelia Huck wrote: > On Fri, 13 Nov 2015 10:28:31 +0100 > Greg Kurz wrote: > > > On Thu, 12 Nov 2015 19:08:59 +0100 > > Cornelia Huck wrote: > > > > > On Mon, 09 Nov 2015 18:58:34 +0100 > > > Greg Kurz w

Re: [Qemu-devel] [PATCH 11/11] migration: normalize locking in migration/savevm.c

2015-11-18 Thread Greg Kurz
On Tue, 17 Nov 2015 12:08:31 +0300 "Denis V. Lunev" wrote: > basically all bdrv_* operations must be called under aio_context_acquire > except ones with bdrv_all prefix. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin

Re: [Qemu-devel] [PATCH for 2.9 v8 0/10] dataplane snapshot fixes

2015-11-18 Thread Greg Kurz
ext being used in migration code, but in case this series gets applied anyway: Tested-by: Greg Kurz > Anyway, I think that the construction like > assert(aio_context_is_locked(aio_context)); > should be widely used to ensure proper locking. > > Changes from v8: > - split p

[Qemu-devel] [PATCH v3 0/3] virtio-net/vhost-net: share cross-endian enablement

2015-11-18 Thread Greg Kurz
full emulation can now benefit from it. Of course we keep the current hack to fall back on when the backend doesn't support cross-endian. --- Greg Kurz (3): virtio-net: use the backend cross-endian capabilities Revert "vhost-net: tell tap backend about the vnet endianness&quo

[Qemu-devel] [PATCH v3 1/3] virtio-net: use the backend cross-endian capabilities

2015-11-18 Thread Greg Kurz
paths. The current vhost-net code also tries to configure net backends. This will be no more needed and will be addressed in a subsequent patch. Signed-off-by: Greg Kurz --- v3: - dropped extraneous peer_has_vnet_hdr() declaration - only rely on the flag to decide if swap is needed --- hw/net

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

2015-11-18 Thread Greg Kurz
This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. Cross-endian is now configured by the core virtio-net code. We simply fall back on full emulation if the net backend cannot support the requested endianness for vnet headers. Signed-off-by: Greg Kurz --- hw/net/vhost_net.c | 33

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

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

Re: [Qemu-devel] [PATCH v3 0/3] virtio-net/vhost-net: share cross-endian enablement

2015-11-18 Thread Greg Kurz
On Wed, 18 Nov 2015 22:48:06 +0200 "Michael S. Tsirkin" wrote: > On Wed, Nov 18, 2015 at 05:23:00PM +0100, Greg Kurz wrote: > > Since QEMU 2.4.0, vhost-net uses the cross-endian support of TAP devices to > > fix vnet headers. In fact, virtio-net can do the same instea

[Qemu-devel] [PATCH v2] migration: fix bad string passed to error_report()

2016-02-05 Thread Greg Kurz
state->name does not contain a terminating '\0' and you may get: Machine type received is 'pseries-2.3y�?' and local is 'pseries-2.4' load of migration failed: Invalid argument Let's add a precision modifier to fix this. Reviewed-by: Amit Shah Signed-off-b

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

2016-02-05 Thread Greg Kurz
trace_xics_alloc_block_failed_no_left, added trace_xics_alloc_block_failed_no_left definition to trace-events] Signed-off-by: Greg Kurz --- hw/intc/xics.c | 10 ++ hw/ppc/spapr_pci.c |9 + trace-events |1 + 3 files changed, 12 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] [PULL 45/49] net: set endianness on all backend devices

2016-02-05 Thread Greg Kurz
only for > the first device. > > In case of multiqueue, we have multiple devices... This patch sets the > endianness for all the devices of the interface. > > Signed-off-by: Laurent Vivier > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > Reviewed-

[Qemu-devel] [PATCH v4 0/6] virtio/vhost cross-endian cleanup

2016-02-05 Thread Greg Kurz
patches 1 and 2, that had already been reviewed. Laurent, Cornelia, Could you please ack/nack the changes ? The series is based on Michael Tsirkin's tree: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git pci Thanks. -- Greg --- Greg Kurz (6): virtio-net: use the backend cross-e

[Qemu-devel] [PATCH v4 1/6] virtio-net: use the backend cross-endian capabilities

2016-02-05 Thread Greg Kurz
connectivity if rebooted into a different endianness. The current vhost-net code also tries to configure net backends. This will be no more needed and will be reverted in a subsequent patch. Reviewed-by: Cornelia Huck Reviewed-by: Laurent Vivier Signed-off-by: Greg Kurz --- v4: - fix bug

[Qemu-devel] [PATCH v4 2/6] vhost-net: revert support of cross-endian vnet headers

2016-02-05 Thread Greg Kurz
Reviewed-by: Laurent Vivier Signed-off-by: Greg Kurz --- v4: - also revert Laurent's fix --- hw/net/vhost_net.c | 41 + 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 3940a04b659a..b242832

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

2016-02-05 Thread Greg Kurz
, where indeed non bi-endian targets don't have to deal with cross-endian issues. This patch moves the helper to vhost.c and gives it a more appropriate name. Reviewed-by: Cornelia Huck Reviewed-by: Laurent Vivier Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |

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

2016-02-05 Thread Greg Kurz
Indeed vhost doesn't need to ask for vring endian fixing if the device is virtio 1.0, since it is already handled by the in-kernel vhost driver. This patch simply consolidates the logic into the existing helper. Reviewed-by: Cornelia Huck Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |

[Qemu-devel] [PATCH v4 5/6] vhost: simplify vhost_needs_vring_endian()

2016-02-05 Thread Greg Kurz
t need the assert() either. This open codes the device_endian checking in vhost_needs_vring_endian(). It also adds a comment to explain the logic, as recent reviews showed the cross-endian tweaks aren't that obvious. Signed-off-by: Greg Kurz --- hw/virtio/vhost.c |9 +++-- 1

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

2016-02-05 Thread Greg Kurz
ed-by: Laurent Vivier Signed-off-by: Greg Kurz --- include/hw/virtio/virtio-access.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index f1f12afe9089..8dc84f520316 100644 --- a/include/hw/v

Re: [Qemu-devel] [PATCH v4 1/6] virtio-net: use the backend cross-endian capabilities

2016-02-05 Thread Greg Kurz
On Fri, 5 Feb 2016 12:33:44 +0100 Cornelia Huck wrote: > On Fri, 05 Feb 2016 11:43:11 +0100 > Greg Kurz wrote: > > > +static bool virtio_net_set_vnet_endian(VirtIODevice *vdev, NetClientState > > *ncs, > > + int queues, bo

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

2016-02-08 Thread Greg Kurz
On Mon, 8 Feb 2016 11:45:19 +1000 David Gibson wrote: > On Fri, Feb 05, 2016 at 09:43:40AM +0100, Greg Kurz wrote: > > From: Brian W. Hart > > > > xics_alloc_block() does not return a clear error code when it > > fails to allocate a block of interrupts. Inst

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

2016-02-08 Thread Greg Kurz
Since QEMU 2.4, we have a configuration section in the migration stream. This must be skipped for older machines, like it is already done for x86. Fixes: 61964c23e5ddd5a33f15699e45ce126f879e3e33 Cc: qemu-sta...@nongnu.org Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |1 + 1 file changed, 1

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

2016-02-10 Thread Greg Kurz
On Mon, 8 Feb 2016 09:31:49 +0100 Greg Kurz wrote: > On Mon, 8 Feb 2016 11:45:19 +1000 > David Gibson wrote: > > > On Fri, Feb 05, 2016 at 09:43:40AM +0100, Greg Kurz wrote: > > > From: Brian W. Hart > > > > > > xics_alloc_block() does not return

Re: [Qemu-devel] [Qemu-stable] [PATCH] spapr: skip configuration section during migration of older machines

2016-02-10 Thread Greg Kurz
On Mon, 08 Feb 2016 16:59:47 +0100 Greg Kurz wrote: > Since QEMU 2.4, we have a configuration section in the migration stream. > This must be skipped for older machines, like it is already done for x86. > > Fixes: 61964c23e5ddd5a33f15699e45ce126f879e3e33 > Cc: qemu-sta...@nong

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