[Qemu-devel] [PATCH v4 02/15] xive: Only set source type for LSIs

2019-02-12 Thread Greg Kurz
MSI is the default and LSI specific code is guarded by the xive_source_irq_is_lsi() helper. The xive_source_irq_set() helper is a nop for MSIs. Simplify the code by turning xive_source_irq_set() into xive_source_irq_set_lsi() and only call it for LSIs. The call to xive_source_irq_set(false) in spa

Re: [Qemu-devel] [PATCH 0/5] dirty-bitmaps: deprecate @status field

2019-02-12 Thread John Snow
On 2/12/19 1:12 PM, Eric Blake wrote: > On 2/11/19 7:02 PM, John Snow wrote: >> The current internal meanings of "locked", "user_locked", >> "qmp_locked", "frozen", "enabled", and "disabled" are all >> a little muddled. >> >> Deprecate the @status field in favor of two new booleans >> that carry

[Qemu-devel] [PATCH v4 06/15] spapr_pci: add PHB unrealize

2019-02-12 Thread Greg Kurz
To support PHB hotplug we need to clean up lingering references, memory, child properties, etc. prior to the PHB object being finalized. Generally this will be called as a result of calling object_unparent() on the PHB object, which in turn would normally be called as the result of an unplug() oper

Re: [Qemu-devel] [PATCH v1 01/15] s390x/tcg: Fix TEST DATA CLASS instructions

2019-02-12 Thread David Hildenbrand
On 12.02.19 19:01, Richard Henderson wrote: > On 2/12/19 3:02 AM, David Hildenbrand wrote: >> +static bool s390_tdc32(CPUS390XState *env, float32 f1, uint16_t dc_mask) >> +{ >> +const bool neg = float32_is_neg(f1); >> +const bool zero = float32_is_zero(f1); >> +const bool no

[Qemu-devel] [PATCH v4 07/15] spapr: create DR connectors for PHBs

2019-02-12 Thread Greg Kurz
From: Michael Roth Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 13 + hw/ppc/spapr_drc.c | 17 + include/hw/ppc/spapr.h |1 + include/hw/ppc/spapr_drc.h |8 4 files

[Qemu-devel] [PATCH v4 09/15] spapr_events: add support for phb hotplug events

2019-02-12 Thread Greg Kurz
From: Michael Roth Extend the existing EPOW event format we use for PCI devices to emit PHB plug/unplug events. Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: Greg Kurz --- hw/ppc/spapr_events.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/ppc/spapr_even

[Qemu-devel] [PATCH v4 10/15] qdev: pass an Object * to qbus_set_hotplug_handler()

2019-02-12 Thread Greg Kurz
From: Michael Roth Certain devices types, like memory/CPU, are now being handled using a hotplug interface provided by a top-level MachineClass. Hotpluggable host bridges are another such device where it makes sense to use a machine-level hotplug handler. However, unlike those devices, host-bridg

[Qemu-devel] [PATCH v4 11/15] spapr_pci: provide node start offset via spapr_populate_pci_dt()

2019-02-12 Thread Greg Kurz
From: Michael Roth PHB hotplug re-uses PHB device tree generation code and passes it to a guest via RTAS. Doing this requires knowledge of where exactly in the device tree the node describing the PHB begins. Provide this via a new optional pointer that can be used to store the PHB node's start o

[Qemu-devel] [PATCH v4 05/15] spapr_irq: Expose the phandle of the interrupt controller

2019-02-12 Thread Greg Kurz
This will be used by PHB hotplug in order to create the "interrupt-map" property of the PHB node. Reviewed-by: Cédric Le Goater Signed-off-by: Greg Kurz --- v4: - return phandle via a pointer --- hw/ppc/spapr_irq.c | 26 ++ include/hw/ppc/spapr_irq.h |2 ++

Re: [Qemu-devel] Is IOThread for virtio-net a good idea?

2019-02-12 Thread Michael S. Tsirkin
On Tue, Feb 12, 2019 at 03:00:55PM +0800, Jason Wang wrote: > > On 2019/2/12 下午2:48, Jason Wang wrote: > > > > On 2019/2/11 下午9:40, Anton Kuchin wrote: > > > As far as I can see currently IOThread offloading is used only for > > > block devices and all others are emulated by main thread. > > > >

[Qemu-devel] [PATCH v4 12/15] spapr_pci: add ibm, my-drc-index property for PHB hotplug

2019-02-12 Thread Greg Kurz
From: Michael Roth This is needed to denote a boot-time PHB as being hot-pluggable. Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: Greg Kurz --- hw/ppc/spapr_pci.c |9 + 1 file changed, 9 insertions(+) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c in

[Qemu-devel] [PATCH v4 15/15] spapr: enable PHB hotplug for default pseries machine type

2019-02-12 Thread Greg Kurz
From: Michael Roth The 'dr_phb_enabled' field of that class can be set as part of machine-specific init code. It will be used to conditionally enable creation of DRC objects and device-tree description to facilitate hotplug of PHBs. Since we can't migrate this state to older machine types, defau

[Qemu-devel] [PATCH v4 04/15] spapr: Expose the name of the interrupt controller node

2019-02-12 Thread Greg Kurz
This will be needed by PHB hotplug in order to access the "phandle" property of the interrupt controller node. Reviewed-by: Cédric Le Goater Signed-off-by: Greg Kurz --- v4: - folded some changes from patches 15, 16 and 17 of v3 - dropped useless helpers --- hw/intc/spapr_xive.c|

Re: [Qemu-devel] [PATCH] hw/intc/armv7m_nvic: Allow byte accesses to SHPR1

2019-02-12 Thread Peter Maydell
On Tue, 12 Feb 2019 at 18:25, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 2/12/19 7:19 PM, Peter Maydell wrote: > > The code for handling the NVIC SHPR1 register intends to permit > > byte and halfword accesses (as the architecture requires). However > > the 'case' line for it only lists th

[Qemu-devel] [PATCH v4 13/15] spapr_drc: Allow FDT fragment to be added later

2019-02-12 Thread Greg Kurz
The current logic is to provide the FDT fragment when attaching a device to a DRC. This works perfectly fine for our current hotplug support, but soon we will add support for PHB hotplug which has some constraints, that CPU, PCI and LMB devices don't seem to have. The first constraint is that the

Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmaps: rename frozen predicate helper

2019-02-12 Thread John Snow
On 2/12/19 1:26 PM, Eric Blake wrote: > On 2/11/19 7:02 PM, John Snow wrote: >> "Frozen" was a good description a long time ago, but it isn't adequate now. >> Rename the frozen predicate to has_successor to make the semantics of the >> predicate more clear to outside callers. >> >> In the proces

Re: [Qemu-devel] [PATCH v3] virtio-blk: set correct config size for the host driver

2019-02-12 Thread Greg Kurz
On Tue, 12 Feb 2019 23:19:49 +0800 Changpeng Liu wrote: > Commit caa1ee43 "vhost-user-blk: add discard/write zeroes features > support" added fields to struct virtio_blk_config. This changes > the size of the config space and breaks migration from QEMU 3.1 > and older: > > qemu-system-ppc64: get

[Qemu-devel] [PATCH v4 14/15] spapr: add hotplug hooks for PHB hotplug

2019-02-12 Thread Greg Kurz
Hotplugging PHBs is a machine-level operation, but PHBs reside on the main system bus, so we register spapr machine as the handler for the main system bus. Provide the usual pre-plug, plug and unplug-request handlers. Move the checking of the PHB index to the pre-plug handler. It is okay to do th

Re: [Qemu-devel] [PATCH 2/5] block/dirty-bitmaps: rename frozen predicate helper

2019-02-12 Thread Eric Blake
On 2/11/19 7:02 PM, John Snow wrote: > "Frozen" was a good description a long time ago, but it isn't adequate now. > Rename the frozen predicate to has_successor to make the semantics of the > predicate more clear to outside callers. > > In the process, remove some calls to frozen() that no longer

Re: [Qemu-devel] [PATCH v3 0/5] add the BiosTablesTest UEFI app, build it with the new roms/edk2 submodule

2019-02-12 Thread Michael S. Tsirkin
On Wed, Feb 06, 2019 at 11:30:13AM +0100, Igor Mammedov wrote: > On Tue, 5 Feb 2019 16:19:50 +0100 > Laszlo Ersek wrote: > > > On 02/05/19 16:07, Igor Mammedov wrote: > > > On Mon, 4 Feb 2019 17:03:20 +0100 > > > Laszlo Ersek wrote: > > > > > > Am I to greedy to ask for prebuilt AVMF image in

Re: [Qemu-devel] [PATCH v1 06/15] s390x/tcg: Refactor SET FPC AND SIGNAL handling

2019-02-12 Thread Richard Henderson
On 2/12/19 3:02 AM, David Hildenbrand wrote: > We can directly work on the uint64_t value, no need for a temporary > uint32_t value. > > Also cleanup and shorten the comments. > > Signed-off-by: David Hildenbrand > --- > target/s390x/fpu_helper.c | 22 -- > 1 file changed, 1

Re: [Qemu-devel] [PATCH v1 07/15] s390x/tcg: Fix simulated-IEEE exceptions

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > The trap is triggered based on priority of the enabled signaling flags. > Only overflow and underflow allow a concurrent inexact exception. > > z14 PoP, 9-33, Figure 9-21 > > Signed-off-by: David Hildenbrand > --- > target/s390x/fpu_helper.c | 13 +

Re: [Qemu-devel] [PATCH 3/5] block/dirty-bitmap: change semantics of enabled predicate

2019-02-12 Thread John Snow
On 2/12/19 1:58 PM, Eric Blake wrote: > On 2/11/19 7:02 PM, John Snow wrote: >> Currently, enabled means something like "the status of the bitmap >> is ACTIVE." After this patch, it should mean exclusively: "This >> bitmap is recording guest writes, and is allowed to do so." >> >> In many places

Re: [Qemu-devel] [PATCH 4/5] block/dirty-bitmap: explicitly lock bitmaps with successors

2019-02-12 Thread Eric Blake
On 2/11/19 7:02 PM, John Snow wrote: > Instead of implying a locked status, make it explicit. > Now, bitmaps in use by migration, NBD or backup operations > are all treated the same way with the same code paths. > --- > block/dirty-bitmap.c | 9 + > 1 file changed, 5 insertions(+), 4 delet

Re: [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > We already forward the 3 bits correctly in the translation functions. We > also have to handle them properly and check for specification > exceptions. > > Setting an invalid rounding mode (BFP only, all DFP rounding modes) > results in a specification

Re: [Qemu-devel] [PATCH 3/5] block/dirty-bitmap: change semantics of enabled predicate

2019-02-12 Thread Eric Blake
On 2/11/19 7:02 PM, John Snow wrote: > Currently, enabled means something like "the status of the bitmap > is ACTIVE." After this patch, it should mean exclusively: "This > bitmap is recording guest writes, and is allowed to do so." > > In many places, this is how this predicate was already used.

Re: [Qemu-devel] [PATCH 5/5] block/dirty-bitmaps: unify qmp_locked and user_locked calls

2019-02-12 Thread Eric Blake
On 2/11/19 7:02 PM, John Snow wrote: > These mean the same thing now. Unify them and rename the merged call > bdrv_dirty_bitmap_busy to indicate semantically what we are describing, > as well as help disambiguate from the various _locked and _unlocked > versions of bitmap helpers that refer to mute

Re: [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes

2019-02-12 Thread David Hildenbrand
On 12.02.19 20:07, Richard Henderson wrote: > On 2/12/19 3:03 AM, David Hildenbrand wrote: >> We already forward the 3 bits correctly in the translation functions. We >> also have to handle them properly and check for specification >> exceptions. >> >> Setting an invalid rounding mode (BFP only, al

Re: [Qemu-devel] [PATCH 5/5] block/dirty-bitmaps: unify qmp_locked and user_locked calls

2019-02-12 Thread John Snow
On 2/12/19 2:27 PM, Eric Blake wrote: > On 2/11/19 7:02 PM, John Snow wrote: >> These mean the same thing now. Unify them and rename the merged call >> bdrv_dirty_bitmap_busy to indicate semantically what we are describing, >> as well as help disambiguate from the various _locked and _unlocked >

Re: [Qemu-devel] [PATCH v2 1/3] s390x/cpumodel: mepochptff: warn when no mepoch and re-align group init

2019-02-12 Thread David Hildenbrand
On 12.02.19 02:16, Collin Walling wrote: > The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent > on the multiple-epoch facility (mepoch). Let's print a warning if these > features are enabled without mepoch. > > While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down

Re: [Qemu-devel] [PATCH 0/2] Fix slirp regression on win32

2019-02-12 Thread Samuel Thibault
Marc-André Lureau, le mar. 12 févr. 2019 17:09:51 +0100, a ecrit: > QEMU wraps the socket functions in os-win32.h, but in commit > a9d8b3ec4385793815d71217857304, the header inclusion was dropped, > breaking slirp on Windows. Fix the regression by wrapping all the > socket functions. Applied to my

[Qemu-devel] [PATCH v3 1/2] tests.acceptance: adds multi vm capability for acceptance tests

2019-02-12 Thread Caio Carrara
This change adds the possibility to write acceptance tests with multi virtual machine support. It's done keeping the virtual machines objects stored in a test attribute (dictionary). This dictionary shouldn't be accessed directly but through the new method added `get_vm`. This new method accept a l

[Qemu-devel] [PATCH v3 0/2] tests.acceptance: adds multi vm capability and basic migration test

2019-02-12 Thread Caio Carrara
This is the third attempt to add the multi vm capability to base class of acceptance tests. The difference from first version is that in this current version a simple migration test was added (done by Cleber) so the new code that is being added is properly used and we're not adding "new dead code"

[Qemu-devel] [PATCH v3 2/2] tests.acceptance: adds simple migration test

2019-02-12 Thread Caio Carrara
This change adds the simplest possible migration test. Beyond the test purpose itself it's also useful to exercise the multi virtual machines capabilities from base avocado qemu test class. Signed-off-by: Cleber Rosa Signed-off-by: Caio Carrara --- tests/acceptance/migration.py | 53 +++

Re: [Qemu-devel] [PATCH] blockdev: acquire aio_context for bitmap add/remove

2019-02-12 Thread Eric Blake
On 2/6/19 11:02 AM, John Snow wrote: > When bitmaps are persistent, they may incur a disk read or write when bitmaps > are added or removed. For configurations like virtio-dataplane, failing to > acquire this lock will abort QEMU when disk IO occurs. > > We used to acquire aio_context as part of t

[Qemu-devel] [PATCH 4/5] tests/tcg: target/mips: Add a header with test utilities

2019-02-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Add a header that contains test utilities. For now, it contains only a function for checking and printing test results for bit counting and similar MSA instructions. Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/include/test_utils.h | 84 ++

Re: [Qemu-devel] [PATCH] blockdev: acquire aio_context for bitmap add/remove

2019-02-12 Thread John Snow
On 2/12/19 2:36 PM, Eric Blake wrote: > On 2/6/19 11:02 AM, John Snow wrote: >> When bitmaps are persistent, they may incur a disk read or write when bitmaps >> are added or removed. For configurations like virtio-dataplane, failing to >> acquire this lock will abort QEMU when disk IO occurs. >>

[Qemu-devel] [PATCH 0/5] target/mips: Add MSA ASE tests

2019-02-12 Thread Aleksandar Markovic
From: Aleksandar Markovic This series begins to add unit tests (aka tcg tests) for MIPS' MSA ASE. More tests and related test infrastructure will be added in subsequent version of this series. There are several checkpatch warnings that are all false positives for given circumstances. Aleksandar

[Qemu-devel] [PATCH 1/5] tests/tcg: target/mips: Remove an unnecessary file

2019-02-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Remove a file that was added long time ago by mistake. Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/mips64-dspr2/.directory | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 tests/tcg/mips/mips64-dspr2/.directory diff --git a/tests/tcg/mips/mips64-d

[Qemu-devel] [PATCH 2/5] tests/tcg: target/mips: Add a header with test inputs

2019-02-12 Thread Aleksandar Markovic
From: Aleksandar Markovic The file tests/tcg/mips/include/test_inputs.h is planned to contain various test inputs. For now, it contains 64 128-bit pattern inputs (alternating groups od ones and zeroes) and 16 128-bit random inputs. Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/include/

Re: [Qemu-devel] [PATCH v3 1/2] pcie: Add a simple PCIe ACS (Access Control Services) helper function

2019-02-12 Thread Knut Omang
On Tue, 2019-02-12 at 10:14 -0700, Alex Williamson wrote: > On Tue, 12 Feb 2019 17:25:46 +0100 > Knut Omang wrote: > > > On Tue, 2019-02-12 at 08:59 -0700, Alex Williamson wrote: > > > On Tue, 12 Feb 2019 09:07:43 +0100 > > > Knut Omang wrote: > > > > > > > On Mon, 2019-02-11 at 16:09 -0700,

[Qemu-devel] [PATCH 3/5] tests/tcg: target/mips: Add a header with MSA wrappers

2019-02-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Add a header that contains wrappers around MSA instructions assembler invocations. For now, only bit counting instructions (NLOC, NLZC, and PCNT; each in four data format flavors) are supported. Signed-off-by: Aleksandar Markovic --- tests/tcg/mips/include/wrappers_ms

[Qemu-devel] [PATCH 5/5] tests/tcg: target/mips: Add tests for MSA bit counting instructions

2019-02-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Add tests for MSA bit counting instructions. Each test consists of 80 test cases, so altogether there are 960 test cases. Signed-off-by: Aleksandar Markovic --- .../user/ase/msa/bit_counting/test_msa_nloc_b.c| 144 + .../user/ase/msa/bit_counti

Re: [Qemu-devel] [PATCH v1 09/15] s390x/tcg: Check for exceptions in SET BFP ROUNDING MODE

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > Let's split handling of BFP/DFP rounding mode configuration. Also, > let's not reuse the sfpc handler, use a separate handler so we can > properly check for specification exceptions for SRNMB. > > Signed-off-by: David Hildenbrand > --- Reviewed-by:

Re: [Qemu-devel] [PATCH 1/5] tests/tcg: target/mips: Remove an unnecessary file

2019-02-12 Thread Eric Blake
On 2/12/19 1:53 PM, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Remove a file that was added long time ago by mistake. Might be worth mentioning commit d70080c4 (in 2012). Is this the sort of file that is likely enough to be created during typical workflows that it should be list

Re: [Qemu-devel] [PATCH v1 08/15] s390x/tcg: Handle SET FPC AND LOAD FPC 3-bit BFP rounding modes

2019-02-12 Thread Richard Henderson
On 2/12/19 11:32 AM, David Hildenbrand wrote: >> Yes, you want round_to_odd. I suppose that's not valid for float128 right >> now? > > roundAndPackFloat64() > > as well as > > roundAndPackFloat128() > > support it. > > It's not implemented for round_canonical(), round_to_int(), These two ar

Re: [Qemu-devel] [PATCH v1 11/15] s390x/tcg: Prepare for IEEE-inexact-exception control (XxC)

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > Some instructions allow to suppress IEEE inexact exceptions. > > z14 PoP, 9-23, "Suppression of Certain IEEE Exceptions" > IEEE-inexact-exception control (XxC): Bit 1 of > the M4 field is the XxC bit. If XxC is zero, recogni- > tion of IEE

Re: [Qemu-devel] [PATCH v4 01/15] spapr_irq: Add an @xics_offset field to sPAPRIrq

2019-02-12 Thread Cédric Le Goater
On 2/12/19 7:24 PM, Greg Kurz wrote: > Only pseries machines, either recent ones started with ic-mode=xics > or older ones using the legacy irq allocation scheme, need to set the > @offset of the ICS to XICS_IRQ_BASE. Recent pseries started with > ic-mode=dual set it to 0 and powernv machines set i

[Qemu-devel] [PATCH v2] blockdev: acquire aio_context for bitmap add/remove

2019-02-12 Thread John Snow
When bitmaps are persistent, they may incur a disk read or write when bitmaps are added or removed. For configurations like virtio-dataplane, failing to acquire this lock will abort QEMU when disk IO occurs. We used to acquire aio_context as part of the bitmap lookup, so re-introduce the lock for

Re: [Qemu-devel] [Qemu-ppc] [PATCH] cuda: decrease time delay before raising VIA SR interrupt

2019-02-12 Thread Mark Cave-Ayland
On 12/02/2019 18:21, Philippe Mathieu-Daudé wrote: > On 2/12/19 6:50 PM, Mark Cave-Ayland wrote: >> On 12/02/2019 17:21, Philippe Mathieu-Daudé wrote: >> > If this delay is to prevent a bug which only happens in MacOS then that's > the hack > not the normal code path to run without th

Re: [Qemu-devel] [PATCH v1 10/15] s390x/tcg: Refactor saving/restoring the bfp rounding mode

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > We want to reuse this in the context of vector instructions. So use > better matching names and introduce s390_restore_bfp_rounding_mode(). > > While at it, add proper newlines. > > Signed-off-by: David Hildenbrand > --- Reviewed-by: Richard Hender

Re: [Qemu-devel] [PATCH v4 03/15] spapr_irq: Set LSIs at interrupt controller init

2019-02-12 Thread Cédric Le Goater
On 2/12/19 7:24 PM, Greg Kurz wrote: > The pseries machine only uses LSIs to support legacy PCI devices. Every > PHB claims 4 LSIs at realize time. When using in-kernel XICS (or upcoming > in-kernel XIVE), QEMU synchronizes the state of all irqs, including these > LSIs, later on at machine reset. >

Re: [Qemu-devel] [PATCH 1/5] tests/tcg: target/mips: Remove an unnecessary file

2019-02-12 Thread Aleksandar Markovic
> From: Eric Blake > Sent: Tuesday, February 12, 2019 9:04 PM > To: Aleksandar Markovic; qemu-devel@nongnu.org > Cc: Aleksandar Rikalo; alex.ben...@linaro.org; Aleksandar Markovic; > aurel...@aurel32.net > Subject: Re: [Qemu-devel] [PATCH 1/5] tests/tcg: target/mips: Remove an > unnecessary file

Re: [Qemu-devel] [PATCH v2] blockdev: acquire aio_context for bitmap add/remove

2019-02-12 Thread Eric Blake
On 2/12/19 2:07 PM, John Snow wrote: > When bitmaps are persistent, they may incur a disk read or write when bitmaps > are added or removed. For configurations like virtio-dataplane, failing to > acquire this lock will abort QEMU when disk IO occurs. > > We used to acquire aio_context as part of t

Re: [Qemu-devel] [PATCH v1 12/15] s390x/tcg: Implement XxC and checks for most FP instructions

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > -uint64_t HELPER(cegb)(CPUS390XState *env, int64_t v2, uint32_t m3) > +uint64_t HELPER(cegb)(CPUS390XState *env, int64_t v2, uint32_t m) > { > -int old_mode = s390_swap_bfp_rounding_mode(env, m3); > +int old_mode = s390_swap_bfp_rounding_mode(

Re: [Qemu-devel] [PATCH v1 13/15] s390x/tcg: Implement rounding mode and XxC for LOAD ROUNDED

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > With the floating-point extension facility, LOAD ROUNDED has > a rounding mode specification and the inexact-exception control (XxC). > > Handle them just like e.g. LOAD FP INTEGER. > > Signed-off-by: David Hildenbrand > --- Modulo the comments for

Re: [Qemu-devel] [PATCH v1 14/15] s390x/tcg: Handle all rounding modes overwritten by BFP instructions

2019-02-12 Thread Richard Henderson
On 2/12/19 3:03 AM, David Hildenbrand wrote: > PoP describes "Round to nearest with ties away from 0" as > "The candidate nearest to the input value is selected. In case of a tie, >the candidate selected is the one that is larger in magnitude." > > While float_round_ties_away is according to

Re: [Qemu-devel] [PATCH 03/19] xive: extend the XiveRouter get_tctx() method with the page offset

2019-02-12 Thread Cédric Le Goater
On 2/12/19 9:25 AM, Cédric Le Goater wrote: > On 2/12/19 5:34 AM, David Gibson wrote: >> On Mon, Jan 28, 2019 at 10:46:09AM +0100, Cédric Le Goater wrote: >>> The PowerNV machine can perform indirect loads and stores on the TIMA >>> on behalf of another CPU. The PIR of the CPU is controlled by a se

[Qemu-devel] [PATCH v3 3/3] tpm_tis: convert tpm_tis_show_buffer() to use trace event

2019-02-12 Thread Liam Merwick
cppcheck reports: [hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int' Rather than just converting the format specifier to use '%u", the tpm_tis_show_buffer() function is converted to use trace points and the two debug callers use t

[Qemu-devel] [PATCH v3 2/3] tpm_tis: assert valid addr passed to tpm_tis_locality_from_addr()

2019-02-12 Thread Liam Merwick
Assert that the address passed in results in a valid locality value. Current callers pass a valid address so this is just a defensive check to prevent a future caller passing an incorrect address or catch if the MMIO address parameters were not all modified correctly. This is to help static code a

[Qemu-devel] [PATCH v3 1/3] tpm_tis: fix loop that cancels any seizure by a lower locality

2019-02-12 Thread Liam Merwick
In tpm_tis_mmio_write() if the requesting locality is seizing access, any seizure by a lower locality is cancelled. However the loop doing the seizure had an off-by-one error and the locality immediately preceding the requesting locality was not being cleared. This is fixed by adjusting the test i

Re: [Qemu-devel] [PATCH v3 3/3] tpm_tis: convert tpm_tis_show_buffer() to use trace event

2019-02-12 Thread Stefan Berger
On 2/12/19 3:48 PM, Liam Merwick wrote: cppcheck reports: [hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int' Rather than just converting the format specifier to use '%u", the tpm_tis_show_buffer() function is converted to use tr

Re: [Qemu-devel] [PATCH v3 3/3] blkdebug: Add latency injection rule type

2019-02-12 Thread Marc Olson via Qemu-devel
On 1/11/19 7:00 AM, Max Reitz wrote: On 12.11.18 08:06, Marc Olson wrote: Add a new rule type for blkdebug that instead of returning an error, can inject latency to an IO. Signed-off-by: Marc Olson --- block/blkdebug.c | 79 +++--- docs/deve

[Qemu-devel] [Bug 1813034] Re: create_elf_tables() doesn't set AT_PLATFORM for 32bit ARM platforms

2019-02-12 Thread Richard Henderson
Patches posted: https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg02863.html ** Changed in: qemu Assignee: (unassigned) => Richard Henderson (rth) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net

[Qemu-devel] [PATCH 1/2] qga-win: include glib when building VSS DLL

2019-02-12 Thread Michael Roth
Commit 3ebee3b191e defined assert() as g_assert(), but when we build the VSS DLL component of QGA (to handle fsfreeze) we do not include glib, which results in breakage when building with VSS support enabled. Fix this by including glib. Since the VSS DLL is built statically, this introduces an add

[Qemu-devel] [PATCH 0/2] qga-win: fixes for builds with VSS/fsfreeze enabled

2019-02-12 Thread Michael Roth
These fix a couple build regressions that have slipped in over that past couple months and hopefully will help avoid future breakages. qga/vss-win32/Makefile.objs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PULL v2 12/24] target/hppa: Convert direct and indirect branches

2019-02-12 Thread Richard Henderson
Tested-by: Helge Deller Tested-by: Sven Schnelle Signed-off-by: Richard Henderson --- target/hppa/translate.c | 131 +-- target/hppa/insns.decode | 34 +- 2 files changed, 63 insertions(+), 102 deletions(-) diff --git a/target/hppa/translate.c b/ta

Re: [Qemu-devel] [PATCH v2] blockdev: acquire aio_context for bitmap add/remove

2019-02-12 Thread John Snow
On 2/12/19 3:16 PM, Eric Blake wrote: > On 2/12/19 2:07 PM, John Snow wrote: >> When bitmaps are persistent, they may incur a disk read or write when bitmaps >> are added or removed. For configurations like virtio-dataplane, failing to >> acquire this lock will abort QEMU when disk IO occurs. >>

[Qemu-devel] [PULL v2 00/24] target/hppa patch queue

2019-02-12 Thread Richard Henderson
ommit 0b5e750bea635b167eb03d86c3d9a09bbd43bc06: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2019-02-12 10:53:37 +) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-hppa-20190212 for you to fetc

[Qemu-devel] [PATCH 2/2] qga-win: fix VSS build breakage due to unintended gnu99 C++ flag

2019-02-12 Thread Michael Roth
Commit 7be41675f7c set -std=gnu99 for C code via QEMU_CFLAGS. Currently we generate a "custom" QEMU_CXXFLAGS for VSS DLL C++ build by filtering out some options from QEMU_CFLAGS and adding some others. Since we don't filter out -std=gnu99 currently this breaks builds when VSS support is enabled. W

Re: [Qemu-devel] [PATCH v2 1/2] linux-user: Add ELF_PLATFORM for arm

2019-02-12 Thread Richard Henderson
On 2/12/19 12:31 AM, Laurent Vivier wrote: > I know nothing about ARM, but in kernel we have also a "v5t" > (cpu_elf_name) and in QEMU we have a ARM_FEATURE_V4T which is set with > ARM_FEATURE_V5. Is it related? >From the ARM ARM (DDI 0406C, page A1-30): The valid variants of ARMv4, ARMv5, and AR

[Qemu-devel] [PATCH] gdbstub: Send a reply to the vKill packet.

2019-02-12 Thread Sandra Loosemore
Per the GDB remote protocol documentation https://sourceware.org/gdb/current/onlinedocs/gdb/Packets.html#index-vKill-packet the debug stub is expected to send a reply to the 'vKill' packet. At least some versions of GDB crash if the gdb stub simply exits without sending a reply. This patch fixe

[Qemu-devel] [RFC 1/4] numa, spapr: add thread-id in the possible_cpus list

2019-02-12 Thread Laurent Vivier
spapr_possible_cpu_arch_ids() counts only cores, and so the number of available CPUs is the number of vCPU divided by smp_threads. ... -smp 4,maxcpus=8,cores=2,threads=2,sockets=2 -numa node,cpus=0,cpus=1 \ -numa node,cpus=3,cpus=4 \

[Qemu-devel] [RFC 2/4] numa: exit on incomplete CPU mapping

2019-02-12 Thread Laurent Vivier
Change the existing message to an error and exit. This message was a warning and comes with the information it will be removed in the future since May 10 2017 (ec78f8114bc4 "numa: use possible_cpus for not mapped CPUs check"). Update tests/numa-test to remove the incomplete CPU mapping test. Sig

[Qemu-devel] [RFC 0/4] numa, spapr: add thread-id in the possible_cpus list

2019-02-12 Thread Laurent Vivier
There are inconsistencies between the command line using "-numa node,cpus=XX" and what is checked internally: the XX is supposed to be a CPU number, but for SPAPR it's taken as a core number, ignoring the threads. (See the description message of PATCH 1 for more details) This series fixes this pro

[Qemu-devel] [RFC 3/4] numa: move cpu_slot_to_string() upper in the function

2019-02-12 Thread Laurent Vivier
This will allow to use it in more functions in the future. As we change the prototype to take directly CpuInstanceProperties instead of CPUArchId, rename the function to cpu_props_to_string(). Signed-off-by: Laurent Vivier --- hw/core/machine.c | 44 ++--

[Qemu-devel] [RFC 4/4] numa: check threads of the same core are on the same node

2019-02-12 Thread Laurent Vivier
A core cannot be split between two nodes. To check if a thread of the same core has already been assigned to a node, this patch reverses the numa topology checking order and exits if the topology is not valid. Update test/numa-test accordingly. Fixes: 722387e78daf ("spapr: get numa node mapping f

Re: [Qemu-devel] [PATCH v2] blockdev: acquire aio_context for bitmap add/remove

2019-02-12 Thread Eric Blake
On 2/12/19 3:37 PM, John Snow wrote: > > > On 2/12/19 3:16 PM, Eric Blake wrote: >> On 2/12/19 2:07 PM, John Snow wrote: >>> When bitmaps are persistent, they may incur a disk read or write when >>> bitmaps >>> are added or removed. For configurations like virtio-dataplane, failing to >>> acquir

[Qemu-devel] [PATCH v4 0/5] RISC-V: Add gdb xml files and gdbstub support.

2019-02-12 Thread Jim Wilson
This is the 4th version of the patch set. Updated as per the review from Alistair, it has the riscv_csrrw_debug function added, and Reviewed-By lines added. Otherwise it is the same as the 3rd version. Jim

[Qemu-devel] [PATCH v4 1/5] RISC-V: Add 32-bit gdb xml files.

2019-02-12 Thread Jim Wilson
Signed-off-by: Jim Wilson Reviewed-by: Alistair Francis --- configure | 1 + gdb-xml/riscv-32bit-cpu.xml | 43 gdb-xml/riscv-32bit-csr.xml | 250 gdb-xml/riscv-32bit-fpu.xml | 46 4 files changed, 340 insertions

[Qemu-devel] [PATCH v4 3/5] RISC-V: Fixes to CSR_* register macros.

2019-02-12 Thread Jim Wilson
This adds some missing CSR_* register macros, and documents some as being priv v1.9.1 specific. Signed-off-by: Jim Wilson Reviewed-by: Alistair Francis --- target/riscv/cpu_bits.h | 35 +-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/target/ris

[Qemu-devel] [PATCH v4 5/5] RISC-V: Add hooks to use the gdb xml files.

2019-02-12 Thread Jim Wilson
The gdb CSR xml file has registers in documentation order, not numerical order, so we need a table to map the register numbers. This also adds fairly standard gdb hooks to access xml specified registers. Signed-off-by: Jim Wilson --- target/riscv/cpu.c | 9 +- target/riscv/cpu.h | 2

[Qemu-devel] [PATCH v4 2/5] RISC-V: Add 64-bit gdb xml files.

2019-02-12 Thread Jim Wilson
Signed-off-by: Jim Wilson Reviewed-by: Alistair Francis --- configure | 1 + gdb-xml/riscv-64bit-cpu.xml | 43 gdb-xml/riscv-64bit-csr.xml | 250 gdb-xml/riscv-64bit-fpu.xml | 52 + 4 files changed, 346 insertion

[Qemu-devel] [PATCH v4 4/5] RISC-V: Add debug support for accessing CSRs.

2019-02-12 Thread Jim Wilson
Add a debugger field to CPURISCVState. Add riscv_csrrw_debug function to set it. Disable mode checks when debugger field true. Signed-off-by: Jim Wilson Reviewed-by: Alistair Francis --- target/riscv/cpu.h | 5 + target/riscv/csr.c | 34 ++ 2 files changed

Re: [Qemu-devel] [PATCH v6 00/35] target/riscv: Convert to decodetree

2019-02-12 Thread Palmer Dabbelt
On Wed, 23 Jan 2019 01:25:03 PST (-0800), Bastian Koppelmann wrote: Hi, this patchset converts the RISC-V decoder to decodetree in four major steps: 1) Convert 32-bit instructions to decodetree [Patch 1-16]: Many of the gen_* functions are called by the decode functions for 16-bit and 3

Re: [Qemu-devel] [PATCH v4 5/5] RISC-V: Add hooks to use the gdb xml files.

2019-02-12 Thread Alistair Francis
On Tue, Feb 12, 2019 at 3:10 PM Jim Wilson wrote: > > The gdb CSR xml file has registers in documentation order, not numerical > order, so we need a table to map the register numbers. This also adds > fairly standard gdb hooks to access xml specified registers. > > Signed-off-by: Jim Wilson Rev

Re: [Qemu-devel] [PATCH 07/19] target/ppc: Make special ORs match x86 pause and don't generate on mttcg

2019-02-12 Thread David Gibson
On Mon, Jan 28, 2019 at 10:46:13AM +0100, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > There's no point in going out of translation on an SMT OR with > mttcg since the backend won't do anything useful such as pausing, > it's only useful on traditional TCG to give time to other > pro

Re: [Qemu-devel] [PATCH 08/19] target/ppc: Fix nip on power management instructions

2019-02-12 Thread David Gibson
On Mon, Jan 28, 2019 at 10:46:14AM +0100, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > Those instructions currently raise an exception from within > the helper. This tends to result in a bogus nip value in > the env context (typically the beginning of the TB). Such > a helper needs

Re: [Qemu-devel] [PATCH 09/19] target/ppc: Don't clobber MSR:EE on PM instructions

2019-02-12 Thread David Gibson
On Mon, Jan 28, 2019 at 10:46:15AM +0100, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > When issuing a power management instruction, we set MSR:EE > to force ppc_hw_interrupt() into calling powerpc_excp() > to deal with the fact that on P7 and P8, the system reset > caused by the wak

Re: [Qemu-devel] [PATCH 08/19] target/ppc: Fix nip on power management instructions

2019-02-12 Thread Benjamin Herrenschmidt
On Tue, 2019-02-12 at 17:02 +1100, David Gibson wrote: > On Mon, Jan 28, 2019 at 10:46:14AM +0100, Cédric Le Goater wrote: > > From: Benjamin Herrenschmidt > > > > Those instructions currently raise an exception from within > > the helper. This tends to result in a bogus nip value in > > the env

Re: [Qemu-devel] [PATCH 07/19] target/ppc: Make special ORs match x86 pause and don't generate on mttcg

2019-02-12 Thread Benjamin Herrenschmidt
On Tue, 2019-02-12 at 16:59 +1100, David Gibson wrote: > On Mon, Jan 28, 2019 at 10:46:13AM +0100, Cédric Le Goater wrote: > > From: Benjamin Herrenschmidt > > > > There's no point in going out of translation on an SMT OR with > > mttcg since the backend won't do anything useful such as pausing,

Re: [Qemu-devel] [PATCH 4/4] mips_fulong2e: Add on-board graphics chip

2019-02-12 Thread BALATON Zoltan
On Tue, 12 Feb 2019, Philippe Mathieu-Daudé wrote: On 2/11/19 5:01 AM, BALATON Zoltan wrote: Add (partial) emulation of the on-board GPU of the machine. This allows the PMON2000 firmware to run and should also work with Linux console but probably not with X yet. Signed-off-by: BALATON Zoltan -

Re: [Qemu-devel] [PATCH] hw/display: Add basic ATI VGA emulation

2019-02-12 Thread BALATON Zoltan
Hello, On Tue, 12 Feb 2019, Philippe Mathieu-Daudé wrote: Hi Zoltan, Thanks for the quick review and testing. I'll use your suggestions for the other (mips) patches in a v2. For this one I'm not convinced. On 2/11/19 4:19 AM, BALATON Zoltan wrote: [...] + +static void ati_reg_write_offs(

Re: [Qemu-devel] [PATCH] SiFive RISC-V GPIO Device

2019-02-12 Thread Alistair Francis
On Tue, Feb 12, 2019 at 9:39 AM Fabien Chouteau wrote: > > QEMU model of the GPIO device on the SiFive E300 series SOCs. > > The pins are not used by a board definition yet, however this > implementation can already be used to trigger GPIO interrupts from the > software by configuring a pin as bot

[Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-12 Thread Changpeng Liu
Commit caa1ee43 "vhost-user-blk: add discard/write zeroes features support" added fields to struct virtio_blk_config. This changes the size of the config space and breaks migration from QEMU 3.1 and older: qemu-system-ppc64: get_pci_config_device: Bad config data: i=0x10 read: 41 device: 1 cmask:

Re: [Qemu-devel] [PATCH v3] virtio-blk: set correct config size for the host driver

2019-02-12 Thread Liu, Changpeng
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, February 12, 2019 11:11 PM > To: Liu, Changpeng > Cc: qemu-devel@nongnu.org; stefa...@redhat.com; sgarz...@redhat.com; > dgilb...@redhat.com; ldok...@redhat.com > Subject: Re: [PATCH v3] virtio-blk

[Qemu-devel] Combining -loadvm and -snapshot

2019-02-12 Thread Drew DeVault
I recently ran into an issue where I found I couldn't combine the -loadvm and -snapshot flags, nor any conceivable combination of alternate approaches like loadvm via the monitor. Independently, both options work as expected, but together I get this error: qemu-system-x86_64: Device 'virtio0' does

Re: [Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-12 Thread Michael S. Tsirkin
On Wed, Feb 13, 2019 at 09:48:57AM +0800, Changpeng Liu wrote: > Commit caa1ee43 "vhost-user-blk: add discard/write zeroes features > support" added fields to struct virtio_blk_config. This changes > the size of the config space and breaks migration from QEMU 3.1 > and older: > > qemu-system-ppc64

Re: [Qemu-devel] [PATCH v6 00/35] target/riscv: Convert to decodetree

2019-02-12 Thread Palmer Dabbelt
On Tue, Feb 12, 2019 at 3:21 PM Palmer Dabbelt wrote: > On Wed, 23 Jan 2019 01:25:03 PST (-0800), Bastian Koppelmann wrote: > > Hi, > > > > this patchset converts the RISC-V decoder to decodetree in four major > steps: > > > > 1) Convert 32-bit instructions to decodetree [Patch 1-16]: > > Man

Re: [Qemu-devel] [PATCH v2] Kconfig: add documentation

2019-02-12 Thread Peter Xu
On Tue, Feb 12, 2019 at 10:57:49AM +0100, Paolo Bonzini wrote: [...] > +Writing and modifying default configurations > + > + > +In addition to the Kconfig files under hw/, each target also includes > +a file called ``default-configs/TARGETNAME-softmmu.m

<    1   2   3   4   >