Re: [Qemu-devel] [PATCH 0/2] Refine some vdi code

2018-07-30 Thread Stefan Weil
Am 30.07.2018 um 04:46 schrieb yuchen...@synology.com: > From: yuchenlin > > This series refine some code in vdi.c, includes: > > * Remvoe CONFIG_VDI_WRITE because there is no reason to leave an always on > and cannot configure option in the code-side. > * decouple if else if chain to get more

[Qemu-devel] [PATCH 0/2] bitmap: some fixes

2018-07-30 Thread Wei Wang
"nbits = 0" is not applicable to BITMAP_LAST_WORD_MASK, callers should avoid that. Fix bitmap_count_one to avoid passing 0 to the macro. Wei Wang (2): bitmap.h: add comments to BITMAP_LAST_WORD_MASK bitmap: fix bitmap_count_one include/qemu/bitmap.h | 3 ++- 1 file changed, 2 insertions(+),

[Qemu-devel] [PATCH 2/2] bitmap: fix bitmap_count_one

2018-07-30 Thread Wei Wang
Since "nbits = 0" is not applicable to the BITMAP_LAST_WORD_MASK macro, callers need to avoid passing "nbits = 0" to this macro, which generates incorrect results. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Peter Xu --- include/qemu/bitmap.h | 2 +- 1 file change

[Qemu-devel] [PATCH 1/2] bitmap.h: add comments to BITMAP_LAST_WORD_MASK

2018-07-30 Thread Wei Wang
This macro was ported from Linux and we've reached an aggreement there that the corner case "nbits = 0" is not applicable to this macro, because when "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0x. This patch simply adds a comment above the macro

Re: [Qemu-devel] [PATCH for-3.0] pc: acpi: fix memhp regression by reducing stub SRAT entry size

2018-07-30 Thread Igor Mammedov
On Sun, 29 Jul 2018 00:09:58 +0300 "Michael S. Tsirkin" wrote: > On Fri, Jul 27, 2018 at 06:52:40PM -0300, Eduardo Habkost wrote: > > On Fri, Jul 27, 2018 at 04:50:31PM +0200, Igor Mammedov wrote: > > [...] > > > NOTE TO MAINTAINER: UPDATE REFERRENCE APCI TABLE BLOBS IN TESTS > > > > Why thi

Re: [Qemu-devel] [PATCH 0/2] Refine some vdi code

2018-07-30 Thread yuchenlin via Qemu-devel
Hi, Stefan I agree that redundancy of If else may helps people to understand the code. However, CONFIG_VDI_WRITE only contributes: #if defined(CONFIG_VDI_WRITE) .bdrv_co_pwritev = vdi_co_pwritev, #endif I think we don't need CONFIG_VDI_WRITE to document the code. As its name implies, vdi_co_pwr

Re: [Qemu-devel] [PATCH 1/2] bitmap.h: add comments to BITMAP_LAST_WORD_MASK

2018-07-30 Thread Wei Wang
On 07/30/2018 03:13 PM, Wei Wang wrote: This macro was ported from Linux and we've reached an aggreement there that the corner case "nbits = 0" is not applicable to this macro, because when "nbits = 0", which means no bits to mask, this macro is expected to return 0, instead of 0x. This p

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-30 Thread Tiwei Bie
On Fri, Jul 27, 2018 at 02:03:00PM -0600, Alex Williamson wrote: > On Fri, 27 Jul 2018 09:58:05 +0800 > Tiwei Bie wrote: > > > On Thu, Jul 26, 2018 at 02:45:39PM -0600, Alex Williamson wrote: > > > On Mon, 23 Jul 2018 12:59:56 +0800 > > > Tiwei Bie wrote: > > > > > [...] > > > > > > > > +st

Re: [Qemu-devel] [PATCH] tests/vm: Add vm-build-all/vm-clean-all in help text

2018-07-30 Thread Alex Bennée
Fam Zheng writes: > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Fam Zheng > --- > tests/vm/Makefile.include | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include > index 5daa2a3b73..9e19f8662f 100644 > --- a/tests/vm/Makef

Re: [Qemu-devel] [RFC PATCH] rbd: Don't convert keypairs to JSON and back

2018-07-30 Thread Markus Armbruster
Jeff Cody writes: > On Wed, Jul 25, 2018 at 10:56:48AM -0500, Eric Blake wrote: >> On 07/25/2018 10:10 AM, Markus Armbruster wrote: >> >qemu_rbd_parse_filename() builds a keypairs QList, converts it to JSON, and >> >stores the resulting QString in a QDict. >> > >> >qemu_rbd_co_create_opts() and q

Re: [Qemu-devel] [PATCH RFC 00/10] docker on non-x86 hosts

2018-07-30 Thread Alex Bennée
Fam Zheng writes: > On Wed, 07/18 11:04, Alex Bennée wrote: >> Hi, >> >> Our existing support for docker is fairly x86 centric. While docker >> itself has support for multiple architectures not all architectures >> are equal. For example Debian only packages the widest range of >> cross-compile

Re: [Qemu-devel] [PATCH RFC 01/10] docker: rename docker-amd64 to docker-host

2018-07-30 Thread Alex Bennée
Fam Zheng writes: > On Wed, 07/18 11:04, Alex Bennée wrote: >> When building on non-x86 systems the base system will be correct so if >> we avoid too many x86'isms in the install we can still use the image. >> >> Signed-off-by: Alex Bennée >> --- >> .../dockerfiles/{debian-amd64.docker => deb

Re: [Qemu-devel] [PATCH 1/1] util/thread-pool: add parameter to limit maximum threads in thread pool

2018-07-30 Thread felix yao
Hi stefan: Thank you very much for your reply. Yes, I want to reduce impact of resources among virtual machines including I/O resources, vCPU and etc. I can use CPU pin feature to pin vCPU to dedicated host's physical CPU and use I/O throttling feature to limit IOPS and bandwidth of VM's disks.

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

2018-07-30 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 c2c08a890c..3bfb062fcb 100644 --- a/tests/libqtest.

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

2018-07-30 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 03/23] libqtest: Clean up how we read device_del messages

2018-07-30 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: Clean up how we read the QMP greeting

2018-07-30 Thread Markus Armbruster
qtest_init() still uses the qtest_qmp_discard_response(s, "") hack to receive the greeting, even though we have qtest_qmp_receive() since commit 66e0c7b187e. Put it to use. Bonus: gets rid of an empty format string. A step towards compile-time format string checking without triggering -Wformat-z

[Qemu-devel] [PATCH v3 16/23] migration-test: Make wait_command() cope with '%'

2018-07-30 Thread Markus Armbruster
wait_command() passes its argument @command to qtest_qmp_send(). Falls apart if @command contain '%'. Two ways to disarm this trap: suppress interpretation of '%' by passing @command as argument to format string "%s", or fix it by having wait_command() take the variable arguments to go with @comma

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

2018-07-30 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 09/23] qobject: qobject_from_jsonv() is dangerous, hide it away

2018-07-30 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 12/23] cpu-plug-test: Don't pass integers as strings to device_add

2018-07-30 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 23/23] libqtest: Rename qtest_FOOv() to qtest_vFOO() for consistency

2018-07-30 Thread Markus Armbruster
13 of 13 C99 library function pairs taking ... or a va_list parameter are called FOO() and vFOO(). In QEMU, we sometimes call the one taking a va_list FOOv() instead. Bad taste. libqtest.h uses both spellings. Normalize it to the standard spelling. Signed-off-by: Markus Armbruster Reviewed-by

[Qemu-devel] [PATCH v3 17/23] migration-test: Clean up string interpolation into QMP, part 1

2018-07-30 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the recent commit "tests: Clean up string interpolation into QMP input (simple cases)". migrate_recover() builds QMP input manually because wait_command() can't interpolate. Well, it can sinc

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

2018-07-30 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 00/23] tests: Compile-time format string checking for libqtest.h

2018-07-30 Thread Markus Armbruster
This is a reboot of "[PATCH 0/9] tests: Clean up around qmp() and hmp()" I sent about a year ago. Back then, Eric folded it into his "Clean up around qmp() and hmp()" series, which stalled after v4. My reboot tries to avoid that fate by reducing mission creep. There are plenty of good ideas in E

[Qemu-devel] [PATCH v3 02/23] libqtest: Rename functions to send QMP messages

2018-07-30 Thread Markus Armbruster
The functions to receive messages are called qtest_qmp_receive() and qmp_receive(), qmp_fd_receive(). The ones to send messages are called qtest_async_qmp(), qtest_async_qmpv(), qmp_async(), qmp_fd_send(), qmp_fd_sendv(). Inconsistent. Rename the *_async* ones to qmp_send(), qtest_qmp_send(), qt

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

2018-07-30 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 01/23] libqtest: Document calling conventions

2018-07-30 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

[Qemu-devel] [PATCH v3 18/23] migration-test: Clean up string interpolation into QMP, part 2

2018-07-30 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the recent commit "tests: Clean up string interpolation into QMP input (simple cases)". migrate() interpolates members into a JSON object. Change it to take its extra QMP arguments as argumen

[Qemu-devel] [PATCH v3 14/23] migration-test: Make wait_command() return the "return" member

2018-07-30 Thread Markus Armbruster
All callers of wait_command() are only interested in the success response's "return" member. Lift its extraction into wait_command(). Cc: Juan Quintela Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela Reviewed-by: Eric Blake --- tests/migration-test.c |

[Qemu-devel] [PATCH v3 22/23] libqtest: Replace qtest_startf() by qtest_initf()

2018-07-30 Thread Markus Armbruster
qtest_init() creates a new QTestState, and leaves @global_qtest alone. qtest_start() additionally assigns it to @global_qtest, but qtest_startf() additionally assigns NULL to @global_qtest. This makes no sense. Replace it by qtest_initf() that works like qtest_init(), i.e. leaves @global_qtest al

[Qemu-devel] [PATCH v3 20/23] libqtest: Enable compile-time format string checking

2018-07-30 Thread Markus Armbruster
qtest_qmp() & friends pass their format string and variable arguments to qobject_from_vjsonf_nofail(). Unlike qobject_from_jsonv(), they aren't decorated with GCC_FMT_ATTR(). Fix that to get compile-time format string checking. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daud

[Qemu-devel] [PATCH v3 15/23] tests: New helper qtest_qmp_receive_success()

2018-07-30 Thread Markus Armbruster
Commit b21373d0713 copied wait_command() from tests/migration-test.c to tests/tpm-util.c. Replace both copies by new libqtest helper qtest_qmp_receive_success(). Also use it to simplify qtest_qmp_device_del(). Bonus: gets rid of a non-literal format string. A step towards compile-time format st

[Qemu-devel] [PATCH v3 11/23] tests: Clean up string interpolation into QMP input (simple cases)

2018-07-30 Thread Markus Armbruster
When you build QMP input manually like this cmd = g_strdup_printf("{ 'execute': 'migrate'," "'arguments': { 'uri': '%s' } }", uri); rsp = qmp(cmd); g_free(cmd); you're responsible for escaping the interpolated values for JSON. Not d

[Qemu-devel] [PATCH v3 19/23] migration-test: Clean up string interpolation into QMP, part 3

2018-07-30 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the recent commit "tests: Clean up string interpolation into QMP input (simple cases)". migration-test.c interpolates strings into JSON in a few places: * migrate_set_parameter() interpolates

Re: [Qemu-devel] [PATCH v2 13/23] tests: Clean up string interpolation around qtest_qmp_device_add()

2018-07-30 Thread Markus Armbruster
Eric Blake writes: [...] > (We really want to assert that any % interpolations in our JSON parser > are NOT embedded in ''). I'll look into that, but it'll be in a separate series. [...]

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

2018-07-30 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. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/ahci-test.c | 20

Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM

2018-07-30 Thread Greg Kurz
On Mon, 30 Jul 2018 15:57:15 +1000 David Gibson wrote: > On Fri, Jul 27, 2018 at 09:54:52AM +0200, Greg Kurz wrote: > > On Fri, 27 Jul 2018 15:27:24 +1000 > > David Gibson wrote: > > > > > On Wed, Jul 25, 2018 at 04:45:26PM +0200, Greg Kurz wrote: > > > > Commit b585395b655 fixed a regressi

[Qemu-devel] [PATCH v3 13/23] tests: Clean up string interpolation around qtest_qmp_device_add()

2018-07-30 Thread Markus Armbruster
Leaving interpolation into JSON to qmp() is more robust than building QMP input manually, as explained in the commit before previous. qtest_qmp_device_add() and its wrappers interpolate into JSON as follows: * qtest_qmp_device_add() interpolates members into a JSON object. * So do its wrappers q

[Qemu-devel] [PATCH] cryptodev: remove dead code

2018-07-30 Thread Paolo Bonzini
Reported by Coverity as CID 1390600. Signed-off-by: Paolo Bonzini --- backends/cryptodev-vhost-user.c | 5 - 1 file changed, 5 deletions(-) diff --git a/backends/cryptodev-vhost-user.c b/backends/cryptodev-vhost-user.c index d52daccfcd..d539f14d59 100644 --- a/backends/cryptodev-vhost-user.

Re: [Qemu-devel] [PATCH v2 1/2] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-07-30 Thread Cédric Le Goater
On 07/27/2018 11:19 AM, Cédric Le Goater wrote: > On 07/27/2018 10:43 AM, Benjamin Herrenschmidt wrote: >> On Fri, 2018-07-27 at 10:25 +0200, Cédric Le Goater wrote: >>> Each PHB creates a pci-bridge device and the PCI bus that comes with it. >>> It makes things easier to define PCI devices. >>>

Re: [Qemu-devel] [PATCH] cryptodev: remove dead code

2018-07-30 Thread Gonglei (Arei)
> -Original Message- > From: Qemu-devel > [mailto:qemu-devel-bounces+arei.gonglei=huawei@nongnu.org] On > Behalf Of Paolo Bonzini > Sent: Monday, July 30, 2018 4:51 PM > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] [PATCH] cryptodev: remove dead code > > Reported by Coverity as

Re: [Qemu-devel] [PATCH v5 1/3] spapr: introduce a fixed IRQ number space

2018-07-30 Thread Cédric Le Goater
On 07/27/2018 05:56 AM, David Gibson wrote: > On Thu, Jul 26, 2018 at 03:37:21PM +0200, Cédric Le Goater wrote: >> This proposal introduces a new IRQ number space layout using static >> numbers for all devices, depending on a device index, and a bitmap >> allocator for the MSI IRQ numbers which are

Re: [Qemu-devel] [qemu-s390x] [PATCH v1] s390x/cpu_models: Add "-cpu max" support

2018-07-30 Thread David Hildenbrand
On 27.07.2018 14:55, Cornelia Huck wrote: > On Wed, 25 Jul 2018 11:12:33 +0200 > David Hildenbrand wrote: > >> The "max" CPU model behaves like "-cpu host" when KVM is enabled, and like >> a CPU with the maximum possible feature set when TCG is enabled. >> >> While the "host" model can not be use

Re: [Qemu-devel] [PULL v2 0/3] QObject patches for 2018-07-27 (3.0.0-rc3)

2018-07-30 Thread Peter Maydell
On 28 July 2018 at 08:16, Markus Armbruster wrote: > The following changes since commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc: > > Update version for v3.0.0-rc2 release (2018-07-24 22:06:31 +0100) > > are available in the Git repository at: > > git://repo.or.cz/qemu/armbru.git tags/pull-qob

Re: [Qemu-devel] [RFC 3/3] vhost-user: support programming VFIO group in master

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 04:10:04PM +0800, Tiwei Bie wrote: > On Fri, Jul 27, 2018 at 02:03:00PM -0600, Alex Williamson wrote: > > On Fri, 27 Jul 2018 09:58:05 +0800 > > Tiwei Bie wrote: > > > > > On Thu, Jul 26, 2018 at 02:45:39PM -0600, Alex Williamson wrote: > > > > On Mon, 23 Jul 2018 12:59:56

[Qemu-devel] [PATCH for-3.0 v2] pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size

2018-07-30 Thread Igor Mammedov
Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM devices) broke the first dimm hotplug in following cases: 1: there is no coldplugged dimm in the last numa node but there is a coldplugged dimm in another node -m 4096,slots=4,maxmem=32G \ -obj

Re: [Qemu-devel] [PATCH 4/6] qcow2: Update total_sectors when resizing the image

2018-07-30 Thread Kevin Wolf
Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: > Signed-off-by: Leonid Bloch > --- > block/qcow2.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/block/qcow2.c b/block/qcow2.c > index ec9e6238a0..223d351e40 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -3646,6 +3646,8

Re: [Qemu-devel] [PATCH v5 1/3] spapr: introduce a fixed IRQ number space

2018-07-30 Thread David Gibson
On Mon, Jul 30, 2018 at 11:05:58AM +0200, Cédric Le Goater wrote: > On 07/27/2018 05:56 AM, David Gibson wrote: > > On Thu, Jul 26, 2018 at 03:37:21PM +0200, Cédric Le Goater wrote: > >> This proposal introduces a new IRQ number space layout using static > >> numbers for all devices, depending on a

Re: [Qemu-devel] [PATCH for-3.1] tests/cpu-plug-test: check CPU hotplug on ppc64 with KVM

2018-07-30 Thread Greg Kurz
On Mon, 30 Jul 2018 10:41:45 +0200 Greg Kurz wrote: > On Mon, 30 Jul 2018 15:57:15 +1000 > David Gibson wrote: [...] > > > > I'm pretty sure trying to change the accelerator on a qtest test just > > > > doesn't make sense. We'd need a different approach for testing cpu > > > > hotplug against k

[Qemu-devel] [PATCH v3] linux-user: ppc64: don't use volatile register during safe_syscall

2018-07-30 Thread Shivaprasad G Bhat
r11 is a volatile register on PPC as per calling conventions. The safe_syscall code uses it to check if the signal_pending is set during the safe_syscall. When a syscall is interrupted on return from signal handling, the r11 might be corrupted before we retry the syscall leading to a crash. The reg

Re: [Qemu-devel] [PULL 1/1] slirp: fix ICMP handling on macOS hosts

2018-07-30 Thread Peter Maydell
On 29 July 2018 at 15:35, Samuel Thibault wrote: > From: Andrew Oates > > On Linux, SOCK_DGRAM+IPPROTO_ICMP sockets give only the ICMP packet when > read from. On macOS, however, the socket acts like a SOCK_RAW socket > and includes the IP header as well. > > This change strips the extra IP head

Re: [Qemu-devel] [PATCH] RISC-V: Correct typo in RV32 perf counters

2018-07-30 Thread Peter Maydell
On 25 May 2018 at 14:17, Richard Henderson wrote: > On 05/24/2018 11:24 PM, Michael Clark wrote: >> This patch enables mhpmcounter3h through mhpmcounter31h on RV32. >> Previously the RV32 h versions (high 32-bits of 64-bit counters) >> of these counters would trap with an illegal instruction inste

Re: [Qemu-devel] [PATCH] cryptodev: remove dead code

2018-07-30 Thread Peter Maydell
On 30 July 2018 at 09:51, Paolo Bonzini wrote: > Reported by Coverity as CID 1390600. > > Signed-off-by: Paolo Bonzini > --- This already has a reviewed patch on-list for this from back in April: https://patchwork.ozlabs.org/patch/906041/ so I think we should just apply that. thanks -- PMM

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-07-30 Thread Kevin Wolf
Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: > This series makes the qcow2 L2 cache cover the entire image by default. > The importance of this change is in noticeable performance improvement, > especially with heavy random I/O. The memory overhead is very small: > only 1 MB of cache for ev

Re: [Qemu-devel] [PATCH for-3.0] pc: acpi: fix memhp regression by reducing stub SRAT entry size

2018-07-30 Thread Igor Mammedov
On Fri, 27 Jul 2018 16:50:31 +0200 Igor Mammedov wrote: > Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for > DIMM devices) > broke the first dimm hotplug in following cases: > > 1: there is no coldplugged dimm in the last numa node > but there is a coldplugged dim

Re: [Qemu-devel] [PATCH] sam460ex: Fix PCI interrupt connections

2018-07-30 Thread BALATON Zoltan
On Mon, 30 Jul 2018, Sebastian Bauer wrote: The four interrupts of the PCI bus are connected to the same UIC pin on the real Sam460ex. Evidence for this can be found in the UBoot source for the Sam460ex in the Sam460ex.c file where PCI_INTERRUPT_LINE in written. This change brings the connection

Re: [Qemu-devel] [PATCH for-3.0 1/3] block/qapi: Add 'qdev' field to query-blockstats result

2018-07-30 Thread Peter Krempa
On Fri, Jul 27, 2018 at 17:58:54 +0200, Kevin Wolf wrote: > Am 27.07.2018 um 17:07 hat Eric Blake geschrieben: > > On 07/27/2018 09:15 AM, Kevin Wolf wrote: > > > Like for query-block, the client needs to identify which BlockBackend > > > the returned data is for. Anonymous BlockBackends are identi

Re: [Qemu-devel] [PATCH] cryptodev: remove dead code

2018-07-30 Thread Gonglei (Arei)
> -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Monday, July 30, 2018 6:49 PM > To: Paolo Bonzini > Cc: QEMU Developers ; Gonglei (Arei) > > Subject: Re: [Qemu-devel] [PATCH] cryptodev: remove dead code > > On 30 July 2018 at 09:51, Paolo Bonzini w

Re: [Qemu-devel] [PATCH 4/6] qcow2: Update total_sectors when resizing the image

2018-07-30 Thread Leonid Bloch
On 07/30/2018 12:43 PM, Kevin Wolf wrote: Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: Signed-off-by: Leonid Bloch --- block/qcow2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index ec9e6238a0..223d351e40 100644 --- a/block/qcow2.c +++ b/block

Re: [Qemu-devel] [PATCH] RISC-V: Correct typo in RV32 perf counters

2018-07-30 Thread Michael Clark
On Mon, 30 Jul 2018 at 10:46 PM, Peter Maydell wrote: > On 25 May 2018 at 14:17, Richard Henderson wrote: > > On 05/24/2018 11:24 PM, Michael Clark wrote: > >> This patch enables mhpmcounter3h through mhpmcounter31h on RV32. > >> Previously the RV32 h versions (high 32-bits of 64-bit counters) >

Re: [Qemu-devel] [PATCH] cryptodev: remove dead code

2018-07-30 Thread Zhoujian (jay)
Hi Paolo, I've posted a patch before, pls see https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg05215.html which reviewed by Stefan https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg01549.html It seems that it hasn't been merged. Could you pick it up pls? Regards, Jay > -Orig

Re: [Qemu-devel] [PATCH] cryptodev: remove dead code

2018-07-30 Thread Paolo Bonzini
On 30/07/2018 13:50, Zhoujian (jay) wrote: > Hi Paolo, > > I've posted a patch before, pls see > https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg05215.html > > which reviewed by Stefan > https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg01549.html > > It seems that it hasn't been

Re: [Qemu-devel] [PATCH] RISC-V: Correct typo in RV32 perf counters

2018-07-30 Thread Peter Maydell
On 30 July 2018 at 12:42, Michael Clark wrote: > > > On Mon, 30 Jul 2018 at 10:46 PM, Peter Maydell > wrote: >> >> On 25 May 2018 at 14:17, Richard Henderson wrote: >> > On 05/24/2018 11:24 PM, Michael Clark wrote: >> >> This patch enables mhpmcounter3h through mhpmcounter31h on RV32. >> >> Prev

Re: [Qemu-devel] [PATCH] sam460ex: Fix PCI interrupt connections

2018-07-30 Thread Sebastian Bauer
Am 2018-07-30 13:06, schrieb BALATON Zoltan: On Mon, 30 Jul 2018, Sebastian Bauer wrote: The four interrupts of the PCI bus are connected to the same UIC pin on the real Sam460ex. Evidence for this can be found in the UBoot source for the Sam460ex in the Sam460ex.c file where PCI_INTERRUPT_LINE

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-07-30 Thread Leonid Bloch
On 07/30/2018 01:55 PM, Kevin Wolf wrote: Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: This series makes the qcow2 L2 cache cover the entire image by default. The importance of this change is in noticeable performance improvement, especially with heavy random I/O. The memory overhead is

Re: [Qemu-devel] [PATCH 4/6] qcow2: Update total_sectors when resizing the image

2018-07-30 Thread Kevin Wolf
Am 30.07.2018 um 13:41 hat Leonid Bloch geschrieben: > On 07/30/2018 12:43 PM, Kevin Wolf wrote: > > Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: > > > Signed-off-by: Leonid Bloch > > > --- > > > block/qcow2.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > diff --git a/block

Re: [Qemu-devel] [PATCH v3] linux-user: ppc64: don't use volatile register during safe_syscall

2018-07-30 Thread Richard Henderson
On 07/30/2018 06:09 AM, Shivaprasad G Bhat wrote: > r11 is a volatile register on PPC as per calling conventions. > The safe_syscall code uses it to check if the signal_pending > is set during the safe_syscall. When a syscall is interrupted > on return from signal handling, the r11 might be corrupt

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-07-30 Thread Kevin Wolf
Am 30.07.2018 um 14:13 hat Leonid Bloch geschrieben: > On 07/30/2018 01:55 PM, Kevin Wolf wrote: > > Am 29.07.2018 um 23:27 hat Leonid Bloch geschrieben: > > > This series makes the qcow2 L2 cache cover the entire image by default. > > > The importance of this change is in noticeable performance im

[Qemu-devel] [PATCH RFC] monitor: temporary fix for dead-lock on event recursion

2018-07-30 Thread Marc-André Lureau
With a Spice port chardev, it is possible to reenter monitor_qapi_event_queue() (when the client disconnects for example). This will dead-lock on monitor_lock. Instead, use some TLS variables to check for recursion and queue the events. Fixes: (gdb) bt #0 0x7fa69e7217fd in __lll_lock_wait

[Qemu-devel] [PATCH QEMU] hw/char/sh_serial: Add timeout handling to unbreak serial input

2018-07-30 Thread Geert Uytterhoeven
As of commit 18e8cf159177100e ("serial: sh-sci: increase RX FIFO trigger defaults for (H)SCIF") in Linux v4.11-rc1, the serial console on the QEMU SH4 target is broken: it delays serial input until enough data has been received. Since aformentioned commit, the Linux SCIF driver programs the Receiv

Re: [Qemu-devel] [PATCH RFC] monitor: temporary fix for dead-lock on event recursion

2018-07-30 Thread Daniel P . Berrangé
On Mon, Jul 30, 2018 at 02:57:46PM +0200, Marc-André Lureau wrote: > With a Spice port chardev, it is possible to reenter > monitor_qapi_event_queue() (when the client disconnects for > example). This will dead-lock on monitor_lock. > > Instead, use some TLS variables to check for recursion and qu

Re: [Qemu-devel] [PATCH RFC] monitor: temporary fix for dead-lock on event recursion

2018-07-30 Thread Marc-André Lureau
Hi On Mon, Jul 30, 2018 at 3:05 PM, Daniel P. Berrangé wrote: > On Mon, Jul 30, 2018 at 02:57:46PM +0200, Marc-André Lureau wrote: >> With a Spice port chardev, it is possible to reenter >> monitor_qapi_event_queue() (when the client disconnects for >> example). This will dead-lock on monitor_loc

Re: [Qemu-devel] [PATCH RFC] monitor: temporary fix for dead-lock on event recursion

2018-07-30 Thread Daniel P . Berrangé
On Mon, Jul 30, 2018 at 03:09:08PM +0200, Marc-André Lureau wrote: > Hi > > On Mon, Jul 30, 2018 at 3:05 PM, Daniel P. Berrangé > wrote: > > On Mon, Jul 30, 2018 at 02:57:46PM +0200, Marc-André Lureau wrote: > >> With a Spice port chardev, it is possible to reenter > >> monitor_qapi_event_queue(

Re: [Qemu-devel] [RFC PATCH 0/6] Clock and power gating support

2018-07-30 Thread Mark Burton
Hi Pete, sorry for the tardy reply, Im not in the office. Your right we shoujd have co-ordinated better the 2 patches, sorry for that. Regarding this new patchset, we think there is a degree of complementary to the clocktree one. Here we simply add a couple of generic power states to a device.

Re: [Qemu-devel] [PATCH 1/2] bitmap.h: add comments to BITMAP_LAST_WORD_MASK

2018-07-30 Thread Juan Quintela
Wei Wang wrote: > On 07/30/2018 03:13 PM, Wei Wang wrote: >> This macro was ported from Linux and we've reached an aggreement there >> that the corner case "nbits = 0" is not applicable to this macro, because >> when "nbits = 0", which means no bits to mask, this macro is expected to >> return 0,

[Qemu-devel] 'make vm-build-freebsd' &c don't work if KVM isn't enabled

2018-07-30 Thread Peter Maydell
The tests in tests/vm/ seem to make some attempt to cope with the host system not allowing the user to use KVM, but it doesn't quite work. The problem is that tests/vm/basevm.py always uses "-cpu host" in the QEMU options it uses to run the VM, and that only works if KVM is enabled. If the user can

Re: [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-07-30 Thread Halil Pasic
On 07/24/2018 11:24 AM, Cornelia Huck wrote: This option has been deprecated for two releases; remove it. Signed-off-by: Cornelia Huck Acked-by: Halil Pasic --- hw/s390x/3270-ccw.c| 2 +- hw/s390x/css-bridge.c | 1 - hw/s390x/css.c

Re: [Qemu-devel] [RFC PATCH v2 0/7] QEMU binary instrumentation prototype

2018-07-30 Thread Pavel Dovgalyuk
Ping? Pavel Dovgalyuk > -Original Message- > From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] > Sent: Wednesday, July 11, 2018 9:03 AM > To: 'Stefan Hajnoczi' > Cc: 'Peter Maydell'; 'Pavel Dovgalyuk'; 'Paolo Bonzini'; > maria.klimushenk...@ispras.ru; 'QEMU > Developers'; 'Lluís Vilanova

Re: [Qemu-devel] 'make vm-build-freebsd' &c don't work if KVM isn't enabled

2018-07-30 Thread Daniel P . Berrangé
On Mon, Jul 30, 2018 at 02:23:50PM +0100, Peter Maydell wrote: > The tests in tests/vm/ seem to make some attempt to cope with the > host system not allowing the user to use KVM, but it doesn't quite > work. The problem is that tests/vm/basevm.py always uses "-cpu host" > in the QEMU options it use

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > Directly assigned vfio devices have never been compatible with > ballooning. Zapping MADV_DONTNEED pages happens completely > independent of vfio page pinning and IOMMU mapping, leaving us with > inconsistent GPA to HPA mapping bet

Re: [Qemu-devel] 'make vm-build-freebsd' &c don't work if KVM isn't enabled

2018-07-30 Thread Peter Maydell
On 30 July 2018 at 14:23, Peter Maydell wrote: > The tests in tests/vm/ seem to make some attempt to cope with the > host system not allowing the user to use KVM, but it doesn't quite > work. Also, passing V=1 to the outer make command like: make vm-build-freebsd J=16 V=1 isn't propagated throug

Re: [Qemu-devel] 'make vm-build-freebsd' &c don't work if KVM isn't enabled

2018-07-30 Thread Peter Maydell
On 30 July 2018 at 14:36, Peter Maydell wrote: > On 30 July 2018 at 14:23, Peter Maydell wrote: >> The tests in tests/vm/ seem to make some attempt to cope with the >> host system not allowing the user to use KVM, but it doesn't quite >> work. > > Also, passing V=1 to the outer make command like:

[Qemu-devel] [PATCH v2 for 3.0 1/2] linux-user/mmap.c: handle invalid len maps correctly

2018-07-30 Thread Alex Bennée
I've slightly re-organised the check to more closely match the sequence that the kernel uses in do_mmap(). We check for both the zero case (EINVAL) and the overflow length case (ENOMEM). Signed-off-by: Alex Bennée Cc: umarcor <1783...@bugs.launchpad.net> --- v2 - add comment on overflow --- l

[Qemu-devel] [PATCH v2 for 3.0 0/2] fix for bug #1783362

2018-07-30 Thread Alex Bennée
Hi, Updated to cover the overflow case properly as well. Alex Bennée (2): linux-user/mmap.c: handle invalid len maps correctly tests: add check_invalid_maps to test-mmap linux-user/mmap.c | 15 --- tests/tcg/multiarch/test-mmap.c | 22 +- 2 file

[Qemu-devel] [PATCH v2 for 3.0 2/2] tests: add check_invalid_maps to test-mmap

2018-07-30 Thread Alex Bennée
This adds a test to make sure we fail properly for a 0 length mmap. There are most likely other failure conditions we should also check. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Cc: umarcor <1783...@bugs.launchpad.net> --- v2 - add test for overflow --- tests/tcg/multiarch/t

Re: [Qemu-devel] [PATCH for-3.1] s390x: remove 's390-squash-mcss' option

2018-07-30 Thread Cornelia Huck
On Tue, 24 Jul 2018 11:24:13 +0200 Cornelia Huck wrote: > This option has been deprecated for two releases; remove it. > > Signed-off-by: Cornelia Huck > --- > hw/s390x/3270-ccw.c| 2 +- > hw/s390x/css-bridge.c | 1 - > hw/s390x/css.c | 6 ++-

Re: [Qemu-devel] [PATCH] arm/smmuv3: Fix missing VMSD terminator

2018-07-30 Thread Peter Maydell
On 27 July 2018 at 14:54, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The 'vmstate_smmuv3_queue' is missing the end-of-list marker. > > Fixes: 10a83cb9887 > Signed-off-by: Dr. David Alan Gilbert > --- > hw/arm/smmuv3.c | 2 ++ > 1 file changed, 2 insertions(+) > > d

Re: [Qemu-devel] [PATCH] hw/arm/sysbus-fdt: Fix assertion in copy_properties_from_host()

2018-07-30 Thread Peter Maydell
On 25 July 2018 at 12:30, Geert Uytterhoeven wrote: > When copy_properties_from_host() ignores the error for an optional > property, it frees the error, but fails to reset it. > > Hence if two or more optional properties are missing, an assertion is > triggered: > > util/error.c:57: error_setv

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread David Hildenbrand
On 30.07.2018 15:34, Michael S. Tsirkin wrote: > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: >> Directly assigned vfio devices have never been compatible with >> ballooning. Zapping MADV_DONTNEED pages happens completely >> independent of vfio page pinning and IOMMU mapping, l

Re: [Qemu-devel] [PATCH for-3.0] hw/misc/tz-mpc: Zero the LUT on initialization, not just reset

2018-07-30 Thread Peter Maydell
On 24 July 2018 at 16:45, Thomas Huth wrote: > On 24.07.2018 17:36, Peter Maydell wrote: >> In the tz-mpc device we allocate a data block for the LUT, >> which we then clear to zero in the device's reset method. >> This is conceptually fine, but unfortunately results in a >> valgrind complaint abo

Re: [Qemu-devel] [PATCH v5 2/3] spapr: introduce a IRQ controller backend to the machine

2018-07-30 Thread Cédric Le Goater
>> +static void spapr_irq_init_xics(sPAPRMachineState *spapr, Error **errp) >> +{ >> +MachineState *machine = MACHINE(spapr); >> +sPAPRMachineClass *smc = SPAPR_MACHINE_GET_CLASS(spapr); >> +int nr_irqs = smc->irq->nr_irqs; >> +Error *local_err = NULL; >> + >> +/* Initialize t

Re: [Qemu-devel] [RFC PATCH 0/3] Balloon inhibit enhancements

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 03:54:04PM +0200, David Hildenbrand wrote: > On 30.07.2018 15:34, Michael S. Tsirkin wrote: > > On Tue, Jul 17, 2018 at 04:47:31PM -0600, Alex Williamson wrote: > >> Directly assigned vfio devices have never been compatible with > >> ballooning. Zapping MADV_DONTNEED pages

Re: [Qemu-devel] [PATCH v3 2/3] arm: Add Nordic Semiconductor nRF51 SoC

2018-07-30 Thread Joel Stanley
On 26 July 2018 at 20:31, Julia Suvorova wrote: >> +++ b/hw/arm/nrf51_soc.c >> +static void nrf51_soc_init(Object *obj) >> +{ >> +NRF51State *s = NRF51_SOC(obj); >> + >> +memory_region_init(&s->container, obj, "nrf51-container", >> UINT64_MAX); >> + >> +object_initialize(&s->cpu, siz

Re: [Qemu-devel] [PATCH] target/arm: Remove duplicate 'host' entry in '-cpu ?' output

2018-07-30 Thread Peter Maydell
On 27 July 2018 at 14:23, Philippe Mathieu-Daudé wrote: > Since 86f0a186d6f the TYPE_ARM_HOST_CPU is only compiled when CONFIG_KVM > is enabled. > > Remove the now redundant special-case introduced in a96c0514ab7, to avoid: > > $ qemu-system-aarch64 -machine virt -cpu \? | fgrep host > host >

[Qemu-devel] [PATCH 1/1] s390x/sclp: fix maxram calculation

2018-07-30 Thread Christian Borntraeger
We clamp down ram_size to match the sclp increment size. We do not do the same for maxram_size, which means for large guests with some sizes (e.g. -m 5) maxram_size differs from ram_size. This can break other code (e.g. CMMA migration) which uses maxram_size to calculate the number of pages and

[Qemu-devel] [PATCH v6 0/4] spapr: introduce a fixed IRQ number space and an IRQ controller backend

2018-07-30 Thread Cédric Le Goater
Here is a proposal for a new IRQ number space layout using static numbers and a bitmap allocator for the MSIs. The previous layout is kept for compatibly in machines raising the 'legacy_irq_allocation' flag. The patchset also introduces a sPAPR IRQ interface which offers the possibility to provide

[Qemu-devel] [PATCH v6 1/4] spapr: Add a pseries-3.1 machine type

2018-07-30 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- include/hw/compat.h | 3 +++ hw/ppc/spapr.c | 23 +-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/hw/compat.h b/include/hw/compat.h index c08f4040bb80..6f4d5fc64704 100644 --- a/include/hw/compat.h +++ b/inc

[Qemu-devel] [PATCH v6 2/4] spapr: introduce a fixed IRQ number space

2018-07-30 Thread Cédric Le Goater
This proposal introduces a new IRQ number space layout using static numbers for all devices, depending on a device index, and a bitmap allocator for the MSI IRQ numbers which are negotiated by the guest at runtime. As the VIO device model does not have a device index but a "reg" property, we intro

[Qemu-devel] [PATCH v6 3/4] spapr: introduce a IRQ controller backend to the machine

2018-07-30 Thread Cédric Le Goater
This proposal moves all the related IRQ routines of the sPAPR machine behind a sPAPR IRQ backend interface 'spapr_irq' to prepare for future changes. First of which will be to increase the size of the IRQ number space, then, will follow a new backend for the POWER9 XIVE IRQ controller. Signed-off-

  1   2   3   4   >