Re: [Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions

2015-11-02 Thread Markus Armbruster
Eric Blake writes: > On 11/02/2015 08:37 AM, Markus Armbruster wrote: > >> >> Not checked: variant's members don't collide with non-variant members. >> I think this check got lost when we simplified >> QAPISchemaObjectTypeVariants to hold a single member. > > Yep, I found the culprit: in your v2

Re: [Qemu-devel] [PATCH 0/2] block: Introduce "json-file:" protocol

2015-11-02 Thread Fam Zheng
On Tue, 11/03 07:35, Daniel P. Berrange wrote: > On Tue, Nov 03, 2015 at 03:01:16PM +0800, Fam Zheng wrote: > > This would be a safer channel when we want to provide block options that > > contain sensitive information, such as fields for authentication. > > If passing of security sensitive data i

Re: [Qemu-devel] [PATCH 0/2] block: Introduce "json-file:" protocol

2015-11-02 Thread Daniel P. Berrange
On Tue, Nov 03, 2015 at 03:01:16PM +0800, Fam Zheng wrote: > This would be a safer channel when we want to provide block options that > contain sensitive information, such as fields for authentication. If passing of security sensitive data is the motivation for this, then I don't think we want it

Re: [Qemu-devel] RFC: libyajl for JSON

2015-11-02 Thread Markus Armbruster
Eric Blake writes: > On 11/02/2015 12:10 PM, Markus Armbruster wrote: > * Single-quoted strings > >> >>> So that is an absolute must for whatever parser we choose. My first >>> glance at libyajl is that it does NOT currently allow single quotes (not >>> even with any of its existing option

Re: [Qemu-devel] [PATCH 00/19] buffer/vnc: improve vnc buffer hsndling

2015-11-02 Thread Peter Lieven
Am 30.10.2015 um 12:09 schrieb Gerd Hoffmann: Hi, This series has a bunch of improvements in the vnc buffer handling, to reduce the memory footprint. Some of the changes are applied to the buffer helper functions which Daniel separated out of the vnc code recently. Most patches have been on

Re: [Qemu-devel] [PATCH 19/19] buffer: allow a buffer to shrink gracefully

2015-11-02 Thread Peter Lieven
Am 30.10.2015 um 12:10 schrieb Gerd Hoffmann: From: Peter Lieven the idea behind this patch is to allow the buffer to shrink, but make this a seldom operation. The buffers average size is measured exponentionally smoothed with am alpha of 1/128. Signed-off-by: Peter Lieven Signed-off-by: Gerd

Re: [Qemu-devel] [PATCH] qom/object: fix 2 comment typos

2015-11-02 Thread Cao jin
On 11/02/2015 07:34 PM, Peter Maydell wrote: On 2 November 2015 at 09:04, Cao jin wrote: Signed-off-by: Cao jin --- include/qom/object.h | 2 +- qom/object.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index b

Re: [Qemu-devel] [PATCH 1/4] ide/atapi: make PIO read requests async

2015-11-02 Thread Peter Lieven
Am 03.11.2015 um 01:48 schrieb John Snow: On 10/12/2015 08:27 AM, Peter Lieven wrote: PIO read requests on the ATAPI interface used to be sync blk requests. This has two significant drawbacks. First the main loop hangs util an I/O request is completed and secondly if the I/O request does not co

[Qemu-devel] [PATCH v2] qom/object: fix 2 comment typos

2015-11-02 Thread Cao jin
Also change the misleading definition of macro OBJECT_CLASS_CHECK Signed-off-by: Cao jin --- changelog v2: modified according to peter`s suggestion include/qom/object.h | 10 +- qom/object.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qom/

[Qemu-devel] [PATCH 0/2] block: Introduce "json-file:" protocol

2015-11-02 Thread Fam Zheng
This would be a safer channel when we want to provide block options that contain sensitive information, such as fields for authentication. Fam Zheng (2): block: Add "json-file:" pseudo protocol iotests: Add tests for "json-file:" pseudo protocol block.c| 58

[Qemu-devel] [PATCH 1/2] block: Add "json-file:" pseudo protocol

2015-11-02 Thread Fam Zheng
When opening the image, "json-file:/path/to/json/file" has the same as "json-file:$(cat /path/to/json/file)". The advantage is that sensitive information that would be exposed in /proc/$PID/cmdline or log files, is no longer visible this way. Signed-off-by: Fam Zheng --- block.c | 58 +++

[Qemu-devel] [PATCH 2/2] iotests: Add tests for "json-file:" pseudo protocol

2015-11-02 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/089 | 27 +++ tests/qemu-iotests/089.out | 15 +++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/089 b/tests/qemu-iotests/089 index 3e0038d..6115563 100755 --- a/tests/qemu

Re: [Qemu-devel] Status Buildbot

2015-11-02 Thread Timo Benk
On Monday 02 November 2015 17:29:44 Stefan Hajnoczi wrote: > On Mon, Nov 02, 2015 at 10:37:06AM +0100, Timo Benk wrote: > > we at B1 Systems GmbH are currently hosting the buildbot infrastructure. I > > have mailed some > > former contacts and it seems that this service is no longer needed anymore

Re: [Qemu-devel] [PATCH v1 1/4] qemu-iotests: refine common.config

2015-11-02 Thread tu bo
Hi Eric: thanks for your review. On 10/31/2015 01:36 AM, Eric Blake wrote: On 10/30/2015 01:13 AM, Bo Tu wrote: Be easier to read, and be slightly shorter. You mentioned a very short "what" in the subject line (good), but the "why" in the commit body ("easier to read, shorter") is rather ters

Re: [Qemu-devel] [PATCH v7 03/35] acpi: add aml_create_field

2015-11-02 Thread Shannon Zhao
On 2015/11/2 17:13, Xiao Guangrong wrote: > Implement CreateField term which is used by NVDIMM _DSM method in later patch > > Signed-off-by: Xiao Guangrong > --- > hw/acpi/aml-build.c | 13 + > include/hw/acpi/aml-build.h | 1 + > 2 files changed, 14 insertions(+) > > dif

Re: [Qemu-devel] [RFC PATCH 0/5] Introduce Intel 82574 GbE Controller Emulation (e1000e)

2015-11-02 Thread Jason Wang
On 11/02/2015 03:49 PM, Dmitry Fleytman wrote: > >> On 2 Nov 2015, at 05:35 AM, Jason Wang > > wrote: >> >> >> >> On 10/31/2015 01:52 PM, Dmitry Fleytman wrote: >>> Hello Jason, >>> >>> Thanks for reviewing. See my answers inline. >>> >>> On 30 Oct 2015, at 07:28

Re: [Qemu-devel] [PATCH qemu] pseries: Update SLOF firmware image to qemu-slof-20151103

2015-11-02 Thread Alexey Kardashevskiy
On 11/03/2015 01:22 PM, Alexey Kardashevskiy wrote: The changes are: 1. supports recent binutils; 2. 64bit BARs behind PCI bridges supported; 3. Many fixes for USB keyboard support - keys, XHCI; 4. virtio-vga support. Forgot mention that this binary was build using: gcc version 5.2.1 20151001

Re: [Qemu-devel] [Qemu-arm] [PATCH] ARM: ACPI: Fix MPIDR value in ACPI table

2015-11-02 Thread Peter Crosthwaite
On Sat, Oct 31, 2015 at 5:04 PM, Peter Maydell wrote: > On 31 October 2015 at 18:53, Peter Crosthwaite > wrote: >> On Sat, Oct 31, 2015 at 2:50 AM, Shannon Zhao >> wrote: >>> From: Shannon Zhao >>> >>> Use mp_affinity of ARMCPU as the CPU MPIDR instead of the CPU index. >>> >>> Signed-off-by:

Re: [Qemu-devel] [PATCH for-2.5 v3 1/1] hw/misc: Add support for ADC controller in Xilinx Zynq 7000

2015-11-02 Thread Guenter Roeck
On 11/02/2015 08:25 PM, Peter Crosthwaite wrote: From: Guenter Roeck Add support for the Xilinx XADC core used in Zynq 7000. Hi Peter, Wow ... thanks for doing my job! Owe you a beer or two. Guenter References: - Zynq-7000 All Programmable SoC Technical Reference Manual - 7 Series FPGAs

[Qemu-devel] [PATCH for-2.5 v3 2/3] arm: highbank: Defeature CPU override

2015-11-02 Thread Peter Crosthwaite
This board should not support CPU model override. This allows for easier patching of the board with being able to rely on the CPU type being correct. Signed-off-by: Peter Crosthwaite --- hw/arm/highbank.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a

[Qemu-devel] [PATCH for-2.5 v3 1/3] arm: boot: Add secure_board_setup flag

2015-11-02 Thread Peter Crosthwaite
Add a flag that when set, will cause the primary CPU to start in secure mode, even if the overall boot is non-secure. This is useful for when there is a board-setup blob that needs to run from secure mode, but device and secondary CPU init should still be done as-normal for a non- secure boot. Sig

[Qemu-devel] [PATCH for-2.5 v3 3/3] arm: highbank: Implement PSCI and dummy monitor

2015-11-02 Thread Peter Crosthwaite
Firstly, enable monitor mode and PSCI, both are which are features of this board. In addition to PSCI, this board also uses SMC for cache maintainence ops. This means we need a secure monitor to catch these and nop them. Use the ARM boot board-setup feature to implement this. All traps to monitor

[Qemu-devel] [PATCH for-2.5 v3 0/3] ARM: Highbank: Add monitor support

2015-11-02 Thread Peter Crosthwaite
Hi, This adds dummy monitor support to the Highbank board. It is needed by the Highbank kernel which expects a monitor to be present. A feature is added to arm/boot's board_setup feature, that allows the board_setup entry point to be entered in secure mode (which is needed to configure a monitor)

[Qemu-devel] [PATCH for-2.5 v3 1/1] hw/misc: Add support for ADC controller in Xilinx Zynq 7000

2015-11-02 Thread Peter Crosthwaite
From: Guenter Roeck Add support for the Xilinx XADC core used in Zynq 7000. References: - Zynq-7000 All Programmable SoC Technical Reference Manual - 7 Series FPGAs and Zynq-7000 All Programmable SoC XADC Dual 12-Bit 1 MSPS Analog-to-Digital Converter Tested with Linux using QEMU machine xili

Re: [Qemu-devel] [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-02 Thread Xiao Guangrong
On 11/03/2015 05:12 AM, Paolo Bonzini wrote: On 02/11/2015 10:13, Xiao Guangrong wrote: Currently, file_ram_alloc() only works on directory - it creates a file under @path and do mmap on it This patch tries to allow it to work on file directly, if @path is a directory it works as before, ot

Re: [Qemu-devel] [PATCH] hw/arm/virt-acpi-build: _CCA attribute is compulsary

2015-11-02 Thread Shannon Zhao
Hi Graeme, On 2015/11/2 18:39, Graeme Gregory wrote: > According to ACPI specification 6.2.17 _CCA (Cache Coherency Attribute) > this attribute is compulsary on ARM systems. Add this attribute to > the PCI host bridges as required. > To ACPI 5.1 this object is not compulsory and if not supplied

Re: [Qemu-devel] [PATCH 1/4] ide/atapi: make PIO read requests async

2015-11-02 Thread John Snow
On 10/12/2015 08:27 AM, Peter Lieven wrote: > PIO read requests on the ATAPI interface used to be sync blk requests. > This has two significant drawbacks. First the main loop hangs util an > I/O request is completed and secondly if the I/O request does not > complete (e.g. due to an unresponsive

[Qemu-devel] [PATCH v3 1/5] fw_cfg: move internal function call docs to header file

2015-11-02 Thread Gabriel L. Somlo
Move documentation for fw_cfg functions internal to qemu from docs/specs/fw_cfg.txt to the fw_cfg.h header file, next to their prototype declarations, formatted as doc-comments. NOTE: Documentation for fw_cfg_add_callback() is completely dropped by this patch, as that function has been eliminated b

[Qemu-devel] [PATCH v3 0/5] fw_cfg: spec update, misc. cleanup, optimize read

2015-11-02 Thread Gabriel L. Somlo
New since v2: - Patches 1-3: updated to address Laszlo's suggestions for better and more accurate change descriptions in commit logs, comments, etc. - Patch 4: Per Laszlo's recommendation, this has been split into two separate components for improved

[Qemu-devel] [PATCH v3 4/5] fw_cfg: add generic non-DMA read method

2015-11-02 Thread Gabriel L. Somlo
Introduce fw_cfg_data_read(), a generic read method which works on all access widths (1 through 8 bytes, inclusive), and can be used during both IOPort and MMIO read accesses. To maintain legibility, only fw_cfg_data_mem_read() (the MMIO data read method) is replaced by this patch. The new method

[Qemu-devel] [PATCH v3 3/5] fw_cfg: remove offset argument from callback prototype

2015-11-02 Thread Gabriel L. Somlo
Read callbacks are now only invoked at item selection, before any data is read. As such, the value of the offset argument passed to the callback will always be 0. Also, the two callback instances currently in use both leave their offset argument unused. This patch removes the offset argument from

[Qemu-devel] [PATCH v3 2/5] fw_cfg: amend callback behavior spec to once per select

2015-11-02 Thread Gabriel L. Somlo
Currently, the fw_cfg internal API specifies that if an item was set up with a read callback, the callback must be run each time a byte is read from the item. This behavior is both wasteful (most items do not have a read callback set), and impractical for bulk transfers (e.g., DMA read). At the ti

[Qemu-devel] [PATCH v3 5/5] fw_cfg: replace ioport data read with generic method

2015-11-02 Thread Gabriel L. Somlo
IOPort read access is limited to one byte at a time by fw_cfg_comb_valid(). As such, fw_cfg_comb_read() may safely ignore its size argument (which will always be 1), and simply call its fw_cfg_read() helper function once, returning 8 bits via the least significant byte of a 64-bit return value. Th

Re: [Qemu-devel] [PATCH] configure: add missing --disable-modules option

2015-11-02 Thread Fam Zheng
On Mon, 11/02 14:06, Stefan Hajnoczi wrote: > According to ./configure all options should have both --enable-foo and > --disable-foo: > > # Always add --enable-foo and --disable-foo command line args. > # Distributions want to ensure that several features are compiled in, and it > # is impos

Re: [Qemu-devel] [PATCH] qemu-img: add check for zero-length job len

2015-11-02 Thread Jeff Cody
On Mon, Nov 02, 2015 at 06:28:20PM -0500, John Snow wrote: > The mirror job doesn't update its total length until > it has already started running, so we should translate > a zero-length job-len as meaning 0%. > > Otherwise, we may get divide-by-zero faults. > > Signed-off-by: John Snow > --- >

Re: [Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap

2015-11-02 Thread Eric Blake
On 11/02/2015 04:32 PM, John Snow wrote: > If we create a buffer directly on the stack by using 12 bytes, there's > no guarantee the 64bit value we want to swap will be aligned, which > could cause errors with undefined behavior. > > Spotted with clang -fsanitize=undefined and observed in iotests

Re: [Qemu-devel] [PATCH] qemu-img: add check for zero-length job len

2015-11-02 Thread John Snow
On 11/02/2015 06:43 PM, Eric Blake wrote: > On 11/02/2015 04:28 PM, John Snow wrote: >> The mirror job doesn't update its total length until >> it has already started running, so we should translate >> a zero-length job-len as meaning 0%. >> >> Otherwise, we may get divide-by-zero faults. >> >> S

Re: [Qemu-devel] [PATCH] qemu-img: add check for zero-length job len

2015-11-02 Thread Eric Blake
On 11/02/2015 04:28 PM, John Snow wrote: > The mirror job doesn't update its total length until > it has already started running, so we should translate > a zero-length job-len as meaning 0%. > > Otherwise, we may get divide-by-zero faults. > > Signed-off-by: John Snow > --- > qemu-img.c | 3 ++

[Qemu-devel] [PATCH] qcow2: avoid misaligned 64bit bswap

2015-11-02 Thread John Snow
If we create a buffer directly on the stack by using 12 bytes, there's no guarantee the 64bit value we want to swap will be aligned, which could cause errors with undefined behavior. Spotted with clang -fsanitize=undefined and observed in iotests 15, 26, 44, 115 and 121. Signed-off-by: John Snow

[Qemu-devel] [PATCH] qemu-img: add check for zero-length job len

2015-11-02 Thread John Snow
The mirror job doesn't update its total length until it has already started running, so we should translate a zero-length job-len as meaning 0%. Otherwise, we may get divide-by-zero faults. Signed-off-by: John Snow --- qemu-img.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[Qemu-devel] [PATCH v3] seccomp: add cacheflush to whitelist

2015-11-02 Thread Andrew Jones
cacheflush is an arm-specific syscall that qemu built for arm uses. Add it to the whitelist, but only if we're linking with a recent enough libseccomp. Signed-off-by: Andrew Jones --- v3: deal with major and minor version number bumps v2: only add cacheflush if libseccomp supports it qemu-secco

[Qemu-devel] [PATCH v8.5 2/4] qapi: Check for QMP collisions of flat union branches

2015-11-02 Thread Eric Blake
Right now, our ad hoc parser ensures that we cannot have a flat union that introduces any QMP member names that would conflict with the non-variant QMP members already present from the union's base type (see flat-union-clash-member.json). However, we want QAPISchema*.check() to make the same check,

[Qemu-devel] [PATCH v8.5 4/4] qapi: Consolidate collision detection code

2015-11-02 Thread Eric Blake
Rather than having three separate places populate the seen map, it is easier to just factor out a subset of Member.check() that does this as a new method check_collision(), and have the remaining places in ObjectType.check() and Variant.check() call into it. This likewise means a new helper method

[Qemu-devel] [PATCH v8.5 3/4] qapi: Fix check for variant tag values collision

2015-11-02 Thread Eric Blake
Now that commit e4ba22b3 has separated the C representation of qapi unions so that tag values no longer collide with non-variant members, we must adjust QAPISchemaObjectTypeVariant.check() to match. The fix is conceptually simple - track a separate dictionary of tag names we have seen so far, diff

[Qemu-devel] [PATCH v8.5 0/4] rework of 7/17

2015-11-02 Thread Eric Blake
Based on the confusion I caused Markus, I've tried to split the v8 patch 7/17 into smaller pieces that are hopefully easier to review in isolation. Eric Blake (4): qapi: Drop all_members parameter from check() qapi: Check for QMP collisions of flat union branches qapi: Fix check for variant

[Qemu-devel] [PATCH v8.5 1/4] qapi: Drop all_members parameter from check()

2015-11-02 Thread Eric Blake
The implementation of QAPISchemaObjectTypeMember.check() always adds the member currently being checked to both the all_members and seen parameters. However, the three callers of this method pass in the following parameters: QAPISchemaObjectType.check(): - all_members contains all non-variant me

[Qemu-devel] SMM error in 2.4 changelog

2015-11-02 Thread William Dauchy
Hello, I think there might be a mistake in the 2.4 changelog: http://wiki.qemu.org/ChangeLog/2.4 "Support for system management mode (requires Linux 4.1)." But I believe it's included in Linux v4.2 see https://lwn.net/Articles/648995/ for the merge window. Sorry for the noise if it is not the ri

Re: [Qemu-devel] [PATCH v2] seccomp: add cacheflush to whitelist

2015-11-02 Thread Andrew Jones
On Mon, Nov 02, 2015 at 08:37:15PM +, Peter Maydell wrote: > On 2 November 2015 at 19:04, Andrew Jones wrote: > > On Mon, Nov 02, 2015 at 06:09:41PM +, Peter Maydell wrote: > >> On 2 November 2015 at 17:56, Andrew Jones wrote: > >> > cacheflush is an arm-specific syscall that qemu built f

[Qemu-devel] anybody using MMIO tracing?

2015-11-02 Thread Hollis Blanchard
I'm trying to use the memory_region_ops_read/write tracepoints. They produce output like this: memory_region_ops_write 0.000 pid=8861 mr=0x185b1e8 addr=0x0 value=0x3 size=0x4 memory_region_ops_write 165.000 pid=8861 mr=0x185b1e8 addr=0x80 value=0x size=0x4 memory_region_op

Re: [Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions

2015-11-02 Thread Eric Blake
On 11/02/2015 08:37 AM, Markus Armbruster wrote: > > Not checked: variant's members don't collide with non-variant members. > I think this check got lost when we simplified > QAPISchemaObjectTypeVariants to hold a single member. Yep, I found the culprit: in your v2 proposal for QAPISchema, you h

[Qemu-devel] [RFC v2] Add support for KVM_CAP_SPLIT_IRQCHIP

2015-11-02 Thread Matt Gingell
Hi Jan, Would you be able to look this over? I’d like to get this into shape to commit, either now or once the corresponding kernel patch goes in. Thanks, Matt Add support for KVM_CAP_SPLIT_IRQCHIP Adds a new alternative 'split' to the -machine kernel-irqchip option. When split mode is specif

Re: [Qemu-devel] [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-02 Thread Paolo Bonzini
On 02/11/2015 10:13, Xiao Guangrong wrote: > Currently, file_ram_alloc() only works on directory - it creates a file > under @path and do mmap on it > > This patch tries to allow it to work on file directly, if @path is a > directory it works as before, otherwise it treats @path as the target >

Re: [Qemu-devel] [PATCH v10 00/14] block: incremental backup transactions using BlockJobTxn

2015-11-02 Thread John Snow
Ping! To clarify, I *do* intend this series to be for-2.5, and I think it does qualify as such. If this *doesn't* go in, we have to revise our documentation just a pinch to undo some of Kashyap's changes that have already been merged in. Patches 5, 10, 11 and 12 are awaiting review. --js On 10

Re: [Qemu-devel] [PATCH v2 2/4] fw_cfg: amend callback behavior spec to once per select

2015-11-02 Thread Gabriel L. Somlo
On Mon, Nov 02, 2015 at 03:16:47PM +0100, Laszlo Ersek wrote: > Comments below: > > On 10/28/15 18:20, Gabriel L. Somlo wrote: > > Currently, the fw_cfg internal API specifies that if an item was set up > > with a read callback, the callback must be run each time a byte is read > > from the item.

Re: [Qemu-devel] [PATCH v2 1/4] fw_cfg: move internal function call docs to header file

2015-11-02 Thread Laszlo Ersek
On 11/02/15 21:36, Gabriel L. Somlo wrote: > On Mon, Nov 02, 2015 at 02:41:58PM +0100, Laszlo Ersek wrote: >> Three (well, two n' half) comments: >> >> On 10/28/15 18:20, Gabriel L. Somlo wrote: >>> Move documentation for fw_cfg functions internal to qemu from >>> docs/specs/fw_cfg.txt to the fw_cf

Re: [Qemu-devel] [PATCH v2 1/4] fw_cfg: move internal function call docs to header file

2015-11-02 Thread Gabriel L. Somlo
On Mon, Nov 02, 2015 at 02:41:58PM +0100, Laszlo Ersek wrote: > Three (well, two n' half) comments: > > On 10/28/15 18:20, Gabriel L. Somlo wrote: > > Move documentation for fw_cfg functions internal to qemu from > > docs/specs/fw_cfg.txt to the fw_cfg.h header file, next to their > > prototype de

Re: [Qemu-devel] [PATCH v2] seccomp: add cacheflush to whitelist

2015-11-02 Thread Peter Maydell
On 2 November 2015 at 19:04, Andrew Jones wrote: > On Mon, Nov 02, 2015 at 06:09:41PM +, Peter Maydell wrote: >> On 2 November 2015 at 17:56, Andrew Jones wrote: >> > cacheflush is an arm-specific syscall that qemu built for arm >> > uses. Add it to the whitelist, but only if we're linking wi

Re: [Qemu-devel] [PATCH v3 0/2] qemu-iotests: fix cleanup of background processes

2015-11-02 Thread Max Reitz
On 02.11.2015 21:31, Max Reitz wrote: > On 30.10.2015 20:25, Jeff Cody wrote: >> Changes from v2: >> >> * Pulled patch 2 into this series >> >> * Patch 1: Moved non-empty test conditionals inside >>pid file existance check (thanks Max) >> >>Added a fix in for patch 058, for

Re: [Qemu-devel] [PATCH v3 0/2] qemu-iotests: fix cleanup of background processes

2015-11-02 Thread Max Reitz
On 30.10.2015 20:25, Jeff Cody wrote: > Changes from v2: > > * Pulled patch 2 into this series > > * Patch 1: Moved non-empty test conditionals inside >pid file existance check (thanks Max) > >Added a fix in for patch 058, for its >self-launched qemu-nbd insta

Re: [Qemu-devel] [PATCH v8 32/54] Postcopy: Maintain sentmap and calculate discard

2015-11-02 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > > +/* functions for postcopy * */ > > + > > +/* > > + * Callback from postcopy_each_ram_send_discard for each RAMBlock > > + * start,end: Indexes into the bitmap for the first and last bit > > + *representing the named block > > +

Re: [Qemu-devel] RFC: libyajl for JSON

2015-11-02 Thread Eric Blake
On 11/02/2015 12:10 PM, Markus Armbruster wrote: >>> * Single-quoted strings > >> So that is an absolute must for whatever parser we choose. My first >> glance at libyajl is that it does NOT currently allow single quotes (not >> even with any of its existing options), so we'd have to pre-proces

Re: [Qemu-devel] [PATCH v1 0/4] AHCI patches + Allwinner SATA

2015-11-02 Thread John Snow
On 10/27/2015 12:02 AM, Peter Crosthwaite wrote: > This patch series adds bare-minimum Allwinner SATA support. > > P1 is a trivial to help debug AHCI. > > Changed since RFC: > Addressed Beniamino review. > Rebased to avoid bad deps (John Snow review) > > Regards, > Peter > > > Peter Crosthwa

Re: [Qemu-devel] [PATCH] ide: remove hardcoded 2GiB transactional limit

2015-11-02 Thread John Snow
On 10/27/2015 12:50 PM, Stefan Hajnoczi wrote: > On Mon, Oct 26, 2015 at 07:38:02PM -0400, John Snow wrote: >> Not that you can request a >2GiB transaction, but that's why checking >> for it makes no sense anymore. >> >> With the newer 'limit' parameter to prepare_buf, we no longer need a >> stat

Re: [Qemu-devel] RFC: libyajl for JSON

2015-11-02 Thread Markus Armbruster
Eric Blake writes: > On 11/02/2015 01:40 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Loaded question in response to >>> https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg06988.html, but >> >> Discussion of our parser's enormous appetite for wasting RAM. Fixable, >> but it

Re: [Qemu-devel] [PATCH v2] seccomp: add cacheflush to whitelist

2015-11-02 Thread Andrew Jones
On Mon, Nov 02, 2015 at 06:09:41PM +, Peter Maydell wrote: > On 2 November 2015 at 17:56, Andrew Jones wrote: > > cacheflush is an arm-specific syscall that qemu built for arm > > uses. Add it to the whitelist, but only if we're linking with > > a recent enough libseccomp. > > > > Signed-off-b

Re: [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled

2015-11-02 Thread Peter Maydell
On 2 November 2015 at 17:51, Sergey Fedorov wrote: > CPU singlestep is done by generating a debug internal exception. Do not > raise a real CPU exception in case of singlestepping. > > Signed-off-by: Sergey Fedorov > --- > target-arm/op_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deleti

Re: [Qemu-devel] [PATCH] target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code

2015-11-02 Thread Peter Maydell
On 2 November 2015 at 18:16, Sergey Fedorov wrote: > AArch32 translation code does not distinguish between DISAS_UPDATE and > DISAS_JUMP. Thus, we cannot use any of them without first updating PC in > CPU state. Furthermore, it is too complicated to update PC in CPU state > before PC gets updated

Re: [Qemu-devel] [PATCH v8 32/54] Postcopy: Maintain sentmap and calculate discard

2015-11-02 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > > @@ -662,6 +672,24 @@ static int save_zero_page(QEMUFile *f, RAMBlock > > *block, ram_addr_t offset, > > } > > > > /** > > + * ram_find_block_by_id: Find a ramblock by name. > > + * > > + * Returns: The RAMBlock with matching ID, or NULL. > > +

[Qemu-devel] [PATCH] target-arm: Clean up DISAS_UPDATE usage in AArch32 translation code

2015-11-02 Thread Sergey Fedorov
AArch32 translation code does not distinguish between DISAS_UPDATE and DISAS_JUMP. Thus, we cannot use any of them without first updating PC in CPU state. Furthermore, it is too complicated to update PC in CPU state before PC gets updated in disas context. So it is hardly possible to correctly end

Re: [Qemu-devel] [PATCH v2] seccomp: add cacheflush to whitelist

2015-11-02 Thread Peter Maydell
On 2 November 2015 at 17:56, Andrew Jones wrote: > cacheflush is an arm-specific syscall that qemu built for arm > uses. Add it to the whitelist, but only if we're linking with > a recent enough libseccomp. > > Signed-off-by: Andrew Jones > --- > v2: only add cacheflush if libseccomp supports it

[Qemu-devel] [PATCH v2] seccomp: add cacheflush to whitelist

2015-11-02 Thread Andrew Jones
cacheflush is an arm-specific syscall that qemu built for arm uses. Add it to the whitelist, but only if we're linking with a recent enough libseccomp. Signed-off-by: Andrew Jones --- v2: only add cacheflush if libseccomp supports it qemu-seccomp.c | 9 - 1 file changed, 8 insertions(+)

[Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled

2015-11-02 Thread Sergey Fedorov
CPU singlestep is done by generating a debug internal exception. Do not raise a real CPU exception in case of singlestepping. Signed-off-by: Sergey Fedorov --- target-arm/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-11-02 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 05:48:02PM +0200, Michael S. Tsirkin wrote: > Use address_space_read to make sure we handle the case of an indirect > descriptor crossing DIMM boundary correctly. > > Signed-off-by: Michael S. Tsirkin > --- > > Warning: compile-tested only. Test (with your follow-up patc

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-11-02 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 05:48:02PM +0200, Michael S. Tsirkin wrote: > Use address_space_read to make sure we handle the case of an indirect > descriptor crossing DIMM boundary correctly. > > Signed-off-by: Michael S. Tsirkin > --- > > Warning: compile-tested only. > > hw/virtio/dataplane/vring

Re: [Qemu-devel] [Qemu-block] [PATCH] fixup! dataplane: support non-contigious s/g

2015-11-02 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 11:18:42PM +0200, Michael S. Tsirkin wrote: > Should fix issues Stefan reported. > > --- > > Built only. > > hw/virtio/dataplane/vring.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Squashed in to the previous commit. Thanks, applied to my block tree: ht

Re: [Qemu-devel] [PATCH v8 32/54] Postcopy: Maintain sentmap and calculate discard

2015-11-02 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > > +/* > > + * Transmit the set of pages to be discarded after precopy to the target > > + * these are pages that: > > + * a) Have been previously transmitted but are now dirty again > > + * b) Pages that have never been transmitted, this ensur

Re: [Qemu-devel] Status Buildbot

2015-11-02 Thread Stefan Hajnoczi
On Mon, Nov 02, 2015 at 10:37:06AM +0100, Timo Benk wrote: > we at B1 Systems GmbH are currently hosting the buildbot infrastructure. I > have mailed some > former contacts and it seems that this service is no longer needed anymore. > > Can you confirm that? It's me again :). I announced the en

Re: [Qemu-devel] [PATCH v2 2/2] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-02 Thread Eric Blake
On 11/02/2015 10:07 AM, Max Reitz wrote: > On 02.11.2015 13:15, Alberto Garcia wrote: >> This test checks that it is not possible to create a snapshot using as >> the overlay node a BDS that does not support backing images. > > I don't think that works in English. I may be wrong, of course. > > "

Re: [Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions

2015-11-02 Thread Eric Blake
On 11/02/2015 08:37 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Now that we have separate namespaces for QMP vs. tag values, > > What's the "QMP namespace"? I guess I need to be more explicit :) In the generated C struct for a qapi object, we now have two separate namespaces: struc

Re: [Qemu-devel] [PATCH v4 4/4] iotests: Add tests for the x-blockdev-del command

2015-11-02 Thread Max Reitz
On 02.11.2015 15:51, Alberto Garcia wrote: > Signed-off-by: Alberto Garcia > --- > tests/qemu-iotests/139 | 414 > + > tests/qemu-iotests/139.out | 5 + > tests/qemu-iotests/group | 1 + > 3 files changed, 420 insertions(+) > create mode 100

Re: [Qemu-devel] [PATCH v2 1/2] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-02 Thread Alberto Garcia
On Mon 02 Nov 2015 05:11:46 PM CET, Eric Blake wrote: >> @@ -1667,6 +1667,11 @@ static void >> external_snapshot_prepare(BlkTransactionState *common, >> >> if (state->new_bs->backing != NULL) { >> error_setg(errp, "The snapshot already has a backing image"); >> +return; >>

Re: [Qemu-devel] [PATCH v7 13/35] hostmem-file: use whole file size if possible

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: Use the whole file size if @size is not specified which is useful if we want to directly pass a file to guest Signed-off-by: Xiao Guangrong --- backends/hostmem-file.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) di

Re: [Qemu-devel] [PATCH v2 2/2] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-02 Thread Max Reitz
On 02.11.2015 13:15, Alberto Garcia wrote: > This test checks that it is not possible to create a snapshot using as > the overlay node a BDS that does not support backing images. I don't think that works in English. I may be wrong, of course. "a snapshot using a BDS that does not support backing

Re: [Qemu-devel] [PATCH v2 1/2] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-02 Thread Max Reitz
On 02.11.2015 13:15, Alberto Garcia wrote: > This addresses scenarios like this one: > > { 'execute': 'blockdev-add', 'arguments': > { 'options': { 'driver': 'qcow2', >'node-name': 'new0', >'file': { 'driver': 'file', > 'fi

[Qemu-devel] [Bug 1512134] Re: Multiboot v1 memory map offset wrong

2015-11-02 Thread Max Reitz
Hi, Have you tested your code with GRUB (Legacy) itself? Looking at code from one of my own hobby kernels, and from a hobby kernel that has largely not been written by me, both are interpreting the fields as qemu is (i.e. mmap_addr points to a multiboot_mmap_entry, and not to multiboot_mmap_entry

Re: [Qemu-devel] [PATCH v2 4/4] fw_cfg: streamline (non-DMA) read operations

2015-11-02 Thread Eric Blake
On 11/02/2015 07:38 AM, Laszlo Ersek wrote: > > (1) Can you please split this patch in two? Maybe I'm just particularly > slow today, but I feel that it would help me review this patch if I > could look at each .read conversion in separation. I'd like to see that > each conversion, individually,

Re: [Qemu-devel] [PATCH v3 1/2] qemu-iotests: fix cleanup of background processes

2015-11-02 Thread Eric Blake
On 11/02/2015 09:03 AM, Max Reitz wrote: +++ b/tests/qemu-iotests/058 @@ -32,11 +32,17 @@ status=1 # failure is the default! nbd_unix_socket=$TEST_DIR/test_qemu_nbd_socket nbd_snapshot_img="nbd:unix:$nbd_unix_socket" +rm -f "${TEST_DIR}/qemu-nbd.pid"

Re: [Qemu-devel] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-02 Thread Xiao Guangrong
On 11/03/2015 12:11 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: lseek can not work for all block devices as the man page says: | Some devices are incapable of seeking and POSIX does not specify | which devices must support lseek(). This patch tries to ad

Re: [Qemu-devel] [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 18:06, Xiao Guangrong wrote: On 11/02/2015 10:26 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed me

Re: [Qemu-devel] [PATCH v7 12/35] util: let qemu_fd_getlength support block device

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: lseek can not work for all block devices as the man page says: | Some devices are incapable of seeking and POSIX does not specify | which devices must support lseek(). This patch tries to add the support on Linux by using BLKGETSIZE64 ioctl Signed-off-

Re: [Qemu-devel] [PATCH v2 1/2] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-02 Thread Eric Blake
On 11/02/2015 05:15 AM, Alberto Garcia wrote: > This addresses scenarios like this one: > > { 'execute': 'blockdev-add', 'arguments': > { 'options': { 'driver': 'qcow2', >'node-name': 'new0', >'file': { 'driver': 'file', >

Re: [Qemu-devel] [PATCH v3 1/2] qemu-iotests: fix cleanup of background processes

2015-11-02 Thread Max Reitz
On 02.11.2015 08:37, Markus Armbruster wrote: > Max Reitz writes: > >> On 30.10.2015 20:25, Jeff Cody wrote: >>> Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash >>> subshell, in order to catch segfaults. Unfortunately, this means the >>> process PID cannot be captured vi

Re: [Qemu-devel] [PATCH v7 09/35] exec: allow file_ram_alloc to work on file

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 18:25, Xiao Guangrong wrote: On 11/02/2015 11:12 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Currently, file_ram_alloc() only works on directory - it creates a file under @path and do mmap on it This patch tries to allow it to work on file

Re: [Qemu-devel] [kvm-unit-tests PATCHv5 3/3] arm: pmu: Add CPI checking

2015-11-02 Thread Andrew Jones
On Fri, Oct 30, 2015 at 03:32:43PM -0400, Christopher Covington wrote: > Hi Drew, > > On 10/30/2015 09:00 AM, Andrew Jones wrote: > > On Wed, Oct 28, 2015 at 03:12:55PM -0400, Christopher Covington wrote: > >> Calculate the numbers of cycles per instruction (CPI) implied by ARM > >> PMU cycle coun

Re: [Qemu-devel] [PATCH v7 08/35] exec: allow memory to be allocated from any kind of path

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 18:22, Xiao Guangrong wrote: On 11/02/2015 10:51 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however, the memory of nvdimm can come from either raw pmem device eg, /dev/pmem, or the fil

Re: [Qemu-devel] [PATCH] qemu-sockets: do not test path with access() before unlinking

2015-11-02 Thread Paolo Bonzini
On 02/11/2015 16:18, Cole Robinson wrote: >> > -if ((access(un.sun_path, F_OK) == 0) && >> > -unlink(un.sun_path) < 0) { >> > +if (unlink(un.sun_path) < 0) { >> > error_setg_errno(errp, errno, >> > "Failed to unlink socket %s", un.sun_path); >> >

Re: [Qemu-devel] [PATCH] target-sparc: fix 32-bit truncation in fpackfix

2015-11-02 Thread Paolo Bonzini
On 02/11/2015 16:13, Peter Maydell wrote: > On 2 November 2015 at 14:48, Paolo Bonzini wrote: >> >> >> On 02/11/2015 15:09, Peter Maydell wrote: > diff --git a/target-sparc/vis_helper.c b/target-sparc/vis_helper.c > index 383cc8b..45fc7db 100644 > --- a/target-sparc/vis_helper.c

Re: [Qemu-devel] [PATCH] qemu-sockets: do not test path with access() before unlinking

2015-11-02 Thread Markus Armbruster
Cole Robinson writes: > On 11/02/2015 09:10 AM, Paolo Bonzini wrote: >> Using access() is a time-of-check/time-of-use race condition. It is >> okay to use them to provide better error messages, but that is pretty >> much it. >> >> This is not one such case, so just drop the call. >> >> Signed-

Re: [Qemu-devel] RFC: libyajl for JSON

2015-11-02 Thread Eric Blake
On 11/02/2015 01:40 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Loaded question in response to >> https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg06988.html, but > > Discussion of our parser's enormous appetite for wasting RAM. Fixable, > but it's work, and it's not its only

Re: [Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions

2015-11-02 Thread Markus Armbruster
Eric Blake writes: > Now that we have separate namespaces for QMP vs. tag values, What's the "QMP namespace"? > we can simplify how the QAPISchema*.check() methods check for > collisions. I *guess* the point of this patch is dropping checks that are obsolete now tag values no longer collide wi

  1   2   3   >