Re: [Qemu-devel] [PATCH COLO-Frame v10 01/38] configure: Add parameter for configure to enable/disable COLO support

2015-11-05 Thread zhanghailiang
Hi Eric, On 2015/11/5 22:52, Eric Blake wrote: On 11/03/2015 04:56 AM, zhanghailiang wrote: configure --enable-colo/--disable-colo to switch COLO support on/off. COLO support is off by default. Off by default risks bit-rot for people not building it; it's generally best to default to off only

[Qemu-devel] [PATCH v10 20/30] qapi: Eliminate QAPISchemaObjectType.check() variable members

2015-11-05 Thread Eric Blake
From: Markus Armbruster We can use seen.values() instead if we make it an OrderedDict. Signed-off-by: Markus Armbruster Message-Id: <1446559499-26984-5-git-send-email-arm...@redhat.com> Signed-off-by: Eric Blake --- v10: redo closer to Markus' original proposal v9: new patch --- scripts/qapi

[Qemu-devel] [PATCH v10 29/30] cpu: Convert CpuInfo into flat union

2015-11-05 Thread Eric Blake
When qapi type CpuInfo was originally created for 0.14, we had no notion of a flat union, and instead just listed a bunch of optional fields with documentation about the mutually-exclusive choice of which instruction pointer field(s) would be provided for a given architecture. But now that we have

[Qemu-devel] [PATCH v10 30/30] qapi: Forbid case-insensitive clashes

2015-11-05 Thread Eric Blake
We have toyed on list with the idea of a future extension to QMP of teaching it to be case-insensitive (the user could request command 'Quit' instead of 'quit', or could spell a struct field as 'CPU' instead of 'cpu'). But for that to be a practical extension, we cannot break backwards compatibili

[Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash()

2015-11-05 Thread Eric Blake
Consolidate two common sequences of clash detection into a new QAPISchemaObjectType.check_clash() helper method. No change to generated code. Signed-off-by: Eric Blake --- v10: rebase on new Variants.check_clash() v9: new patch, split off from v8 7/17 --- scripts/qapi.py | 19 -

[Qemu-devel] [PATCH v10 26/30] qapi: Remove outdated tests related to QMP/branch collisions

2015-11-05 Thread Eric Blake
Now that branches are in a separate C namespace, we can remove the restrictions in the parser that claim a branch name would collide with QMP, and delete the negative tests that are no longer problematic. A separate patch can then add positive tests to qapi-schema-test to test that any corner case

[Qemu-devel] [PATCH v10 27/30] qapi: Track owner of each object member

2015-11-05 Thread Eric Blake
Future commits will migrate semantic checking away from parsing and over to the various QAPISchema*.check() methods. But to report an error message about an incorrect semantic use of a member of an object type, it helps to know which type, command, or event owns the member. In particular, when a

[Qemu-devel] [PATCH v10 21/30] qapi: Factor out QAPISchemaObjectTypeMember.check_clash()

2015-11-05 Thread Eric Blake
From: Markus Armbruster While there, stick in a TODO change key of seen from QAPI name to C name. Can't do it right away, because it would fail the assertion for tests/qapi-schema/args-has-clash.json. Signed-off-by: Markus Armbruster Message-Id: <1446559499-26984-6-git-send-email-arm...@redhat

[Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches

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

[Qemu-devel] [PATCH v10 16/30] qapi: Drop obsolete tag value collision assertions

2015-11-05 Thread Eric Blake
From: Markus Armbruster Union tag values can't clash with member names in generated C anymore since commit e4ba22b, but QAPISchemaObjectTypeVariants.check() still asserts they don't. Drop it. Signed-off-by: Markus Armbruster Message-Id: <1446559499-26984-1-git-send-email-arm...@redhat.com> Sig

[Qemu-devel] [PATCH v10 22/30] qapi: Simplify QAPISchemaObjectTypeVariants.check()

2015-11-05 Thread Eric Blake
From: Markus Armbruster Reduce the ugly flat union / simple union conditional by doing just the essential work here, namely setting self.tag_member. Move the rest to callers. Signed-off-by: Markus Armbruster Message-Id: <1446559499-26984-7-git-send-email-arm...@redhat.com> [rebase to earlier ch

[Qemu-devel] [PATCH v10 28/30] qapi: Detect collisions in C member names

2015-11-05 Thread Eric Blake
Detect attempts to declare two object members that would result in the same C member name, by keying the 'seen' dictionary off of the C name rather than the qapi name. It also requires passing info through the check_clash() methods. This addresses a TODO and fixes the previously-broken args-name-

[Qemu-devel] [PATCH v10 17/30] qapi: Simplify QAPISchemaObjectTypeMember.check()

2015-11-05 Thread Eric Blake
From: Markus Armbruster QAPISchemaObjectTypeMember.check() currently does four things: 1. Compute self.type 2. Accumulate members in all_members Only one caller cares: QAPISchemaObjectType.check() uses it to compute self.members. The other callers pass a throw-away accumulator. 3. A

[Qemu-devel] [PATCH v10 18/30] qapi: Clean up after previous commit

2015-11-05 Thread Eric Blake
From: Markus Armbruster QAPISchemaObjectTypeVariants.check() parameter members and QAPISchemaObjectTypeVariant.check() parameter seen are no longer used, drop them. Signed-off-by: Markus Armbruster Message-Id: <1446559499-26984-3-git-send-email-arm...@redhat.com> [rebase to earlier changes that

[Qemu-devel] [PATCH v10 14/30] qapi-types: Consolidate gen_struct() and gen_union()

2015-11-05 Thread Eric Blake
These two methods are now close enough that we can finally merge them, relying on the fact that simple unions now provide a reasonable local_members. Change gen_struct() to gen_object() that handles all forms of QAPISchemaObjectType, and rename and shrink gen_union() to gen_variants() to handle th

[Qemu-devel] [PATCH v10 25/30] qapi: Hoist tag collision check to Variants.check()

2015-11-05 Thread Eric Blake
Checking that a given QAPISchemaObjectTypeVariant.name is a member of the corresponding QAPISchemaEnumType of the owning QAPISchemaObjectTypeVariants.tag_member ensures that there are no collisions in the generated C union for those tag values (since the enum itself should have no collisions). How

[Qemu-devel] [PATCH v10 12/30] qapi-introspect: Document lack of sorting

2015-11-05 Thread Eric Blake
qapi-code-gen.txt already claims that types, commands, and events share a common namespace; set this in stone by further documenting that our introspection output will never have collisions with the same name tied to more than one meta-type. Our largest QMP enum currently has 125 values, our large

[Qemu-devel] [PATCH v10 19/30] qapi: Fix up commit 7618b91's clash sanity checking change

2015-11-05 Thread Eric Blake
From: Markus Armbruster This hunk @@ -964,6 +965,7 @@ class QAPISchemaObjectType(QAPISchemaType): members = [] seen = {} for m in members: +assert c_name(m.name) not in seen seen[m.name] = m for m in sel

[Qemu-devel] [PATCH v10 06/30] qapi: Simplify non-error testing in test-qmp-*

2015-11-05 Thread Eric Blake
By using &error_abort, we can avoid a local err variable in situations where we expect success. It also has the nice effect that if the test breaks, the error message from error_abort tends to be nicer than that of g_assert(). Signed-off-by: Eric Blake --- v10: split into two pieces v9: move ea

[Qemu-devel] [PATCH v10 04/30] qapi: Share test_init code in test-qmp-input*

2015-11-05 Thread Eric Blake
Rather than duplicate the body of two functions just to decide between qobject_from_jsonv() and qobject_from_json(), exploit the fact that qobject_from_jsonv() intentionally takes 'va_list *' instead of the more common 'va_list', and that qobject_from_json() just calls qobject_from_jsonv(,NULL). Fo

[Qemu-devel] [PATCH v10 13/30] qapi: Track simple union tag in object.local_members

2015-11-05 Thread Eric Blake
We were previously creating all unions with an empty list for local_members. However, it will make it easier to unify struct and union generation if we include the generated tag member in local_members. That way, we can have a common code pattern: visit the base (if any), visit the local members

[Qemu-devel] [PATCH v10 07/30] qapi: Simplify error cleanup in test-qmp-*

2015-11-05 Thread Eric Blake
By moving err into data, we can let test teardown take care of cleaning up any collected error; it also gives us fewer lines of code between repeated tests where init runs teardown on our behalf. Rather than duplicate code between .c files, I added a new test-qmp-common.h. I debated about putting

[Qemu-devel] [PATCH v10 05/30] qapi: Plug leaks in test-qmp-*

2015-11-05 Thread Eric Blake
Make valgrind happy with the current state of the tests, so that it is easier to see if future patches introduce new memory problems without being drowned in noise. Many of the leaks were due to calling a second init without tearing down the data from an earlier visit. But since teardown is alrea

[Qemu-devel] [PATCH v10 01/30] qapi: Use generated TestStruct machinery in tests

2015-11-05 Thread Eric Blake
Commit d88f5fd and friends first introduced the various test-qmp-* tests in 2011, with duplicated hand-rolled TestStruct machinery, to make sure the qapi visitor interface was tested. Later, commit 4f193e3 in 2013 added a .json file for further testing use by the files, but without consolidating a

[Qemu-devel] [PATCH v10 00/30] qapi member collision (post-introspection cleanups, subset C')

2015-11-05 Thread Eric Blake
No pending prerequisites; based on qemu.git master Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9c and will soon be part of my branch with the rest of the v5 series, at: http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi v10 notes: Split

[Qemu-devel] [PATCH v10 09/30] qapi: Test failure in middle of array parse

2015-11-05 Thread Eric Blake
Our generated list visitors have the same problem as has been mentioned elsewhere (see commit 2f52e20): they allocate data even on failure. An upcoming patch will correct things to provide saner guarantees, but first we need to expose the behavior in the testsuite to ensure we aren't introducing an

[Qemu-devel] [PATCH v10 15/30] qapi-types: Simplify gen_struct_field[s]

2015-11-05 Thread Eric Blake
Simplify gen_struct_fields() back to a single iteration over a list of fields (like it was prior to commit f87ab7f9), by moving the generated comments to gen_object(). Then, inline gen_struct_field() into its only caller. Signed-off-by: Eric Blake --- v10: no change v9: new patch --- scripts/q

[Qemu-devel] [PATCH v10 03/30] qobject: Protect against use-after-free in qobject_decref()

2015-11-05 Thread Eric Blake
Adding an assertion to qobject_decref() will ensure that a programming error causing use-after-free will result in immediate failure (provided no other thread has started using the memory) instead of silently attempting to wrap refcnt around and leaving the problem to potentially bite later at a ha

[Qemu-devel] [PATCH v10 11/30] qapi: Provide nicer array names in introspection

2015-11-05 Thread Eric Blake
For the sake of humans reading introspection output, it is nice to have the name of implicit array types be recognizable as arrays of the underlying type. However, while this patch allows humans to skip from a command with return type "[123]" straight to the definition of type "123" without having

[Qemu-devel] [PATCH v10 02/30] qapi: Strengthen test of TestStructList

2015-11-05 Thread Eric Blake
Make each list element different, to ensure that order is preserved, and use the generated free function instead of hand-rolling our own to ensure (under valgrind) that the list is properly cleaned. Suggested-by: Markus Armbruster Signed-off-by: Eric Blake --- v10: no change v9: no change v8: n

[Qemu-devel] [PATCH v10 10/30] qapi: More tests of input arrays

2015-11-05 Thread Eric Blake
Our testsuite had no coverage of empty arrays, nor of what happens when the input does not match the expected type. Useful to have, especially if we start changing the visitor contracts. I did not think it worth duplicating these additions to test-qmp-input-strict; since all strict mode does is ad

[Qemu-devel] [PATCH v10 08/30] qapi: More tests of alternate output

2015-11-05 Thread Eric Blake
The testsuite was only covering that we could output the 'int' branch of an alternate (no additional allocation/cleanup required). Add a test of the 'str' branch, to make sure that things still work even when a branch involves allocation. Update to modern style of g_new0() over g_malloc0() while t

[Qemu-devel] Question about the source code.

2015-11-05 Thread Toni Nedialkov
Hello, I have a question pertaining the source code, wondering if I've discovered a bug or am just simply confused. It's about this function in translate-all.c static void page_flush_tb(void) { int i; for (i = 0; i < V_L1_SIZE; i++) { page_flush_tb_1(V_L1_SHIFT / V_L2_BITS - 1, l

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

2015-11-05 Thread Matt Gingell
Hi Paolo, Thanks for your comments. I'll address your comments and submit two separate patches. > On Nov 4, 2015, at 1:23 PM, Paolo Bonzini wrote: > > More importantly, I would like to understand what is the kernel issue > that you are getting. It should be resolved before 4.4 goes out in two

Re: [Qemu-devel] [PULL 00/18] Record/replay core for 2.5-rc1

2015-11-05 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 05/11/2015 15:00, Peter Maydell wrote: > > On 5 November 2015 at 12:13, Paolo Bonzini wrote: > >> The following changes since commit > >> 6c5f30cad290c745f910481d0e890b3f4fad1f00: > >> > >> Merge remote-tracking branch > >> 'remotes/juanq

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-05 Thread Bharata B Rao
On Thu, Nov 05, 2015 at 06:10:27PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > This is the 9th cut of my version of postcopy. > > The userfaultfd linux kernel code is now in the upstream kernel > tree, and so 4.3 can be used without modification. > > This q

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

2015-11-05 Thread Xiao Guangrong
On 11/06/2015 01:29 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote: [...] static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm) { -return host_memory_backend_get_memory(dimm->hostmem, &error_abort); +Error *local_err = NULL; +

Re: [Qemu-devel] [PATCH v3 3/3] target-i386: load the migrated vcpu's TSC rate

2015-11-05 Thread Haozhong Zhang
On 11/05/15 14:10, Eduardo Habkost wrote: > On Mon, Nov 02, 2015 at 05:26:43PM +0800, Haozhong Zhang wrote: > > Set vcpu's TSC rate to the migrated value if the user does not specify a > > TSC rate by cpu option 'tsc-freq' and a migrated TSC rate does exist. If > > KVM supports TSC scaling, guest p

Re: [Qemu-devel] [PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated

2015-11-05 Thread haozhong . zhang
On 11/05/15 14:05, Eduardo Habkost wrote: > On Thu, Nov 05, 2015 at 09:30:51AM +0800, Haozhong Zhang wrote: > > On 11/04/15 19:42, Eduardo Habkost wrote: > > > On Mon, Nov 02, 2015 at 05:26:42PM +0800, Haozhong Zhang wrote: > > > > The value of the migrated vcpu's TSC rate is determined as below. >

Re: [Qemu-devel] [PULL 12/22] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE

2015-11-05 Thread Yuanhan Liu
On Thu, Nov 05, 2015 at 11:42:15AM +, Peter Maydell wrote: > On 3 October 2015 at 17:33, Michael S. Tsirkin wrote: > > On Fri, Oct 02, 2015 at 06:18:51PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 24/09/2015 15:20, Michael S. Tsirkin wrote: > >> > From: Yuanhan Liu > >> > > >> > Quote from

[Qemu-devel] [PATCH] virtio-blk: trivial code optimization

2015-11-05 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 093e475..752586d 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -409,18 +409,20 @@ void vi

Re: [Qemu-devel] [PATCH v6 3/4] qmp: add monitor command to add/remove a child

2015-11-05 Thread Wen Congyang
On 11/05/2015 09:49 PM, Alberto Garcia wrote: > On Fri 16 Oct 2015 10:57:45 AM CEST, Wen Congyang > wrote: > >> The new QMP command name is x-blockdev-change. It justs for >> adding/removing quorum's child now, and don't support all kinds of >> children, all kinds of operations, nor all block dr

[Qemu-devel] [PATCH v4 1/3] qemu-io: fix cvtnum lval types

2015-11-05 Thread John Snow
cvtnum() returns int64_t: we should not be storing this result inside of an int. In a few cases, we need an extra sprinkling of error handling where we expect to pass this number on towards a function that expects something smaller than int64_t. Reported-by: Max Reitz Signed-off-by: John Snow -

[Qemu-devel] [PATCH v4 3/3] qemu-io: Correct error messages

2015-11-05 Thread John Snow
Reported-by: Max Reitz Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-io-cmds.c | 53 ++--- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 238b1da..3dddae8

[Qemu-devel] [PATCH v4 2/3] qemu-io: Check for trailing chars

2015-11-05 Thread John Snow
Make sure there's not trailing garbage, e.g. "64k-whatever-i-want-here" Reported-by: Max Reitz Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-io-cmds.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.

[Qemu-devel] [PATCH v4 0/3] qemu-io: clean up cvtnum usage

2015-11-05 Thread John Snow
cvtnum returns an int64_t, not an int, so correct the lvalue types wherever it is used. While we're at it, make the error messages more meaningful and hopefully less confusing. v4: - Now missing ALL sweaters v3: - pulled a lot of loose yarn, now missing my sweater (Updated patch 1 even furth

[Qemu-devel] [PATCH v11 12/14] block: add transactional properties

2015-11-05 Thread John Snow
Add both transactional properties to the QMP transactional interface, and add the BlockJobTxn that we create as a result of the err-cancel property to the BlkActionState structure. [split up from a patch originally by Stefan and Fam. --js] Signed-off-by: Stefan Hajnoczi Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v11 13/14] iotests: 124 - transactional failure test

2015-11-05 Thread John Snow
Use a transaction to request an incremental backup across two drives. Coerce one of the jobs to fail, and then re-run the transaction. Verify that no bitmap data was lost due to the partial transaction failure. To support the 'err-cancel' QMP argument name it's necessary for transaction_action()

[Qemu-devel] [PATCH v11 11/14] block: Add BlockJobTxn support to backup_run

2015-11-05 Thread John Snow
Allow a BlockJobTxn to be passed into backup_run, which will allow the job to join a transactional group if present. Propagate this new parameter outward into new QMP helper functions in blockdev.c to allow transaction commands to pass forward their BlockJobTxn object in a forthcoming patch. [spl

[Qemu-devel] [PATCH v11 10/14] block/backup: Rely on commit/abort for cleanup

2015-11-05 Thread John Snow
Switch over to the new .commit/.abort handlers for cleaning up incremental bitmaps. [split up from a patch originally by Stefan and Fam. --js] Signed-off-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Signed-off-by: John Snow Signed-off-by: John Snow --- block/backup.c | 22 ++-

[Qemu-devel] [PATCH v11 09/14] block: Add block job transactions

2015-11-05 Thread John Snow
From: Fam Zheng Sometimes block jobs must execute as a transaction group. Finishing jobs wait until all other jobs are ready to complete successfully. Failure or cancellation of one job cancels the other jobs in the group. Signed-off-by: Stefan Hajnoczi [Rewrite the implementation which is now

[Qemu-devel] [PATCH v11 05/14] blockjob: Introduce reference count and fix reference to job->bs

2015-11-05 Thread John Snow
From: Fam Zheng Add reference count to block job, meanwhile move the ownership of the reference to job->bs from the caller (which is released in two completion callbacks) to the block job itself. It is necessary for block_job_complete_sync to work, because block job shouldn't live longer than its

[Qemu-devel] [PATCH v11 08/14] blockjob: Simplify block_job_finish_sync

2015-11-05 Thread John Snow
From: Fam Zheng With job->completed and job->ret to replace BlockFinishData. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- blockjob.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/blockjob.c b/blockjob.c index bcd7efc..81b268e 100644

[Qemu-devel] [PATCH v11 07/14] blockjob: Add "completed" and "ret" in BlockJob

2015-11-05 Thread John Snow
From: Fam Zheng They are set when block_job_completed is called. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow --- blockjob.c | 3 +++ include/block/blockjob.h | 9 + 2 files changed, 12 insertions(+) diff --git a/bloc

[Qemu-devel] [PATCH v11 03/14] block: rename BlkTransactionState and BdrvActionOps

2015-11-05 Thread John Snow
These structures are misnomers, somewhat. (1) BlockTransactionState is not state for a transaction, but is rather state for a single transaction action. Rename it "BlkActionState" to be more accurate. (2) The BdrvActionOps describes operations for the BlkActionState, above. This name

[Qemu-devel] [PATCH v11 06/14] blockjob: Add .commit and .abort block job actions

2015-11-05 Thread John Snow
From: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Fam Zheng Signed-off-by: John Snow --- include/block/blockjob.h | 20 1 file changed, 20 insertions(+) diff --git a/include/block/blockjob.h b/include/block/blockjob.h index b649a40..ed856d7 10

[Qemu-devel] [PATCH v11 02/14] iotests: add transactional incremental backup test

2015-11-05 Thread John Snow
Test simple usage cases for using transactions to create and synchronize incremental backups. Signed-off-by: John Snow Reviewed-by: Max Reitz Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Fam Zheng --- tests/qemu-iotests/124 | 54 +

[Qemu-devel] [PATCH v11 14/14] tests: add BlockJobTxn unit test

2015-11-05 Thread John Snow
From: Stefan Hajnoczi The BlockJobTxn unit test verifies that both single jobs and pairs of jobs behave as a transaction group. Either all jobs complete successfully or the group is cancelled. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Reviewed-by: John Snow Signed-off-by: Fam Zhe

[Qemu-devel] [PATCH v11 01/14] qapi: Add transaction support to block-dirty-bitmap operations

2015-11-05 Thread John Snow
This adds two qmp commands to transactions. block-dirty-bitmap-add allows you to create a bitmap simultaneously alongside a new full backup to accomplish a clean synchronization point. block-dirty-bitmap-clear allows you to reset a bitmap back to as-if it were new, which can also be used alongsid

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

2015-11-05 Thread John Snow
Welcome to the Incremental Backup Transactions Newsletter! What's new? I replaced the per-action "transactional-cancel" parameter with a per-transaction paremeter named "completion-mode" which is implemented as an enum in case we want to add new behaviors in the future, such as a "jobs only" canc

[Qemu-devel] [PATCH v11 04/14] backup: Extract dirty bitmap handling as a separate function

2015-11-05 Thread John Snow
From: Fam Zheng This will be reused by the coming new transactional completion code. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow --- block/backup.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff -

Re: [Qemu-devel] [PATCH RFC 3/5] qapi: Use common name mangling for enumeration constants

2015-11-05 Thread Eric Blake
On 11/05/2015 09:41 AM, Eric Blake wrote: > In order to (later) support case-insensitive QMP, we need to decide up > front that we will not allow any qapi member names to collide > case-insensitively (outlaw 'a' and 'A' in the same struct; although the > C code is still case-preserving); and now t

[Qemu-devel] [PATCH V4] block/nfs: add support for setting debug level

2015-11-05 Thread Peter Lieven
recent libnfs versions support logging debug messages. Add support for it in qemu through an URL parameter. Example: qemu -cdrom nfs://127.0.0.1/iso/my.iso?debug=2 --- v3->v4: revert to the initial version, but limit max debug level v2->v3: use a per-drive option instead of a global one. [Stefan]

Re: [Qemu-devel] [PATCH v3] iscsi: Translate scsi sense into error code

2015-11-05 Thread Peter Lieven
Am 05.11.2015 um 06:00 schrieb Fam Zheng: > Previously we return -EIO blindly when anything goes wrong. Add a helper > function to parse sense fields and try to make the return code more > meaningful. > > This also fixes the default werror configuration (enospc) when we're > using qcow2 on an iscsi

Re: [Qemu-devel] [PATCH 1/2] io/buffer: allow a buffer to shrink gracefully

2015-11-05 Thread Peter Lieven
Am 03.11.2015 um 11:40 schrieb Gerd Hoffmann: > On Di, 2015-11-03 at 10:01 +0100, Peter Lieven wrote: >> diff --git a/io/buffer.c b/io/buffer.c >> index 0fd3cea..d2a6043 100644 >> --- a/io/buffer.c >> +++ b/io/buffer.c >> @@ -23,6 +23,10 @@ > Needs a rebase (current wip branch is available at > htt

Re: [Qemu-devel] [PATCH 3/3] usb-mtp: add support for basic mtp events

2015-11-05 Thread Bandan Das
Gerd Hoffmann writes: > On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote: >> -.wMaxPacketSize= 8, >> +.wMaxPacketSize= 64, > > This is a guest-visible change, so strictly speaking this needs be tied > to the machine type. I think we can be a bit sloppy h

Re: [Qemu-devel] [PATCH 2/3] usb-mtp: Add support for inotify based file monitoring

2015-11-05 Thread Bandan Das
Gerd Hoffmann writes: >> +#include > > What happens on non-linux systems? > > I guess we need some #ifdefs to not break the build there, or enable mtp > only for CONFIG_LINUX=y instead of CONFIG_POSIX=y. Oh, I had the ifdefs but somehow I confused myself by thinking CONFIG_POSIX is enough not t

Re: [Qemu-devel] [PATCH 1/3] usb-mtp: use a list for keeping track of children

2015-11-05 Thread Bandan Das
Gerd Hoffmann writes: >> static void usb_mtp_object_free(MTPState *s, MTPObject *o) >> { >> -int i; >> +MTPObject *iter; >> + >> +if (o) { >> +trace_usb_mtp_object_free(s->dev.addr, o->handle, o->path); > > That also makes usb_mtp_object_free callable with o == NULL. Makes

Re: [Qemu-devel] [PATCH 1/2] net: netmap: Fix compilation issue

2015-11-05 Thread Vincenzo Maffione
2015-11-05 16:01 GMT+01:00 Eric Blake : > On 11/05/2015 07:52 AM, Vincenzo Maffione wrote: >> No worries. >> >> It needs --enable-netmap (default is --disable-netmap on linux), and >> --extra-cflags=-I/path/to/netmap/sys for netmap API headers. >> >> (netmap code is avaliable here https://github.co

Re: [Qemu-devel] enable-gprof configuration option issue?

2015-11-05 Thread John Snow
On 11/04/2015 11:45 AM, Claudio Fontana wrote: > Hello, > > we are trying to use good old gprof to profile the QEMU process, > and it seems to work when directly passing "-O0 -pg" using --extra-cflags, > while it does not seem to work when using "--enable-gprof". > > The error we get when using

Re: [Qemu-devel] clang -fsanitize=undefined warnings in the string visitors

2015-11-05 Thread John Snow
On 10/01/2015 09:38 AM, Paolo Bonzini wrote: > > > On 01/10/2015 12:47, Peter Maydell wrote: >> On 29 May 2015 at 12:12, Paolo Bonzini wrote: >>> >>> >>> On 29/05/2015 12:56, Peter Maydell wrote: Paolo: ping^2, since we're out of release freeze now? >> >> I have some patches,

Re: [Qemu-devel] [PATCH v9 00/27] alternate layout (post-introspection cleanups, subset C)

2015-11-05 Thread Markus Armbruster
Got through, puh! Most patches are basically fine, but there are a few open questions.

Re: [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread John Snow
On 11/05/2015 02:35 PM, Markus Armbruster wrote: > John Snow writes: > >> On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: >>> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: > On Fri, Oct 23, 2015 at 07:56:50PM -0400, J

[Qemu-devel] [PULL 4/5] target-i386: Remove POPCNT from qemu64 and qemu32 CPU models

2015-11-05 Thread Eduardo Habkost
POPCNT is not available on Penryn and older and on Opteron_G2 and older, and we want to make the default CPU runnable in most hosts, so it won't be enabled by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good me

[Qemu-devel] [PULL 5/5] target-i386: Enable clflushopt/clwb/pcommit instructions

2015-11-05 Thread Eduardo Habkost
From: Xiao Guangrong These instructions are used by NVDIMM drivers and the specification is located at: https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf There instructions are available on Skylake Server. Signed-off-by: Xiao Guangrong Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 3/5] target-i386: Remove ABM from qemu64 CPU model

2015-11-05 Thread Eduardo Habkost
ABM is not available on Sandy Bridge and older, and we want to make the default CPU runnable in most hosts, so it won't be enabled by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good mechanism today to ensure w

[Qemu-devel] [PULL 1/5] target-i386: Set "check=off" by default on pc-*-2.4 and older

2015-11-05 Thread Eduardo Habkost
The default CPU model (qemu64) have some issues today: it enables some features (ABM and SSE4a) that are not present in many host CPUs. That means many hosts (but not all of them) had those features silently disabled in the default configuration in QEMU 2.4 and older. With the new "check=on" defau

[Qemu-devel] [PULL 2/5] target-i386: Remove SSE4a from qemu64 CPU model

2015-11-05 Thread Eduardo Habkost
SSE4a is not available in any Intel CPU, and we want to make the default CPU runnable in most hosts, so it doesn't make sense to enable it by default in KVM mode. We should eventually have all features supported by TCG enabled by default in TCG mode, but as we don't have a good mechanism today to

[Qemu-devel] [PULL 0/5] X86 queue, 2015-11-05

2015-11-05 Thread Eduardo Habkost
The following changes since commit 496c1b19facc7b850fa0c09899fcc07a0702fbfd: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2015-11-05 14:31:24 +) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/x86-pull-request for you to

Re: [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread Markus Armbruster
John Snow writes: > On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: >> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: >>> >>> >>> On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote: > @@ -1732,6 +1757,10 @@ static void >>>

Re: [Qemu-devel] [PATCH v9 25/27] qapi: Add positive tests to qapi-schema-test

2015-11-05 Thread Markus Armbruster
Eric Blake writes: > Add positive tests to qapi-schema-test for things that were > made possible by recent patches but which caused compile errors > due to collisions prior to that point. The focus is mainly on > collisions due to names we have reserved for qapi, even though > it is unlikely tha

Re: [Qemu-devel] [PATCH v9 26/27] qapi: Remove dead visitor code

2015-11-05 Thread Markus Armbruster
Eric Blake writes: > Commit cbc95538 removed unused start_handle() and end_handle(), > but forgot got remove their declarations. > > Commit 4e27e819 introduced optional visitor callbacks for all > sorts of int types, but except for type_uint64 and type_size, > none of them have ever been supplied

Re: [Qemu-devel] [PULL 00/37] Block layer patches

2015-11-05 Thread Peter Maydell
On 5 November 2015 at 18:17, Kevin Wolf wrote: > The following changes since commit 8835b9df3bddf332c883c861d6a1defc12c4ebe9: > > Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-11-04-tag' > into staging (2015-11-05 10:52:35 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread John Snow
On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote: > On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote: >> >> >> On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: >>> On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote: @@ -1732,6 +1757,10 @@ static void block_dirty_bitmap_add_p

Re: [Qemu-devel] virtio-gpu doesn't build if you do a linux-headers update from kvm/next

2015-11-05 Thread Peter Maydell
On 5 November 2015 at 14:58, Paolo Bonzini wrote: > I think the main issue is that right now we have a very long freeze > period. It would be nice to know why (e.g. what kind of bugs are fixed? > are they release blockers only?) and whether a shorter development > period could also lead to a sho

[Qemu-devel] [PULL 33/37] mirror: block all operations on the target image during the job

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia There's nothing preventing the target image from being used by other operations during the 'drive-mirror' job, so we should block them all until the job is done. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 82b88fd04cde918a08a6f9a4ab85626d7fd7b502.1446

[Qemu-devel] [PULL 28/37] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia This addresses scenarios like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename': 'new.qcow2',

Re: [Qemu-devel] [PATCH V3] hw/virtio: Add PCIe capability to virtio devices

2015-11-05 Thread Dr. David Alan Gilbert
* Marcel Apfelbaum (mar...@redhat.com) wrote: > On 11/05/2015 08:22 PM, Dr. David Alan Gilbert wrote: > >* Eduardo Habkost (ehabk...@redhat.com) wrote: > >>On Mon, Nov 02, 2015 at 02:12:32PM +0200, Marcel Apfelbaum wrote: > >>>On 11/02/2015 02:05 PM, Cornelia Huck wrote: > >>[...] > What's the

Re: [Qemu-devel] [PATCH V3] hw/virtio: Add PCIe capability to virtio devices

2015-11-05 Thread Dr. David Alan Gilbert
* Eduardo Habkost (ehabk...@redhat.com) wrote: > On Mon, Nov 02, 2015 at 02:12:32PM +0200, Marcel Apfelbaum wrote: > > On 11/02/2015 02:05 PM, Cornelia Huck wrote: > [...] > > >What's the word on compat machines and new device types, btw.? If we > > >fire up a compat machine, we can still specify d

[Qemu-devel] [PULL 27/37] throttle: Use bs->throttle_state instead of bs->io_limits_enabled

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia There are two ways to check for I/O limits in a BlockDriverState: - bs->throttle_state: if this pointer is not NULL, it means that this BDS is member of a throttling group, its ThrottleTimers structure has been initialized and its I/O limits are ready to be applied. - b

[Qemu-devel] [PATCH 10/16] target-arm: Implement cpu_get_phys_page_asidx_debug

2015-11-05 Thread Peter Maydell
Implement cpu_get_phys_page_asidx_debug instead of cpu_get_phys_page_debug. Signed-off-by: Peter Maydell --- target-arm/cpu-qom.h | 2 +- target-arm/cpu.c | 2 +- target-arm/helper.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/target-arm/cpu-qom.h b/target-arm/cp

Re: [Qemu-devel] virtio-gpu doesn't build if you do a linux-headers update from kvm/next

2015-11-05 Thread Laszlo Ersek
On 11/05/15 19:13, Cornelia Huck wrote: > On Thu, 5 Nov 2015 18:15:04 +0100 > Laszlo Ersek wrote: > >> On 11/05/15 16:11, Peter Maydell wrote: >>> On 5 November 2015 at 14:58, Gerd Hoffmann wrote: On Do, 2015-11-05 at 14:45 +, Peter Maydell wrote: > On 5 November 2015 at 14:42, Gerd

[Qemu-devel] [PULL 25/37] qemu-img: add check for zero-length job len

2015-11-05 Thread Kevin Wolf
From: 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 Reviewed-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by:

Re: [Qemu-devel] [PATCH V3] hw/virtio: Add PCIe capability to virtio devices

2015-11-05 Thread Marcel Apfelbaum
On 11/05/2015 08:22 PM, Dr. David Alan Gilbert wrote: * Eduardo Habkost (ehabk...@redhat.com) wrote: On Mon, Nov 02, 2015 at 02:12:32PM +0200, Marcel Apfelbaum wrote: On 11/02/2015 02:05 PM, Cornelia Huck wrote: [...] What's the word on compat machines and new device types, btw.? If we fire u

[Qemu-devel] [PULL 34/37] block: Add blk_get_refcnt()

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia This function returns the reference count of a given BlockBackend. For convenience, it returns 0 if the BlockBackend pointer is NULL. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: dfdd8a17dbe3288842840636d2cfe5bb895abcb0.1446475331.git.be...@igalia.com

[Qemu-devel] [PULL 23/37] qemu-iotests: Test the reopening of overlay_bs in 'block-commit'

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia The 'block-commit' command needs the overlay image of 'top' to be opened in read-write mode in order to update the backing file string. If 'top' is not the active layer or its backing file then its overlay needs to be reopened during the block job. This is a test case for th

[Qemu-devel] [PULL 31/37] qemu-iotests: fix cleanup of background processes

2015-11-05 Thread Kevin Wolf
From: Jeff Cody 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 via '$!'. We stopped killing qemu and qemu-nbd processes, leaving a lot of orphaned, running qemu processes

[Qemu-devel] [PULL 19/37] block: support passing 'backing': '' to 'blockdev-add'

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia Passing an empty string allows opening an image but not its backing file. This was already described in the API documentation, only the implementation was missing. This is useful for creating snapshots using images opened with blockdev-add, since they are not supposed to hav

[Qemu-devel] [PULL 36/37] iotests: Add tests for the x-blockdev-del command

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia Signed-off-by: Alberto Garcia Message-id: 57c3b0d4d0c73ddadd19e5bded9492c359cc4568.1446475331.git.be...@igalia.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- tests/qemu-iotests/139 | 414 + tests/qemu-iotests/139.o

[Qemu-devel] [PULL 16/37] iotests: Add test for change-related QMP commands

2015-11-05 Thread Kevin Wolf
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/118 | 720 + tests/qemu-iotests/118.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 726 insertions(+) create mode 100755 tests/qemu-iotes

  1   2   3   4   >