Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-15 Thread Jason Wang
On 2019/2/15 下午1:39, Peter Xu wrote: On Fri, Feb 15, 2019 at 01:22:34PM +0800, Yi Sun wrote: [...] +/* TODO: read cap/ecap from host to decide which cap to be exposed. */ +if (s->scalable_mode) { +if (!s->caching_mode) { +error_report("Need to set caching-mode for

Re: [Qemu-devel] Proper use of unnest-vars (was: [PATCH v5 00/18] qapi: add #if pre-processor conditions to generated code (part 3))

2019-02-15 Thread Paolo Bonzini
On 15/02/19 08:53, Markus Armbruster wrote: > This time, $(obj-y) is very much not blank, and... > > @qapi/ final qapi-introspect.o qapi-types-target.o qapi-types.o > qapi-visit-target.o qapi-visit.o qapi-events-target.o qapi-events.o > qapi-commands-target.o qapi-commands.o > [Trailing

Re: [Qemu-devel] [PATCH] block: skip initializer BDS on recursive aio context attachment/detachment

2019-02-15 Thread Denis Plotnikov
On 08.02.2019 14:03, Kevin Wolf wrote: > Am 24.01.2019 um 08:48 hat Denis Plotnikov geschrieben: >> When there is a Backup Block Job running and shutdown command is sent to >> a guest, the guest crushes due to assert(!bs->walking_aio_notifiers). >> >> Call stack: >> >> 0 __GI_raise >> 1 __GI_ab

Re: [Qemu-devel] [PATCH 8/9] vhost-user-test: small changes to init_hugepagefs

2019-02-15 Thread Thomas Huth
On 14/02/2019 18.35, Paolo Bonzini wrote: > After the conversion to qgraph, the equivalent of "main" will be in > a constructor and will run even if the tests are not being requested. > Therefore, it should not assert that init_hugepagefs succeeds and will > be called when creating the TestServer.

Re: [Qemu-devel] [PATCH v2 1/9] ccid-card-passthru: Move assertion in read() to can_read()

2019-02-15 Thread Wei Yang
On Thu, Feb 14, 2019 at 09:19:31PM +0100, Philippe Mathieu-Daudé wrote: >chardev::read() depends of what chardev::can_read() returns, move the >assertion to can_read(). > >Suggested-by: Paolo Bonzini >Signed-off-by: Philippe Mathieu-Daudé >--- > hw/usb/ccid-card-passthru.c | 5 ++--- > 1 file chan

Re: [Qemu-devel] [PATCH v2 3/9] ccid-card-passthru: Assert on a stricter expression

2019-02-15 Thread Wei Yang
Would it be better to have some description? On Thu, Feb 14, 2019 at 09:19:33PM +0100, Philippe Mathieu-Daudé wrote: >Suggested-by: Paolo Bonzini >Signed-off-by: Philippe Mathieu-Daudé >--- > hw/usb/ccid-card-passthru.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/hw/us

Re: [Qemu-devel] [PATCH v2] hostmem: fix crash when querying empty host-nodes property via QMP

2019-02-15 Thread Stefano Garzarella
On Thu, Feb 14, 2019 at 05:57:33AM -0500, Igor Mammedov wrote: > QEMU will crashes with > qapi/qobject-output-visitor.c:210: qobject_output_complete: Assertion > `qov->root && ((&qov->stack)->slh_first == ((void *)0))' failed > when trying to get value of not set hostmem's "host-nodes" > property

Re: [Qemu-devel] [PATCH v1] tests: Add a simple device_del test for PCI devices

2019-02-15 Thread Thomas Huth
On 14/02/2019 18.11, David Hildenbrand wrote: > The issue with testing asynchronous unplug requests it that they usually > require a running guest to handle the request. However, to test if > unplug of PCI devices works, we can apply a nice little trick on some > architectures: > > On system reset

Re: [Qemu-devel] [PATCH v1] tests: Add a simple device_del test for PCI devices

2019-02-15 Thread Greg Kurz
On Thu, 14 Feb 2019 18:11:28 +0100 David Hildenbrand wrote: > The issue with testing asynchronous unplug requests it that they usually > require a running guest to handle the request. However, to test if > unplug of PCI devices works, we can apply a nice little trick on some > architectures: > >

Re: [Qemu-devel] [PATCH] hw/block: report when pflash backing file isn't aligned

2019-02-15 Thread Markus Armbruster
Alex Bennée writes: > Laszlo Ersek writes: > >> On 02/14/19 16:57, Alex Bennée wrote: >>> It looks like there was going to be code to check we had some sort of >>> alignment so lets replace it with an actual check. This is a bit more >>> useful than the enigmatic "failed to read the initial flas

[Qemu-devel] [PATCH] block: don't set the same context

2019-02-15 Thread Denis Plotnikov
Adds a fast path on aio context setting preventing unnecessary context setting routine. Also, it prevents issues with cyclic walk of child bds-es appeared because of registring aio walking notifiers: Call stack: 0 __GI_raise 1 __GI_abort 2 __assert_fail_base 3 __GI___assert_fail 4 bdrv_detac

Re: [Qemu-devel] QEMU xen coverity issues

2019-02-15 Thread Paul Durrant
> -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: 14 February 2019 18:29 > To: QEMU Developers > Cc: Paul Durrant ; Anthony Perard > > Subject: QEMU xen coverity issues > > Hi; we've just done another Coverity run, and it's pulled up some > issues in th

Re: [Qemu-devel] [PATCH] lsi: implement basic SBCL functionality

2019-02-15 Thread Paolo Bonzini
On 14/02/19 23:04, Sven Schnelle wrote: > HP-UX checks this register after sending data to the target. If there's no > valid > information present, it assumes the client disconnected because the kernel > sent > to much data. Implement at least some of the SBCL functionality that is > possible >

Re: [Qemu-devel] Proper use of unnest-vars

2019-02-15 Thread Markus Armbruster
Paolo Bonzini writes: > On 15/02/19 08:53, Markus Armbruster wrote: >> This time, $(obj-y) is very much not blank, and... >> >> @qapi/ final qapi-introspect.o qapi-types-target.o qapi-types.o >> qapi-visit-target.o qapi-visit.o qapi-events-target.o qapi-events.o >> qapi-commands-target.o q

[Qemu-devel] [PATCH 1/2] .travis.yml: Test with disable-replication

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We've had the build break with replication disabled, so lets test that case in travis. Suggsted-by: Alex Bennée Signed-off-by: Dr. David Alan Gilbert --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml in

[Qemu-devel] [PATCH 2/2] .travis.yml: Remove disable-uuid

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Commit 315d3184525 turned --disable-uuid into a warning only; remove the check from Travis. Signed-off-by: Dr. David Alan Gilbert --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 95c554897b..8497f

Re: [Qemu-devel] [PATCH v3] s390x/cpumodel: Set up CPU model for AQIC interception

2019-02-15 Thread Pierre Morel
On 14/02/2019 13:14, Pierre Morel wrote: A new CPU model facilities is introduced to support AP devices interruption interception for a KVM guest. "APQI" for "AP-Queue Interruption" facility The S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, CPU facility indicates whether the PQAP instruction with the A

[Qemu-devel] MemoryRegionOps access sizes

2019-02-15 Thread BALATON Zoltan
Hello, Could someone please explain how the MemoryRegionOps valid.{min,max}_access_size and unaligned and corresponding impl constraints work and where are these implemented? And in particular if this would work: static const MemoryRegionOps ops = { .read = readfn, .write = writefn,

Re: [Qemu-devel] [PATCH v2 0/3] target/arm: Implement ARMv8.3-JSConv

2019-02-15 Thread Peter Maydell
On Thu, 14 Feb 2019 at 21:28, Richard Henderson wrote: > > On 2/14/19 1:10 PM, Richard Henderson wrote: > > On 2/14/19 5:53 AM, Peter Maydell wrote: > >> On Wed, 6 Feb 2019 at 05:29, Richard Henderson > >> wrote: > >>> > >>> Changes since v1: > >>> * Typo fixed in patch 2, which had scrogged FM

[Qemu-devel] [PATCH v4] spice: set device address and device display ID in QXL interface

2019-02-15 Thread Lukáš Hrázký
Calls the new SPICE QXL interface function spice_qxl_set_device_info to set the hardware address of the graphics device represented by the QXL interface (e.g. a PCI path) and the device display IDs (the IDs of the device's monitors that belong to this QXL interface). Also stops using the deprecate

Re: [Qemu-devel] [PATCH v3] s390x/cpumodel: Set up CPU model for AQIC interception

2019-02-15 Thread Christian Borntraeger
On 15.02.2019 10:53, Pierre Morel wrote: > On 14/02/2019 13:14, Pierre Morel wrote: >> A new CPU model facilities is introduced to support AP devices >> interruption interception for a KVM guest. >> >> "APQI" for "AP-Queue Interruption" facility >> >> The S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, CP

[Qemu-devel] [PATCH 07/17] target/ppc: convert xxspltw to vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 36 +++- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-imp

[Qemu-devel] [PATCH 08/17] target/ppc: convert xxsel to vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 55 ++--- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-im

[Qemu-devel] [PATCH 02/17] target/ppc: convert vaddu[b, h, w, d] and vsubu[b, h, w, d] over to use vector operations

2019-02-15 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Acked-by: David Gibson --- target/ppc/helper.h | 8 target/ppc/int_helper.c | 7 --- target/ppc/translate/vmx-impl.inc.c | 16 3 files changed, 8 insertions(+), 23 deletion

[Qemu-devel] [PATCH 09/17] target/ppc: Pass integer to helper_mtvscr

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson We can re-use this helper elsewhere if we're not passing in an entire vector register. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/helper.h | 2 +- target/ppc/int_helper.c | 6 +++--- target/ppc/translate/vmx-imp

[Qemu-devel] [PATCH 03/17] target/ppc: convert vspltis[bhw] to use vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson --- target/ppc/helper.h | 3 --- target/ppc/int_helper.c | 15 --- target/ppc/translate/vmx-impl.inc.c | 36 3 files changed, 8 insertions(+), 46 deletions(-)

[Qemu-devel] [PATCH 04/17] target/ppc: convert vsplt[bhw] to use vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/helper.h | 3 --- target/ppc/int_helper.c | 19 --- target/ppc/translate/vmx-impl.inc.c | 46 ++--- 3 files changed, 27 insert

[Qemu-devel] [PATCH 00/17] target/ppc: convert instructions to use TCG vector operations

2019-02-15 Thread Mark Cave-Ayland
Now that all the pre-requisite patches and bugfixes have been merged, here is the remainder of Richard's "tcg, target/ppc vector improvements" patchset that converts various PPC VMX/VSX instructions over to use TCG vector operations. Compared to the original posted patchset I've made a few minor c

[Qemu-devel] [PATCH 01/17] target/ppc: convert VMX logical instructions to use vector operations

2019-02-15 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland Reviewed-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate.c | 1 + target/ppc/translate/vmx-impl.inc.c | 47 + 2 files changed, 17 insertions(+), 31 deletions(-) diff --git a/target/ppc/trans

[Qemu-devel] [PATCH 05/17] target/ppc: convert VSX logical operations to vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 43 +++-- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-im

[Qemu-devel] [PATCH 06/17] target/ppc: convert xxspltib to vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate/vsx-impl.inc.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c index 2576d81ac5.

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-15 Thread Peter Maydell
On Fri, 15 Feb 2019 at 01:28, BALATON Zoltan wrote: > > On Thu, 14 Feb 2019, Peter Maydell wrote: > > - (void)sendEvent:(NSEvent *)event > > { > > COCOA_DEBUG("QemuApplication: sendEvent\n"); > > -[super sendEvent: event]; > > +if (!cocoaView || ![cocoaView handleEvent:event]) { > > +

[Qemu-devel] [PATCH 12/17] target/ppc: Add helper_mfvscr

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson This is required before changing the representation of the register. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/arch_dump.c | 3 ++- target/ppc/helper.h | 1 + target/ppc/int_helper.c | 5 + targe

[Qemu-devel] [PATCH 10/17] target/ppc: Use helper_mtvscr for reset and gdb

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Not setting flush_to_zero from gdb_set_avr_reg was a bug. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/translate_init.inc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/ppc/translate_init.inc.c b/target/ppc/t

[Qemu-devel] [PATCH 17/17] target/ppc: convert vmin* and vmax* to vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/helper.h | 16 target/ppc/int_helper.c | 27 --- target/ppc/translate/vmx-impl.inc.c | 32 3 file

[Qemu-devel] [PATCH 11/17] target/ppc: Remove vscr_nj and vscr_sat

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson These macros are no longer used. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 2c22292e7f..a62f628d28 100644 --- a/target/ppc/cpu.h +++ b/targe

[Qemu-devel] [PATCH 13/17] target/ppc: Use mtvscr/mfvscr for vmstate

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson This is required before changing the representation of the register. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/machine.c | 44 +--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/targe

[Qemu-devel] [PULL v2 00/25] target-arm queue

2019-02-15 Thread Peter Maydell
Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190215 for you to fetch changes up to 0f8b09b22234460cb5b8766a25066cf6b5f06842: gdbstub: Send a reply to the vKill packet. (2019-02-15

[Qemu-devel] [PATCH 15/17] target/ppc: Split out VSCR_SAT to a vector field

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Change the representation of VSCR_SAT such that it is easy to set from vector code. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/cpu.h| 4 +++- target/ppc/int_helper.c | 11 --- 2 files changed, 11 insertions(+), 4 deletions(-

Re: [Qemu-devel] [PATCH 2/2] .travis.yml: Remove disable-uuid

2019-02-15 Thread Thomas Huth
On 15/02/2019 10.45, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Commit 315d3184525 turned --disable-uuid into a warning only; remove > the check from Travis. > > Signed-off-by: Dr. David Alan Gilbert > --- > .travis.yml | 2 +- > 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH 16/17] target/ppc: convert vadd*s and vsub*s to vector operations

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/helper.h | 24 target/ppc/int_helper.c | 18 +++- target/ppc/translate/vmx-impl.inc.c | 57 + 3 files changed,

[Qemu-devel] [PATCH 14/17] target/ppc: Add set_vscr_sat

2019-02-15 Thread Mark Cave-Ayland
From: Richard Henderson This is required before changing the representation of the register. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/int_helper.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/target/ppc/int_h

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-15 Thread David Gibson
On Fri, Feb 15, 2019 at 03:34:52PM +1100, Alexey Kardashevskiy wrote: > > > On 15/02/2019 14:54, David Gibson wrote: > > On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote: > >> > >> > >> On 15/02/2019 14:24, David Gibson wrote: > >>> On Fri, Feb 15, 2019 at 11:35:02AM +1100, Al

Re: [Qemu-devel] [PATCH qemu v2 4/4] spapr: Support NVIDIA V100 GPU with NVLink2

2019-02-15 Thread David Gibson
On Fri, Feb 15, 2019 at 03:42:56PM +1100, Alexey Kardashevskiy wrote: > > > On 15/02/2019 14:22, David Gibson wrote: > > On Thu, Feb 14, 2019 at 04:21:44PM +1100, Alexey Kardashevskiy wrote: > >> NVIDIA V100 GPUs have on-board RAM which is mapped into the host memory > >> space and accessible as

Re: [Qemu-devel] [PATCH 1/2] .travis.yml: Test with disable-replication

2019-02-15 Thread Thomas Huth
On 15/02/2019 10.45, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > We've had the build break with replication disabled, so lets > test that case in travis. > > Suggsted-by: Alex Bennée > Signed-off-by: Dr. David Alan Gilbert > --- > .travis.yml | 2 +- > 1 file chan

[Qemu-devel] [PATCH v2 2/2] Revert "globals: Allow global properties to be optional"

2019-02-15 Thread Daniel P . Berrangé
This reverts commit d7741743f4f3d2683d1bb6938f88dc0167c21afa. Relying on setting properties on parents types which may not be relevant to certain sub-classes had unexpected side-effects causing bugs in device config defaults. It is preferrable to be explicit about which devices get which propertie

[Qemu-devel] [PATCH v2 0/2] hw: provide error checking of disable-legacy/modern property usage

2019-02-15 Thread Daniel P . Berrangé
Changed in v2: - Fix properties set for v2.6 machine type compat so that it only affects the virtio devices which support both legacy and modern modes. - Revert unneccessary patch allowing optional properties in machine prop back compat Daniel P. Berrangé (2): hw: report invalid disa

[Qemu-devel] [PATCH v2 1/2] hw: report invalid disable-legacy|modern usage for virtio-1-only devs

2019-02-15 Thread Daniel P . Berrangé
A number of virtio devices (gpu, crypto, mouse, keyboard, tablet) only support the virtio-1 (aka modern) mode. Currently if the user launches QEMU, setting those devices to enable legacy mode, QEMU will silently create them in modern mode, ignoring the user's (mistaken) request. This patch introdu

Re: [Qemu-devel] [PATCH] hw: report invalid disable-legacy|modern usage for virtio-1-only devs

2019-02-15 Thread Daniel P . Berrangé
On Mon, Jan 28, 2019 at 03:48:57PM -0200, Eduardo Habkost wrote: > On Fri, Jan 18, 2019 at 01:38:26PM +, Daniel P. Berrangé wrote: > > A number of virtio devices (gpu, crypto, mouse, keyboard, tablet) only > > support the virtio-1 (aka modern) mode. Currently if the user launches > > QEMU, sett

[Qemu-devel] [PULL 0/1] qemu-openbios queue 20190215

2019-02-15 Thread Mark Cave-Ayland
u-openbios-20190215 for you to fetch changes up to e9deadb1c10351213845428de7591931f790f111: Update OpenBIOS images to 3464681b built from submodule. (2019-02-15 10:07:40 +) qemu-open

Re: [Qemu-devel] [PATCH] migration/rdma: Fix qemu_rdma_cleanup null check

2019-02-15 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Feb 14, 2019 at 06:53:51PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > If the migration fails before the channel is open (e.g. a bad > > address) we end up in the cleanup with rdma->channel==NULL. > > > > S

Re: [Qemu-devel] [PATCH v2 2/9] ccid-card-passthru: Replace never trigger if statement by an assertion

2019-02-15 Thread Marc-André Lureau
Hi On Thu, Feb 14, 2019 at 9:20 PM Philippe Mathieu-Daudé wrote: > > The right side of the comparison is the return value of can_read(): > VSCARD_IN_SIZE - card->vscard_in_pos. > Since the 'size' argument of chardev::read() is bound to > what chardev::can_read() returns, this condition can never

Re: [Qemu-devel] [PATCH v3] s390x/cpumodel: Set up CPU model for AQIC interception

2019-02-15 Thread Pierre Morel
On 15/02/2019 10:58, Christian Borntraeger wrote: On 15.02.2019 10:53, Pierre Morel wrote: On 14/02/2019 13:14, Pierre Morel wrote: A new CPU model facilities is introduced to support AP devices interruption interception for a KVM guest. "APQI" for "AP-Queue Interruption" facility The S390_

[Qemu-devel] [PATCH] build: clean trace/generated-helpers.c

2019-02-15 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- Makefile.target | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.target b/Makefile.target index 06b44c0..2904910 100644 --- a/Makefile.target +++ b/Makefile.target @@ -221,6 +221,7 @@ clean: clean-target rm -f *.a *~ $(PROGS) rm -f $(sh

[Qemu-devel] [PATCH v4 7/9] qmp: Add announce-self command

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a qmp command that can trigger guest announcements. It uses its own announce-timer instance, and parameters passed to it explicitly in the command. Like most qmp commands, it's in the main thread/bql, so there's no racing with any outstanding timer. Based on

[Qemu-devel] [PATCH v4 8/9] hmp: Add hmp_announce_self

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add an HMP command to trigger self annocements. Unlike the QMP command (which takes a set of parameters), the HMP command reuses the set of parameters used for migration. Signend-off-by: Vladislav Yasevich Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michae

[Qemu-devel] [PATCH v4 5/9] net: Add a network device specific self-announcement ability

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Some network devices have a capability to do self announcements (ex: virtio-net). Add infrastructure that would allow devices to expose this ability. Signed-off-by: Vladislav Yasevich Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin --- in

[Qemu-devel] [PATCH v4 6/9] virtio-net: Allow qemu_announce_self to trigger virtio announcements

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Expose the virtio-net self announcement capability and allow qemu_announce_self() to call it. These announces are caused by something external (i.e. the announce-self command); they won't trigger if the migration counter is triggering announces at the same time. S

Re: [Qemu-devel] [PATCH v2 1/9] ccid-card-passthru: Move assertion in read() to can_read()

2019-02-15 Thread Marc-André Lureau
Hi On Thu, Feb 14, 2019 at 9:19 PM Philippe Mathieu-Daudé wrote: > > chardev::read() depends of what chardev::can_read() returns, move the > assertion to can_read(). > > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé Moving to can_read() makes sense, because nothing (excep

[Qemu-devel] [PATCH] build: get rid of target-obj-y

2019-02-15 Thread Paolo Bonzini
It is possible to specify the trace/ directory already in objs-y; there is no need to have a separate unnest-vars invocation. Signed-off-by: Paolo Bonzini --- Makefile.objs | 1 - Makefile.target | 7 ++- trace/Makefile.objs | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-

[Qemu-devel] [PATCH v4 1/9] net: Introduce announce timer

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'announce timer' will be used by migration, and explicit requests for qemu to perform network announces. Based on the work by Germano Veit Michel and Vlad Yasevich Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin --- include/net/anno

[Qemu-devel] [PATCH] build: remove unnecessary assignments from Makefile.target

2019-02-15 Thread Paolo Bonzini
It is only necessary to clear block-obj-y because Makefile.objs uses "+=" instead of "="; fix that and remove the assignment. The other variables need not be cleared at all. Signed-off-by: Paolo Bonzini --- Makefile.objs | 2 +- Makefile.target | 4 2 files changed, 1 insertion(+), 5 dele

[Qemu-devel] [PATCH v4 0/9] Network announce changes

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a reworking of a few sets of patches from 2017 that were put together by myself, Germano and Vlad that make the network announce system more flexible. Firstly, it's parameterised, so that you can change the number of packets and the gap between them

[Qemu-devel] [PATCH v4 4/9] migration: Switch to using announce timer

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Switch the announcements to using the new announce timer. Move the code that does it to announce.c rather than savevm because it really has nothing to do with the actual migration. Migration starts the announce from bh's and so they're all in the main thread/bql, a

[Qemu-devel] [PATCH v4 9/9] tests: Add a test for qemu self announcements

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We now expose qemu_announce_self through QMP and HMP. Add a test with some very basic packet validation (make sure we get a RARP). Signed-off-by: Vlad Yasevich Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Tsirkin --- tests/Makefile.include

[Qemu-devel] [PATCH v4 3/9] virtio-net: Switch to using announce timer

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Switch virtio's self announcement to use the AnnounceTimer. It keeps it's own AnnounceTimer (per device), and starts running it using a migration post-load and a virtual clock; that way the announce happens once the guest is actually running. The timer uses the migr

Re: [Qemu-devel] [PATCH v2 3/9] ccid-card-passthru: Assert on a stricter expression

2019-02-15 Thread Marc-André Lureau
Hi On Thu, Feb 14, 2019 at 9:20 PM Philippe Mathieu-Daudé wrote: > > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/usb/ccid-card-passthru.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-p

[Qemu-devel] [PATCH v4 2/9] migration: Add announce parameters

2019-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add migration parameters that control RARP/GARP announcement timeouts. Based on earlier patches by myself and Vladislav Yasevich Signed-off-by: Dr. David Alan Gilbert Acked-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin --- hmp.c|

Re: [Qemu-devel] [PULL v2 00/25] target-arm queue

2019-02-15 Thread Peter Maydell
queue-feb-14-2019' into staging (2019-02-14 > 18:33:00 +) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20190215 > > for you to fetch changes up to 0f8b09b22234460cb5b8766a25066cf6b5f0684

Re: [Qemu-devel] [RFC PATCH 3/4] spapr: Add NVDIMM device support

2019-02-15 Thread Shivaprasad G Bhat
Thanks for the comments David. Please find my replies inline.. On 02/12/2019 07:19 AM, David Gibson wrote: On Tue, Feb 05, 2019 at 11:26:27PM -0600, Shivaprasad G Bhat wrote: Add support for NVDIMM devices for sPAPR. Piggyback on existing nvdimm device interface in QEMU to support virtual NVDI

Re: [Qemu-devel] [RFC PATCH 4/4] spapr: Add Hcalls to support PAPR NVDIMM device

2019-02-15 Thread Shivaprasad G Bhat
On 02/12/2019 07:58 AM, David Gibson wrote: On Tue, Feb 05, 2019 at 11:26:41PM -0600, Shivaprasad G Bhat wrote: This patch implements few of the necessary hcalls for the nvdimm support. PAPR semantics is such that each NVDIMM device is comprising of multiple SCM(Storage Class Memory) blocks.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 13/17] target/ppc: Use mtvscr/mfvscr for vmstate

2019-02-15 Thread BALATON Zoltan
On Fri, 15 Feb 2019, Mark Cave-Ayland wrote: From: Richard Henderson This is required before changing the representation of the register. Signed-off-by: Richard Henderson Acked-by: David Gibson --- target/ppc/machine.c | 44 +--- 1 file changed, 41 inse

Re: [Qemu-devel] [PATCH] i386, acpi: check acpi_memory_hotplug capacity in pre_plug

2019-02-15 Thread Igor Mammedov
On Thu, 14 Feb 2019 20:53:31 + Wei Yang wrote: > On Thu, Feb 14, 2019 at 12:25:27PM +0100, Igor Mammedov wrote: > >On Thu, 14 Feb 2019 08:52:25 +0800 > >Wei Yang wrote: > > > >> Currently we do device realization like below: > >> > >>hotplug_handler_pre_plug() > >>dc->realize() > >>

Re: [Qemu-devel] [PATCH] migration/rdma: Fix qemu_rdma_cleanup null check

2019-02-15 Thread Philippe Mathieu-Daudé
On 2/14/19 7:53 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > If the migration fails before the channel is open (e.g. a bad > address) we end up in the cleanup with rdma->channel==NULL. > > Spotted by Coverity: CID 1398634 > Fixes: fbbaacab2758cb3f32a0 > Signed-off

Re: [Qemu-devel] [RFC] memory: use memory_region_init_ram() instead of memory_region_allocate_system_memory()

2019-02-15 Thread Igor Mammedov
On Thu, 14 Feb 2019 19:11:27 +0100 Paolo Bonzini wrote: > On 14/02/19 15:07, Igor Mammedov wrote: > > Also some boards (ab)use memory_region_allocate_system_memory(), calling it > > several > > times to allocate various fixed sized chunks of RAM and ROMs, which is > > problematic > > to map to

[Qemu-devel] [PATCH] hw/arm/armsse: Fix memory leak in error-exit path

2019-02-15 Thread Peter Maydell
Coverity points out (CID 1398632, CID 1398650) that we leak a couple of allocated strings in the error-exit code path for setting up the MHUs in the ARMSSE. Fix this bug by moving the allocate-and-free of each string to be closer to the use, so we do the free before doing the error-exit check. Fix

[Qemu-devel] [PATCH 01/10] xics: Explicitely call KVM ICP methods from the common code

2019-02-15 Thread Greg Kurz
The pre_save(), post_load() and synchronize_state() methods of the ICPStateClass type are really KVM only things. Make that obvious by dropping the indirections and directly calling the KVM functions instead. Signed-off-by: Greg Kurz --- hw/intc/xics.c| 24 +++- hw/

[Qemu-devel] [PATCH 03/10] xics: Handle KVM ICP realize from the common code

2019-02-15 Thread Greg Kurz
The realization of KVM ICP currently follows the parent_realize logic, which is a bit overkill here. Also we want to get rid of the KVM ICP class. Explicitely call icp_kvm_realize() from the base ICP realize function. Note that ICPStateClass::parent_realize is retained because powernv needs it. S

[Qemu-devel] [PATCH 02/10] xics: Handle KVM ICP reset from the common code

2019-02-15 Thread Greg Kurz
The KVM ICP reset handler simply writes the ICP state to KVM. This doesn't need the overkill parent_reset logic we have today. Call icp_set_kvm_state() from the base ICP reset function instead. Since there are no other users for ICPStateClass::parent_reset, and it isn't currently expected to chang

[Qemu-devel] [PATCH 07/10] xics: Handle KVM ICS reset from the "simple" ICS code

2019-02-15 Thread Greg Kurz
The KVM ICS reset handler simply writes the ICS state to KVM. This doesn't need the overkill parent_reset logic we have today. Also we want to use the same ICS type for the KVM and non-KVM case with pseries. Call icp_set_kvm_state() from the "simple" ICS reset function. Signed-off-by: Greg Kurz

[Qemu-devel] [PATCH 00/10] xics: Get rid of KVM specific classes

2019-02-15 Thread Greg Kurz
As recently pointed [1], using different object types for the KVM and non-KVM scenarios was a bad idea: "In general different device types should represent guest-visibly different objects, not just implementation differences." This series converts the base ICP class and the "simple" ICS class to s

[Qemu-devel] [PATCH 05/10] xics: Drop the KVM ICP class

2019-02-15 Thread Greg Kurz
The KVM ICP class isn't used anymore. Drop it. Signed-off-by: Greg Kurz --- hw/intc/xics_kvm.c| 18 -- include/hw/ppc/xics.h |3 --- 2 files changed, 21 deletions(-) diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index 4eebced516b6..fae4ac431f2f 100644 --- a/hw/i

[Qemu-devel] [PATCH 10/10] xics: Drop the KVM ICS class

2019-02-15 Thread Greg Kurz
The KVM ICS class isn't used anymore. Drop it. Signed-off-by: Greg Kurz --- hw/intc/xics_kvm.c| 40 hw/ppc/spapr_irq.c|2 +- include/hw/ppc/xics.h |3 --- 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/hw/intc/xics_kvm.c

Re: [Qemu-devel] [PATCH v2 5/9] ccid-card-passthru: Replace assert() by QEMU_BUILD_BUG_ON()

2019-02-15 Thread Marc-André Lureau
On Thu, Feb 14, 2019 at 9:20 PM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > hw/usb/ccid-card-passthru.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/cci

[Qemu-devel] [PATCH 04/10] spapr/irq: Use the base ICP class for KVM

2019-02-15 Thread Greg Kurz
The base ICP class knows how to interact with KVM. Adapt sPAPR to use it instead of the ICP KVM class. Signed-off-by: Greg Kurz --- hw/ppc/spapr_irq.c |4 +--- include/hw/ppc/spapr.h |1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr

[Qemu-devel] [PATCH 06/10] xics: Explicitely call KVM ICS methods from the common code

2019-02-15 Thread Greg Kurz
The pre_save(), post_load() and synchronize_state() methods of the ICSStateClass type are really KVM only things. Make that obvious by dropping the indirections and directly calling the KVM functions instead. Signed-off-by: Greg Kurz --- hw/intc/xics.c| 23 ++- hw/i

[Qemu-devel] [PATCH 08/10] xics: Handle KVM interrupt presentation from "simple" ICS code

2019-02-15 Thread Greg Kurz
We want to use the "simple" ICS type in both KVM and non-KVM setups. Teach the "simple" ICS how to present interrupts to KVM and adapt sPAPR accordingly. Signed-off-by: Greg Kurz --- hw/intc/xics.c|5 + hw/intc/xics_kvm.c|3 +-- hw/ppc/spapr_irq.c|7 +-- inclu

Re: [Qemu-devel] [PATCH v2 6/9] ccid-card-passthru: Simplify the if() condition

2019-02-15 Thread Marc-André Lureau
Hi On Thu, Feb 14, 2019 at 9:20 PM Philippe Mathieu-Daudé wrote: > > Simplify the if() condition so we can remove an indent layer > and the code is easier to review. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > hw/usb/ccid-card-passthru.c | 18 -

[Qemu-devel] [PATCH 09/10] spapr/irq: Use the "simple" ICS class for KVM

2019-02-15 Thread Greg Kurz
The "simple" ICS class knows how to interract with KVM. Adapt sPAPR to use it instead of the ICS KVM class. Signed-off-by: Greg Kurz --- hw/ppc/spapr_irq.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/ppc/spapr_irq.c b/hw/ppc/spapr_irq.c index 9f43b7b3

Re: [Qemu-devel] [PATCH v2 4/9] ccid-card-passthru: Let the chardev::read() be more generic

2019-02-15 Thread Marc-André Lureau
Hi On Thu, Feb 14, 2019 at 9:20 PM Philippe Mathieu-Daudé wrote: > > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/usb/ccid-card-passthru.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/

Re: [Qemu-devel] [PATCH v2 8/9] ccid-card-passthru: Use size_t to hold size argument

2019-02-15 Thread Marc-André Lureau
Hi On Thu, Feb 14, 2019 at 9:28 PM Philippe Mathieu-Daudé wrote: > > check_atr() is called once with a unsigned argument. > Since there is no need to use a signed type, use a size_t. > > Signed-off-by: Philippe Mathieu-Daudé and make data const? Reviewed-by: Marc-André Lureau > --- > hw/usb

Re: [Qemu-devel] [RFC] memory: use memory_region_init_ram() instead of memory_region_allocate_system_memory()

2019-02-15 Thread Igor Mammedov
On Thu, 14 Feb 2019 18:30:37 + Peter Maydell wrote: > On Thu, 14 Feb 2019 at 14:07, Igor Mammedov wrote: > > Also some boards (ab)use memory_region_allocate_system_memory(), calling it > > several > > times to allocate various fixed sized chunks of RAM and ROMs, which is > > problematic >

Re: [Qemu-devel] [PATCH v2 9/9] ccid-card-passthru: Use size_t for index

2019-02-15 Thread Marc-André Lureau
On Thu, Feb 14, 2019 at 9:27 PM Philippe Mathieu-Daudé wrote: > > The variable 'opt_bytes' is an index to the data[] array. > Use size_t for indexes. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau > --- > hw/usb/ccid-card-passthru.c | 7 --- > 1 file changed, 4 i

[Qemu-devel] [PATCH] build-sys: remove baum SDL CFLAGS

2019-02-15 Thread Marc-André Lureau
SDL dependency was removed in commit f29b3431f6294168e5f8fc63edb91c15c6a08e41. Signed-off-by: Marc-André Lureau --- chardev/Makefile.objs | 1 - 1 file changed, 1 deletion(-) diff --git a/chardev/Makefile.objs b/chardev/Makefile.objs index d68e1347f9..7749bc0ec2 100644 --- a/chardev/Makefile.ob

Re: [Qemu-devel] [PATCH] migration/rdma: Fix qemu_rdma_cleanup null check

2019-02-15 Thread Peter Xu
On Fri, Feb 15, 2019 at 11:00:56AM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Thu, Feb 14, 2019 at 06:53:51PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > If the migration fails before the channel is open

Re: [Qemu-devel] [PATCH v7 10/35] target/riscv: Convert RV32A insns to decodetree

2019-02-15 Thread Bastian Koppelmann
On 2/13/19 4:53 PM, Palmer Dabbelt wrote: From: Bastian Koppelmann Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 17 +++ target/riscv/insn_trans/trans_rva.inc.c | 149

Re: [Qemu-devel] [PATCH v7 12/35] target/riscv: Convert RV32F insns to decodetree

2019-02-15 Thread Bastian Koppelmann
On 2/13/19 4:53 PM, Palmer Dabbelt wrote: From: Bastian Koppelmann Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn32.decode | 35 +++ target/riscv/insn_trans/trans_rvf.inc.c | 353

Re: [Qemu-devel] [PATCH v7 16/35] target/riscv: Convert RV priv insns to decodetree

2019-02-15 Thread Bastian Koppelmann
On 2/13/19 4:53 PM, Palmer Dabbelt wrote: +} + +static bool trans_sret(DisasContext *ctx, arg_sret *a) +{ +#ifndef CONFIG_USER_ONLY +tcg_gen_movi_tl(cpu_pc, ctx->base.pc_next); + +if (riscv_has_ext(ctx->env, RVS)) { This should use has_ext() Cheers, Bastian

Re: [Qemu-devel] [PATCH v7 20/35] target/riscv: Remove gen_jalr()

2019-02-15 Thread Bastian Koppelmann
On 2/13/19 4:53 PM, Palmer Dabbelt wrote: From: Bastian Koppelmann trans_jalr() is the only caller, so move the code into trans_jalr(). Acked-by: Alistair Francis Reviewed-by: Richard Henderson Signed-off-by: Bastian Koppelmann Signed-off-by: Peer Adelt --- target/riscv/insn_trans/tran

Re: [Qemu-devel] [PATCH v2 02/25] hw/arm: Express dependencies of the highbank machines with Kconfig

2019-02-15 Thread Thomas Huth
On 14/02/2019 21.35, Paolo Bonzini wrote: > On 14/02/19 20:17, Peter Maydell wrote: >> On Wed, 13 Feb 2019 at 08:38, Thomas Huth wrote: >>> >>> Add Kconfig dependencies for the highbank machine (and the midway >>> machine). >>> This patch is slightly based on earlier work by Ákos Kovács (i.e. >>>

  1   2   3   4   >