Re: [Qemu-devel] [PATCH v6 01/12] qapi: Use predicate callback to determine visit filtering

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > 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 py

[Qemu-devel] [PATCH qemu v4] monitor/target-ppc: Define target_get_monitor_def

2015-10-01 Thread Alexey Kardashevskiy
At the moment get_monitor_def() returns only registers from statically defined monitor_defs array. However there is a lot of BOOK3S SPRs which are not in the list and cannot be printed from the monitor. This adds a new target platform hook - target_get_monitor_def(). The hook is called if a regist

Re: [Qemu-devel] [PATCH] target-tilegx: Call dest_gr() later when have to use it

2015-10-01 Thread Chen Gang
On 10/2/15 03:30, Richard Henderson wrote: > On 10/01/2015 11:49 PM, gang.chen.5...@gmail.com wrote: >> From: Chen Gang >> >> When a nop instruction is generated, but the 'dest' is a valid (e.g. for >> any qemu skipped instructions, but still be useful in real machine), >> always allocate dest_gr(

Re: [Qemu-devel] [PATCH] target-tilegx: Call dest_gr() later when have to use it

2015-10-01 Thread Richard Henderson
On 10/01/2015 11:49 PM, gang.chen.5...@gmail.com wrote: From: Chen Gang When a nop instruction is generated, but the 'dest' is a valid (e.g. for any qemu skipped instructions, but still be useful in real machine), always allocate dest_gr() will cause issue for these nop instructions. After fix

[Qemu-devel] [PATCH v6 10/12] qapi: Correct error for union branch 'kind' clash

2015-10-01 Thread Eric Blake
The error message when a simple union or alternate contains a branch named 'kind' is ugly, because it is tied to the Schema member named 'type'. A future patch will fix the generated C to match QMP, but until that point, we can hack things with a temporary subclass to make the error message reflec

[Qemu-devel] [PATCH v6 09/12] qapi: Defer duplicate enum value checks to schema check()

2015-10-01 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 v6 07/12] qapi: Detect collisions in C member names

2015-10-01 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. Doing this was made easier by adding a member.c_name() helper function. As this is the first error raised within the QAPISchema*.

[Qemu-devel] [PATCH v6 11/12] qapi: Detect base class loops

2015-10-01 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 prior to Markus' introspection commits (such as commit 75ebcd7f),

[Qemu-devel] [PATCH v6 06/12] qapi: Track owner of each object member

2015-10-01 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, we need to know which type, command, or event owns the member. Rather than making all

[Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type

2015-10-01 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 v6 03/12] qapi: Lazy creation of array types

2015-10-01 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 v6 12/12] RFC: qapi: Hide _info member

2015-10-01 Thread Eric Blake
Now that nothing but sub-classes are using QAPISchemaEntity.info, rename it to _info to ensure that external users do not revert to using it again. Signed-off-by: Eric Blake --- v6: split from 11/46; probably worth dropping --- scripts/qapi.py | 28 ++-- 1 file changed,

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

2015-10-01 Thread Eric Blake
A future patch will enable deferred error detection in the various QAPISchema*.check() methods (rather than the current ad hoc parse checks). But that means the user can request a QAPI entity that will only fail validation after it has been initialized. Since all errors have to have an associated

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

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

2015-10-01 Thread Eric Blake
Pending prerequisite: Markus' qapi-next branch (which has my subset A patches): git://repo.or.cz/qemu/armbru.git qapi-next http://thread.gmane.org/gmane.comp.emulators.qemu/365827/focus=366351 Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv6b and

[Qemu-devel] [PATCH v6 04/12] qapi: Create simple union type member earlier

2015-10-01 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, and pass the entity rather than th

[Qemu-devel] [PATCH v6 08/12] qapi: Defer duplicate member checks to schema check()

2015-10-01 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 defer all of the parse time semantic check

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: Add "slb-size" property to CPU device tree nodes

2015-10-01 Thread David Gibson
On Thu, Oct 01, 2015 at 03:30:07PM +0200, Thomas Huth wrote: > According to a commit message in the Linux kernel (see here > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b60c31d85a2a > for example), the name of the property that carries the information > about the numb

[Qemu-devel] [PATCH] target-tilegx: Implement v?int_* instructions.

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang Signed-off-by: Chen Gang --- target-tilegx/helper.h | 5 target-tilegx/simd_helper.c | 56 + target-tilegx/translate.c | 14 3 files changed, 75 insertions(+) diff --git a/target-tilegx/helper.h b/target-tile

Re: [Qemu-devel] [PATCH v2] exec: factor out duplicate mmap code

2015-10-01 Thread Richard Henderson
On 10/01/2015 10:58 PM, Michael S. Tsirkin wrote: Anonymous and file-backed RAM allocation are now almost exactly the same. Reduce code duplication by moving RAM mmap code out of oslib-posix.c and exec.c. Reported-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonz

Re: [Qemu-devel] [PATCH v3] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread Richard Henderson
On 10/02/2015 11:31 AM, Chris Metcalf wrote: It disables interrupts from being delivered. This means asynchronous interrupts get deferred until ICS is set back to zero, and synchronous interrupts (page fault, etc) cause a double-fault instead. ICS is automatically set on entry to interrupt hand

Re: [Qemu-devel] [PATCH v1 1/1] target-microblaze: Set the PC in reset instead of realize

2015-10-01 Thread Edgar E. Iglesias
On Sat, Jul 25, 2015 at 12:45:08PM +1000, Edgar E. Iglesias wrote: > On Thu, Jul 23, 2015 at 08:13:56AM -0700, Alistair Francis wrote: > > Set the Microblaze CPU PC in the reset instead of setting it > > in the realize. This is required as the PC is zeroed in the > > reset function and causes probl

Re: [Qemu-devel] [PATCH v3] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread Chen Gang
OK, thanks. I shall try to send patch v4 for it within 2 days. On 10/2/15 09:31, Chris Metcalf wrote: > On 10/1/2015 8:36 PM, Richard Henderson wrote: >> On 10/01/2015 10:37 PM, gang.chen.5...@gmail.com wrote: >>> { >>>mtspr INTERRUPT_CRITICAL_SECTION, r3 >>>shli

Re: [Qemu-devel] [PATCH v3] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread Chris Metcalf
On 10/1/2015 8:36 PM, Richard Henderson wrote: On 10/01/2015 10:37 PM, gang.chen.5...@gmail.com wrote: { mtspr INTERRUPT_CRITICAL_SECTION, r3 shli r2, r2, SPR_EX_CONTEXT_0_1__ICS_SHIFT } { mtspr EX_CONTEXT_0_0, lr ori r2,

[Qemu-devel] [PATCH] target-tilegx: Implement v2sh* instructions

2015-10-01 Thread gang . chen . 5i5j
From: Chen Gang It is just according to v1sh* instructions implementation. Signed-off-by: Chen Gang --- target-tilegx/translate.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index f711c18..03c8e7

Re: [Qemu-devel] [PATCH v3] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread Chen Gang
On 10/2/15 08:36, Richard Henderson wrote: > On 10/01/2015 10:37 PM, gang.chen.5...@gmail.com wrote: >> { >> mtspr INTERRUPT_CRITICAL_SECTION, r3 >> shli r2, r2, SPR_EX_CONTEXT_0_1__ICS_SHIFT >> } >> >> { >> mtspr EX_CONTEXT_0_0, lr >> ori r2, r2, RETURN_PL >> } >> >> { >> or r0, r1, r0 >> mtspr EX

[Qemu-devel] [PATCH v2 6/8] target-arm: Add S2 translation support for S1 PTW

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add support for applying S2 translation to S1 page-table walks. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c| 50 -- target-arm/op_helper.c | 4 ++-- 2 files changed, 50 insertions(+), 4 deletions(-) di

[Qemu-devel] [PATCH v2 5/8] target-arm: Add ARMMMUFaultInfo

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Introduce ARMMMUFaultInfo to propagate MMU Fault information across the MMU translation code path. This is in preparation for adding State-2 translation. No functional changes. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c| 22 ++ t

[Qemu-devel] [PATCH v2 8/8] target-arm: Add support for S1 + S2 MMU translations

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 44 +--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 2d1532a..113d6f3 100644 --- a/target-arm/helper.c

[Qemu-devel] [PATCH v2 4/8] target-arm: Avoid inline for get_phys_addr

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Avoid inline for get_phys_addr() to prepare for future recursive use. Reviewed-by: Peter Maydell Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/target-arm/helper.c b/target

[Qemu-devel] [PATCH v2 0/8] arm: Steps towards EL2 support round 5

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, Another round of patches towards EL2 support. This one adds partial support for 2-stage MMU for AArch64. I've marked it RFC because I expect a few iterations. Once we can settle on the approach I'll add the AArch32 support (changes for arm_ldl_ptw etc). I've probabl

[Qemu-devel] [PATCH v2 3/8] target-arm: Add support for S2 page-table protection bits

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 41 + 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 16a0701..2701788 100644 --- a/target-arm/helper.c +++

[Qemu-devel] [PATCH v2 7/8] target-arm: Route S2 MMU faults to EL2

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/op_helper.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index d4715f4..2ccd1c9 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_hel

[Qemu-devel] [PATCH v2 1/8] target-arm: Add HPFAR_EL2

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/cpu.h| 1 + target-arm/helper.c | 12 2 files changed, 13 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index cc1578c..895f2c2 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -2

[Qemu-devel] [PATCH v2 2/8] target-arm: Add computation of starting level for S2 PTW

2015-10-01 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The starting level for S2 pagetable walks is computed differently from the S1 starting level. Implement the S2 variant. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-)

Re: [Qemu-devel] [PATCH v3] target-tilegx: Support iret instruction and related special registers

2015-10-01 Thread Richard Henderson
On 10/01/2015 10:37 PM, gang.chen.5...@gmail.com wrote: { mtspr INTERRUPT_CRITICAL_SECTION, r3 shli r2, r2, SPR_EX_CONTEXT_0_1__ICS_SHIFT } { mtspr EX_CONTEXT_0_0, lr ori r2, r2, RETURN_PL } {

Re: [Qemu-devel] [PATCH] disas/cris: Fix typo in comment

2015-10-01 Thread Edgar E. Iglesias
On Fri, Sep 25, 2015 at 10:45:53PM +0200, Stefan Weil wrote: > Signed-off-by: Stefan Weil Reviewed-by: Edgar E. Iglesias Applied, thanks! > --- > disas/cris.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/disas/cris.c b/disas/cris.c > index 1b76a09..4482a41 10064

Re: [Qemu-devel] [PATCH v2 4/4] tests: add a local test for guest agent

2015-10-01 Thread Michael Roth
Quoting Marc-André Lureau (2015-10-01 17:24:53) > > > - Original Message - > > Quoting marcandre.lur...@redhat.com (2015-09-11 13:53:41) > > > From: Marc-André Lureau > > > > > > Add some local guest agent tests (as it is better than nothing) only > > > when CONFIG_LINUX. > > > > > > T

Re: [Qemu-devel] [PATCH 1/5] qga: drop guest_file_init helper and replace it with static initializers

2015-10-01 Thread Michael Roth
Quoting Denis V. Lunev (2015-10-01 02:37:59) > This just makes code shorter and better. Can't complain with that. > > Signed-off-by: Denis V. Lunev > Signed-off-by: Yuri Pudgorodskiy > CC: Michael Roth Reviewed-by: Michael Roth > --- > qga/commands-posix.c | 10 +++--- > qga/commands-

Re: [Qemu-devel] [PATCH 3/5] qga: guest exec functionality

2015-10-01 Thread Michael Roth
Quoting Denis V. Lunev (2015-10-01 02:38:01) > From: Yuri Pudgorodskiy > > Guest-exec rewriten in platform-independant style with glib spawn. > > Child process is spawn asynchroneously and exit status can later > be picked up by guest-exec-status command. > > stdin/stdout/stderr of the child no

Re: [Qemu-devel] [PATCH 2/5] qga: handle G_IO_STATUS_AGAIN in ga_channel_write_all()

2015-10-01 Thread Michael Roth
Quoting Denis V. Lunev (2015-10-01 02:38:00) > From: Yuri Pudgorodskiy > > glib may return G_IO_STATUS_AGAIN which is actually not an error. > Also fixed a bug when on incomplete write buf pointer was not adjusted. > > Signed-off-by: Yuri Pudgorodskiy > Signed-off-by: Denis V. Lunev > CC: Mich

Re: [Qemu-devel] [PATCH 4/5] qga: handle possible SIGPIPE in guest-file-write

2015-10-01 Thread Michael Roth
Quoting Denis V. Lunev (2015-10-01 02:38:02) > qemu-ga should not exit on guest-file-write to pipe without read end > but proper error code should be returned. The behavior of the > spawned process should be default thus SIGPIPE processing should be > reset to default after fork() but before exec()

Re: [Qemu-devel] [PATCH v2 4/4] tests: add a local test for guest agent

2015-10-01 Thread Marc-André Lureau
- Original Message - > Quoting marcandre.lur...@redhat.com (2015-09-11 13:53:41) > > From: Marc-André Lureau > > > > Add some local guest agent tests (as it is better than nothing) only > > when CONFIG_LINUX. > > > > They can be run inside or outside a VM, when run inside a VM, they wi

Re: [Qemu-devel] [PATCH v3 0/6] qemu: guest agent: implement guest-exec command

2015-10-01 Thread Michael Roth
Quoting Vasiliy Tolstov (2015-10-01 03:17:34) > 2015-10-01 11:00 GMT+03:00 Denis V. Lunev : > > Subject: [PATCH 0/5] simplified QEMU guest exec > > Date: Thu, 1 Oct 2015 10:37:58 +0300 > > Message-ID: <1443685083-6242-1-git-send-email-...@openvz.org> > > > hm... i don't see it and google and > ht

Re: [Qemu-devel] [PATCH v2 2/4] qga: do not override configuration verbosity

2015-10-01 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-09-11 13:53:39) > From: Marc-André Lureau > > Move the default verbosity settings before loading the configuration > file, or it will overwrite it. Found thanks to writing qga tests :) > > Signed-off-by: Marc-André Lureau > --- > qga/main.c | 4 ++-- >

Re: [Qemu-devel] [PATCH v2 1/4] qga: add QGA_CONF environment variable

2015-10-01 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-09-11 13:53:38) > From: Marc-André Lureau > > Having a environment variable allows to override default configuration > path, useful for testing. Note that this can't easily be an argument, > since loading config is done before parsing the arguments. I'd

Re: [Qemu-devel] [PATCH v2 4/4] tests: add a local test for guest agent

2015-10-01 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-09-11 13:53:41) > From: Marc-André Lureau > > Add some local guest agent tests (as it is better than nothing) only > when CONFIG_LINUX. > > They can be run inside or outside a VM, when run inside a VM, they will > do a bit more side effects, such as free

Re: [Qemu-devel] [PATCH 3/3] target-xtensa: xtfpga: support noMMU cores

2015-10-01 Thread Peter Crosthwaite
On Thu, Oct 1, 2015 at 1:13 PM, Max Filippov wrote: > On Thu, Oct 1, 2015 at 10:18 PM, Peter Crosthwaite > wrote: >> On Thu, Oct 1, 2015 at 11:25 AM, Max Filippov wrote: >>> On Thu, Oct 1, 2015 at 9:06 PM, Peter Crosthwaite >>> wrote: What is your intended user command lines? E.g. how do I

Re: [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift

2015-10-01 Thread Markus Armbruster
Peter Maydell writes: > On 1 October 2015 at 18:30, Paolo Bonzini wrote: >> >> >> On 01/10/2015 19:07, Laszlo Ersek wrote: >>> > In addition, C89 didn't say at all what the result was for signed data >>> > types, so technically we could compile QEMU with -std=gnu89 (the default >>> > until GCC5)

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 10/01/2015 11:39 AM, Markus Armbruster wrote: > >>> I'm leaning towards A (calling self-inheritance a name collision is a >>> bit of a stretch in the first place; and leaving it untested until 16/46 >>> goes in doesn't hurt). >> >> Okay, A. it is. I pushed to branch qapi

Re: [Qemu-devel] [PATCH 3/3] target-xtensa: xtfpga: support noMMU cores

2015-10-01 Thread Max Filippov
On Thu, Oct 1, 2015 at 10:18 PM, Peter Crosthwaite wrote: > On Thu, Oct 1, 2015 at 11:25 AM, Max Filippov wrote: >> On Thu, Oct 1, 2015 at 9:06 PM, Peter Crosthwaite >> wrote: >>> What is your intended user command lines? E.g. how do I boot with >>> ml605 no-mmu and then with mmu. >> >> '-M ml60

Re: [Qemu-devel] [PATCH RFC 3/8] target-arm: Add support for S2 page-table protection bits

2015-10-01 Thread Edgar E. Iglesias
On Thu, Oct 01, 2015 at 08:48:17PM +0100, Peter Maydell wrote: > On 1 October 2015 at 19:44, Edgar E. Iglesias > wrote: > > On Wed, Sep 23, 2015 at 09:55:05AM -0700, Peter Maydell wrote: > >> This isn't right -- the XN bit controls executability and the > >> S2AP bits don't affect it at all. I th

Re: [Qemu-devel] [PATCH v2 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ

2015-10-01 Thread Richard Henderson
On 10/01/2015 08:58 PM, James Hogan wrote: Extend MIPS movcond implementation to support the SELNEZ/SELEQZ instructions introduced in MIPS r6 (where MOVN/MOVZ have been removed). Whereas the "MOVN/MOVZ rd, rs, rt" instructions have the following semantics: rd = [!]rt ? rs : rd The "SELNEZ/SEL

Re: [Qemu-devel] [PATCH RFC 3/8] target-arm: Add support for S2 page-table protection bits

2015-10-01 Thread Peter Maydell
On 1 October 2015 at 19:44, Edgar E. Iglesias wrote: > On Wed, Sep 23, 2015 at 09:55:05AM -0700, Peter Maydell wrote: >> This isn't right -- the XN bit controls executability and the >> S2AP bits don't affect it at all. I think you want: >> >> int prot_rw = 0; >> if (s2ap & 1) { >>

[Qemu-devel] [PATCHv2] arm: Fail on unknown subtest

2015-10-01 Thread Christopher Covington
Signed-off-by: Christopher Covington --- arm/selftest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arm/selftest.c b/arm/selftest.c index fc9ec60..f4a5030 100644 --- a/arm/selftest.c +++ b/arm/selftest.c @@ -376,6 +376,9 @@ int main(int argc, char **argv) cpumask_set_cp

Re: [Qemu-devel] [PATCH v2 5/6] tcg/mips: Support r6 multiply/divide encodings

2015-10-01 Thread Richard Henderson
On 10/01/2015 08:58 PM, James Hogan wrote: MIPSr6 adds several new integer multiply, divide, and modulo instructions, and removes several pre-r6 encodings, along with the HI/LO registers which were the implicit operands of some of those instructions. Update TCG to use the new instructions when bu

[Qemu-devel] [PATCH] arm: Add PMU test

2015-10-01 Thread Christopher Covington
Beginning with just a read of the control register, add plumbing for testing the ARM Performance Monitors Unit (PMU). Signed-off-by: Christopher Covington --- arm/pmu.c| 31 +++ arm/unittests.cfg| 5 + config/config-arm-common.mak

Re: [Qemu-devel] [PATCH v2 2/6] disas/mips: Add R6 jr/jr.hb to disassembler

2015-10-01 Thread Richard Henderson
On 10/01/2015 08:58 PM, James Hogan wrote: MIPS r6 encodes jr as jalr zero, and jr.hb as jalr.hb zero, so add these encodings to the MIPS disassembly table. Signed-off-by: James Hogan Cc: Aurelien Jarno Cc: Leon Alrae --- disas/mips.c | 2 ++ 1 file changed, 2 insertions(+) Reviewed-by: Ric

Re: [Qemu-devel] [RFC v5 3/6] softmmu: Add helpers for a new slowpath

2015-10-01 Thread Richard Henderson
On 10/01/2015 06:05 PM, alvise rigo wrote: On Wed, Sep 30, 2015 at 10:42 PM, Richard Henderson wrote: On 09/30/2015 07:46 PM, alvise rigo wrote: On Wed, Sep 30, 2015 at 5:58 AM, Richard Henderson wrote: Why would you need to indicate that another cpu has started an exclusive operation on

[Qemu-devel] [Bug 1484925] Re: Segfault with custom vnc client

2015-10-01 Thread Dubravko
Hi, Did you resolve your problem? Because I have the same issus.. Dubravko -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1484925 Title: Segfault with custom vnc client Status in QEMU: New Bug

Re: [Qemu-devel] Enabling PMU in qemu arm64

2015-10-01 Thread Pranith Kumar
On Thu, Oct 1, 2015 at 12:21 PM, Christopher Covington wrote: > > Are you using KVM or TCG (are you running on an x86 host or an arm64 host)? I am using TCG, aarch64-softmmu on x86 host. > > We have published some patches implementing the PMU registers and instruction > counting (but not any oth

Re: [Qemu-devel] [RFC v5 0/6] Slow-path for atomic instruction translation

2015-10-01 Thread Emilio G. Cota
On Wed, Sep 30, 2015 at 06:44:32 +0200, Paolo Bonzini wrote: > I have a doubt about your patches for ll/sc emulation, that I hope you > can clarify. > > From 1ft, both approaches rely on checking a flag during stores. > This is split between the TLB and the CPUState for Alvise's patches (in >

Re: [Qemu-devel] [PATCH 3/3] target-xtensa: xtfpga: support noMMU cores

2015-10-01 Thread Peter Crosthwaite
On Thu, Oct 1, 2015 at 11:25 AM, Max Filippov wrote: > On Thu, Oct 1, 2015 at 9:06 PM, Peter Crosthwaite > wrote: >> On Wed, Sep 30, 2015 at 3:42 PM, Max Filippov wrote: >>> On Thu, Oct 1, 2015 at 1:23 AM, Peter Crosthwaite >>> wrote: On Wed, Sep 30, 2015 at 3:07 PM, Max Filippov wrote: >

Re: [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift

2015-10-01 Thread Laszlo Ersek
On 10/01/15 19:38, Peter Maydell wrote: > On 1 October 2015 at 18:30, Paolo Bonzini wrote: >> >> >> On 01/10/2015 19:07, Laszlo Ersek wrote: In addition, C89 didn't say at all what the result was for signed data types, so technically we could compile QEMU with -std=gnu89 (the default >>>

Re: [Qemu-devel] [PATCH v4 3/7] Implement fw_cfg DMA interface

2015-10-01 Thread Laszlo Ersek
On 10/01/15 19:18, Peter Maydell wrote: > On 1 October 2015 at 15:36, Laszlo Ersek wrote: >> I think I finally understand this difference now. It is all rooted in >> the difference between the internal APIs sysbus_add_io() and >> sysbus_init_mmio(). Both of these are called from the device realize

[Qemu-devel] [PATCH v3] linux-user/syscall.c: malloc()/calloc() to g_malloc()/g_try_malloc()/g_new0()

2015-10-01 Thread Harmandeep Kaur
v1-> Convert malloc()/calloc() calls to g_malloc()/g_try_malloc()/g_new0() in linux-user/syscall.c file v1->v2 convert the free() call in host_to_target_semarray() to g_free() and calls g_try_malloc(count) instead of g_try_malloc(sizeof(count)) Signed-off-by: Harmandeep Kaur --- v2->v3 used g_

[Qemu-devel] [PULL 0/1] Block job patches

2015-10-01 Thread Jeff Cody
The following changes since commit fa500928ad9da6dd570918e3dfca13c029af07a8: Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20150930' into staging (2015-10-01 10:49:38 +0100) are available in the git repository at: g...@github.com:codyprime/qemu-kvm-jtc.git tags/block-pu

[Qemu-devel] [PULL 1/1] block: mirror - fix full sync mode when target does not support zero init

2015-10-01 Thread Jeff Cody
During mirror, if the target device does not support zero init, a mirror may result in a corrupted image for sync="full" mode. This is due to how the initial dirty bitmap is set up prior to copying data - we did not mark sectors as dirty that are unallocated. This means those unallocated sectors

Re: [Qemu-devel] [PATCH v3] block: mirror - fix full sync mode when target does not support zero init

2015-10-01 Thread Jeff Cody
On Thu, Oct 01, 2015 at 09:14:51AM -0400, Jeff Cody wrote: > During mirror, if the target device does not support zero init, a > mirror may result in a corrupted image for sync="full" mode. > > This is due to how the initial dirty bitmap is set up prior to copying > data - we did not mark sectors

Re: [Qemu-devel] [PATCH RFC 3/8] target-arm: Add support for S2 page-table protection bits

2015-10-01 Thread Edgar E. Iglesias
On Wed, Sep 23, 2015 at 09:55:05AM -0700, Peter Maydell wrote: > On 19 September 2015 at 07:15, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Signed-off-by: Edgar E. Iglesias > > --- > > target-arm/helper.c | 48 +--- > > 1 file cha

Re: [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift

2015-10-01 Thread Laszlo Ersek
On 10/01/15 19:30, Paolo Bonzini wrote: > > > On 01/10/2015 19:07, Laszlo Ersek wrote: >>> In addition, C89 didn't say at all what the result was for signed data >>> types, so technically we could compile QEMU with -std=gnu89 (the default >>> until GCC5) and call it a day. >>> >>> Really the C st

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Eric Blake
On 10/01/2015 11:39 AM, Markus Armbruster wrote: >> I'm leaning towards A (calling self-inheritance a name collision is a >> bit of a stretch in the first place; and leaving it untested until 16/46 >> goes in doesn't hurt). > > Okay, A. it is. I pushed to branch qapi-next at > http://repo.or.cz/

Re: [Qemu-devel] [PATCH RFC 4/8] target-arm: Avoid inline for get_phys_addr

2015-10-01 Thread Edgar E. Iglesias
On Wed, Sep 23, 2015 at 09:58:10AM -0700, Peter Maydell wrote: > On 19 September 2015 at 07:15, Edgar E. Iglesias > wrote: > > From: "Edgar E. Iglesias" > > > > Avoid inline for get_phys_addr() to prepare for future recursive use. > > Does the compiler actually complain? Sorry for the late repl

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-01 Thread Marc Marí
On Thu, 1 Oct 2015 12:02:42 -0400 "Kevin O'Connor" wrote: > On Thu, Oct 01, 2015 at 05:25:11PM +0200, Laszlo Ersek wrote: > > On 10/01/15 14:16, Marc Marí wrote: > > > Add an entry to the bootorder file with name "vmlinux". > > > Give this entry more priority than the romfile. > > > > > > Signed

Re: [Qemu-devel] [PATCH 3/3] target-xtensa: xtfpga: support noMMU cores

2015-10-01 Thread Max Filippov
On Thu, Oct 1, 2015 at 9:06 PM, Peter Crosthwaite wrote: > On Wed, Sep 30, 2015 at 3:42 PM, Max Filippov wrote: >> On Thu, Oct 1, 2015 at 1:23 AM, Peter Crosthwaite >> wrote: >>> On Wed, Sep 30, 2015 at 3:07 PM, Max Filippov wrote: On Thu, Oct 1, 2015 at 12:02 AM, Peter Crosthwaite w

Re: [Qemu-devel] [PATCH 3/3] block: prohibit migration during transactions

2015-10-01 Thread Paolo Bonzini
On 01/10/2015 18:34, John Snow wrote: > + > +error_setg(&blocker, "Block device(s) are in use by a Block > Transaction"); s/Block Transaction/transaction command/ But how can migration start during a transaction? > +ret = migrate_add_blocker(blocker, errp); > +if (ret < 0) { > +

Re: [Qemu-devel] [PATCH 1/3] block: prohibit migration during BlockJobs

2015-10-01 Thread Paolo Bonzini
On 01/10/2015 18:34, John Snow wrote: > Unless we can prove this to be safe for specific cases, > the default should be to prohibit migration during BlockJobs. Block jobs do not affect the current block, only other block device, hence they *are* safe for migration. What you want, I think, is th

Re: [Qemu-devel] [PATCH 3/3] target-xtensa: xtfpga: support noMMU cores

2015-10-01 Thread Peter Crosthwaite
On Wed, Sep 30, 2015 at 3:42 PM, Max Filippov wrote: > On Thu, Oct 1, 2015 at 1:23 AM, Peter Crosthwaite > wrote: >> On Wed, Sep 30, 2015 at 3:07 PM, Max Filippov wrote: >>> On Thu, Oct 1, 2015 at 12:02 AM, Peter Crosthwaite >>> wrote: Which makes MMU vs noMMU a board level property, not a

[Qemu-devel] [RFC PATCH] Add qemu .clang-format

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau clang-format is awesome to reflow your code according to qemu coding style in an editor (in the region you modify). (note: clang-tidy should be able to add missing braces around statements, but I haven't tried it, it's quite recent) Signed-off-by: Marc-André Lureau ---

Re: [Qemu-devel] [PATCH v7 05/18] qapi: Test for various name collisions

2015-10-01 Thread Markus Armbruster
Eric Blake writes: > On 10/01/2015 09:34 AM, Markus Armbruster wrote: > Do we have a test for the simpler case of a struct inheriting from itself? >>> >>> Not here, but in v5 16/46. That's because it asserts, but while it was >>> easy to fix up in the QAPISchema.check(), I did not find

[Qemu-devel] [PATCH v7 24/24] vhost-user-test: check ownership during migration

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Check that backend source and destination do not have simultaneous ownership during migration. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/vhost-user-test.

[Qemu-devel] [PATCH v7 18/24] vhost: add migration block if memfd failed

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c| 3 +++ include/qemu/memfd.h | 2 ++ util/memfd.c | 22 ++ 3 files changed, 27 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 1e8ee76..eaf8117 100644 --- a/h

[Qemu-devel] [PATCH v7 21/24] vhost-user-test: wrap server in TestServer struct

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau In the coming patches, a test will use several servers simultaneously. Wrap the server in a struct, out of the global scope. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 139 +++- 1 file changed, 89 insertion

[Qemu-devel] [PATCH v7 16/24] vhost user: add rarp sending after live migration for legacy guest

2015-10-01 Thread marcandre . lureau
From: Thibaut Collet A new vhost user message is added to allow QEMU to ask to vhost user backend to broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE capability. This new message is sent only if the backend supports the new VHOST_USER_PROTOCOL_F_RARP protocol feature.

[Qemu-devel] [PATCH v7 17/24] vhost-user: use an enum helper for features mask

2015-10-01 Thread marcandre . lureau
From: Thibaut Collet The VHOST_USER_PROTOCOL_FEATURE_MASK will be automatically updated when adding new features to the enum. Signed-off-by: Thibaut Collet [Adapted from mailing list discussion - Marc-André] Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 13 + 1 fil

Re: [Qemu-devel] [PATCH v1 1/3] ssi: Move ssi.h into a seperate directory

2015-10-01 Thread Peter Crosthwaite
On Thu, Oct 1, 2015 at 10:19 AM, Alistair Francis wrote: > On Wed, Sep 30, 2015 at 2:06 PM, Peter Crosthwaite > wrote: >> On Tue, Sep 29, 2015 at 4:03 PM, Alistair Francis >> wrote: >>> Move the ssi.h include file into the ssi directory. >>> >>> Signed-off-by: Alistair Francis >>> --- >>> >>>

Re: [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift

2015-10-01 Thread Peter Maydell
On 1 October 2015 at 18:30, Paolo Bonzini wrote: > > > On 01/10/2015 19:07, Laszlo Ersek wrote: >> > In addition, C89 didn't say at all what the result was for signed data >> > types, so technically we could compile QEMU with -std=gnu89 (the default >> > until GCC5) and call it a day. >> > >> > Re

[Qemu-devel] [PATCH v7 12/24] vhost: use a function for each call

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Replace the generic vhost_call() by specific functions for each function call to help with type safety and changing arguments. While doing this, I found that "unsigned long long" and "uint64_t" were used interchangeably and causing compilation warnings, using uint64_t ins

[Qemu-devel] [PATCH v7 14/24] net: add trace_vhost_user_event

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Replace error_report() and use tracing instead. It's not an error to get a connection or a disconnection, so silence this and trace it instead. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 4 ++-- trace-events | 3 +++ 2 files changed, 5 insertions(+), 2

[Qemu-devel] [PATCH v7 23/24] vhost-user-test: add live-migration test

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau This test checks that the log fd is given to the migration source, and mark dirty pages during migration. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 171 +++- 1 file changed, 169 insertions(+), 2 deletions(

[Qemu-devel] [PATCH v7 13/24] vhost-user: document migration log

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 48 +-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 4eadad1..e0292a0 100644 --- a/d

[Qemu-devel] [PATCH v7 05/24] util: add fallback for qemu_memfd_alloc()

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Add an open/unlink/mmap fallback for system that do not support memfd (only available since 3.17, ~1y ago). This patch may require additional SELinux policies to work for enforced systems, but should fail gracefully in this case. Signed-off-by: Marc-André Lureau --- ut

[Qemu-devel] [PATCH v7 15/24] vhost user: add support of live migration

2015-10-01 Thread marcandre . lureau
From: Thibaut Collet Some vhost user backends are able to support live migration. To provide this service the following features must be added: 1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev backend is vhost-user. 2. Provide a nop receive callback to vhost-user.

[Qemu-devel] [PATCH v7 02/24] linux-headers: add unistd.h

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau New syscalls are not yet widely distributed. Add them to qemu linux-headers include directory. Update based on v4.3-rc3 kernel headers. Exclude mips for now, which is more problematic due to extra header inclusion and probably unnecessary here. Signed-off-by: Marc-André

[Qemu-devel] [PATCH v7 04/24] util: add memfd helpers

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal shared memory. Signed-off-by: Marc-André Lureau --- include/qemu/memfd.h | 4 +++ util/memfd.c | 75 ++-- 2 files changed, 77 insertion

Re: [Qemu-devel] [PATCH 1/2] target-i386: Use 1UL for bit shift

2015-10-01 Thread Paolo Bonzini
On 01/10/2015 19:07, Laszlo Ersek wrote: > > In addition, C89 didn't say at all what the result was for signed data > > types, so technically we could compile QEMU with -std=gnu89 (the default > > until GCC5) and call it a day. > > > > Really the C standard should make this implementation-define

[Qemu-devel] [PATCH v7 11/24] vhost-user: add a migration blocker

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau If VHOST_USER_PROTOCOL_F_LOG_SHMFD is not announced, block vhost-user migration. The blocker is removed in vhost_dev_cleanup(). Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 9 + hw/virtio/vhost.c | 16 2 files changed, 21

[Qemu-devel] [PATCH v7 01/24] configure: probe for memfd

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index f14454e..5e77ed5 100755 --- a/configure +++ b/configure @@ -3486,6 +3486,2

[Qemu-devel] [PATCH v7 10/24] vhost-user: send log shm fd along with log_base

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Send the shm for the dirty pages logging if the backend supports VHOST_USER_PROTOCOL_F_LOG_SHMFD. Wait for a reply to make sure the old log is no longer used. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-backend.c | 3 ++- hw/virtio/vhost-user.c

[Qemu-devel] [PATCH v7 22/24] vhost-user-test: learn to tweak various qemu arguments

2015-10-01 Thread marcandre . lureau
From: Marc-André Lureau Add a new macro to make the qemu command line with other values of memory size, and specific chardev id. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/vh

  1   2   3   4   5   >