Re: [Qemu-devel] [PATCH v3 2/2] i440fx: print an error message if user tries to enable iommu

2015-11-18 Thread Markus Armbruster
Bandan Das writes: > Markus Armbruster writes: > >> Bandan Das writes: >> >>> There's no indication of any sort that i440fx doesn't support >>> "iommu=on" >>> >>> Reviewed-by: Eric Blake >>> Signed-off-by: Bandan Das >>> --- >>> hw/pci-host/piix.c | 5 + >>> 1 file changed, 5 insertions(

Re: [Qemu-devel] [PATCH 3/3] exec: silence hugetlbfs warning under qtest

2015-11-18 Thread Markus Armbruster
Marc-André Lureau writes: > nack, this isn't enough to silence the warning, as vhost-user-test > uses -machine accel=tcg Pity. > On Mon, Nov 16, 2015 at 6:23 PM, wrote: >> From: Marc-André Lureau >> >> vhost-user-test prints a warning. A test should not need to run on >> hugetlbfs, let's si

[Qemu-devel] [PATCH v12 04/36] qapi: Drop obsolete tag value collision assertions

2015-11-18 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 v12 07/36] qapi: Fix up commit 7618b91's clash sanity checking change

2015-11-18 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 v12 10/36] qapi: Simplify QAPISchemaObjectTypeVariants.check()

2015-11-18 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 v12 05/36] qapi: Simplify QAPISchemaObjectTypeMember.check()

2015-11-18 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 v12 06/36] qapi: Clean up after previous commit

2015-11-18 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 v12 03/36] qapi-types: Simplify gen_struct_field[s]

2015-11-18 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 --- v12: no change v11: no change v10: no chang

[Qemu-devel] [PATCH v12 14/36] qapi: Remove outdated tests related to QMP/branch collisions

2015-11-18 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 v12 01/36] qapi: Track simple union tag in object.local_members

2015-11-18 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 v12 08/36] qapi: Eliminate QAPISchemaObjectType.check() variable members

2015-11-18 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 --- v12: no change v11: no change v10: redo closer to Markus' original proposal v

[Qemu-devel] [PATCH v12 02/36] qapi-types: Consolidate gen_struct() and gen_union()

2015-11-18 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 v12 16/36] qapi: Detect collisions in C member names

2015-11-18 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 v12 09/36] qapi: Factor out QAPISchemaObjectTypeMember.check_clash()

2015-11-18 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 v12 13/36] qapi: Hoist tag collision check to Variants.check()

2015-11-18 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 v12 00/36] qapi member collision, alternate layout (post-introspection cleanups, subset D)

2015-11-18 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-cleanupv12d 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 v12 notes: Dela

[Qemu-devel] [PATCH v12 12/36] qapi: Factor out QAPISchemaObjectType.check_clash()

2015-11-18 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 --- v12: no change v11: don't lose isinstance check, and don't hide type.check() inside check_clash() v10: rebase on new Varian

[Qemu-devel] [PATCH v12 23/36] qapi: Remove dead tests for max collision

2015-11-18 Thread Eric Blake
Now that we no longer collide with an implicit _MAX enum member, we no longer need to reject it in the ad hoc parser, and can remove several tests that are no longer needed. Signed-off-by: Eric Blake --- v12: new patch --- scripts/qapi.py| 8 +++- tests/Makefile

[Qemu-devel] [PATCH v12 25/36] qapi: Add alias for ErrorClass

2015-11-18 Thread Eric Blake
The qapi enum ErrorClass is unusual that it uses 'CamelCase' names, contrary to our documented convention of preferring 'lower-case'. However, this enum is entrenched in the API; we cannot change what strings QMP outputs. Meanwhile, we want to simplify how c_enum_const() is used to generate enum c

[Qemu-devel] [PATCH v12 15/36] qapi: Track owner of each object member

2015-11-18 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 v12 32/36] qapi: Inline _make_implicit_tag()

2015-11-18 Thread Eric Blake
Now that alternates no longer use an implicit tag, we can inline _make_implicit_tag() into its one caller of _def_union_type(). No change to generated code. Suggested-by: Markus Armbruster Signed-off-by: Eric Blake --- v12: new patch --- scripts/qapi.py | 9 +++-- 1 file changed, 3 insert

[Qemu-devel] [PATCH v12 11/36] qapi: Check for qapi collisions involving variant members

2015-11-18 Thread Eric Blake
Right now, our ad hoc parser ensures that we cannot have a flat union that introduces any members that would clash with non-variant members inherited from the union's base type (see flat-union-clash-member.json). We want ObjectType.check() to make the same check, so we can later reduce some of the

[Qemu-devel] [PATCH v12 33/36] qapi: Fix alternates that accept 'number' but not 'int'

2015-11-18 Thread Eric Blake
The QMP input visitor allows integral values to be assigned by promotion to a QTYPE_QFLOAT. However, when parsing an alternate, we did not take this into account, such that an alternate that accepts 'number' and some other type, but not 'int', would reject integral values. With this patch, we now

[Qemu-devel] [PATCH v12 18/36] qapi: Remove dead visitor code

2015-11-18 Thread Eric Blake
Commit cbc95538 removed unused start_handle() and end_handle(), but forgot to remove their declarations. Signed-off-by: Eric Blake --- v12 (no v10-11): Split off obvious piece from v9 26/27 v9: no change v8: no change v7: no change v6: no change --- include/qapi/visitor.h | 3 --- 1 file change

[Qemu-devel] [PATCH v12 21/36] qapi: Tighten the regex on valid names

2015-11-18 Thread Eric Blake
We already documented that qapi names should match specific patterns (such as starting with a letter unless it was an enum value or a downstream extension). Tighten that from a suggestion into a hard requirement, which frees up names beginning with a single underscore for qapi internal usage. Als

[Qemu-devel] [PATCH v12 30/36] qapi: Convert QType into qapi builtin enum type

2015-11-18 Thread Eric Blake
What's more meta than using qapi to define qapi? :) Convert QType into a full-fledged[*] builtin qapi enum type, so that a subsequent patch can then use it as the discriminator type of qapi alternate types. Fortunately, the judicious use of 'prefix' in the qapi definition avoids churn to the spel

[Qemu-devel] [PATCH v12 17/36] qapi: Fix c_name() munging

2015-11-18 Thread Eric Blake
The method c_name() is supposed to do two different actions: munge '-' into '_', and add a 'q_' prefix to ticklish names. But it did these steps out of order, making it possible to submit input that is not ticklish until after munging, where the output then lacked the desired prefix. The failure

[Qemu-devel] [PATCH v12 36/36] qapi: Shorter visits of optional fields

2015-11-18 Thread Eric Blake
For less code, reflect the determined boolean value of an optional visit back to the caller instead of making the caller read the boolean after the fact. The resulting generated code has the following diff: |-visit_optional(v, &has_fdset_id, "fdset-id"); |-if (has_fdset_id) { |+if (vi

[Qemu-devel] [PATCH v12 19/36] blkdebug: Merge hand-rolled and qapi BlkdebugEvent enum

2015-11-18 Thread Eric Blake
No need to keep two separate enums, where editing one is likely to forget the other. Now that we can specify a qapi enum prefix, we don't even have to change the bulk of the uses. get_event_by_name() could perhaps be replaced by qapi_enum_parse(), but I left that for another day. CC: Kevin Wolf

[Qemu-devel] [PATCH v12 20/36] blkdebug: Avoid '.' in enum values

2015-11-18 Thread Eric Blake
Our qapi conventions document that '.' should only be used in the prefix of downstream names. BlkdebugEvent was a lone exception to this. Changing this is not backwards compatible to the 'blockdev-add' QMP command; however, that command is not yet fully stable. It can also be argued that the tes

[Qemu-devel] [PATCH v12 24/36] cpu: Convert CpuInfo into flat union

2015-11-18 Thread Eric Blake
The CpuInfo struct is used only by the 'query-cpus' output command, so we are free to modify it by adding fields (clients are already supposed to ignore unknown output fields), or by changing optional members to mandatory, while still keeping QMP wire compatibility with older versions of qemu. Whe

[Qemu-devel] [PATCH v12 26/36] qapi: Change munging of CamelCase enum values

2015-11-18 Thread Eric Blake
When munging enum values, the fact that we were passing the entire prefix + value through camel_to_upper() meant that enum values spelled with CamelCase could be turned into CAMEL_CASE. However, this provides a potential collision (both OneTwo and One-Two would munge into ONE_TWO) for enum types,

[Qemu-devel] [PATCH v12 35/36] qapi: Simplify visits of optional fields

2015-11-18 Thread Eric Blake
None of the visitor callbacks would set an error when testing if an optional field was present; make this part of the interface contract by eliminating the errp argument. The resulting generated code has a nice diff: |-visit_optional(v, &has_fdset_id, "fdset-id", &err); |-if (err) { |-

[Qemu-devel] [PATCH v12 28/36] qapi: Simplify QObject

2015-11-18 Thread Eric Blake
The QObject hierarchy is small enough, and unlikely to grow further (since we only use it to map to JSON and already cover all JSON types), that we can simplify things by not tracking a separate vtable, but just inline all two elements of the vtable QType directly into QObject. We can drop qnull_d

[Qemu-devel] [PATCH v12 22/36] qapi: Don't let implicit enum MAX member collide

2015-11-18 Thread Eric Blake
Now that we guarantee the user doesn't have any enum values beginning with a single underscore, we can use that for our own purposes. Renaming ENUM_MAX to ENUM__MAX makes it obvious that the sentinel is generated. This patch was mostly generated by applying a temporary patch: |diff --git a/scrip

[Qemu-devel] [PATCH] exec: silence hugetlbfs warning under qtest

2015-11-18 Thread marcandre . lureau
From: Marc-André Lureau vhost-user-test prints a warning. A test should not need to run on hugetlbfs, let's silence the warning under qtest. The condition can't check on qtest_enabled() since vhost-user-test actually doesn't use qtest accel. However, qtest_driver() can be used, if qtest_init() is

[Qemu-devel] [PATCH v12 27/36] qapi: Forbid case-insensitive clashes

2015-11-18 Thread Eric Blake
In general, designing user interfaces that rely on case distinction is poor practice. Another benefit of enforcing a restriction against case-insensitive clashes is that we no longer have to worry about the situation of enum values that could be distinguished by case if mapped by c_name(), but whi

[Qemu-devel] [PATCH v12 34/36] qapi: Add positive tests to qapi-schema-test

2015-11-18 Thread Eric Blake
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 that anyone will want to abuse the

[Qemu-devel] [PATCH v12 29/36] qobject: Rename qtype_code to QType

2015-11-18 Thread Eric Blake
The name QType is more in line with our conventions for qapi types, and matches the fact that each enum member has a prefix of QTYPE_. Signed-off-by: Eric Blake --- v12: new patch split off of 21/28 --- block/qapi.c | 4 ++-- include/hw/qdev-core.h | 2 +- include/qapi/qmp/qob

[Qemu-devel] [PATCH v12 31/36] qapi: Simplify visiting of alternate types

2015-11-18 Thread Eric Blake
Previously, working with alternates required two lookup arrays and some indirection: for type Foo, we created Foo_qtypes[] which maps each qtype to a value of the generated FooKind enum, then look up that value in FooKind_lookup[] like we do for other union types. This has a couple of subtle bugs.

Re: [Qemu-devel] [PATCH] vfio/pci-quirks: Only quirk to size of PCI config space

2015-11-18 Thread Laszlo Ersek
On 11/18/15 00:41, Alex Williamson wrote: > For quirks that support the full PCIe extended config space, limit the > quirk to only the size of config space available through vfio. This > allows host systems with broken MMCONFIG regions to still make use of > these quirks without generating bad add

Re: [Qemu-devel] [PATCH 00/14] target-i386: Implement MPX extension

2015-11-18 Thread Richard Henderson
On 11/17/2015 06:43 PM, Paolo Bonzini wrote: Hi Richard, it would be nice to have these patches---or at least the XSAVE support---in 2.6. I also have a PKRU implementation for TCG, but currently I'm only implementing RDPKRU/WRPKRU because I would like to build the XSAVE support on top of your pa

Re: [Qemu-devel] [PATCH v12 11/36] qapi: Check for qapi collisions involving variant members

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > Right now, our ad hoc parser ensures that we cannot have a > flat union that introduces any members that would clash with > non-variant members inherited from the union's base type (see > flat-union-clash-member.json). We want ObjectType.check() to Recommend not to abbrevia

Re: [Qemu-devel] [PATCH] configure: preserve various environment variables in config.status

2015-11-18 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 12:06:55PM -0700, Eric Blake wrote: > On 11/17/2015 10:59 AM, Daniel P. Berrange wrote: > > Suggested in > > > > https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg03298.html > > > > The config.status script is auto-generated by configure upon > > completion. The i

Re: [Qemu-devel] [PATCH v2 2/5] sockets: remove use of QemuOpts from socket_listen

2015-11-18 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 03:22:04PM -0700, Eric Blake wrote: > On 11/17/2015 10:00 AM, Daniel P. Berrange wrote: > > The socket_listen method accepts a QAPI SocketAddress object > > which it then turns into QemuOpts before calling the > > inet_listen_opts/unix_listen_opts helper methods. By > > conv

Re: [Qemu-devel] [PATCH v12 13/36] qapi: Hoist tag collision check to Variants.check()

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > *** WARNING: THE ATTACHED DOCUMENT(S) CONTAIN MACROS *** > *** MACROS MAY CONTAIN MALICIOUS CODE *** > *** Open only if you can verify and trust the sender *** > *** Please contact info...@redhat.com if you have questions or concerns ** Looks like infosec crapped over your c

Re: [Qemu-devel] [PATCH v2 3/5] sockets: remove use of QemuOpts from socket_connect

2015-11-18 Thread Daniel P. Berrange
On Tue, Nov 17, 2015 at 03:40:58PM -0700, Eric Blake wrote: > On 11/17/2015 10:00 AM, Daniel P. Berrange wrote: > > The socket_connect method accepts a QAPI SocketAddress object > > which it then turns into QemuOpts before calling the > > inet_connect_opts/unix_connect_opts helper methods. By > > c

Re: [Qemu-devel] [PATCH 00/14] target-i386: Implement MPX extension

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 10:43, Richard Henderson wrote: >> 1) pester Intel some more so that they disclose the format of the SMM >> state save area; > > They have done so, and relatively well. Section 34.4.1.1 of the > software developer's manual (I'm looking at 325462-055, June 2015). Relatively well u

Re: [Qemu-devel] [PATCH v12 17/36] qapi: Fix c_name() munging

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > *** WARNING: THE ATTACHED DOCUMENT(S) CONTAIN MACROS *** > *** MACROS MAY CONTAIN MALICIOUS CODE *** > *** Open only if you can verify and trust the sender *** > *** Please contact info...@redhat.com if you have questions or concerns ** Another one. > The method c_name() is

Re: [Qemu-devel] [PATCH v12 13/36] qapi: Hoist tag collision check to Variants.check()

2015-11-18 Thread Daniel P. Berrange
On Wed, Nov 18, 2015 at 11:08:58AM +0100, Markus Armbruster wrote: > Eric Blake writes: > > > *** WARNING: THE ATTACHED DOCUMENT(S) CONTAIN MACROS *** > > *** MACROS MAY CONTAIN MALICIOUS CODE *** > > *** Open only if you can verify and trust the sender *** > > *** Please contact info...@redhat.c

Re: [Qemu-devel] [PATCH v12 19/36] blkdebug: Merge hand-rolled and qapi BlkdebugEvent enum

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > No need to keep two separate enums, where editing one is likely > to forget the other. Now that we can specify a qapi enum prefix, > we don't even have to change the bulk of the uses. > > get_event_by_name() could perhaps be replaced by qapi_enum_parse(), > but I left that f

[Qemu-devel] [PATCH v2] configure: preserve various environment variables in config.status

2015-11-18 Thread Daniel P. Berrange
The config.status script is auto-generated by configure upon completion. The intention is that config.status can be later invoked by the developer to re-detect the same environment that configure originally used. The current config.status script, however, only contains a record of the command line

Re: [Qemu-devel] [PATCH 1/2] mirror: Rewrite mirror_iteration

2015-11-18 Thread Paolo Bonzini
On 17/11/2015 12:41, Fam Zheng wrote: > +/* Wait for I/O to this cluster (from a previous iteration) to be > + * done.*/ > +while (test_bit(next_chunk, s->in_flight_bitmap)) { > +trace_mirror_yield_in_flight(s, next_sector, s->in_flight); > +s->wait

Re: [Qemu-devel] [PATCH qemu] spapr: Add /system-id

2015-11-18 Thread David Gibson
On Wed, Nov 18, 2015 at 06:45:39PM +1100, Alexey Kardashevskiy wrote: > On 11/09/2015 07:47 PM, David Gibson wrote: > >On Mon, Nov 09, 2015 at 05:47:17PM +1100, Alexey Kardashevskiy wrote: > >>Section B.6.2.1 Root Node Properties of PAPR specification defines > >>a set of properties which shall be

Re: [Qemu-devel] [PATCH] migration: Add state records for migration incoming

2015-11-18 Thread Juan Quintela
zhanghailiang wrote: > For migration destination, sometimes we need to know its state, > and it is also useful for tracing migration incoming process. > > Here we add a new member 'state' for MigrationIncomingState, > and also use migrate_set_state() to modify its value. > We fix the first paramet

Re: [Qemu-devel] [PATCH v12 22/36] qapi: Don't let implicit enum MAX member collide

2015-11-18 Thread Juan Quintela
Eric Blake wrote: > Now that we guarantee the user doesn't have any enum values > beginning with a single underscore, we can use that for our > own purposes. Renaming ENUM_MAX to ENUM__MAX makes it obvious > that the sentinel is generated. > > This patch was mostly generated by applying a tempora

Re: [Qemu-devel] [PATCH for 2.9 v8 0/10] dataplane snapshot fixes

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: for 2.9? You really plane very well in advance? O:-) As you asked for review from migration side > with test > while /bin/true ; do > virsh snapshot-create rhel7 > sleep 10 > virsh snapshot-delete rhel7 --current > done > with enable

Re: [Qemu-devel] [PATCH 01/11] snapshot: create helper to test that block drivers supports snapshots

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > The patch enforces proper locking for this operation. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Greg Kurz > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 02/11] snapshot: return error code from bdrv_snapshot_delete_by_id_or_name

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > this will make code better in the next patch > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 03/11] snapshot: create bdrv_all_delete_snapshot helper

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > to delete snapshots from all loaded block drivers. > > The patch also ensures proper locking. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf Reviewed-by: Juan Quintela I will still sug

Re: [Qemu-devel] [PATCH 04/11] snapshot: create bdrv_all_goto_snapshot helper

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > to switch to snapshot on all loaded block drivers. > > The patch also ensures proper locking. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Greg Kurz > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf Reviewed-by: Juan Q

Re: [Qemu-devel] [PATCH 05/11] migration: factor our snapshottability check in load_vmstate

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > We should check that all inserted and not read-only images support > snapshotting. This could be made using already invented helper > bdrv_all_can_snapshot(). > > Signed-off-by: Denis V. Lunev Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 07/11] migration: drop find_vmstate_bs check in hmp_delvm

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > There is no much sense to do the check and write warning. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH for 2.9 v8 0/10] dataplane snapshot fixes

2015-11-18 Thread Denis V. Lunev
On 11/18/2015 01:56 PM, Juan Quintela wrote: "Denis V. Lunev" wrote: for 2.9? You really plane very well in advance? O:-) ha-ha :) wrong character replaced. I have planned to switch v8 to v9 but typed 9 instead of 5 2 symbols before... Den

Re: [Qemu-devel] [PATCH 06/11] snapshot: create bdrv_all_find_snapshot helper

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > to check that snapshot is available for all loaded block drivers. > The check bs != bs1 in hmp_info_snapshots is an optimization. The check > for availability of this snapshot will return always true as the list > of snapshots was collected from that image. > > The patch

Re: [Qemu-devel] [PATCH 08/11] snapshot: create bdrv_all_create_snapshot helper

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > to create snapshot for all loaded block drivers. > > The patch also ensures proper locking. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 10/11] migration: implement bdrv_all_find_vmstate_bs helper

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > The patch also ensures proper locking for the operation. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 09/11] migration: reorder processing in hmp_savevm

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > State deletion can be performed on running VM which reduces VM downtime > This approach looks a bit more natural. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH] MAINTAINERS: Update TCG CPU cores section

2015-11-18 Thread Paolo Bonzini
On 13/11/2015 18:57, Peter Crosthwaite wrote: > On Fri, Nov 13, 2015 at 9:53 AM, Paolo Bonzini wrote: >> These are the people that I think have been touching it lately >> or reviewing patches. >> >> Signed-off-by: Paolo Bonzini > > >> --- >> MAINTAINERS | 17 + >> 1 file chan

Re: [Qemu-devel] [kvm-unit-test RFC] x86: Memory instructions test case

2015-11-18 Thread Paolo Bonzini
On 04/11/2015 22:21, Eduardo Habkost wrote: > Quickly hacked test case for memory instructions (clflush, mfence, > sfence, lfence, clflushopt, clwb, pcommit), that simply checks for #UD > exceptions. > > This was useful to test TCG handling of those instructions. > > The "fake clwb" part will p

Re: [Qemu-devel] [PATCH 11/11] migration: normalize locking in migration/savevm.c

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > basically all bdrv_* operations must be called under aio_context_acquire > except ones with bdrv_all prefix. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Fam Zheng > CC: Juan Quintela > CC: Kevin Wolf I will preffer that migration

Re: [Qemu-devel] [PATCH 2/2] add support for KVM_CAP_SPLIT_IRQCHIP

2015-11-18 Thread Paolo Bonzini
On 14/11/2015 00:25, Matt Gingell wrote: > +#define APIC_DELIVERY_MODE_SHIFT 8; > +#define APIC_POLARITY_SHIFT 14; > +#define APIC_TRIG_MODE_SHIFT 15; > + Stray semicolons, fixed and queued for QEMU 2.6. Paolo

Re: [Qemu-devel] [PATCH for 2.9 v8 0/10] dataplane snapshot fixes

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: Hi Kevin, Stefan > with test > while /bin/true ; do > virsh snapshot-create rhel7 > sleep 10 > virsh snapshot-delete rhel7 --current > done > with enabled iothreads on a running VM leads to a lot of troubles: hangs, > asserts, errors. > >

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > This would be useful in the next step when QMP version of this call will > be introduced. > > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Amit Shah > CC: Markus Armbruster > CC: Eric Blake Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 2/5] qmp: create qmp_savevm command

2015-11-18 Thread Juan Quintela
Markus Armbruster wrote: > "Denis V. Lunev" writes: > >> Signed-off-by: Denis V. Lunev >> CC: Juan Quintela >> CC: Amit Shah >> CC: Markus Armbruster >> CC: Eric Blake >> --- >> migration/savevm.c | 5 + >> qapi-schema.json | 13 + >> qmp-commands.hx| 25 +

Re: [Qemu-devel] [PATCH 3/5] qmp: create qmp_delvm command

2015-11-18 Thread Juan Quintela
Markus Armbruster wrote: > "Denis V. Lunev" writes: > >> Signed-off-by: Denis V. Lunev >> CC: Juan Quintela >> CC: Amit Shah >> CC: Markus Armbruster >> CC: Eric Blake >> --- >> migration/savevm.c | 27 ++- >> qapi-schema.json | 13 + >> qmp-commands.hx

Re: [Qemu-devel] [PATCH 3/5] qmp: create qmp_delvm command

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Amit Shah > CC: Markus Armbruster > CC: Eric Blake I agree with the changes, move them to hmp.c as Markus suggests.

Re: [Qemu-devel] [PATCH 5/5] qmp: create QMP implementation of loadvm command

2015-11-18 Thread Juan Quintela
"Denis V. Lunev" wrote: > Signed-off-by: Denis V. Lunev > CC: Juan Quintela > CC: Amit Shah > CC: Markus Armbruster > CC: Eric Blake > --- > migration/savevm.c | 5 + > qapi-schema.json | 13 + > qmp-commands.hx| 23 +++ > 3 files changed, 41 insert

[Qemu-devel] [PATCH v2] vhost-user: ignore qemu-only features

2015-11-18 Thread Michael S. Tsirkin
Some feratures (such as ctrl vq) are supported by qemu without need to communicate with the backend. Drop them from the feature mask so we set them unconditionally. Reported-by: Victor Kaplansky Signed-off-by: Michael S. Tsirkin --- Changes since v1: re-add VIRTIO_NET_F_GUEST_ANNOUNCE, add

[Qemu-devel] [PATCH 0/3] [For 2.5] Migration fixes

2015-11-18 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, These are 3 migration fixes that fix things I messed up. Only the 1st one (set last_sent_block) fixes a problem, the other two fix coverity findings. Dave Dr. David Alan Gilbert (3): Set last_sent_block migration: Dead assignment of current_time Unneed

[Qemu-devel] [PATCH 1/3] Set last_sent_block

2015-11-18 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In a82d593b61054b3dea43 I accidentally removed the setting of last_sent_block, put it back. Symptoms: Multithreaded compression only uses one thread. Migration is a bit less efficient since it won't use 'cont' flags. Signed-off-by: Dr. David Alan Gilbert Fix

[Qemu-devel] [PATCH 2/3] migration: Dead assignment of current_time

2015-11-18 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I set current_time before the postcopy test but never use it; (I think this was from the original version where it was time based). Spotted by coverity, CID 1339208 Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 1 - 1 file changed, 1 deletion(

[Qemu-devel] [PATCH 3/3] Unneeded NULL check

2015-11-18 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The check is unneccesary, we read the value at the start of the thread, use it, and never change it. The value is checked to be non-NULL before thread creation. Spotted by coverity, CID 1339211 Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 2

Re: [Qemu-devel] [PATCH v12 21/36] qapi: Tighten the regex on valid names

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > We already documented that qapi names should match specific > patterns (such as starting with a letter unless it was an enum > value or a downstream extension). Tighten that from a suggestion > into a hard requirement, which frees up names beginning with a > single underscor

Re: [Qemu-devel] [PATCH 1/3] Set last_sent_block

2015-11-18 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > In a82d593b61054b3dea43 I accidentally removed the setting of > last_sent_block, put it back. > > Symptoms: > Multithreaded compression only uses one thread. > Migration is a bit less efficient since it won't use 'con

Re: [Qemu-devel] [PATCH 3/3] Unneeded NULL check

2015-11-18 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > The check is unneccesary, we read the value at the start of the > thread, use it, and never change it. The value is checked to be > non-NULL before thread creation. > > Spotted by coverity, CID 1339211 > > Signed-off-by:

Re: [Qemu-devel] [PATCH 2/3] migration: Dead assignment of current_time

2015-11-18 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > I set current_time before the postcopy test but never use it; > (I think this was from the original version where it was time based). > Spotted by coverity, CID 1339208 > > Signed-off-by: Dr. David Alan Gilbert Reviewed-

Re: [Qemu-devel] [PATCH v12 19/36] blkdebug: Merge hand-rolled and qapi BlkdebugEvent enum

2015-11-18 Thread Kevin Wolf
Am 18.11.2015 um 11:30 hat Markus Armbruster geschrieben: > Eric Blake writes: > > > No need to keep two separate enums, where editing one is likely > > to forget the other. Now that we can specify a qapi enum prefix, > > we don't even have to change the bulk of the uses. > > > > get_event_by_na

Re: [Qemu-devel] [PULL 0/2] X86 fixes, 2015-11-17

2015-11-18 Thread Peter Maydell
On 17 November 2015 at 19:11, Eduardo Habkost wrote: > The following changes since commit 9be060f5278dc0d732ebfcf2bf0a293f88b833eb: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2015-11-17 11:33:38 +) > > are available in the git repository at:

[Qemu-devel] KVM call for November 22th

2015-11-18 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. At the end of Monday I will send an email with the agenda or the cancellation of the call, so hurry up. After discussions on the QEMU Summit, we are going to have always open a KVM call where you can add topics. Call details: By

Re: [Qemu-devel] [PATCH 44/77] pci-bridge: Set a supported devfn_min for bridge

2015-11-18 Thread Paolo Bonzini
On 11/11/2015 01:27, Benjamin Herrenschmidt wrote: > if (bridge_dev->flags & (1 << PCI_BRIDGE_DEV_F_SHPC_REQ)) { > +/* SHCP gets upset if we try to use slot 0 */ > +br->sec_bus.devfn_min = PCI_FUNC_MAX; > dev->config[PCI_INTERRUPT_PIN] = 0x1; > memory_region

Re: [Qemu-devel] [PATCH 45/77] qdev: Add a hook for a bus to device if it can add devices

2015-11-18 Thread Paolo Bonzini
On 11/11/2015 01:27, Benjamin Herrenschmidt wrote: > This allows a bus class to tell whether a given bus has room for > any new device. max_dev isn't sufficient as the rules can depend > on some arguments or can differ between instances of a bus. This > will be used by PCI in subsequent patches >

Re: [Qemu-devel] [PATCH 46/77] pci: Use the new pci_can_add_device() to enforce devfn_min/max

2015-11-18 Thread Paolo Bonzini
On 11/11/2015 01:27, Benjamin Herrenschmidt wrote: > This adds a devfn_max field to PCIBus and adds a pci_can_add_device() > function which, if no "addr" (aka devfn) is specified, will tell whether > there is any slot free between devfn_min and devfn_max. > > This will be used by some PCI root c

Re: [Qemu-devel] [PATCH for-2.5 44/77] pci-bridge: Set a supported devfn_min for bridge

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 13:31, Paolo Bonzini wrote: > > > On 11/11/2015 01:27, Benjamin Herrenschmidt wrote: >> if (bridge_dev->flags & (1 << PCI_BRIDGE_DEV_F_SHPC_REQ)) { >> +/* SHCP gets upset if we try to use slot 0 */ >> +br->sec_bus.devfn_min = PCI_FUNC_MAX; >> dev->confi

Re: [Qemu-devel] [PULL 0/6] Ide patches

2015-11-18 Thread Peter Maydell
On 17 November 2015 at 20:12, John Snow wrote: > The following changes since commit c27e9014d56fa4880e7d741275d887c3a5949997: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into > staging (2015-11-17 12:34:07 +) > > are available in the git repository at: > > h

Re: [Qemu-devel] [PATCH v4 4/4] devicetree: update documentation for fw_cfg ARM bindings

2015-11-18 Thread François Revol
On 17/11/2015 23:14, Rob Herring wrote: > On Mon, Nov 16, 2015 at 2:38 AM, Paolo Bonzini wrote: >> >> >> On 15/11/2015 03:07, Rob Herring wrote: >>> We generally don't want DT docs to depend on other kernel documentation. >> >> DT docs do not contain a copy of the data sheets, either. There is no

Re: [Qemu-devel] [PATCH v12 22/36] qapi: Don't let implicit enum MAX member collide

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > Now that we guarantee the user doesn't have any enum values > beginning with a single underscore, we can use that for our > own purposes. Renaming ENUM_MAX to ENUM__MAX makes it obvious > that the sentinel is generated. The ENUM__MAX are mildly ugly. If we cared, we could

Re: [Qemu-devel] [PATCH v2] target-mips: Fix exceptions while UX=0

2015-11-18 Thread Leon Alrae
On 17/11/15 17:13, James Hogan wrote: > Commit 01f728857941 ("target-mips: Status.UX/SX/KX enable 32-bit address > wrapping") added a new hflag MIPS_HFLAG_AWRAP, which indicates that > 64-bit addressing is disallowed in the current mode, so hflag users > don't need to worry about the complexities o

Re: [Qemu-devel] [PULL v2 for-2.5 0/3] qemu-ga patch queue for 2.5

2015-11-18 Thread Peter Maydell
On 17 November 2015 at 23:06, Michael Roth wrote: > The following changes since commit c27e9014d56fa4880e7d741275d887c3a5949997: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20151116-1' into > staging (2015-11-17 12:34:07 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v12 26/36] qapi: Change munging of CamelCase enum values

2015-11-18 Thread Markus Armbruster
Eric Blake writes: > When munging enum values, the fact that we were passing the entire > prefix + value through camel_to_upper() meant that enum values > spelled with CamelCase could be turned into CAMEL_CASE. However, > this provides a potential collision (both OneTwo and One-Two would > munge

  1   2   3   4   >