Re: [Qemu-devel] [PATCH 0/4] four zpci patches

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 13:20:12 +0800 Yi Min Zhao wrote: > Why can't I receive [Qemu-devel] prefixed patches? > > > 在 2017/8/23 下午3:26, Yi Min Zhao 写道: > > This patch set contains four small zpci patches to fixup different issues. > > 1) fixup calculation of msix boundary > > 2) remove zpci idx fr

Re: [Qemu-devel] [Qemu-block] [RFC PATCH 31/56] block: Make throttle byte rates and sizes unsigned in QAPI/QMP

2017-08-24 Thread Markus Armbruster
Alberto Garcia writes: > On Mon 07 Aug 2017 04:45:35 PM CEST, Markus Armbruster wrote: >> Sizes and byte rates should use QAPI type 'size' (uint64_t). >> BlockIOThrottle and BlockDeviceInfo members @bps, @bps_rd, @bps_wr, >> @bps_max, @bps_rd_max, @bps_wr_max, @iops_size are 'int' (int64_t). >> q

Re: [Qemu-devel] [PATCH v5 3/9] s390x/pci: add stubs

2017-08-24 Thread Christian Borntraeger
On 08/23/2017 05:54 PM, Cornelia Huck wrote: > Some non-pci code calls into zpci code. Provide some stubs for builds > without pci. > > Reviewed-by: Thomas Huth > Signed-off-by: Cornelia Huck > --- > hw/s390x/Makefile.objs | 3 +- > hw/s390x/s390-pci-stub.c | 74 >

[Qemu-devel] [PATCH] hw/nvram/spapr_nvram: Device can not be created by the users

2017-08-24 Thread Thomas Huth
Trying to add a spapr-nvram device currently aborts QEMU like this: $ ppc64-softmmu/qemu-system-ppc64 -device spapr-nvram qemu-system-ppc64: hw/ppc/spapr_rtas.c:407: spapr_rtas_register: Assertion `!rtas_table[token].name' failed. Aborted (core dumped) This NVRAM device registers RTAS calls dur

[Qemu-devel] [PATCH for-2.11] hw/nvram/spapr_nvram: Device can not be created by the users

2017-08-24 Thread Thomas Huth
Trying to add a spapr-nvram device currently aborts QEMU like this: $ ppc64-softmmu/qemu-system-ppc64 -device spapr-nvram qemu-system-ppc64: hw/ppc/spapr_rtas.c:407: spapr_rtas_register: Assertion `!rtas_table[token].name' failed. Aborted (core dumped) This NVRAM device registers RTAS calls dur

Re: [Qemu-devel] [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-24 Thread Markus Armbruster
Paolo Bonzini writes: > On 23/08/2017 23:30, Eric Blake wrote: >>> Well, whatever is assigning to global_qtest should be using the long form. >> Question - what about going the other way, and switching ALL callers to >> always use the explicit form? I'd really like to maintain only one >> form,

Re: [Qemu-devel] [PATCH v5 3/9] s390x/pci: add stubs

2017-08-24 Thread Christian Borntraeger
On 08/24/2017 09:38 AM, Christian Borntraeger wrote: > > > On 08/23/2017 05:54 PM, Cornelia Huck wrote: >> Some non-pci code calls into zpci code. Provide some stubs for builds >> without pci. >> >> Reviewed-by: Thomas Huth >> Signed-off-by: Cornelia Huck >> --- >> hw/s390x/Makefile.objs |

[Qemu-devel] [PATCH 2/3] iotests.py: add FilePath context manager

2017-08-24 Thread Stefan Hajnoczi
The scratch/ (TEST_DIR) directory is not automatically cleaned up after test execution. It is the responsibility of tests to remove any files they create. A nice way of doing this is to declare files at the beginning of the test and automatically remove them with a context manager: with iotest

[Qemu-devel] [PATCH 1/3] qemu.py: make VM() a context manager

2017-08-24 Thread Stefan Hajnoczi
There are a number of ways to ensure that the QEMU process is shut down when the test ends, including atexit.register(), try: finally:, or unittest.teardown() methods. All of these require extra code and the programmer must remember to add vm.shutdown(). A nice solution is context managers: wi

[Qemu-devel] [PATCH 3/3] qemu-iotests: use context managers for resource cleanup in 194

2017-08-24 Thread Stefan Hajnoczi
Switch from atexit.register() to a more elegant idiom of declaring resources in a with statement: with FilePath('monitor.sock') as monitor_path, VM() as vm: ... The files and VMs will be automatically cleaned up whether the test passes or fails. Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PATCH 0/3] iotests: clean up resources using context managers

2017-08-24 Thread Stefan Hajnoczi
This series introduces context managers for the two most commonly used resources: files and VMs. Context managers eliminate the need to call a cleanup function explicitly. Tests should declare resources upfront in a with statement. Resources are automatically cleaned up whether the test passes o

Re: [Qemu-devel] [PATCH v5 0/9] zpci detangling

2017-08-24 Thread Christian Borntraeger
As there are only minor things left, whole series Acked-by: Christian Borntraeger On 08/23/2017 05:54 PM, Cornelia Huck wrote: > Hopefully should be close now... > > v4->v5: > - dropped "s390x/kvm: msi route fixup for non-pci" > - reworked "s390x/sclp: properly guard pci-specific functions":

Re: [Qemu-devel] [RFC PATCH] osdep.h: Prohibit disabling assert() in supported builds

2017-08-24 Thread Markus Armbruster
Eric Blake writes: > On 08/22/2017 06:19 AM, Halil Pasic wrote: > >> OTOH I do think this is to some degree institutionalizing a bad practice >> (you say we do not want to do that, but IMHO refusing to build with >> NDEBUG makes only sense if we want to alter the semantic of assert so >> that onc

Re: [Qemu-devel] [PATCHv4 02/03] colo-compare: Use IOThread to Check old packet regularly and Process pactkets of the primary

2017-08-24 Thread Zhang Chen
On 08/22/2017 04:46 PM, Wang yong wrote: From: Wang Yong Remove the task which check old packet in the comparing thread, then use IOthread context timer to handle it. Process pactkets in the IOThread which arrived over the socket. we use iothread_get_g_main_context to create a new g_main_loo

[Qemu-devel] [PATCH 2/2] qxl: add support for chunked cursors.

2017-08-24 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/qxl-render.c | 33 ++--- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index e1b3f05ecb..b2c98f90c0 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-

[Qemu-devel] [PATCH 0/2] qxl: add support for chunked cursors.

2017-08-24 Thread Gerd Hoffmann
This series adds support for unpacking qxl chunks, and uses it to support chunked cursor images. Windows guest drivers seem to use that when in HiDPI mode. Also drop (broken) support for mono cursors. Gerd Hoffmann (2): qxl: drop mono cursor support qxl: add support for chunked cursors. hw

[Qemu-devel] [PATCH 1/2] qxl: drop mono cursor support

2017-08-24 Thread Gerd Hoffmann
The chunk size sanity check in qxl_render_cursor works for SPICE_CURSOR_TYPE_ALPHA cursors only. So support for SPICE_CURSOR_TYPE_MONO cursors must be broken for ages without anyone noticing. Most likely it simply isn't used any more by guest drivers. Drop the dead code. Signed-off-by: Gerd Hoff

Re: [Qemu-devel] [PATCH v2] audio: intel-hda: do not use old_mmio accesses

2017-08-24 Thread Gerd Hoffmann
On Wed, 2017-08-23 at 20:37 +0100, Matt Parker wrote: > +    intel_hda_reg_write(d, reg, val, (1UL << (size * 8)) - 1); Hmm? Same as v1, forgot to commit the changes? cheers, Gerd

[Qemu-devel] [PATCH for-2.11 1/6] ppc: use macros to make cpu type name from string literal

2017-08-24 Thread Igor Mammedov
Replace "-" TYPE_POWERPC_CPU when composing cpu type name from cpu model string literal and the same pattern in format strings with POWERPC_CPU_TYPE_SUFFIX and POWERPC_CPU_TYPE_NAME(model) macroses like we do in x86. Later POWERPC_CPU_TYPE_NAME() will be used to define default cpu type per mach

[Qemu-devel] [PATCH for-2.11 0/6] ppc: cpu_model handling cleanups

2017-08-24 Thread Igor Mammedov
While removing cpu_init() tree-wide, I've stumbled uppon PPC way of parsing cpu_model which looked way too complex compared to other targets. So here goes cleanups that instead of current inconsistent way of dealing with cpu models - mix of case-(in)sensetive lookups and cpu model names - aliase

[Qemu-devel] [PATCH for-2.11 6/6] ppc: drop caching ObjectClass from PowerPCCPUAlias

2017-08-24 Thread Igor Mammedov
Caching there practically doesn't give any benefits and that at slow path druring querying supported CPU list. But it introduces non conventional path of where from comes used CPU type name (kvm_ppc_register_host_cpu_type). Taking in account that kvm_ppc_register_host_cpu_type() fixes up models th

[Qemu-devel] [PATCH for-2.11 3/6] ppc: make cpu alias point only to real cpu models

2017-08-24 Thread Igor Mammedov
alias pointing to another alias forces lookup code to do recurrsive translation till real cpu model is reached. Drop this nonsence and make each alias point to cpu model that has corresponding CPU type. It will allow to drop recurrsion in cpu model translation code and actually make ppc_cpu_aliase

[Qemu-devel] [PATCH for-2.11 4/6] ppc: replace inter-function cyclic dependency/recurssion with 2 simple lookups

2017-08-24 Thread Igor Mammedov
previous patches cleaned up cpu model/alias naming which allows to simplify cpu model/alias to cpu type lookup a bit byt removing recurssion and dependency of ppc_cpu_class_by_name() / ppc_cpu_class_by_alias() on each other. Besides of simplifying code it reduces it by ~15LOC. Signed-off-by: Igor

[Qemu-devel] [PATCH for-2.11 2/6] ppc: make cpu_model translation to type consistent

2017-08-24 Thread Igor Mammedov
PPC handles -cpu FOO rather incosistently, i.e. it does case-insensitive matching of FOO to a CPU type (see: ppc_cpu_compare_class_name) but handles alias names as case-sensitive, as result: # qemu-system-ppc64 -M mac99 -cpu g3 qemu-system-ppc64: unable to find CPU model ' kN�U' # qemu-system-

[Qemu-devel] [PATCH for-2.11 5/6] ppc: simplify cpu model lookup by PVR

2017-08-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target/ppc/translate_init.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c index f1a559d..ca9f1e3 100644 --- a/target/ppc/translate_init.c +++ b/target/ppc

Re: [Qemu-devel] [PATCH v5 7/9] s390x/sclp: properly guard pci-specific functions

2017-08-24 Thread Cornelia Huck
On Wed, 23 Aug 2017 18:25:05 +0200 Pierre Morel wrote: > On 23/08/2017 17:54, Cornelia Huck wrote: > > If we do not provide zpci, pci reconfiguration via sclp is not available > > either. I/O adapter configuration, however, should always be present. > > > > Rename the values that refer to I/O ad

Re: [Qemu-devel] [PATCH v5 2/9] kvm: remove hard dependency on pci

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 03:13:46 +0200 Thomas Huth wrote: > On 23.08.2017 17:54, Cornelia Huck wrote: > > The msi routing code in kvm calls some pci functions: provide > > some stubs to enable builds without pci. > > > > Also, to make this more obvious, guard them via a pci_available boolean > > (wh

Re: [Qemu-devel] [PATCH 0/3] iotests: clean up resources using context managers

2017-08-24 Thread Fam Zheng
On Thu, 08/24 08:21, Stefan Hajnoczi wrote: > Tests should declare resources upfront in a with statement. Resources are > automatically cleaned up whether the test passes or fails: > > with FilePath('test.img') as img_path, >VM() as vm: > ...test... > # img_path is deleted and v

Re: [Qemu-devel] [PATCH 0/2] qxl: add support for chunked cursors.

2017-08-24 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20170824081305.8445-1-kra...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] qxl: add support for chunked cursors. === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(g

[Qemu-devel] [PATCH 10/16] qapi: Use qapi_enum_parse() in input_type_enum()

2017-08-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qapi/qapi-visit-core.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index ed6d2af..ec83ff6 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -14,6 +14,7 @@

[Qemu-devel] [PATCH 08/16] quorum: Use qapi_enum_parse() in quorum_open()

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Message-Id: <20170822132255.23945-12-marcandre.lur...@redhat.com> Reviewed-by: Markus Armbruster [Rebased, qemu_opt_get() factored out, commit message tweaked] Cc: Alberto Garcia Reviewed-by: Alberto Garcia Signed-off-by: Markus Armbrus

[Qemu-devel] [PATCH 12/16] qapi: Generate FOO_str() macro for QAPI enum FOO

2017-08-24 Thread Markus Armbruster
The next commit will put it to use. May look pointless now, but we're going to change the FOO_lookup's type, and then it'll help. Signed-off-by: Markus Armbruster --- block.c | 1 - block/blkdebug.c | 1 - block/file-posix.c | 1 - block/file-win32.c

[Qemu-devel] [PATCH 00/16] qapi: Rework mapping of enum value to string

2017-08-24 Thread Markus Armbruster
The purpose of this work is to make holes in QAPI enumerations possible. Why holes? Because we want to be able to suppress enumeration constants with #if. Holes could be avoided, e.g. by letting the compiler assign the values. Falls apart when the conditions are target-specific, because then ta

[Qemu-devel] [PATCH 04/16] tpm: Clean up model registration & lookup

2017-08-24 Thread Markus Armbruster
We have a strict separation between enum TpmModel and tpm_models[]: * TpmModel may have any number of members. It just happens to have one. * tpm_register_model() uses the first empty slot in tmp_models[]. If you register more than tpm_models[] has space, tpn_register_model() fails. Its ca

[Qemu-devel] [PATCH 11/16] qapi: Avoid unnecessary use of enum lookup table's sentinel

2017-08-24 Thread Markus Armbruster
Currently, the FOO_lookup[] generated for QAPI enum types are terminated by a NULL sentinel. A future patch will generate enums with "holes". NULL-termination will cease to work then. To prepare for that, replace "have we reached the sentinel?" predicates by "have we reached the FOO__MAX value?"

[Qemu-devel] [PATCH 03/16] tpm: Clean up driver registration & lookup

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau We have a strict separation between enum TpmType and be_drivers[]: * TpmType may have any number of members. It just happens to have one. * tpm_register_driver() uses the first empty slot in be_drivers[]. If you register more than tpm_models[] has space, tpm_regist

[Qemu-devel] [PATCH 07/16] block: Use qemu_enum_parse() in blkdebug_debug_breakpoint()

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau The error message on invalid blkdebug events changes from qemu-system-x86_64: LOCATION: Invalid event name "VALUE" to qemu-system-x86_64: LOCATION: invalid parameter value: VALUE Slight degradation, but the message is sub-par even before the patch. When complai

[Qemu-devel] [PATCH 16/16] qapi: drop the sentinel in enum array

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau Now that all usages have been converted to user lookup helpers. Signed-off-by: Marc-André Lureau Message-Id: <20170822132255.23945-14-marcandre.lur...@redhat.com> [Rebased, superfluous local variable dropped, missing check-qom-proplist.c update added] Signed-off-by: Mark

[Qemu-devel] [PATCH 09/16] crypto: Use qapi_enum_parse() in qcrypto_block_luks_name_lookup()

2017-08-24 Thread Markus Armbruster
Cc: "Daniel P. Berrange" Signed-off-by: Markus Armbruster --- crypto/block-luks.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index afb8543..c3cacdb 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks.c @

[Qemu-devel] [PATCH 14/16] qapi: Convert indirect uses of FOO_lookup[...] to qapi_enum_lookup()

2017-08-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/core/qdev-properties.c | 7 +-- qapi/qapi-visit-core.c| 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 078fc5d..7512bd4 100644 --- a/hw/core/qdev-properties.c +++ b/hw

[Qemu-devel] [PATCH 01/16] qapi: Update qapi-code-gen.txt examples to match current code

2017-08-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt | 47 +++- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt index 9903ac4..ae05327 100644 --- a/docs/devel/qapi-code-

[Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max

2017-08-24 Thread Markus Armbruster
The lookup tables have a sentinel, no need to make callers pass their size. Fun: the header has it in the wrong position. Good riddance. Signed-off-by: Markus Armbruster --- block.c | 1 - block/file-posix.c | 7 +++ block/file-win32.c | 2 +- block/gluster.

Re: [Qemu-devel] [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-24 Thread Paolo Bonzini
On 24/08/2017 09:42, Markus Armbruster wrote: > > In a language less primitive than C, I'd write it exactly that way, and > nobody would complain. In old, primitive C, I have to write > > global_qtest = A; > do this > do that > > global_qtest = B; > do something > > glo

[Qemu-devel] [PATCH 05/16] hmp: Use qapi_enum_parse() in hmp_migrate_set_capability()

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau The error message on invalid capability name changes from Invalid parameter "NAME" to invalid parameter value: NAME No worse than before. Signed-off-by: Marc-André Lureau Message-Id: <20170822132255.23945-9-marcandre.lur...@redhat.com> Reviewed-by: Markus Arm

Re: [Qemu-devel] [PATCH 0/4] four zpci patches

2017-08-24 Thread Yi Min Zhao
在 2017/8/24 下午3:13, Cornelia Huck 写道: On Thu, 24 Aug 2017 13:20:12 +0800 Yi Min Zhao wrote: Why can't I receive [Qemu-devel] prefixed patches? 在 2017/8/23 下午3:26, Yi Min Zhao 写道: This patch set contains four small zpci patches to fixup different issues. 1) fixup calculation of msix bounda

Re: [Qemu-devel] Number of usable slots in PCIe Root Port / PCIe Switch Downstream Port

2017-08-24 Thread Andrea Bolognani
On Wed, 2017-08-23 at 23:16 +0300, Marcel Apfelbaum wrote: > > Is such a configuration considered valid? > > Definitely no. > > > Or should > > libvirt and the guest OS / firmware start allowing it? > > I thought libvirt does not allow it anyway and yes, is a bug, > but considered low priority.

[Qemu-devel] [PATCH 06/16] hmp: Use qapi_enum_parse() in hmp_migrate_set_parameter()

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau The error message on invalid parameter name changes from Invalid parameter "NAME" to invalid parameter value: NAME Slight degratation, perhaps. Signed-off-by: Marc-André Lureau Message-Id: <20170822132255.23945-10-marcandre.lur...@redhat.com> Reviewed-by: Mar

[Qemu-devel] [PATCH 15/16] qapi: Change data type of the FOO_lookup generated for enum FOO

2017-08-24 Thread Markus Armbruster
From: Marc-André Lureau Currently, a FOO_lookup is an array of strings terminated by a NULL sentinel. A future patch will generate enums with "holes". NULL-termination will cease to work then. To prepare for that, store the length in the FOO_lookup by wrapping it in a struct and adding a membe

[Qemu-devel] [PATCH 13/16] qapi: Mechanically convert FOO_lookup[...] to FOO_str(...)

2017-08-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- backends/hostmem.c | 2 +- block/backup.c | 2 +- block/file-posix.c | 4 +-- block/file-win32.c | 2 +- block/gluster.c | 4 +-- block/iscsi.c

Re: [Qemu-devel] [PATCH v5 3/9] s390x/pci: add stubs

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 09:43:48 +0200 Christian Borntraeger wrote: > On 08/24/2017 09:38 AM, Christian Borntraeger wrote: > > > > > > On 08/23/2017 05:54 PM, Cornelia Huck wrote: > >> Some non-pci code calls into zpci code. Provide some stubs for builds > >> without pci. > >> > >> Reviewed-by: T

Re: [Qemu-devel] anyone seen or heard of large delays/stalls running qemu with kvm support?

2017-08-24 Thread Dr. David Alan Gilbert
* Chris Friesen (chris.frie...@windriver.com) wrote: > > Hi all, > > I need to apologize up front, this is going to be a long email. Basically > the executive summary is that we're seeing issues where a VM is apparently > not making forward progress in the guest, while at the same time spinning

[Qemu-devel] [PATCH] vga: stop passing pointers to vga_draw_line* functions

2017-08-24 Thread Gerd Hoffmann
Instead pass around the address (aka offset into vga memory). Add vga_read_* helper functions which apply vbe_size_mask to the address, to make sure the address stays within the valid range, simliar to the cirrus blitter fixes (commits ffaf857778 and 026aeffcb4). Impact: DoS for priviledged guest

Re: [Qemu-devel] [PATCH for-2.11 06/27] x86: extract legacy cpu features format parser

2017-08-24 Thread Igor Mammedov
On Wed, 23 Aug 2017 14:58:39 -0300 Eduardo Habkost wrote: > On Wed, Aug 23, 2017 at 07:37:39PM +0200, Igor Mammedov wrote: > > On Wed, 23 Aug 2017 13:46:38 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Aug 23, 2017 at 06:29:02PM +0200, Igor Mammedov wrote: > > > > On Wed, 23 Aug 2017 1

[Qemu-devel] [PATCH] vga: fix display update region calculation (split screen)

2017-08-24 Thread Gerd Hoffmann
vga display update mis-calculated the region for the dirty bitmap snapshot in case split screen mode is used. This can trigger an assert in cpu_physical_memory_snapshot_get_dirty(). Impact: DoS for priviledged guest users. Fixes: CVE-2017- Fixes: fec5e8c92becad223df9d972770522f64aafdb72 Cc:

Re: [Qemu-devel] [PATCH v3 06/10] tests: Add NetBSD image

2017-08-24 Thread Fam Zheng
On Wed, 08/23 17:15, Kamil Rytarowski wrote: > On 22.08.2017 06:41, Fam Zheng wrote: > > The image is prepared following instructions as in: > > > > https://wiki.qemu.org/Hosts/BSD > > > > Signed-off-by: Fam Zheng > > Reviewed-by: Kamil Rytarowski > > --- > > tests/vm/netbsd | 45 +

Re: [Qemu-devel] [PATCH v3 00/10] tests: Add VM based build tests (for non-x86_64 and/or non-Linux)

2017-08-24 Thread Fam Zheng
On Tue, 08/22 16:33, Kamil Rytarowski wrote: > I propose to rename *bsd.img.xz (like netbsd.img.xz) to > *bsd-version-arch.img.xz, like netbsd-7.1-amd64.img.xz. This will be > more verbose about the version and leave room for image upgrades in future. Good idea, will update. Fam

Re: [Qemu-devel] [PATCH v5 7/9] s390x/sclp: properly guard pci-specific functions

2017-08-24 Thread Halil Pasic
On 08/23/2017 05:54 PM, Cornelia Huck wrote: > If we do not provide zpci, pci reconfiguration via sclp is not available > either. I/O adapter configuration, however, should always be present. > > Rename the values that refer to I/O adapter configuration (instead of only > pci) to make things cle

Re: [Qemu-devel] [PATCH v5 7/9] s390x/sclp: properly guard pci-specific functions

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 11:29:47 +0200 Halil Pasic wrote: > On 08/23/2017 05:54 PM, Cornelia Huck wrote: > > If we do not provide zpci, pci reconfiguration via sclp is not available > > either. I/O adapter configuration, however, should always be present. > > > > Rename the values that refer to I/O

Re: [Qemu-devel] Memory use with >100 virtio devices

2017-08-24 Thread Alexey Kardashevskiy
On 21/08/17 15:50, Alexey Kardashevskiy wrote: > On 21/08/17 14:31, David Gibson wrote: >> On Fri, Aug 18, 2017 at 02:18:53PM +0100, Stefan Hajnoczi wrote: >>> On Fri, Aug 18, 2017 at 03:39:20PM +1000, Alexey Kardashevskiy wrote: ==94451== 4 of 10

Re: [Qemu-devel] [PATCH v5 3/9] s390x/pci: add stubs

2017-08-24 Thread Halil Pasic
On 08/24/2017 11:09 AM, Cornelia Huck wrote: > On Thu, 24 Aug 2017 09:43:48 +0200 > Christian Borntraeger wrote: > >> On 08/24/2017 09:38 AM, Christian Borntraeger wrote: >>> >>> >>> On 08/23/2017 05:54 PM, Cornelia Huck wrote: Some non-pci code calls into zpci code. Provide some stubs f

Re: [Qemu-devel] [PATCH QEMU] xen/pt: allow QEMU to request MSI unmasking at bind time

2017-08-24 Thread Jan Beulich
>>> On 24.08.17 at 11:47, wrote: > @@ -274,7 +278,7 @@ int xen_pt_msi_update(XenPCIPassthroughState *s) > { > XenPTMSI *msi = s->msi; > return msi_msix_update(s, msi_addr64(msi), msi->data, msi->pirq, > - false, 0, &msi->pirq); > + fal

Re: [Qemu-devel] [PATCH 15/16] qapi: Change data type of the FOO_lookup generated for enum FOO

2017-08-24 Thread Markus Armbruster
Markus Armbruster writes: > From: Marc-André Lureau > > Currently, a FOO_lookup is an array of strings terminated by a NULL > sentinel. > > A future patch will generate enums with "holes". NULL-termination > will cease to work then. > > To prepare for that, store the length in the FOO_lookup by

Re: [Qemu-devel] [PATCH v5 3/9] s390x/pci: add stubs

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 11:50:54 +0200 Halil Pasic wrote: > On 08/24/2017 11:09 AM, Cornelia Huck wrote: > > On Thu, 24 Aug 2017 09:43:48 +0200 > > Christian Borntraeger wrote: > > > >> On 08/24/2017 09:38 AM, Christian Borntraeger wrote: > >>> > >>> > >>> On 08/23/2017 05:54 PM, Cornelia Huck

[Qemu-devel] [PATCH for-2.11] hw/s390x/s390-skeys: Mark the storage key devices with user_creatable = false

2017-08-24 Thread Thomas Huth
QEMU currently aborts if the user tries to create a skey device: $ s390x-softmmu/qemu-system-s390x -nographic -device s390-skeys-qemu qemu-system-s390x: hw/s390x/s390-skeys.c:30: s390_get_skeys_device: Assertion `ss' failed. Aborted (core dumped) The storage key devices are only meant to be inst

Re: [Qemu-devel] [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-24 Thread Markus Armbruster
Paolo Bonzini writes: > On 24/08/2017 09:42, Markus Armbruster wrote: >> >> In a language less primitive than C, I'd write it exactly that way, and >> nobody would complain. In old, primitive C, I have to write >> >> global_qtest = A; >> do this >> do that >> >> global_qtest =

Re: [Qemu-devel] [PATCH QEMU] xen/pt: allow QEMU to request MSI unmasking at bind time

2017-08-24 Thread Jan Beulich
>>> On 24.08.17 at 12:06, wrote: > On Thu, Aug 24, 2017 at 03:54:21AM -0600, Jan Beulich wrote: >> >>> On 24.08.17 at 11:47, wrote: >> > @@ -274,7 +278,7 @@ int xen_pt_msi_update(XenPCIPassthroughState *s) >> > { >> > XenPTMSI *msi = s->msi; >> > return msi_msix_update(s, msi_addr64(ms

[Qemu-devel] [Bug 1712027] Re: qemu: Cryptography adding encrypted disk with luks format failed

2017-08-24 Thread Huang Yong
If the alg is GCRY_CIPHER_AES256 and length of data to be encrypted is multiple of 16 (16/32/48...),the length of encryted data is equal to the raw data. There is no padding and the bug is triggerd. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscri

[Qemu-devel] [PATCH QEMU] xen/pt: allow QEMU to request MSI unmasking at bind time

2017-08-24 Thread Roger Pau Monne
When a MSIX interrupt is bound to a guest using xc_domain_update_msi_irq (XEN_DOMCTL_bind_pt_irq) the interrupt is left masked by default. This causes problems with guests that first configure interrupts and clean the per-entry MSIX table mask bit and afterwards enable MSIX globally. In such scena

Re: [Qemu-devel] [Qemu-block] [PATCH v5 08/13] tests: Rely more on global_qtest

2017-08-24 Thread Paolo Bonzini
On 24/08/2017 12:09, Markus Armbruster wrote: > Cut-and-paste cuts both ways (pardon the pun): > > initialize with QTestState A > frobnicate with QTestState A > glomnify with QTestState A > frobnicate with QTestState A > initialize with QTestState B > boingboing with QTestS

Re: [Qemu-devel] AVMF & OVMF blobs in QEMU tree???

2017-08-24 Thread Gerd Hoffmann
Hi, > > How big? > > The ArmVirtQemu firmware binary, and its matching varstore template, > need to be padded to 64MB each, after the edk2 build process > completes, > before the fw binary, and a variable store created from the varstore > template, can be passed to QEMU. > > So, "pretty big".

Re: [Qemu-devel] [PATCH for-2.11] hw/s390x/s390-skeys: Mark the storage key devices with user_creatable = false

2017-08-24 Thread Claudio Imbrenda
On Thu, 24 Aug 2017 12:08:48 +0200 Thomas Huth wrote: > QEMU currently aborts if the user tries to create a skey device: > > $ s390x-softmmu/qemu-system-s390x -nographic -device s390-skeys-qemu > qemu-system-s390x: hw/s390x/s390-skeys.c:30: s390_get_skeys_device: > Assertion `ss' failed. > Abor

[Qemu-devel] [PATCH 01/14] qdict: add qdict_put_null() helper

2017-08-24 Thread Marc-André Lureau
A step towards completeness. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qdict.h | 4 +++- target/i386/cpu.c| 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 363e431106..6588c7f0c8 100644 --- a/inc

[Qemu-devel] [PATCH 00/14] Generate a literal qobject for introspection

2017-08-24 Thread Marc-André Lureau
Hi, This series is based on patches 2-5 from "[PATCH v2 00/54] qapi: add #if pre-processor conditions to generated code". Generating a literal qobject will allow to easily introduce #if conditionals from the original series. Marc-André Lureau (14): qdict: add qdict_put_null() helper qlit: mov

[Qemu-devel] [PATCH 05/14] qlit: rename compare_litqobj_to_qobj

2017-08-24 Thread Marc-André Lureau
Use qlit_ prefix. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 2 +- qobject/qlit.c | 6 +++--- tests/check-qjson.c | 14 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h index 1e969

[Qemu-devel] [PATCH 02/14] qlit: move qlit from check-qjson to qobject/

2017-08-24 Thread Marc-André Lureau
Fix code style issues while at it, to please check-patch. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 49 + qobject/qlit.c | 89 + tests/check-qjson.c | 96 +---

[Qemu-devel] [PATCH 07/14] qlit: make qlit_equal_qobject() take const arguments

2017-08-24 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 2 +- qobject/qlit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h index 2e22d0f73c..8882016199 100644 --- a/include/qapi/qmp/qlit.h +++ b/include/qap

[Qemu-devel] [PATCH 03/14] qlit: use QLit prefix consistently

2017-08-24 Thread Marc-André Lureau
Rename from LiteralQ to QLit. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 24 qobject/qlit.c | 4 ++-- tests/check-qjson.c | 40 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/inc

[Qemu-devel] [PATCH 04/14] qlit: remove needless type cast

2017-08-24 Thread Marc-André Lureau
And misc code style fix. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h index f36bca4554..1e9696988a 100644 --- a/include/qapi/qmp/qlit.h +++ b/include/qapi

[Qemu-devel] [PATCH 08/14] qlit: add QLIT_QNULL and QLIT_BOOL

2017-08-24 Thread Marc-André Lureau
As they are going to be used in the following patches. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 5 + qobject/qlit.c | 4 2 files changed, 9 insertions(+) diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h index 8882016199..7118fc9e32 100644 --

[Qemu-devel] [PATCH 06/14] qlit: make qlit_equal_qobject return a bool

2017-08-24 Thread Marc-André Lureau
Make it more obvious about the expected return values. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 2 +- qobject/qlit.c | 18 +- tests/check-qjson.c | 14 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/qapi

[Qemu-devel] [PATCH 11/14] qlit: improve QLit dict vs qdict comparison

2017-08-24 Thread Marc-André Lureau
Fail if the QLit dict doesn't match exactly the object dict. To do so, create a copy of the original qdict, and remove the checked elements. Verify that the dict is empty by the end of the comparison. Signed-off-by: Marc-André Lureau --- qobject/qlit.c | 42 -

Re: [Qemu-devel] [PATCH for-2.11] hw/s390x/s390-skeys: Mark the storage key devices with user_creatable = false

2017-08-24 Thread Halil Pasic
On 08/24/2017 12:08 PM, Thomas Huth wrote: > QEMU currently aborts if the user tries to create a skey device: > > $ s390x-softmmu/qemu-system-s390x -nographic -device s390-skeys-qemu > qemu-system-s390x: hw/s390x/s390-skeys.c:30: s390_get_skeys_device: > Assertion `ss' failed. > Aborted (core d

[Qemu-devel] [PATCH 09/14] qlit: replace assert(qnum_get_try_int)

2017-08-24 Thread Marc-André Lureau
qnum_get_int() will assert if underlying type isn't compatible. Signed-off-by: Marc-André Lureau --- qobject/qlit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qobject/qlit.c b/qobject/qlit.c index 07ad6b05e8..7e4bf92862 100644 --- a/qobject/qlit.c +++ b/qobject/qlit.c @@

[Qemu-devel] [PATCH 10/14] tests: add qlit tests

2017-08-24 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/check-qlit.c | 64 ++ tests/Makefile.include | 5 +++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 tests/check-qlit.c diff --git a/tests/check-qlit.c b/tests/check-qlit.c new

Re: [Qemu-devel] [PATCH 01/16] qapi: Update qapi-code-gen.txt examples to match current code

2017-08-24 Thread Marc-André Lureau
On Thu, Aug 24, 2017 at 10:55 AM Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > Reviewed-by: Marc-André Lureau (tbh, I find it tedious and not really useful to have generated code in the doc though) --- > docs/devel/qapi-code-gen.txt | 47 > ++

Re: [Qemu-devel] [PATCH QEMU] xen/pt: allow QEMU to request MSI unmasking at bind time

2017-08-24 Thread Roger Pau Monne
On Thu, Aug 24, 2017 at 03:54:21AM -0600, Jan Beulich wrote: > >>> On 24.08.17 at 11:47, wrote: > > @@ -274,7 +278,7 @@ int xen_pt_msi_update(XenPCIPassthroughState *s) > > { > > XenPTMSI *msi = s->msi; > > return msi_msix_update(s, msi_addr64(msi), msi->data, msi->pirq, > > -

[Qemu-devel] [PATCH 12/14] qlit: improve QLit list vs qlist comparison

2017-08-24 Thread Marc-André Lureau
Check that the QLit list has the same size as the qlist, this should ensure that we have an exact match when iterating over qlist for comparing the elements. Signed-off-by: Marc-André Lureau --- qobject/qlit.c | 39 ++- tests/check-qlit.c | 3 +++ 2 files

[Qemu-devel] [PATCH 13/14] qlit: add qobject_form_qlit()

2017-08-24 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qlit.h | 2 ++ qobject/qlit.c | 37 + tests/check-qlit.c | 26 ++ 3 files changed, 65 insertions(+) diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h inde

[Qemu-devel] [PATCH 14/14] qapi: generate a literal qobject for introspection

2017-08-24 Thread Marc-André Lureau
Replace the generated json string with a literal qobject. The later is easier to deal with, at run time as well as compile time: adding #if conditionals will be easier than in a json string. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- scripts/qapi-introspect.py |

Re: [Qemu-devel] [PATCH 12/14] qlit: improve QLit list vs qlist comparison

2017-08-24 Thread Marc-André Lureau
- Original Message - > Check that the QLit list has the same size as the qlist, this should > ensure that we have an exact match when iterating over qlist for > comparing the elements. > > Signed-off-by: Marc-André Lureau > --- > qobject/qlit.c | 39 ++--

Re: [Qemu-devel] [PATCH 04/16] tpm: Clean up model registration & lookup

2017-08-24 Thread Marc-André Lureau
Hi On Thu, Aug 24, 2017 at 10:45 AM, Markus Armbruster wrote: > We have a strict separation between enum TpmModel and tpm_models[]: > > * TpmModel may have any number of members. It just happens to have one. > > * tpm_register_model() uses the first empty slot in tmp_models[]. > > If you regis

Re: [Qemu-devel] [PATCH QEMU] xen/pt: allow QEMU to request MSI unmasking at bind time

2017-08-24 Thread Roger Pau Monne
On Thu, Aug 24, 2017 at 04:13:58AM -0600, Jan Beulich wrote: > >>> On 24.08.17 at 12:06, wrote: > > On Thu, Aug 24, 2017 at 03:54:21AM -0600, Jan Beulich wrote: > >> >>> On 24.08.17 at 11:47, wrote: > >> > @@ -274,7 +278,7 @@ int xen_pt_msi_update(XenPCIPassthroughState *s) > >> > { > >> >

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max

2017-08-24 Thread Marc-André Lureau
On Thu, Aug 24, 2017 at 10:45 AM, Markus Armbruster wrote: > The lookup tables have a sentinel, no need to make callers pass their > size. > > Fun: the header has it in the wrong position. Good riddance. > > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > block.c

Re: [Qemu-devel] [PATCH 09/16] crypto: Use qapi_enum_parse() in qcrypto_block_luks_name_lookup()

2017-08-24 Thread Marc-André Lureau
On Thu, Aug 24, 2017 at 10:46 AM, Markus Armbruster wrote: > Cc: "Daniel P. Berrange" > Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau > --- > crypto/block-luks.c | 19 +++ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/crypto/block-luks

Re: [Qemu-devel] AVMF & OVMF blobs in QEMU tree???

2017-08-24 Thread Gerd Hoffmann
Hi, > Having all our precompiled blobs be in a submodule would > maybe be handy for properly keeping them separate from the > QEMU code -- would that be useful for downstream distro > packagers? I like the clear separation. Also you don't have to fetch the firmware submodule if you don't need

Re: [Qemu-devel] [PATCH v5 0/9] zpci detangling

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 09:49:18 +0200 Christian Borntraeger wrote: > As there are only minor things left, > whole series > > Acked-by: Christian Borntraeger Thanks. I've applied this to s390-next.

Re: [Qemu-devel] [PATCH v2 06/54] qapi: introduce qapi_enum_lookup()

2017-08-24 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Hi > > - Original Message - > > Marc-André Lureau writes: > > > > > This will help with the introduction of a new structure to handle > > > enum lookup. It would be good to make that comment explain why it's necessary. > > > Si

Re: [Qemu-devel] A use-after-free in slirp

2017-08-24 Thread P J P
Hello Samuel, +-- On Wed, 23 Aug 2017, Samuel Thibault wrote --+ | The paste is not available any more. Is it really very large? It's usually | really better to just send it by mail, so it's archived in the mailing list | etc. Yes, stack-trace was quite long. === ==2704==ERROR: AddressSaniti

Re: [Qemu-devel] [PATCH for-2.11] hw/s390x/s390-skeys: Mark the storage key devices with user_creatable = false

2017-08-24 Thread Cornelia Huck
On Thu, 24 Aug 2017 12:08:48 +0200 Thomas Huth wrote: > QEMU currently aborts if the user tries to create a skey device: > > $ s390x-softmmu/qemu-system-s390x -nographic -device s390-skeys-qemu > qemu-system-s390x: hw/s390x/s390-skeys.c:30: s390_get_skeys_device: > Assertion `ss' failed. > Abor

Re: [Qemu-devel] [PATCH v2 08/54] hmp: use qapi_enum_parse() in hmp_migrate_set_capability

2017-08-24 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Signed-off-by: Marc-André Lureau > --- > hmp.c | 24 +++- > 1 file changed, 11 insertions(+), 13 deletions(-) > > diff --git a/hmp.c b/hmp.c > index 29e42ab661..4ba50e8e26 100644 > --- a/hmp.c > +++ b/hmp.c > @@ -1544

  1   2   3   4   >