[Qemu-devel] [PATCH 1/2] sysbus: always allow explicit_ofw_unit_address() to override address generation

2018-08-05 Thread Mark Cave-Ayland
Some SysBusDevices either use sysbus_init_mmio() without sysbus_mmio_map() or the first MMIO memory region doesn't represent the bus address, causing a firmware device path with an invalid address to be generated. SysBusDeviceClass does provide a virtual explicit_ofw_unit_address() method that can

[Qemu-devel] [PATCH 0/2] machine: preparation for adding SPARC64/PPC bootindex support

2018-08-05 Thread Mark Cave-Ayland
Here is a patchset that contains the preparatory work to enable upcoming bootindex support in OpenBIOS for SPARC64/PPC. Patch 1 enables the OFW address generated via the sysbus explicit_ofw_unit_address() method to always take precendence when generating fw paths, and has already been discussed o

[Qemu-devel] [PATCH 2/2] fw_cfg: set the get_boot_devices_list() ignore_suffixes parameter from machine property

2018-08-05 Thread Mark Cave-Ayland
For the older machines (such as Mac and SPARC) the DT nodes representing bootdevices for disk nodes are irregular for mainly historical reasons, and should be handled on an individual basis via a custom FWPathProvider. Since the majority of bootdevice nodes for these machines either do not have a

Re: [Qemu-devel] [Qemu-ppc] [PATCH 7/7] target/ppc: Use non-arithmetic conversions for fp load/store

2018-08-05 Thread Mark Cave-Ayland
On 06/07/18 10:03, Mark Cave-Ayland wrote: On 05/07/18 17:48, Richard Henderson wrote: On 07/05/2018 09:31 AM, Programmingkid wrote: On Jul 3, 2018, at 11:17 AM, Richard Henderson wrote: Memory operations have no side effects on fp state. The use of a "real" conversions between float64 and

Re: [Qemu-devel] [PATCH 07/13] hw/rdma: Do not allocate memory for non-dma MR

2018-08-05 Thread Yuval Shaia
On Tue, Jul 24, 2018 at 03:19:52PM +0300, Marcel Apfelbaum wrote: > > Hi Yuval, > > On 07/16/2018 10:40 AM, Yuval Shaia wrote: > > There is no use in the memory allocated for non-dma MR (one with > > host_virt equals to NULL). > > No need for the (one with...) Will remove. > > > Delete the co

[Qemu-devel] [Bug 1785485] [NEW] Mouse moves erratically when using scroll wheel on Windows NT 4, Windows 95, and Windows 3.1 guests

2018-08-05 Thread John Arbuckle
Public bug reported: QEMU version: 3.0.0 RC3 Guests: Windows NT 4.0, Windows 95, Windows 3.1 Program: When the user uses the scroll wheel, the mouse's movement becomes erratic. This is noticed immediately when the scroll wheel is used. Sometimes the problem can be fixed by moving the scroll whee

[Qemu-devel] [PATCH v2 05/13] hw/pvrdma: Make default pkey 0xFFFF

2018-08-05 Thread Yuval Shaia
0x7FFF is not the default pkey - fix it. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 3 +++ hw/rdma/vmw/pvrdma_cmd.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index 81e0e0e99c..e2d

[Qemu-devel] [PATCH v2 04/13] hw/pvrdma: Clean CQE before use

2018-08-05 Thread Yuval Shaia
Next CQE is fetched from CQ ring, clean it before usage as it still carries old CQE values. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index

[Qemu-devel] [PATCH v2 00/13] Misc fixes for pvrdma device

2018-08-05 Thread Yuval Shaia
Hi, Please review some changes i've made for pvrdma device. v1 -> v2: * Fix various stuff pointed by Marcel * Add Marcel's r-b Yuval Shaia (13): hw/rdma: Make distinction between device init and start modes hw/pvrdma: Bugfix - provide the correct attr_mask to query_qp hw/rdm

[Qemu-devel] [PATCH v2 02/13] hw/pvrdma: Bugfix - provide the correct attr_mask to query_qp

2018-08-05 Thread Yuval Shaia
Calling rdma_rm_query_qp with attr_mask equals to -1 leads to error where backend query_qp fails to retrieve the needed QP attributes. Fix it by providing the attr_mask we got from driver. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- 1 file cha

[Qemu-devel] [PATCH v2 06/13] hw/rdma: Delete useless structure RdmaRmUserMR

2018-08-05 Thread Yuval Shaia
The structure RdmaRmUserMR has no benefits, remove it an move all its fields to struct RdmaRmMR. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 3 +-- hw/rdma/rdma_rm.c | 16 hw/rdma/rdma_rm_defs.h | 10 +++--- 3 files changed, 12 insertions(+), 17 deletions(-

[Qemu-devel] [PATCH v2 08/13] hw/rdma: Reorder resource cleanup

2018-08-05 Thread Yuval Shaia
To be consistence with allocation do the reverse order in deallocation Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index bf4a5c71b4..1f014b4ab2 100644 --

[Qemu-devel] [PATCH v2 01/13] hw/rdma: Make distinction between device init and start modes

2018-08-05 Thread Yuval Shaia
There are certain operations that are well considered as part of device configuration while others are needed only when "start" command is triggered by the guest driver. An example of device initialization step is msix_init and example of "device start" stage is the creation of a CQ completion hand

[Qemu-devel] [PATCH v2 03/13] hw/rdma: Modify debug macros

2018-08-05 Thread Yuval Shaia
- Add line counter to ease navigation in log - Print rdma instead of pvrdma Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_utils.c | 4 hw/rdma/rdma_utils.h | 16 hw/rdma/vmw/pvrdma_main.c | 2 ++ 3 files changed, 18 insertions(+), 4 d

[Qemu-devel] [PATCH v2 11/13] hw/rdma: Print backend QP number in hex format

2018-08-05 Thread Yuval Shaia
To be consistent with other prints throughout the code fix places that print it as decimal number. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 4 ++-- hw/rdma/vmw/pvrdma_qp_ops.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v2 07/13] hw/rdma: Do not allocate memory for non-dma MR

2018-08-05 Thread Yuval Shaia
There is no use in the memory allocated for non-dma MR. Delete the code that allocates it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 52 +++ 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/2] ppc-for-3.0 queue 20180801

2018-08-05 Thread BALATON Zoltan
On Wed, 1 Aug 2018, Peter Maydell wrote: On 1 August 2018 at 12:24, BALATON Zoltan wrote: On Wed, 1 Aug 2018, Peter Maydell wrote: So, we've just put out rc3, which in an ideal world is our final release candidate for 3.0. Are these bugs regressions from 2.12 ? I don't know about the macio

[Qemu-devel] [PATCH v2 09/13] hw/pvrdma: Cosmetic change - indent right

2018-08-05 Thread Yuval Shaia
Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 1b1330e113..3d448bffc4 100644 --- a/hw/rdma/vmw/pvrdma_main.c +++ b/hw/rdma/vm

[Qemu-devel] [PATCH v2 10/13] hw/rdma: Cosmetic change - move to generic function

2018-08-05 Thread Yuval Shaia
To ease maintenance of struct comp_thread move all related code to dedicated function. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.

[Qemu-devel] [PATCH v2 13/13] hw/rdma: Add reference to pci_dev in backend_dev

2018-08-05 Thread Yuval Shaia
The field backend_dev->dev is not initialized, fix it. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c| 6 +- hw/rdma/rdma_backend.h| 2 +- hw/rdma/vmw/pvrdma_main.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_bac

[Qemu-devel] [PATCH v2 12/13] hw/rdma: Bugfix - Support non-aligned buffers

2018-08-05 Thread Yuval Shaia
RDMA application can provide non-aligned buffers to be registered. In such case the DMA address passed by driver is pointing to the beginning of the physical address of the mapped page so we can't distinguish between two addresses from the same page. Fix it by keeping the offset of the virtual add

[Qemu-devel] [PATCH 0/6] Some improvements in z/Arch instructions support

2018-08-05 Thread Pavel Zbitskiy
Add BAL, BALR, CVB instructions Fix few bugs in PACK, CSST Pavel Zbitskiy (6): target/s390x: add BAL and BALR instructions target/s390x: fix CSST decoding and runtime alignment check target/s390x: fix ipm polluting irrelevant bits target/s390x: add EX support for TRT and TRTR target/s390

[Qemu-devel] [PATCH 3/6] target/s390x: fix ipm polluting irrelevant bits

2018-08-05 Thread Pavel Zbitskiy
Suppose psw.mask=0x8000, cc=2, r1=0 and we do "ipm 1". This command must touch only bits 32-39, so the expected output is r1=0x2000. However, currently qemu yields r1=0x20008000, because irrelevant parts of PSW leak into r1 during program mask transfer. Signed-off-by: Pavel Zbitski

[Qemu-devel] [PATCH 2/6] target/s390x: fix CSST decoding and runtime alignment check

2018-08-05 Thread Pavel Zbitskiy
CSST is defined as: C(0xc802, CSST,SSF, CASS, la1, a2, 0, 0, csst, 0) It means that the first parameter is handled by in1_la1(). in1_la1() fills addr1 field, and not in1. Furthermore, when extract32() is used for the alignment check, the third parameter should specify the number of tra

[Qemu-devel] [PATCH 0/6] Some improvements in z/Arch instructions support

2018-08-05 Thread Pavel Zbitskiy
Add BAL, BALR, CVB instructions Fix few bugs in PACK, CSST Pavel Zbitskiy (6): target/s390x: add BAL and BALR instructions target/s390x: fix CSST decoding and runtime alignment check target/s390x: fix ipm polluting irrelevant bits target/s390x: add EX support for TRT and TRTR target/s390

[Qemu-devel] [PATCH 1/6] target/s390x: add BAL and BALR instructions

2018-08-05 Thread Pavel Zbitskiy
These instructions are provided for compatibility purposes and are used only by old software, in the new code BAS and BASR are preferred. The difference between the old and new instruction exists only in the 24-bit mode. Signed-off-by: Pavel Zbitskiy --- target/s390x/insn-data.def | 3 +++ targ

[Qemu-devel] [PATCH 4/6] target/s390x: add EX support for TRT and TRTR

2018-08-05 Thread Pavel Zbitskiy
Improves "b213c9f5: target/s390x: Implement TRTR" by introducing the intermediate functions, which are compatible with dx_helper type. Signed-off-by: Pavel Zbitskiy --- target/s390x/mem_helper.c | 16 1 file changed, 16 insertions(+) diff --git a/target/s390x/mem_helper.c b/tar

[Qemu-devel] [PATCH 5/6] target/s390x: fix PACK reading 1 byte less and writing 1 byte more

2018-08-05 Thread Pavel Zbitskiy
PACK fails on the test from the Principles of Operation: F1F2F3F4 becomes 234C instead of 0001234C due to an off-by-one error. Furthermore, it overwrites one extra byte to the left of F1. Signed-off-by: Pavel Zbitskiy --- target/s390x/mem_helper.c | 6 +++--- 1 file changed, 3 insertions(+),

[Qemu-devel] [PATCH 6/6] target/s390x: implement CVB, CVBY and CVBG

2018-08-05 Thread Pavel Zbitskiy
Convert to Binary - counterparts of the already implemented Convert to Decimal (CVD*) instructions. Example from the Principles of Operation: 25594C becomes 63FA. Signed-off-by: Pavel Zbitskiy --- target/s390x/helper.h | 2 ++ target/s390x/insn-data.def | 4 target/s390x/int_helper.c

[Qemu-devel] [PATCH] tcg/optimize: Do not skip default processing of dup_vec

2018-08-05 Thread Richard Henderson
If we do not opimize away dup_vec, we must mark its output as changed. Fixes: 170ba88f45b Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson --- tcg/optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index d4ea67e541..

[Qemu-devel] [PATCH 0/2] target/ppc: Fixes for my fpu cleanups

2018-08-05 Thread Richard Henderson
David, please squash these with the patches you already have on your ppc-for-3.1 branch. The first fixes fp division within the vector insns. The second fixes some typos within the load/store converters as reported by Mark Cave-Ayland. r~ Richard Henderson (2): fixup! target/ppc: Honor fpscr

[Qemu-devel] [PATCH 2/2] fixup! target/ppc: Use non-arithmetic conversions for fp load/store

2018-08-05 Thread Richard Henderson
--- target/ppc/fpu_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index faea64020b..b9bb1b856e 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -61,7 +61,7 @@ uint64_t helper_todouble(uint32_

[Qemu-devel] [PATCH 1/2] fixup! target/ppc: Honor fpscr_ze semantics and tidy fdiv

2018-08-05 Thread Richard Henderson
--- target/ppc/fpu_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/ppc/fpu_helper.c b/target/ppc/fpu_helper.c index cb82e6e842..faea64020b 100644 --- a/target/ppc/fpu_helper.c +++ b/target/ppc/fpu_helper.c @@ -1965,6 +1965,9 @@ void helper_##op(CPUPPCState *env, uint32_t

Re: [Qemu-devel] [Qemu-ppc] [PATCH 7/7] target/ppc: Use non-arithmetic conversions for fp load/store

2018-08-05 Thread Richard Henderson
On 08/05/2018 04:41 AM, Mark Cave-Ayland wrote: > On 06/07/18 10:03, Mark Cave-Ayland wrote: > >> On 05/07/18 17:48, Richard Henderson wrote: >> >>> On 07/05/2018 09:31 AM, Programmingkid wrote: > On Jul 3, 2018, at 11:17 AM, Richard Henderson > wrote: > > Memory operations have n

Re: [Qemu-devel] [PATCH 0/2] target/ppc: Fixes for my fpu cleanups

2018-08-05 Thread David Gibson
On Sun, Aug 05, 2018 at 06:27:21PM -0700, Richard Henderson wrote: > David, please squash these with the patches you already > have on your ppc-for-3.1 branch. > > The first fixes fp division within the vector insns. > The second fixes some typos within the load/store converters > as reported by M

Re: [Qemu-devel] [PATCH] tcg/optimize: Do not skip default processing of dup_vec

2018-08-05 Thread Laurent Desnogues
Hello, On Mon, Aug 6, 2018 at 1:32 AM, Richard Henderson wrote: > If we do not opimize away dup_vec, we must mark its output as changed. > > Fixes: 170ba88f45b > Reported-by: Laurent Desnogues > Signed-off-by: Richard Henderson Reviewed-by: Laurent Desnogues Tested-by: Laurent Desnogues Tha

[Qemu-devel] [PATCH] Revert "Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO""

2018-08-05 Thread Xiong Zhang
This reverts commit 93587e3af3a259deac89c12863d93653d69d22b8 The original patch "c2b2e158cc7b vfio/pci-quirks.c: Disable stolen memory for igd VFIO" intend to fix an issue that linux guest couldn't work under igd passthrough. But this patch breaks windows guest which will unload igd windows driver

Re: [Qemu-devel] [PATCH 1/2] sysbus: always allow explicit_ofw_unit_address() to override address generation

2018-08-05 Thread Thomas Huth
On 08/05/2018 01:28 PM, Mark Cave-Ayland wrote: > Some SysBusDevices either use sysbus_init_mmio() without > sysbus_mmio_map() or the first MMIO memory region doesn't represent the > bus address, causing a firmware device path with an invalid address to > be generated. > > SysBusDeviceClass does p

Re: [Qemu-devel] [PATCH 2/2] fw_cfg: set the get_boot_devices_list() ignore_suffixes parameter from machine property

2018-08-05 Thread Thomas Huth
On 08/05/2018 01:28 PM, Mark Cave-Ayland wrote: > For the older machines (such as Mac and SPARC) the DT nodes representing > bootdevices for disk nodes are irregular for mainly historical reasons, and > should be handled on an individual basis via a custom FWPathProvider. > > Since the majority of

Re: [Qemu-devel] [PATCH v6 00/12] Enable postcopy RDMA live migration

2018-08-05 Thread 858585 jemmy
There is one compile error, please ignore those patch, I will send a new version patch. On Fri, Aug 3, 2018 at 5:13 PM, Lidong Chen wrote: > The RDMA QIOChannel does not support bi-directional communication, so when > RDMA > live migration with postcopy enabled, the source qemu return path get q

[Qemu-devel] [PATCH v3 09/23] test-qobject-input-visitor: Avoid format string ambiguity

2018-08-05 Thread Markus Armbruster
When visitor_input_test_init_internal()'s argument @ap is null, then @json_string is interpreted literally, else it's gets %-escapes interpolated. This is awkward. One caller always passes null @ap, and the others never do. Lift the building of the QObject into the callers, where it can be done

[Qemu-devel] [PATCH v3 07/23] qobject: New qobject_from_vjsonf_nofail(), qdict_from_vjsonf_nofail()

2018-08-05 Thread Markus Armbruster
Every printf()-like function sooner or later needs its vprintf()-like buddy. The next commit will need qobject_from_jsonf_nofail()'s buddy, and qdict_from_jsonf_nofail()'s buddy will be used later in this series. Add both. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Re

[Qemu-devel] [PATCH v3 08/23] libqtest: Simplify qmp_fd_vsend() a bit

2018-08-05 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake --- tests/libqtest.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index 2fe0f4dc29..9e3870bb7d 100644 --- a/tests/libqtest.

[Qemu-devel] [PATCH v3 13/23] cpu-plug-test: Don't pass integers as strings to device_add

2018-08-05 Thread Markus Armbruster
test_plug_with_device_add_x86() plugs Haswell-i386-cpu and Haswell-x86_64-cpu with device_add. It passes socket-id, core-id, thread-id as JSON strings. The properties are actually integers. test_plug_with_device_add_coreid() plugs power8_v2.0-spapr-cpu-core and qemu-s390x-cpu with device_add. I

[Qemu-devel] [PATCH v3 06/23] qobject: Replace qobject_from_jsonf() by qobject_from_jsonf_nofail()

2018-08-05 Thread Markus Armbruster
Commit ab45015a968 "qobject: Let qobject_from_jsonf() fail instead of abort" fails to accomplish its stated aim: the function can still abort due to its use of &error_abort. Its rationale for letting it fail is that all remaining users cope fine with failure. Well, they're just fine with aborting

[Qemu-devel] [PATCH v3 11/23] tests: Pass literal format strings directly to qmp_FOO()

2018-08-05 Thread Markus Armbruster
The qmp_FOO() take a printf-like format string. In a few places, we assign a string literal to a variable and pass that instead of simply passing the literal. Clean that up. Bonus: gets rid of non-literal format strings. A step towards compile-time format string checking without triggering -Wfo

[Qemu-devel] [PATCH v3 02/23] libqtest: Clean up how we read device_del messages

2018-08-05 Thread Markus Armbruster
qtest_qmp_device_del() still uses the qmp("") hack to receive a message, even though we have qmp_receive() since commit 66e0c7b187e. Put it to use. Bonus: gets rid of empty format strings. A step towards compile-time format string checking without triggering -Wformat-zero-length. Signed-off-by:

[Qemu-devel] [PATCH v3 04/23] libqtest: Remove qtest_qmp_discard_response() & friends

2018-08-05 Thread Markus Armbruster
qtest_qmp_discard_response(...) is shorthand for qobject_unref(qtest_qmp(...), except it's not actually shorter. Moreover, the presence of these functions encourage sloppy testing. Remove them from libqtest. Add them as macros to the tests that use them, with a TODO comment asking for cleanup. Si

[Qemu-devel] [PATCH v3 10/23] qobject: qobject_from_jsonv() is dangerous, hide it away

2018-08-05 Thread Markus Armbruster
qobject_from_jsonv() takes ownership of %p arguments. On failure, we can't generally know whether we failed before or after %p, so ownership becomes indeterminate. To avoid leaks, callers passing %p must terminate on error, e.g. by passing &error_abort. Trap for the unwary; document and give the

[Qemu-devel] [PATCH v3 05/23] libqtest: Document calling conventions

2018-08-05 Thread Markus Armbruster
From: Eric Blake We have two flavors of vararg usage in qtest: qtest_hmp() etc. work like sprintf(), and qtest_qmp() etc. work like qobject_from_jsonf(). Spell that out in the comments. Also add GCC_FMT_ATTR() to qtest_hmp() etc. so that the compiler can flag incorrect use. We have some cleanup