Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Dan Williams
On Mon, Oct 12, 2015 at 10:49 PM, Xiao Guangrong wrote: > > > On 10/13/2015 11:38 AM, Dan Williams wrote: >> >> On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong >> wrote: >>> >>> On 10/13/2015 12:36 AM, Dan Williams wrote: Static namespaces can be emitted without a label. Linux needs th

Re: [Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 01:42 PM, Michael S. Tsirkin wrote: On Tue, Oct 13, 2015 at 01:13:18PM +0800, Xiao Guangrong wrote: #endif This header is too small to be worth it. nvdimm_get_built_list seems to be the only interface - just stick it in the header you have under include. Other functions

Re: [Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Michael S. Tsirkin
On Tue, Oct 13, 2015 at 01:17:20PM +0800, Xiao Guangrong wrote: > >Would it worth including / copying the ACPICA header files directly? > > > >https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/acpi/actbl1.h > >https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 01:57 PM, Michael S. Tsirkin wrote: On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote: On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: Changelog in v3: There is huge change in this version, thank I

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Michael S. Tsirkin
On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote: > > > On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: > >On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: > >>Changelog in v3: > >>There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, > >>Michael

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 11:38 AM, Dan Williams wrote: On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong wrote: On 10/13/2015 12:36 AM, Dan Williams wrote: Static namespaces can be emitted without a label. Linux needs this to support existing "label-less" bare metal NVDIMMs. This is Linux specific? A

Re: [Qemu-devel] [PATCH v7 4/5] block: add a 'blockdev-snapshot' QMP command

2015-10-12 Thread Alberto Garcia
On Mon 12 Oct 2015 10:29:35 PM CEST, Max Reitz wrote: >> -if (has_snapshot_node_name && >> -bdrv_lookup_bs(snapshot_node_name, snapshot_node_name, NULL)) { >> -error_setg(errp, "New snapshot node name already in use"); > > There's a difference from v6 here... [...] >> -opti

Re: [Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Michael S. Tsirkin
On Tue, Oct 13, 2015 at 01:13:18PM +0800, Xiao Guangrong wrote: > > > >> #endif > > > >This header is too small to be worth it. > >nvdimm_get_built_list seems to be the only interface - > >just stick it in the header you have under include. > > > > Other functions are introudced and included into

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: Changelog in v3: There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, Michael for their valuable comments, the patchset finally gets better shape. Thanks! Th

Re: [Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 12:40 AM, Dan Williams wrote: On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM region info - M

Re: [Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 07:27 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:55AM +0800, Xiao Guangrong wrote: NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM re

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

2015-10-12 Thread Peter Crosthwaite
On Mon, Oct 12, 2015 at 1:41 PM, Beniamino Galvani wrote: > On Sun, Oct 11, 2015 at 09:21:32AM -0700, Peter Crosthwaite wrote: >> Hi John and Beniamino, >> >> This patch series adds bear-minimum Allwinner SATA support. > > Hi Peter, > > can you suggest a qemu command line to test this? > -drive f

Re: [Qemu-devel] [RFC 3/4] ahci: Add allwinner AHCI

2015-10-12 Thread Peter Crosthwaite
On Mon, Oct 12, 2015 at 4:09 PM, John Snow wrote: > Is there any spec or documentation I can cross-reference this against? > Not that I know of. I am running off a combination of experiments (looking at messages from P1) and the Linux driver source. > I gather this exists within the vendor-speci

Re: [Qemu-devel] [RFC 4/4] arm: allwinner-a10: Add SATA

2015-10-12 Thread Peter Crosthwaite
On Mon, Oct 12, 2015 at 3:32 PM, John Snow wrote: > > > On 10/11/2015 12:21 PM, Peter Crosthwaite wrote: >> Add the Allwinner A10 AHCI controller module to the SoC. >> >> Signed-off-by: Peter Crosthwaite >> --- >> hw/arm/allwinner-a10.c | 11 +++ >> include/hw/arm/allwinner-a10.h

[Qemu-devel] [PATCH v8 14/18] qapi: Detect collisions in C member names

2015-10-12 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 some of the check() methods. This fixes two previously-broken tests, and the resulting erro

[Qemu-devel] [PATCH v8 10/18] qapi: Move union tag quirks into subclass

2015-10-12 Thread Eric Blake
Right now, simple unions have a quirk of using 'kind' in the C struct to match the QMP wire name 'type'. This has resulted in messy clients each doing special cases. While we plan to eventually rename things to match, it is better in the meantime to consolidate the quirks into a special subclass,

[Qemu-devel] [PATCH v8 12/18] qapi: Track location that created an implicit type

2015-10-12 Thread Eric Blake
A future patch will move some error checking from the parser to the various QAPISchema*.check() methods, which run only after parsing completes. It will thus be possible to create a python instance representing an implicit QAPI type that parses fine but will fail validation during check(). Since

[Qemu-devel] [PATCH v8 15/18] qapi: Move duplicate member checks to schema check()

2015-10-12 Thread Eric Blake
With the previous commit, we have two different locations for detecting member name clashes - one at parse time, and another at QAPISchema*.check() time. Consolidate some of the checks into a single place, which is also in line with our TODO to eventually move all of the parse time semantic checki

[Qemu-devel] [PATCH v8 11/18] qapi: Simplify gen_struct_field()

2015-10-12 Thread Eric Blake
Rather than having all callers pass a name, type, and optional flag, have them instead pass a QAPISchemaObjectTypeMember which already has all that information. This will allow a future patch to simplify alternates to use a special tag 'qtype_code type'. In the meantime, it requires a hack to cre

[Qemu-devel] [PATCH v8 13/18] qapi: Track owner of each object member

2015-10-12 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 v8 00/18] post-introspection cleanups, subset B

2015-10-12 Thread Eric Blake
Pending prerequisite: Markus' qapi-next branch (which has my subset A patches): git://repo.or.cz/qemu/armbru.git pull-qapi-2015-10-12 https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg02796.html Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanup

[Qemu-devel] [PATCH v8 09/18] qapi: Create simple union type member earlier

2015-10-12 Thread Eric Blake
For simple unions, we were creating the implicit 'type' tag member during the QAPISchemaObjectTypeVariants constructor. This is different from every other implicit QAPISchemaEntity object, which get created by QAPISchema methods. Hoist the creation to the caller (renaming _make_tag_enum() to _make

[Qemu-devel] [PATCH v8 07/18] qapi: Don't use info as witness of implicit object type

2015-10-12 Thread Eric Blake
A future patch will enable error reporting from the various QAPISchema*.check() methods. But to report an error related to an implicit type, we'll need to associate a location with the type (the same location as the top-level entity that is causing the creation of the implicit type), and once we d

[Qemu-devel] [PATCH v8 01/18] qapi: Use predicate callback to determine visit filtering

2015-10-12 Thread Eric Blake
Previously, qapi-types and qapi-visit filtered out implicit objects during visit_object_type() by using 'info' (works since implicit objects do not [yet] have associated info); meanwhile qapi-introspect filtered out all schema types on the first pass by returning a python type from visit_begin(), w

[Qemu-devel] [PATCH v8 05/18] qapi: Drop redundant returns-int test

2015-10-12 Thread Eric Blake
qapi-schema-test was already testing that we could have a command returning int, but burned a command name in the whitelist. Merge the redundant positive test returns-int, and pick a name that reduces the whitelist size. Signed-off-by: Eric Blake --- v8: (no v7) hoist from subset C into B v6: ne

[Qemu-devel] [PATCH v8 02/18] qapi: Prepare for errors during check()

2015-10-12 Thread Eric Blake
The next few patches will start migrating error checking from ad hoc parse methods into the QAPISchema*.check() methods. But for an error message to display, we first have to fix the overall 'try' to catch those errors. We also want to enable a few more assertions, such as making sure every attem

[Qemu-devel] [PATCH v8 18/18] qapi: Detect base class loops

2015-10-12 Thread Eric Blake
It should be fairly obvious that qapi base classes need to form an acyclic graph, since QMP cannot specify the same key more than once, while base classes are included as flat members alongside other members added by the child. But the old check_member_clash() parser function was not prepared to c

[Qemu-devel] [PATCH v8 16/18] qapi: Move duplicate enum value checks to schema check()

2015-10-12 Thread Eric Blake
Similar to the previous commit, move the detection of a collision in enum values from parse time to QAPISchemaEnumType.check(). This happens to also detect collisions in union branch names, so for a decent error message, we have to determine if the enum is implicit (and if so where the real collisi

[Qemu-devel] [PATCH v8 04/18] qapi: Move empty-enum to compile-time test

2015-10-12 Thread Eric Blake
Rather than just asserting that we can parse an empty enum, let's also make sure we can compile it, by including it in qapi-schema-test. Signed-off-by: Eric Blake --- v8: (no v7) hoist from subset C into B v6: new patch; could be hoisted earlier alongside subset B v7 3/14 --- tests/Makefile

[Qemu-devel] [PATCH v8 08/18] qapi: Lazy creation of array types

2015-10-12 Thread Eric Blake
Commit ac88219a had several TODO markers about whether we needed to automatically create the corresponding array type alongside any other type. It turns out that most of the time, we don't! As part of lazy creation of array types, this patch now assigns an 'info' to array types at their point of

[Qemu-devel] [PATCH v8 17/18] qapi: Add test for alternate branch 'kind' clash

2015-10-12 Thread Eric Blake
Rename alternate-clash to alternate-clash-members, and add a new test alternate-clash-type. While similar to the earlier addition of union-clash-type, we have one major difference: a future patch will be simplifying alternates to not need an implict AlternateKind enum, but we still need to detect

[Qemu-devel] [PATCH v8 03/18] qapi: Drop redundant alternate-good test

2015-10-12 Thread Eric Blake
The alternate-good.json test was already covered by qapi-schema-test.json. As future commits will be tweaking how alternates are laid out, removing the duplicate test now reduces churn. Signed-off-by: Eric Blake --- v8: no change v7: new patch --- tests/Makefile| 1 -

[Qemu-devel] [PATCH v8 06/18] qapi: Drop redundant flat-union-reverse-define test

2015-10-12 Thread Eric Blake
As of commit 8c3f8e77, we test compilation of forward references for a struct base type (UserDefOne), flat union base type (UserDefUnionBase), and flat union branch type (UserDefFlatUnion2). The only remaining forward reference being tested for parsing in flat-union-reverse-define was a forward enu

Re: [Qemu-devel] [PATCH v7 11/14] qapi: Move duplicate member checks to schema check()

2015-10-12 Thread Eric Blake
On 10/12/2015 10:22 AM, Eric Blake wrote: > >>> +def check(self, schema, info, tag_type, seen, flat): >>> QAPISchemaObjectTypeMember.check(self, schema, info, [], seen) seen gets modified here... >>> assert self.name in tag_type.values >>> +if flat: >>> +

Re: [Qemu-devel] [PATCH 5/5] qga: guest-exec simple stdin/stdout/stderr redirection

2015-10-12 Thread Michael Roth
Quoting Denis V. Lunev (2015-10-07 05:32:21) > From: Yuri Pudgorodskiy > > Implemented with base64-encoded strings in qga json protocol. > Glib portable GIOChannel is used for data I/O. > > Optinal stdin parameter of guest-exec command is now used as > stdin content for spawned subprocess. > >

Re: [Qemu-devel] [PATCH v3 14/32] pc-dimm: drop the prefix of pc-dimm

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 12:43 AM, Eric Blake wrote: On 10/10/2015 09:52 PM, Xiao Guangrong wrote: This patch is generated by this script: find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ | xargs sed -i "s/PC_DIMM/DIMM/g" find ./ -name "*.[ch]" -o -name "*.json" -o -name "trac

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

2015-10-12 Thread Xiao Guangrong
On 10/12/2015 06:08 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:40AM +0800, Xiao Guangrong wrote: Currently file_ram_alloc() is designed for hugetlbfs, however, the memory of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file locates at DAX enabled filesyste

Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-12 Thread Xiao Guangrong
On 10/13/2015 12:36 AM, Dan Williams wrote: On Sun, Oct 11, 2015 at 9:33 PM, Xiao Guangrong wrote: On 10/11/2015 05:17 AM, Dan Williams wrote: On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: [..] == Test == In host 1) create memory backed file, e.g # dd if=zero of=/tmp/n

Re: [Qemu-devel] [PATCH v3 07/16] block: Convert bs->backing_hd to BdrvChild

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:32PM +0200, Kevin Wolf wrote: > This is the final step in converting all of the BlockDriverState > pointers that block drivers use to BdrvChild. > > After this patch, bs->children contains the full list of child nodes > that are referenced by a given BDS, and these ch

Re: [Qemu-devel] [PATCH v3 06/16] block: Remove bdrv_open_image()

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:31PM +0200, Kevin Wolf wrote: > It is unused now. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Fam Zheng > --- > block.c | 34 -- > include/block/block.h | 4 ---

Re: [Qemu-devel] [PATCH v3 05/16] block: Convert bs->file to BdrvChild

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:30PM +0200, Kevin Wolf wrote: > This patch removes the temporary duplication between bs->file and > bs->file_child by converting everything to BdrvChild. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH] block: qemu-iotests - fix vmdk test 059.out

2015-10-12 Thread Fam Zheng
On Mon, 10/12 20:18, Jeff Cody wrote: > In commit fe646693acc13ac48b98435d14149ab04dc597bc, the option > printout format changed. > > This updates the VMDK test 059.out to the correct output. > > Signed-off-by: Jeff Cody > --- > tests/qemu-iotests/059.out | 12 ++-- > 1 file changed, 6

Re: [Qemu-devel] [PATCH v3 04/16] quorum: Convert to BdrvChild

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:29PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Fam Zheng > --- > block/quorum.c | 65 > ++ > 1 file changed, 34 insertions(+),

Re: [Qemu-devel] [PATCH v3 03/16] blkverify: Convert s->test_file to BdrvChild

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:28PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Fam Zheng > --- > block/blkverify.c | 41 + > 1 file changed, 21 insertions(+), 20 deletions(-)

[Qemu-devel] [Bug 1465935] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed

2015-10-12 Thread Li Chengyuan
@Stefan Bader, The host OS is ubuntu 12.04, and we upgraded the QEMU to 2.0.0 from ubuntu cloud-archive repo. https://wiki.ubuntu.com/ServerTeam/CloudArchive -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/

Re: [Qemu-devel] [PATCH v3 02/16] vmdk: Use BdrvChild instead of BDS for references to extents

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:27PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia > Reviewed-by: Fam Zheng > --- > block/vmdk.c | 99 > +++- > 1 file changed, 51 insertions(+),

Re: [Qemu-devel] [PATCH v3 01/16] block: Introduce BDS.file_child

2015-10-12 Thread Jeff Cody
On Fri, Oct 09, 2015 at 02:15:26PM +0200, Kevin Wolf wrote: > Store the BdrvChild for bs->file. At this point, bs->file_child->bs just > duplicates the bs->file pointer. Later, it will completely replace it. > > Signed-off-by: Kevin Wolf > Reviewed-by: Max Reitz > Reviewed-by: Alberto Garcia >

[Qemu-devel] [PATCH] block: qemu-iotests - fix vmdk test 059.out

2015-10-12 Thread Jeff Cody
In commit fe646693acc13ac48b98435d14149ab04dc597bc, the option printout format changed. This updates the VMDK test 059.out to the correct output. Signed-off-by: Jeff Cody --- tests/qemu-iotests/059.out | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/qemu-i

Re: [Qemu-devel] [PULL 04/26] target-*: Introduce and use cpu_breakpoint_test

2015-10-12 Thread Richard Henderson
On 10/10/2015 12:34 AM, Sergey Fedorov wrote: @@ -2936,6 +2927,10 @@ static inline void gen_intermediate_code_internal(AlphaCPU *cpu, tcg_gen_insn_start(ctx.pc); num_insns++; +if (unlikely(cpu_breakpoint_test(cs, ctx.pc, BP_ANY))) { +gen_excp(&ctx, EXCP_D

[Qemu-devel] [PATCH v3 4/4] qemu-iotests: update tests for generated node-names

2015-10-12 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/041 | 4 ++-- tests/qemu-iotests/051 | 3 ++- tests/qemu-iotests/051.out | 2 +- tests/qemu-iotests/067 | 3 ++- tests/qemu-iotests/067.out | 5 + tests/qemu-iotests/081 | 3 ++- tests/qemu-iotests/081.out | 2 +- 7 files changed

[Qemu-devel] [PATCH v3 2/4] block: auto-generated node-names

2015-10-12 Thread Jeff Cody
If a node-name is not specified, automatically generate the node-name. Generated node-names will use the "block" sub-system identifier. Reviewed-by: Eric Blake Reviewed-by: John Snow Signed-off-by: Jeff Cody --- block.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-

[Qemu-devel] [PATCH v3 3/4] block: add filter for generated node-names

2015-10-12 Thread Jeff Cody
Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.filter | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index d6d05de..cfdb633 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@

[Qemu-devel] [PATCH v3 1/4] util - add automated ID generation utility

2015-10-12 Thread Jeff Cody
Multiple sub-systems in QEMU may find it useful to generate IDs for objects that a user may reference via QMP or HMP. This patch presents a standardized way to do it, so that automatic ID generation follows the same rules. This patch enforces the following rules when generating an ID: 1.) Guaran

[Qemu-devel] [PATCH v3 0/4]

2015-10-12 Thread Jeff Cody
Changes from v2: Patch 1: Fixed prototype for id_generate() (thanks Alberto) Used *const instead of * const (thanks Eric, Markus) Updated function comment (thanks Markus) Made random in range 0-99 instead of 0-98 (thanks, Marksu) Patch 2: Cleaned

Re: [Qemu-devel] [RFC 3/4] ahci: Add allwinner AHCI

2015-10-12 Thread John Snow
Is there any spec or documentation I can cross-reference this against? I gather this exists within the vendor-specific reserved region from 0xA0 to 0xFF just prior to the port registers, so this all /looks/ like it's right, I just don't have any way to verify it. On 10/11/2015 12:21 PM, Peter Cro

Re: [Qemu-devel] [PATCH v2] README: fill out some useful quickstart information

2015-10-12 Thread John Snow
On 10/12/2015 01:41 PM, Daniel P. Berrange wrote: > The README file is usually the first thing consulted when a user > or developer obtains a copy of the QEMU source. The current QEMU > README is lacking immediately useful information and so not very > friendly for first time encounters. It eithe

Re: [Qemu-devel] [RFC 4/4] arm: allwinner-a10: Add SATA

2015-10-12 Thread John Snow
On 10/11/2015 12:21 PM, Peter Crosthwaite wrote: > Add the Allwinner A10 AHCI controller module to the SoC. > > Signed-off-by: Peter Crosthwaite > --- > hw/arm/allwinner-a10.c | 11 +++ > include/hw/arm/allwinner-a10.h | 5 + > 2 files changed, 16 insertions(+) > > diff -

Re: [Qemu-devel] [PATCH v3] arm_mptimer: Convert to use ptimer

2015-10-12 Thread Dmitry Osipenko
I referred to https://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg00279.html in V3, but probably it was a different issue. Anyway, I tested VExpress SMP with 4.3 linux kernel and it doesn't work without V3 fix and with old TimerBlock variant. -- Dmitry

Re: [Qemu-devel] [PATCH] target-i386: fix pcmpxstrx equal-ordered (strstr) mode

2015-10-12 Thread Richard Henderson
On 10/12/2015 08:50 PM, Paolo Bonzini wrote: In this mode, referring an invalid element of the source forces the result to false (table 4-7, last column) but referring an invalid element of the destination forces the result to true, so the outer loop should still be run even if some elements of t

[Qemu-devel] [PATCH v3] arm_mptimer: Convert to use ptimer

2015-10-12 Thread Dmitry Osipenko
Current ARM MPTimer implementation uses QEMUTimer for the actual timer, this implementation isn't complete and mostly tries to duplicate of what generic ptimer is already doing fine. Conversion to ptimer brings the following benefits and fixes: - Simple timer pausing implementation

[Qemu-devel] [PATCH 1/3] tcg/ppc: Adjust exit_tb for change in prologue placement

2015-10-12 Thread Richard Henderson
Changing the prologue to the beginning of the code_gen_buffer changes the direction of the "return" branch. Need to change the logic to match. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tcg/ppc/tcg-tar

[Qemu-devel] [PATCH 0/3] powerpc tcg backend improvements

2015-10-12 Thread Richard Henderson
I happened to notice the ppc backend had a dependency on the placement of the prologue, which has just changed. There is a 32 byte window at code_gen_buffer + 16MB where we might do the wrong thing. The second patch reduces the code size reserved for performing goto_tb from 7 insns to 4. We prob

[Qemu-devel] [PATCH 3/3] tcg/ppc: Prefer mask over andi.

2015-10-12 Thread Richard Henderson
Prefer the instruction that isn't required to modify cr0. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index cee13e0..2c72565 100644 --- a/tcg/ppc/t

[Qemu-devel] [PATCH 2/3] tcg/ppc: Revise goto_tb implementation

2015-10-12 Thread Richard Henderson
Restrict the size of code_gen_buffer to 2GB on ppc64, which lets us assert that everything is reachable with addis+addi from tb_ret_addr. This lets us use a max of 4 insns for goto_tb instead of 7. Emit the indirect branch portion of goto_tb up front, which means we only have to update two insns

Re: [Qemu-devel] [PATCH] hw/arm/virt: Allow zero address for PCI IO space

2015-10-12 Thread Peter Maydell
On 12 October 2015 at 21:55, Alexander Gordeev wrote: > Currently PCI IO address 0 is not allowed even though > the IO space starts from 0. As result, PCI IO is not > possible to use at all. I don't see any reason for us not to allow 0 IO addresses, but I'm not sure how your your conclusion follo

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

2015-10-12 Thread Beniamino Galvani
On Sun, Oct 11, 2015 at 09:21:32AM -0700, Peter Crosthwaite wrote: > Hi John and Beniamino, > > This patch series adds bear-minimum Allwinner SATA support. Hi Peter, can you suggest a qemu command line to test this? Beniamino

Re: [Qemu-devel] [PATCH v7 4/5] block: add a 'blockdev-snapshot' QMP command

2015-10-12 Thread Max Reitz
On 12.10.2015 11:16, Alberto Garcia wrote: > One of the limitations of the 'blockdev-snapshot-sync' command is that > it does not allow passing BlockdevOptions to the newly created > snapshots, so they are always opened using the default values. > > Extending the command to allow passing options i

[Qemu-devel] [PATCH v6 39/39] iotests: Add test for change-related QMP commands

2015-10-12 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/118 | 638 + tests/qemu-iotests/118.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 644 insertions(+) create mode 100755 tests/qemu-iotests/118 create mode

[Qemu-devel] [PATCH v6 38/39] hmp: Add read-only-mode option to change command

2015-10-12 Thread Max Reitz
Expose the new read-only-mode option of 'blockdev-change-medium' for the 'change' HMP command. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- hmp-commands.hx | 20 +--- hmp.c | 22 +- 2 files changed, 38 insertions(+), 4 deletions(-) diff --g

[Qemu-devel] [PATCH v6 35/39] qmp: Introduce blockdev-change-medium

2015-10-12 Thread Max Reitz
Introduce a new QMP command 'blockdev-change-medium' which is intended to replace the 'change' command for block devices. The existing function qmp_change_blockdev() is accordingly renamed to qmp_blockdev_change_medium(). Signed-off-by: Max Reitz --- blockdev.c| 7 --- inclu

[Qemu-devel] [PATCH v6 34/39] block: Inquire tray state before tray-moved events

2015-10-12 Thread Max Reitz
blk_dev_change_media_cb() is called for all potential tray movements; however, it is possible to request closing the tray but nothing actually happening (on a floppy disk drive without a medium). Thus, the actual tray status should be inquired before sending a tray-moved event (and an event should

[Qemu-devel] [PATCH v6 30/39] blockdev: Add blockdev-remove-medium

2015-10-12 Thread Max Reitz
Signed-off-by: Max Reitz --- blockdev.c | 30 ++ qapi/block-core.json | 15 +++ qmp-commands.hx | 45 + 3 files changed, 90 insertions(+) diff --git a/blockdev.c b/blockdev.c index a4ce1df..6d0a5eb

[Qemu-devel] [PATCH] Limit memory r/w length to buffer size

2015-10-12 Thread P J P
Hello, An OOB r/w access issue was reported by Mr Gerben Lubbe(CC'd here). The GDB(1) stub protocol supports commands 'm/M' to read & write 'len' bytes from/to the stub memory area. In that, the 'len' parameter value supplied by the host gdb(1) is not validated against the local buffer size

Re: [Qemu-devel] [PATCH v7 1/5] block: check for existing device IDs in external_snapshot_prepare()

2015-10-12 Thread Max Reitz
On 12.10.2015 11:16, Alberto Garcia wrote: > The 'snapshot-node-name' parameter of blockdev-snapshot-sync allows > setting the node name of the image that is going to be created. > > Before creating the image, external_snapshot_prepare() checks that the > name is not already being used. The check

[Qemu-devel] [PATCH v6 29/39] blockdev: Add blockdev-close-tray

2015-10-12 Thread Max Reitz
Signed-off-by: Max Reitz --- blockdev.c | 23 +++ qapi/block-core.json | 16 qmp-commands.hx | 35 +++ 3 files changed, 74 insertions(+) diff --git a/blockdev.c b/blockdev.c index b90b1d6..a4ce1df 100644 --- a/bl

[Qemu-devel] [PATCH v6 28/39] blockdev: Add blockdev-open-tray

2015-10-12 Thread Max Reitz
Signed-off-by: Max Reitz --- blockdev.c | 49 + qapi/block-core.json | 23 +++ qmp-commands.hx | 39 +++ 3 files changed, 111 insertions(+) diff --git a/blockdev.c b/blockdev.c

[Qemu-devel] [PATCH v6 36/39] hmp: Use blockdev-change-medium for change command

2015-10-12 Thread Max Reitz
Use separate code paths for the two overloaded functions of the 'change' HMP command, and invoke the 'blockdev-change-medium' QMP command if used on a block device (by calling qmp_blockdev_change_medium()). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- hmp.c | 27 +++-

[Qemu-devel] [PATCH v6 26/39] blockdev: Allow more options for BB-less BDS tree

2015-10-12 Thread Max Reitz
Most of the options which blockdev_init() parses for both the BlockBackend and the root BDS are valid for just the root BDS as well (e.g. read-only). This patch allows specifying these options even if not creating a BlockBackend. Signed-off-by: Max Reitz --- blockdev.c | 160

[Qemu-devel] [PATCH v6 32/39] blockdev: Implement eject with basic operations

2015-10-12 Thread Max Reitz
Implement 'eject' by calling blockdev-open-tray and blockdev-remove-medium. Signed-off-by: Max Reitz --- blockdev.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 706e7e1..ff3b353 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1952,16

[Qemu-devel] [PATCH v6 16/39] block: Move I/O status and error actions into BB

2015-10-12 Thread Max Reitz
These options are only relevant for the user of a whole BDS tree (like a guest device or a block job) and should thus be moved into the BlockBackend. Signed-off-by: Max Reitz --- block.c| 125 - block/backup.c | 17

[Qemu-devel] [PATCH v6 37/39] blockdev: read-only-mode for blockdev-change-medium

2015-10-12 Thread Max Reitz
Add an option to qmp_blockdev_change_medium() which allows changing the read-only status of the block device whose medium is changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the drive. Some users may

[Qemu-devel] [PATCH v6 24/39] blockdev: Do not create BDS for empty drive

2015-10-12 Thread Max Reitz
Do not use "rudimentary" BDSs for empty drives any longer (for freshly created drives). After a follow-up patch, empty drives will generally use a NULL BDS, not only the freshly created drives. Signed-off-by: Max Reitz --- blockdev.c | 72 ++--

[Qemu-devel] [PATCH v6 33/39] blockdev: Implement change with basic operations

2015-10-12 Thread Max Reitz
Implement 'change' on block devices by calling blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium (a variation of that which does not need a node-name) and blockdev-close-tray. Signed-off-by: Max Reitz --- blockdev.c | 180 +

[Qemu-devel] [PATCH v6 15/39] block: Move BlockAcctStats into BlockBackend

2015-10-12 Thread Max Reitz
As the comment above bdrv_get_stats() says, BlockAcctStats is something which belongs to the device instead of each BlockDriverState. This patch therefore moves it into the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- b

[Qemu-devel] [PATCH v6 31/39] blockdev: Add blockdev-insert-medium

2015-10-12 Thread Max Reitz
And a helper function for that, which directly takes a pointer to the BDS to be inserted instead of its node-name (which will be used for implementing 'change' using blockdev-insert-medium). Signed-off-by: Max Reitz --- blockdev.c | 54 ++

[Qemu-devel] [PATCH v6 21/39] block: Prepare remaining BB functions for NULL BDS

2015-10-12 Thread Max Reitz
There are several BlockBackend functions which, in theory, cannot fail. This patch makes them cope with the BlockDriverState pointer being NULL by making them fall back to some default action like ignoring the value in setters and returning the default in getters. Signed-off-by: Max Reitz --- bl

[Qemu-devel] [PATCH v6 23/39] block: Prepare for NULL BDS

2015-10-12 Thread Max Reitz
blk_bs() will not necessarily return a non-NULL value any more (unless blk_is_available() is true or it can be assumed to otherwise, e.g. because it is called immediately after a successful blk_new_with_bs() or blk_new_open()). Signed-off-by: Max Reitz --- block.c | 5 ++ block/qap

[Qemu-devel] [PATCH v6 27/39] block: Add blk_remove_bs()

2015-10-12 Thread Max Reitz
This function removes the BlockDriverState associated with the given BlockBackend from that BB and sets the BDS pointer in the BB to NULL. Signed-off-by: Max Reitz --- block/block-backend.c | 12 include/sysemu/block-backend.h | 1 + 2 files changed, 13 insertions(+) diff

[Qemu-devel] [PATCH v6 13/39] block: Move guest_block_size into BlockBackend

2015-10-12 Thread Max Reitz
guest_block_size is a guest device property so it should be moved into the interface between block layer and guest devices, which is the BlockBackend. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- block.c | 7 ---

[Qemu-devel] [PATCH v6 20/39] block: Fail requests to empty BlockBackend

2015-10-12 Thread Max Reitz
If there is no BlockDriverState in a BlockBackend or if the tray of the guest device is open, fail all requests (where that is possible) with -ENOMEDIUM. The reason the status of the guest device is taken into account is because once the guest device's tray is opened, any request on the same Block

[Qemu-devel] [PATCH v6 22/39] block: Add blk_insert_bs()

2015-10-12 Thread Max Reitz
This function associates the given BlockDriverState with the given BlockBackend. Signed-off-by: Max Reitz --- block/block-backend.c | 11 +++ include/sysemu/block-backend.h | 1 + 2 files changed, 12 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c inde

[Qemu-devel] [PATCH v6 25/39] blockdev: Pull out blockdev option extraction

2015-10-12 Thread Max Reitz
Extract some of the blockdev option extraction code from blockdev_init() into its own function. This simplifies blockdev_init() and will allow reusing the code in a different function added in a follow-up patch. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- blockdev.c | 209 +

[Qemu-devel] [PATCH v6 12/39] block: Fix BB AIOCB AioContext without BDS

2015-10-12 Thread Max Reitz
Fix the BlockBackend's AIOCB AioContext for aborting AIO in case there is no BDS. If there is no implementation of AIOCBInfo::get_aio_context() the AioContext is derived from the BDS the AIOCB belongs to. If that BDS is NULL (because it has been removed from the BB) this will not work. This patch

[Qemu-devel] [PATCH v6 19/39] block: Make some BB functions fall back to BBRS

2015-10-12 Thread Max Reitz
If there is no BDS tree attached to a BlockBackend, functions that can do so should fall back to the BlockBackendRootState structure. Signed-off-by: Max Reitz --- block/block-backend.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/block/block-b

[Qemu-devel] [PATCH v6 18/39] block: Add BlockBackendRootState

2015-10-12 Thread Max Reitz
This structure will store some of the state of the root BDS if the BDS tree is removed, so that state can be restored once a new BDS tree is inserted. Signed-off-by: Max Reitz --- block/block-backend.c | 40 include/block/block_int.h | 10 ++

[Qemu-devel] [PATCH v6 06/39] block: Add blk_is_available()

2015-10-12 Thread Max Reitz
blk_is_available() returns true iff the BDS is inserted (which means blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the tray of the guest device is closed. blk_is_inserted() is changed to return true only if blk_bs() is not NULL. Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v6 09/39] block: Invoke change media CB before NULLing drv

2015-10-12 Thread Max Reitz
In order to handle host device passthrough, some guest device models may call blk_is_inserted() to check whether the medium is inserted on the host, when checking the guest tray status. This tray status is inquired by blk_dev_change_media_cb(); because bdrv_is_inserted() (invoked by blk_is_inserte

[Qemu-devel] [PATCH v6 17/39] block/throttle-groups: Make incref/decref public

2015-10-12 Thread Max Reitz
Throttle groups are not necessarily referenced by BDSs alone; a later patch will essentially allow BBs to reference them, too. Make the ref/unref functions public so that reference can be properly accounted for. Their interface is slightly adjusted in that they return and take a ThrottleState poin

[Qemu-devel] [PATCH v6 10/39] hw/block/fdc: Implement tray status

2015-10-12 Thread Max Reitz
The tray of an FDD is open iff there is no medium inserted (there are only two states for an FDD: "medium inserted" or "no medium inserted"). Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- hw/block/fdc.c | 20 tests/fdc-test.c | 4 +--- 2 f

[Qemu-devel] [PATCH v6 08/39] block/raw_bsd: Drop raw_is_inserted()

2015-10-12 Thread Max Reitz
With the new automatically-recursive implementation of bdrv_is_inserted() checking by default whether all the children of a BDS are inserted, we can drop raw's own implementation. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Reviewed-by: Alberto Garcia --- Note that

  1   2   3   4   5   >