[Qemu-devel] [PATCH v3 for-2.7 6/8] block: Make bdrv_open() return a BDS

2016-04-08 Thread Max Reitz
There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following pattern is applied: bs = NULL; ret

[Qemu-devel] [PATCH v3 for-2.7 4/8] block: Drop blk_new_with_bs()

2016-04-08 Thread Max Reitz
Its only caller is blk_new_open(), so we can just inline it there. The bdrv_new_root() call is dropped in the process because we can just let bdrv_open() create the BDS. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block/block-backend.c | 28

[Qemu-devel] [PATCH v3 for-2.7 2/8] block: Let bdrv_open_inherit() return the snapshot

2016-04-08 Thread Max Reitz
If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that snapshot BDS should be returned instead of the BDS under it. This has worked so far because (nearly) all users of BDRV_O_SNAPSHOT use blk_new_open() to create the BDS tree. bdrv_append() (which is called by

[Qemu-devel] [PATCH v3 for-2.7 8/8] block: Drop bdrv_parent_cb_...() from bdrv_close()

2016-04-08 Thread Max Reitz
bdrv_close() now asserts that the BDS's refcount is 0, therefore it cannot have any parents and the bdrv_parent_cb_change_media() call is a no-op. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- block.c | 2 -- 1 file changed, 2 deletions(-) diff

[Qemu-devel] [PATCH v3 for-2.7 7/8] block: Assert !bs->refcnt in bdrv_close()

2016-04-08 Thread Max Reitz
The only caller of bdrv_close() left is bdrv_delete(). We may as well assert that, in a way (there are some things in bdrv_close() that make more sense under that assumption, such as the call to bdrv_release_all_dirty_bitmaps() which in turn assumes that no frozen bitmaps are attached to the BDS).

[Qemu-devel] [PATCH v3 for-2.7 0/8] blockdev: (Nearly) free clean-up work

2016-04-08 Thread Max Reitz
After a lot has been restructed in the block layer in the past, we can now reap at least one of the fruits: Make bdrv_open() return a BDS! This series depends on the following series/patches: - Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6" This is something I

[Qemu-devel] [PATCH v3 for-2.7 3/8] tests: Drop BDS from test-throttle.c

2016-04-08 Thread Max Reitz
Now that throttling has been moved to the BlockBackend level, we do not need to create a BDS along with the BB in the I/O throttling test. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- tests/test-throttle.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH v3 for-2.7 1/8] block: Drop useless bdrv_new() call

2016-04-08 Thread Max Reitz
bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS before invoking bdrv_open() on that BDS. This is probably a relict from when it used to do some modifications on that empty BDS, but now that is unnecessary, so we can just set bs_snapshot to NULL and let bdrv_open() do the rest.

[Qemu-devel] [PATCH v14 18/19] qapi: Simplify semantics of visit_next_list()

2016-04-08 Thread Eric Blake
We have two uses of list visits in the entire code base: one in spapr_drc (which completely avoids visit_next_list(), feeding in integers from a different source than uint8List), and one in qapi-visit.py (that is, all other list visitors are generated in qapi-visit.c, and share the same paradigm

[Qemu-devel] [PATCH v14 08/19] qapi: Document visitor interfaces, add assertions

2016-04-08 Thread Eric Blake
The visitor interface for mapping between QObject/QemuOpts/string and QAPI is scandalously under-documented, making changes to visitor core, individual visitors, and users of visitors difficult to coordinate. Among other questions: when is it safe to pass NULL, vs. when a string must be provided;

Re: [Qemu-devel] [PATCH v3] fw_cfg: RFQDN rules, documentation

2016-04-08 Thread Markus Armbruster
Interface and doc review only. Sorry for the delay, I was on vacation. "Michael S. Tsirkin" writes: > This requires that all -fw_cfg command line users use names of the form What's "this"? Do you mean "Require that ..."? > opt/RFQDN/: such names are compatible with QEMU 2.4

[Qemu-devel] [PATCH v14 19/19] qapi: Change visit_type_FOO() to no longer return partial objects

2016-04-08 Thread Eric Blake
Returning a partial object on error is an invitation for a careless caller to leak memory. As no one outside the testsuite was actually relying on these semantics, it is cleaner to just document and guarantee that ALL pointer-based visit_type_FOO() functions always leave a safe value in *obj

[Qemu-devel] [PATCH v14 01/19] qapi: Consolidate object visitors

2016-04-08 Thread Eric Blake
Rather than having two separate visitor callbacks with items already broken out, pass the actual QAPISchemaObjectType object to the visitor. This lets the visitor access things like type.is_implicit() without needing another parameter, resolving a TODO from previous patches. For convenience and

[Qemu-devel] [PATCH v14 10/19] qapi: Add visit_type_null() visitor

2016-04-08 Thread Eric Blake
Right now, qmp-output-visitor happens to produce a QNull result if nothing is actually visited between the creation of the visitor and the request for the resulting QObject. A stronger protocol would require that a QMP output visit MUST visit something. But to still be able to produce a JSON

Re: [Qemu-devel] [PATCH v2 for-2.7 2/8] block: Let bdrv_open_inherit() return the snapshot

2016-04-08 Thread Kevin Wolf
Am 08.04.2016 um 17:49 hat Max Reitz geschrieben: > On 07.04.2016 13:29, Kevin Wolf wrote: > > Am 06.04.2016 um 19:57 hat Max Reitz geschrieben: > >> If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that > >> snapshot BDS should be returned instead of the BDS under it. > >> > >> To

[Qemu-devel] [PATCH v14 14/19] qapi: Split visit_end_struct() into pieces

2016-04-08 Thread Eric Blake
As mentioned in previous patches, we want to call visit_end_struct() functions unconditionally, so that visitors can release resources tied up since the matching visit_start_struct() without also having to worry about error priority if more than one error occurs. Even though error_propagate() can

[Qemu-devel] [PATCH v14 17/19] qmp-input: Require struct push to visit members of top dict

2016-04-08 Thread Eric Blake
Don't embed the root of the visit into the stack of current containers being visited. That way, we no longer get confused on whether the first visit of a dictionary is to the dictionary itself or to one of the members of the dictionary, and we no longer have to require the root visit to pass

[Qemu-devel] [PATCH v14 00/19] qapi visitor cleanups (post-introspection cleanups subset E)

2016-04-08 Thread Eric Blake
This is now 2.7 material (it is too invasive for hard freeze). Based on master, with no prerequisite patches. Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv14e and will soon be part of my branch with the rest of the v5 series, at:

[Qemu-devel] [PATCH v14 16/19] qom: Wrap prop visit in visit_start_struct

2016-04-08 Thread Eric Blake
The qmp-input visitor was playing rather fast and loose: when visiting a QDict, you could grab members of the root dictionary without first pushing into the dict. But we are about to tighten the input visitor, at which point user_creatable_add_type() MUST follow the same paradigms as everyone

[Qemu-devel] [PATCH v14 05/19] qmp-input: Clean up stack handling

2016-04-08 Thread Eric Blake
Management of the top of stack was a bit verbose; creating a temporary variable and adding some comments makes the existing code more legible before the next few patches improve things. No semantic changes other than asserting that we are always visiting a QObject, and not a NULL value.

[Qemu-devel] [PATCH v14 06/19] qmp-input: Don't consume input when checking has_member

2016-04-08 Thread Eric Blake
Commit e8316d7 mistakenly passed consume=true when checking if an optional member was present, but the mistake was silently ignored since the code happily let us extract a member more than once. Tighten up the input visitor to ensure that a member is consumed exactly once. To keep the testsuite

[Qemu-devel] [PATCH v14 13/19] qmp: Tighten output visitor rules

2016-04-08 Thread Eric Blake
Add a new qmp_output_visitor_reset(), which must be called before reusing an exising QmpOutputVisitor on a new root object. Tighten assertions to require that qmp_output_get_qobject() can only be called after pairing a visit_end_* for every visit_start_* (rather than allowing it to return a

[Qemu-devel] [PATCH v14 12/19] spapr_drc: Expose 'null' in qom-get when there is no fdt

2016-04-08 Thread Eric Blake
Now that the QMP output visitor supports an explicit null output, we should utilize it to make it easier to diagnose the difference between a missing fdt ('null') vs. a present-but-empty one ('{}'). (Note that this reverts the behavior of commit ab8bf1d, taking us back to the behavior of commit

[Qemu-devel] [PATCH v14 03/19] qapi: Guarantee NULL obj on input visitor callback error

2016-04-08 Thread Eric Blake
Our existing input visitors were not very consistent on errors in a function taking 'TYPE **obj'. While all of them set '*obj' to allocated storage on success, it was not obvious whether '*obj' was guaranteed safe on failure, or whether it was left uninitialized. But a future patch wants to

[Qemu-devel] [PATCH v14 11/19] qmp: Support explicit null during visits

2016-04-08 Thread Eric Blake
Implement the new type_null() callback for the qmp input and output visitors. While we don't yet have a use for this in QAPI input (the generator will need some tweaks first), one usage is already envisioned: when changing blockdev parameters, it would be nice to have a difference between leaving

[Qemu-devel] [PATCH v14 07/19] qmp-input: Refactor when list is advanced

2016-04-08 Thread Eric Blake
Refactor the code to advance the QListEntry pointer at the point where visit_type_FOO() is called, rather than visit_next_list(). This will allow a future patch to move the visit of the list head into visit_start_list(), and get rid of the 'first' flag. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH v14 15/19] qapi-commands: Wrap argument visit in visit_start_struct

2016-04-08 Thread Eric Blake
The qmp-input visitor was playing rather fast and loose: when visiting a QDict, you could grab members of the root dictionary without first pushing into the dict. But we are about to tighten the input visitor, at which point the generated marshal code MUST follow the same paradigms as everyone

[Qemu-devel] [PATCH v14 02/19] qapi-visit: Add visitor.type classification

2016-04-08 Thread Eric Blake
We have three classes of QAPI visitors: input, output, and dealloc. Currently, all implementations of these visitors have one thing in common based on their visitor type: the implementation used for the visit_type_enum() callback. But since we plan to add more such common behavior, in relation to

[Qemu-devel] [PATCH v14 09/19] tests: Add check-qnull

2016-04-08 Thread Eric Blake
Add a new test, for checking reference counting of qnull(). As part of the new file, move a previous reference counting change added in commit a861564 into a more logical place. Signed-off-by: Eric Blake --- v14: no change v13: no change v12: new patch ---

[Qemu-devel] [PATCH v14 04/19] qmp: Drop dead command->type

2016-04-08 Thread Eric Blake
Ever since QMP was first added back in commit 43c20a43, we have never had any QmpCommandType other than QCT_NORMAL. It's pointless to carry around the cruft. Signed-off-by: Eric Blake --- v14: no change v13: no change v12: new patch --- include/qapi/qmp/dispatch.h | 6

[Qemu-devel] [PATCH] configure: Use uniform description for devel packages

2016-04-08 Thread Stefan Weil
As all other devel packages are written in the form "name devel", use this form for libcap devel and libattr devel, too. Signed-off-by: Stefan Weil --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 9101257..adf70bd

Re: [Qemu-devel] [PATCH v2 for-2.7 2/8] block: Let bdrv_open_inherit() return the snapshot

2016-04-08 Thread Max Reitz
On 07.04.2016 13:29, Kevin Wolf wrote: > Am 06.04.2016 um 19:57 hat Max Reitz geschrieben: >> If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that >> snapshot BDS should be returned instead of the BDS under it. >> >> To this end, bdrv_append_temp_snapshot() now returns the snapshot

[Qemu-devel] [PATCH] virtio-input: fix emulated tablet axis ranges

2016-04-08 Thread Ladi Prosek
The reported maximum was wrong. The X and Y coordinates are 0-based so if size is 8000 maximum must be 7FFF. Signed-off-by: Ladi Prosek --- hw/input/virtio-input-hid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/input/virtio-input-hid.c

Re: [Qemu-devel] [PULL 0/1] target-mips queue for 2.6

2016-04-08 Thread Peter Maydell
et> > > The following changes since commit ead5268f2166101f7dde70598c9f538a90afd8ee: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-04-07-tag' > into staging (2016-04-07 18:06:14 +0100) > > are available in the git repository at: > > git://githu

Re: [Qemu-devel] Virtio-9p and cgroup io-throttling

2016-04-08 Thread Greg Kurz
On Fri, 8 Apr 2016 14:55:29 +0200 Pradeep Kiruvale wrote: > Hi Greg, > > FInd my replies inline > > > > > > Below is the way how I add to blkio > > > > > > echo "8:16 8388608" > > > > /sys/fs/cgroup/blkio/test/blkio.throttle.write_bps_device > > > > > > > Ok, this

Re: [Qemu-devel] [Qemu-block] [PATCH 0/7] next round of qemu-iotests fixes

2016-04-08 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > With these fixes, qemu-iotests complete successfully on my test > systems (s390x, x86_64) when used with QCOW2 or raw image formats. > > These are purely bug fixes for tests and most are trivial, so they > should be safe even for hard freeze. Thanks,

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-08 Thread Paolo Bonzini
On 08/04/2016 15:15, Markus Armbruster wrote: > > On the other hand, minimal usage of templates instead of some of the > > preprocessor gunk we have would be a very good thing IMNSHO. I am > > referring to the multiply included header files and to the macros with > > type arguments (mostly QOM

Re: [Qemu-devel] [RFC v2 0/6] QEMU shared-memory backend

2016-04-08 Thread Markus Armbruster
Baptiste Reynal writes: > On Thu, Apr 7, 2016 at 6:27 PM, Markus Armbruster wrote: >> Baptiste Reynal writes: >> >>> On Tue, Mar 22, 2016 at 3:14 PM, Markus Armbruster >>> wrote:

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-08 Thread Eric Blake
On 04/07/2016 11:51 PM, Alex Bligh wrote: > > On 8 Apr 2016, at 02:09, Eric Blake wrote: > >> The NBD Protocol states that NBD_REP_SERVER may set >> 'length > sizeof(namelen) + namelen'; in which case the rest >> of the packet is a UTF-8 description of the export. While we

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-08 Thread Sascha Silbe
Dear Kevin, Kevin Wolf writes: > Am 08.04.2016 um 14:01 hat Sascha Silbe geschrieben: [...] >> The best approach probably would be to fix up the rate limit code to >> delay for multiple time slices if necessary. We should get rid of the >> artificial BDRV_SECTOR_SIZE

[Qemu-devel] [PATCH v2 2/2] configure: Enable seccomp sandbox for MIPS

2016-04-08 Thread James Hogan
Enable seccomp on MIPS since libseccomp version 2.2.0 when MIPS support was first added. Signed-off-by: James Hogan Reviewed-by: Andrew Jones Cc: Eduardo Otubo Cc: Aurelien Jarno --- configure |

Re: [Qemu-devel] [PATCH 1/1] backend: multi-client-socket

2016-04-08 Thread Baptiste Reynal
I wasn't aware of this new framework when I started the development of this socket. For sure I'll have a deeper look and see what can be shared for the next version. On Thu, Mar 31, 2016 at 11:08 AM, Stefan Hajnoczi wrote: > On Fri, Mar 18, 2016 at 10:12:46AM +0100, Baptiste

[Qemu-devel] [PATCH v2 0/2] Enable seccomp on MIPS

2016-04-08 Thread James Hogan
These patches enable seccomp sandboxing on MIPS. libseccomp has supported MIPS since 2.2.0, but cacheflush isn't included in the whitelist until libseccomp 2.2.3 since thats when it was enabled for ARM. The first patch fixes that so that it will work with MIPS right back to 2.2.0. Finally the

[Qemu-devel] [PATCH v2 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-08 Thread James Hogan
The cacheflush system call (found on MIPS and ARM) has been included in the libseccomp header since 2.2.0, so include it back to that version. Previously it was only enabled since 2.2.3 since that is when it was enabled properly for ARM. This will allow seccomp support to be enabled for MIPS back

Re: [Qemu-devel] [RFC] [tcg] Idea on refactoring target code generation loop (gen_intermediate_code)

2016-04-08 Thread Markus Armbruster
Paolo Bonzini writes: > On 07/04/2016 16:49, Peter Maydell wrote: >> > QOM to C++ classes >> I suspect if you looked at this you'd find that the QOM semantics >> for various things don't map onto C++ (ie that we have more runtime >> flexibility than C++ does). > > True, but

Re: [Qemu-devel] [PATCH v2 06/13] qemu-thread: add simple test-and-set spinlock

2016-04-08 Thread Alex Bennée
Emilio G. Cota writes: > From: Guillaume Delbergue > > Signed-off-by: Guillaume Delbergue > [Rewritten. - Paolo] > Signed-off-by: Paolo Bonzini > --- > include/qemu/thread.h | 31

Re: [Qemu-devel] [PATCH 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-08 Thread James Hogan
On Fri, Apr 08, 2016 at 01:49:44PM +0100, Peter Maydell wrote: > On 8 April 2016 at 13:39, Andrew Jones wrote: > > In that message I was referring to arm/aarch64 (the only arch at the > > time that cared about cacheflush). 2.2.0 was the first version arm got > > any cacheflush

Re: [Qemu-devel] Virtio-9p and cgroup io-throttling

2016-04-08 Thread Pradeep Kiruvale
Hi Greg, FInd my replies inline > > > Below is the way how I add to blkio > > > > echo "8:16 8388608" > > > /sys/fs/cgroup/blkio/test/blkio.throttle.write_bps_device > > > > Ok, this just puts a limit of 8MB/s when writing to /dev/sdb for all > tasks in the test cgroup... but what about the

Re: [Qemu-devel] [RFC v2 0/6] QEMU shared-memory backend

2016-04-08 Thread Baptiste Reynal
On Thu, Apr 7, 2016 at 6:27 PM, Markus Armbruster wrote: > Baptiste Reynal writes: > >> On Tue, Mar 22, 2016 at 3:14 PM, Markus Armbruster wrote: >>> >>> Copying Paolo, author of memory-backend-file. >>> >>> Baptiste Reynal

Re: [Qemu-devel] [PATCH 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-08 Thread Peter Maydell
On 8 April 2016 at 13:39, Andrew Jones wrote: > In that message I was referring to arm/aarch64 (the only arch at the > time that cared about cacheflush). 2.2.0 was the first version arm got > any cacheflush support (same version as x86 an mips), but it was > completely wrong

Re: [Qemu-devel] [PULL 00/15] pci, virtio, acpi: fixes for 2.6

2016-04-08 Thread Peter Maydell
On 8 April 2016 at 09:02, Michael S. Tsirkin wrote: > The following changes since commit 7acbff99c6c285b3070bf0e768d56f511e2bf346: > > Update version for v2.6.0-rc1 release (2016-04-05 21:53:18 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [RFC v2 0/6] QEMU shared-memory backend

2016-04-08 Thread Baptiste Reynal
On Wed, Apr 6, 2016 at 3:47 PM, Igor Mammedov wrote: > On Wed, 6 Apr 2016 09:57:57 +0100 > Stefan Hajnoczi wrote: > >> On Tue, Apr 05, 2016 at 02:00:40PM +0200, Baptiste Reynal wrote: >> > On Thu, Mar 31, 2016 at 11:14 AM, Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v2 00/10] tb hash improvements

2016-04-08 Thread Alex Bennée
Emilio G. Cota writes: > See v1 for context: > https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg00587.html > > All patches in v2 are checkpatch-clean, except 05 (checkpatch should > be ignored for this one) and 06, which I took unmodified (later patches > fix those

Re: [Qemu-devel] Virtio-9p and cgroup io-throttling

2016-04-08 Thread Greg Kurz
On Fri, 8 Apr 2016 11:51:05 +0200 Pradeep Kiruvale wrote: > Hi Greg, > > Thanks for your reply. > > Below is the way how I add to blkio > > echo "8:16 8388608" > > /sys/fs/cgroup/blkio/test/blkio.throttle.write_bps_device > Ok, this just puts a limit of 8MB/s when

Re: [Qemu-devel] [PATCH 10/10] tb hash: track translated blocks with qht

2016-04-08 Thread Alex Bennée
Emilio G. Cota writes: > Having a fixed-size hash table for keeping track of all translation blocks > is suboptimal: some workloads are just too big or too small to get maximum > performance from the hash table. The MRU promotion policy helps improve > performance when the hash

Re: [Qemu-devel] [PATCH 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-08 Thread Andrew Jones
On Fri, Apr 08, 2016 at 12:54:54PM +0100, Peter Maydell wrote: > On 8 April 2016 at 12:45, Andrew Jones wrote: > > On Mon, Apr 04, 2016 at 09:29:15AM +0100, James Hogan wrote: > >> The cacheflush system call (found on MIPS and ARM) has been included in > >> the libseccomp

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-08 Thread Kevin Wolf
Am 08.04.2016 um 14:01 hat Sascha Silbe geschrieben: > Dear Max, > > Sascha Silbe writes: > > > @Max: From a cursory glance at the code, maybe your 1 *byte* per second > > rate limit is being rounded down to 0 *blocks* per second, with 0 > > meaning no limit? See e.g.

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/2] block: Fix hang with mirroring qcow2

2016-04-08 Thread Paolo Bonzini
On 08/04/2016 12:06, Stefan Hajnoczi wrote: > On Tue, Apr 05, 2016 at 07:20:51PM +0800, Fam Zheng wrote: >> See patch 1 for the bug analysis. >> >> v3: Make bdrv_co_drain a public function and use it directly in >> block/mirror.c. >> [Stefan] >> >> >> >> Fam Zheng (2): >> block: Fix

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-08 Thread Sascha Silbe
Dear Max, Sascha Silbe writes: > @Max: From a cursory glance at the code, maybe your 1 *byte* per second > rate limit is being rounded down to 0 *blocks* per second, with 0 > meaning no limit? See e.g. mirror_set_speed(). Though I must admit I > don't understand how

Re: [Qemu-devel] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension

2016-04-08 Thread Kevin Wolf
Am 07.04.2016 um 18:10 hat Eric Blake geschrieben: > On 04/07/2016 04:38 AM, Vladimir Sementsov-Ogievskiy wrote: > > On 05.04.2016 16:43, Paolo Bonzini wrote: > >> > >> On 05/04/2016 06:05, Kevin Wolf wrote: > >>> The options I can think of is adding a request field "max number of > >>>

Re: [Qemu-devel] [PATCH v2] qcow2: Prevent backing file names longer than 1023

2016-04-08 Thread Kevin Wolf
Am 06.04.2016 um 18:32 hat Max Reitz geschrieben: > We reject backing file names with a length of more than 1023 characters > when opening a qcow2 file, so we should not produce such files > ourselves. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz Thanks, applied

Re: [Qemu-devel] [PATCH 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-08 Thread Peter Maydell
On 8 April 2016 at 12:45, Andrew Jones wrote: > On Mon, Apr 04, 2016 at 09:29:15AM +0100, James Hogan wrote: >> The cacheflush system call (found on MIPS and ARM) has been included in >> the libseccomp header since 2.2.0, so include include it back to that >> version.

Re: [Qemu-devel] [PATCH for-2.6] vpc: fix return value check for blk_pwrite

2016-04-08 Thread Kevin Wolf
Am 07.04.2016 um 16:52 hat Paolo Bonzini geschrieben: > bdrv_pwrite_sync used to return zero or negative error, while blk_pwrite > returns > the number of written bytes when successful. This caused VPC image creation > to fail spectacularly: it wrote the first 512 bytes, and then exited >

Re: [Qemu-devel] [PATCH 2/2] configure: Enable seccomp sandbox for MIPS

2016-04-08 Thread Andrew Jones
On Mon, Apr 04, 2016 at 09:29:16AM +0100, James Hogan wrote: > Enable seccomp on MIPS since libseccomp version 2.2.0 when MIPS support > was first added. > > Signed-off-by: James Hogan > Cc: Eduardo Otubo > Cc: Aurelien Jarno

Re: [Qemu-devel] [PULL 0/1] ppc-for-2.6 queue 20160408

2016-04-08 Thread Peter Maydell
> > are available in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.6-20160408 > > for you to fetch changes up to a110655a068d4b98495115ff0f8405235d845272: > > spapr: Fix ib

Re: [Qemu-devel] [PATCH 1/2] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-08 Thread Andrew Jones
On Mon, Apr 04, 2016 at 09:29:15AM +0100, James Hogan wrote: > The cacheflush system call (found on MIPS and ARM) has been included in > the libseccomp header since 2.2.0, so include include it back to that > version. Previously it was only enabled since 2.2.3 since that is when > it was enabled

[Qemu-devel] [PATCH for-2.7 v6 2/2] spapr: implement query-hotpluggable-cpus callback

2016-04-08 Thread Igor Mammedov
it returns a list of present/possible to hotplug CPU objects with a list of properties to use with device_add. in spapr case returned list would looks like: -> { "execute": "query-hotpluggable-cpus" } <- {"return": [ { "props": { "core": 1 }, "type": "spapr-cpu-core", "vcpus-count": 2

[Qemu-devel] [PATCH for-2.7 v6 0/2] ispapr: QMP: add query-hotpluggable-cpus

2016-04-08 Thread Igor Mammedov
Changes since v4: - fix style issues in qapi-schema and qmp-commands, Eric Blake - rebase on top current master (fix query-gic-capabilities conflict) - fix s390 build failure: undefined reference to `qmp_query_hotpluggable_cpus' Changes since v3: - replace

[Qemu-devel] [PATCH for-2.7 v6 1/2] QMP: add query-hotpluggable-cpus

2016-04-08 Thread Igor Mammedov
it will allow mgmt to query present and hotpluggable CPU objects, it is required from a target platform that wish to support command to implement and set MachineClass.query_hotpluggable_cpus callback, which will return a list of possible CPU objects with options that would be needed for

Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X

2016-04-08 Thread Markus Armbruster
[Wasn't delivered correctly by eggs.gnu.org, resending] Paolo Bonzini writes: > On 30/03/2016 18:35, Programmingkid wrote: >> Remove macro that prevents event_notifier_init_fd() function from being >> compiled on Mac OS X. >> >> This patch fixes this error: >> >>

[Qemu-devel] [PATCH for-2.6 v2 0/2] acpi: tpm: "Fix" TPM ACPI description

2016-04-08 Thread Igor Mammedov
TPM used to 'work', since in commit: 711b20b4 Add ACPI tables for TPM as TPM device has been placed outside of PCI0 bus scope with IRQ commented out, but since commit 5cb18b3d TPM2 ACPI table support with following fixup 9e472263 acpi: add missing ssdt it has been moved to correct ISA bus

[Qemu-devel] [PATCH for-2.6 v2 1/2] pc: acpi: tpm: add missing MMIO resource to PCI0._CRS

2016-04-08 Thread Igor Mammedov
Windows will fail initialize TMP driver with the reason: 'device cannot find enough free resources' That happens because parent BUS doesn't describe MMIO resources used by TPM child device. Fix it by describing it in top-most parent bus scope PCI0. It was 'regressed' by commit 5cb18b3d TPM2

[Qemu-devel] [PATCH for-2.6 v2 2/2] tpm: acpi: remove IRQ from TPM's CRS to make Windows not see conflict

2016-04-08 Thread Igor Mammedov
IRQ 5 used by TPM conflicts with PNP0C0F IRQs, as result Windows fails driver initialization with reason 'device cannot find enough free resources' But if TPM._CRS.IRQ entry is commented out, Windows seems to initialize driver without errors as it doesn't notice possible conflict and it seems to

Re: [Qemu-devel] [PATCH] qdev property: cleanup

2016-04-08 Thread Markus Armbruster
[Wasn't delivered correctly by eggs.gnu.org, resending] The subsystem tag should be just "qdev:". Suggest "qdev: Clean up around properties". Cao jin writes: > include: > 1. remove unnecessary declaration of static function > 2. fix inconsistency between comment and

Re: [Qemu-devel] [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-08 Thread Kevin Wolf
Am 07.04.2016 um 22:27 hat Sascha Silbe geschrieben: > Dear Max, > > Max Reitz writes: > > > On 05.04.2016 11:21, Sascha Silbe wrote: > >> On systems with fast IO, qemu-io may write more than 1 MiB before > >> receiving the block-job-cancel command, causing the test case to

Re: [Qemu-devel] [RFC v2 1/9] virtio: fix stray tab character

2016-04-08 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Thu, Apr 07, 2016 at 04:50:18PM +0200, Markus Armbruster wrote: >> Stefan Hajnoczi writes: >> >> > The patches fixes a single occurrence of a tab character that resulted >> >> "The patch fixes" or "Fix", or drop the

Re: [Qemu-devel] [PATCH] iotests: Make 150 use qemu-img map instead of du

2016-04-08 Thread Kevin Wolf
Am 08.04.2016 um 12:30 hat Paolo Bonzini geschrieben: > > > On 29/03/2016 18:24, Max Reitz wrote: > > The actual on-disk size of a file does not only depend on factors qemu > > can control. Thus, we should not depend on this to determine whether a > > file has indeed been fully allocated.

Re: [Qemu-devel] run qemu on windows

2016-04-08 Thread Safa Hamza
i installed the latest version but how i can configure it with arm architecture and run it , i already have a zImage and rootfs.img.gz working perfectly in ubuntu with arm32 arch , what are steps , m i going to work with cmd ? On Fri, Apr 8, 2016 at 7:21 AM, Stefan Weil wrote:

Re: [Qemu-devel] [PULL for-2.6] target-xtensa fix

2016-04-08 Thread Peter Maydell
xel/tags/pull-ui-20160309-1' into > staging (2016-03-10 02:51:14 +) > > are available in the git repository at: > > git://github.com/OSLL/qemu-xtensa.git tags/20160408-xtensa > > for you to fetch changes up to 34fe9af09b98e849f52bb62c4668a39f1cd8150e: > > opencores_eth: in

Re: [Qemu-devel] [PATCH for-2.7 1/1] block/gluster: add support for selecting debug logging level

2016-04-08 Thread Niels de Vos
On Thu, Apr 07, 2016 at 05:24:19PM -0400, Jeff Cody wrote: > This adds commandline support for the logging level of the > gluster protocol driver, output to stdout. The option is 'debug', > e.g.: > > -drive filename=gluster://192.168.15.180/gv2/test.qcow2,debug=9 > > Debug levels are 0-9, with

Re: [Qemu-devel] [PATCH 09/10] qht: add test program

2016-04-08 Thread Alex Bennée
Emilio G. Cota writes: > Signed-off-by: Emilio G. Cota > --- > tests/.gitignore | 1 + > tests/Makefile | 6 +++- > tests/test-qht.c | 100 > +++ > 3 files changed, 106 insertions(+), 1 deletion(-) >

Re: [Qemu-devel] [PULL 48/48] iotests: Test qemu-img convert -S 0 behavior

2016-04-08 Thread Fam Zheng
On Fri, 04/08 12:21, Kevin Wolf wrote: > Am 08.04.2016 um 03:18 hat Fam Zheng geschrieben: > > On Thu, 04/07 16:40, Paolo Bonzini wrote: > > > > > > > > > On 29/03/2016 17:08, Kevin Wolf wrote: > > > > From: Max Reitz > > > > > > > > Passing -S 0 to qemu-img convert should

Re: [Qemu-devel] [PATCH] iotests: Make 150 use qemu-img map instead of du

2016-04-08 Thread Paolo Bonzini
On 29/03/2016 18:24, Max Reitz wrote: > The actual on-disk size of a file does not only depend on factors qemu > can control. Thus, we should not depend on this to determine whether a > file has indeed been fully allocated. Instead, use qemu-img map and hope > that if an area is referenced, it

Re: [Qemu-devel] [PULL 0/1] TCI patch queue for QEMU 2.6.0-rc2

2016-04-08 Thread Peter Maydell
On 7 April 2016 at 18:23, Stefan Weil wrote: > There is only a single patch which fixes a tci build regression. > > The following changes since commit e380023898479b57d38c0569c02f7bd41090181b: > > Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into >

Re: [Qemu-devel] [PATCH 08/10] qht: QEMU's fast, resizable and scalable Hash Table

2016-04-08 Thread Alex Bennée
Emilio G. Cota writes: > This is a hash table with optional auto-resizing and MRU promotion for > reads and writes. Its implementation goal is to stay fast while > scaling for read-mostly workloads. > > A hash table with these features will be necessary for the scalability > of

Re: [Qemu-devel] [PULL 48/48] iotests: Test qemu-img convert -S 0 behavior

2016-04-08 Thread Kevin Wolf
Am 08.04.2016 um 03:18 hat Fam Zheng geschrieben: > On Thu, 04/07 16:40, Paolo Bonzini wrote: > > > > > > On 29/03/2016 17:08, Kevin Wolf wrote: > > > From: Max Reitz > > > > > > Passing -S 0 to qemu-img convert should result in all source data being > > > copied to the

Re: [Qemu-devel] [Qemu-block] [PATCH] MAINTAINERS: Add Fam Zheng as a co-maintainer of block I/O path

2016-04-08 Thread Stefan Hajnoczi
On Tue, Apr 05, 2016 at 05:38:25PM +0800, Fam Zheng wrote: > As agreed with Stefan, I'm listing myself a co-maintainer of block I/O > path and assist with the maintainership. > > Signed-off-by: Fam Zheng > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) Thanks,

Re: [Qemu-devel] [Qemu-block] [PATCH v3 0/2] block: Fix hang with mirroring qcow2

2016-04-08 Thread Stefan Hajnoczi
On Tue, Apr 05, 2016 at 07:20:51PM +0800, Fam Zheng wrote: > See patch 1 for the bug analysis. > > v3: Make bdrv_co_drain a public function and use it directly in > block/mirror.c. > [Stefan] > > > > Fam Zheng (2): > block: Fix bdrv_drain in coroutine > mirror: Replace bdrv_drain(bs)

Re: [Qemu-devel] [PATCH 11/13] intel_iommu: add IR translation faults defines

2016-04-08 Thread Peter Xu
On Sun, Feb 21, 2016 at 05:56:07PM +0200, Marcel Apfelbaum wrote: > >+ > >+/* > >+ * Interrupt remapping transition faults > >+ */ > >+VTD_FR_IR_REQ_RSVD = 0x20, /* One or more IR request resved > >+* fields set */ > > Hi, > > Minor comments: >

Re: [Qemu-devel] [PATCH for-2.7 v9 00/11] Support streaming to an intermediate layer

2016-04-08 Thread Stefan Hajnoczi
On Mon, Apr 04, 2016 at 04:43:50PM +0300, Alberto Garcia wrote: > Hi! > > Half a year later :) here's the new version of the intermediate block > streaming patches. CCing Jeff Cody, block jobs maintainer. > Quick summary: the feature was already working since June but there > were two problems

Re: [Qemu-devel] [PATCH 05/13] acpi: add DMAR scope definition for root IOAPIC

2016-04-08 Thread Peter Xu
On Sun, Feb 21, 2016 at 05:01:02PM +0100, Jan Kiszka wrote: > >> We have the same problem over with VT-d and IR. > >> > >> I don't think the firmware is not the right place, otherwise there would > >> be an interface in hw to adjust that parameters. I think we should > >> simply make sure that the

Re: [Qemu-devel] [PULL v2 00/15] Misc changes for QEMU 2.6.0-rc2

2016-04-08 Thread Peter Maydell
On 7 April 2016 at 23:19, Paolo Bonzini wrote: > The following changes since commit 7acbff99c6c285b3070bf0e768d56f511e2bf346: > > Update version for v2.6.0-rc1 release (2016-04-05 21:53:18 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] Virtio-9p and cgroup io-throttling

2016-04-08 Thread Pradeep Kiruvale
Hi Greg, Thanks for your reply. Below is the way how I add to blkio echo "8:16 8388608" > /sys/fs/cgroup/blkio/test/blkio.throttle.write_bps_device The problem I guess is adding these task ids to the "tasks" file in cgroup These threads are started randomly and even then I add the PIDs to the

[Qemu-devel] [PULL 0/1] target-mips queue for 2.6

2016-04-08 Thread Leon Alrae
16-04-07-tag' into staging (2016-04-07 18:06:14 +0100) are available in the git repository at: git://github.com/lalrae/qemu.git tags/mips-20160408 for you to fetch changes up to f2eb665a11a34ac9f6459f8a18c3d9d8be9ca359: hw/mips_itu: fix off-by-one reported by Coverity (2016-04-08 09

[Qemu-devel] [PULL 1/1] hw/mips_itu: fix off-by-one reported by Coverity

2016-04-08 Thread Leon Alrae
Fix off-by-one error in ITC Tag read. Remove the switch as we just want to check if index is in valid range rather than test against list of values. Signed-off-by: Leon Alrae --- hw/misc/mips_itu.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff

Re: [Qemu-devel] [RFC PATCH v2 2/3] utils: Add cpuinfo helper to fetch /proc/cpuinfo

2016-04-08 Thread Peter Maydell
On 8 April 2016 at 07:21, Vijay Kilari wrote: > On Thu, Apr 7, 2016 at 5:15 PM, Peter Maydell > wrote: >> I'm told there are kernel patches in progress to get this sort >> of information in a maintainable way to userspace, which are >> currently

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci-bridge: Convert pxb initialization functions to Error

2016-04-08 Thread Michael S. Tsirkin
On Fri, Apr 08, 2016 at 03:55:54PM +0800, Wei Jiangang wrote: > Firstly, convert pxb_dev_init_common() to Error and rename > it to pxb_dev_realize_common(). > Actually, pxb_register_bus() is converted as well. > > And then, > convert pxb_dev_initfn() and pxb_pcie_dev_initfn() to Error, > rename

Re: [Qemu-devel] [ RFC Patch v4 2/3] virtio-net rsc: support coalescing ipv4 tcp traffic

2016-04-08 Thread Wei Xu
On 2016年04月08日 16:31, Jason Wang wrote: On 04/08/2016 03:47 PM, Wei Xu wrote: On 2016年04月05日 10:47, Jason Wang wrote: On 04/04/2016 03:25 AM, w...@redhat.com wrote: From: Wei Xu All the data packets in a tcp connection will be cached to a big buffer in every receive

Re: [Qemu-devel] [RFC v2 1/9] virtio: fix stray tab character

2016-04-08 Thread Stefan Hajnoczi
On Thu, Apr 07, 2016 at 04:50:18PM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > The patches fixes a single occurrence of a tab character that resulted > > "The patch fixes" or "Fix", or drop the sentence. > > > in mis-aligned indentation. > > Really?

Re: [Qemu-devel] [PATCH v3 0/2] block: Fix hang with mirroring qcow2

2016-04-08 Thread Fam Zheng
On Tue, 04/05 19:20, Fam Zheng wrote: > See patch 1 for the bug analysis. > > v3: Make bdrv_co_drain a public function and use it directly in > block/mirror.c. > [Stefan] Stefan, are you happy with this version for 2.6? Fam > > > > Fam Zheng (2): > block: Fix bdrv_drain in coroutine

<    1   2   3   >