Re: [Qemu-devel] [PATCH for-1.2 v2] target-xtensa: return ENOSYS for unimplemented simcalls

2012-08-29 Thread Max Filippov
On Wed, Aug 29, 2012 at 1:38 PM, Peter Maydell wrote: > On 22 August 2012 19:03, Max Filippov wrote: >> --- a/target-xtensa/xtensa-semi.c >> +++ b/target-xtensa/xtensa-semi.c >> @@ -218,6 +218,8 @@ void HELPER(simcall)(CPUXtensaState *env) >> >> default:

Re: [Qemu-devel] [PATCH for-1.2 v2] target-xtensa: return ENOSYS for unimplemented simcalls

2012-08-29 Thread Max Filippov
On Wed, Aug 29, 2012 at 2:34 PM, Peter Maydell wrote: > On 29 August 2012 11:13, Max Filippov wrote: >> On Wed, Aug 29, 2012 at 1:38 PM, Peter Maydell >> wrote: >>> On 22 August 2012 19:03, Max Filippov wrote: >>>> --- a/target-xtensa/xtensa-semi.c &g

[Qemu-devel] [PATCH] target-xtensa: convert host errno values to guest

2012-08-29 Thread Max Filippov
Guest errno values are taken from the newlib. Convert only those errno values that can be returned from used system calls. Signed-off-by: Max Filippov --- target-xtensa/xtensa-semi.c | 106 +++--- 1 files changed, 98 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] buildbot failure in qemu on default_mingw32

2012-09-05 Thread Max Filippov
dex in initializer not of integer type /home/buildbot/slave-public/default_mingw32/build/target-xtensa/xtensa-semi.c:134: error: (near initialization for 'guest_errno') Will put those under #ifdefs... -- Thanks. -- Max

[Qemu-devel] [PATCH] target-xtensa: fix missing errno codes for mingw32

2012-09-05 Thread Max Filippov
index in initializer not of integer type xtensa-semi.c:124: error: (near initialization for 'guest_errno') xtensa-semi.c:134: error: 'ELOOP' undeclared (first use in this function) xtensa-semi.c:134: error: array index in initializer not of integer type xtensa-semi.c:134: error:

Re: [Qemu-devel] [PATCH] target-xtensa: fix missing errno codes for mingw32

2012-09-06 Thread Max Filippov
On Thu, Sep 6, 2012 at 8:45 AM, Stefan Weil wrote: > Am 06.09.2012 02:36, schrieb Max Filippov: > >> Put the following errno value mappings under #ifdef: >> >> xtensa-semi.c: In function 'errno_h2g': >> xtensa-semi.c:113: error: 'ENOTBLK' un

Re: [Qemu-devel] [PATCH] target-xtensa: fix missing errno codes for mingw32

2012-09-07 Thread Max Filippov
On Sat, Sep 8, 2012 at 12:22 AM, Stefan Weil wrote: > Am 06.09.2012 14:48, schrieb Max Filippov: > >> On Thu, Sep 6, 2012 at 8:45 AM, Stefan Weil wrote: >>> >>> Am 06.09.2012 02:36, schrieb Max Filippov: >>> >>>> Put the following errno value

Re: [Qemu-devel] [PATCH 1/5] softfloat: fix float{32, 64}_muladd options

2012-09-08 Thread Max Filippov
fpu/softfloat.h @@ -219,7 +219,7 @@ void float_raise( int8 flags STATUS_PARAM); enum { float_muladd_negate_c = 1, float_muladd_negate_product = 2, -float_muladd_negate_result = 3, +float_muladd_negate_result = 4, }; /*---- -- Thanks. -- Max

[Qemu-devel] [PATCH 0/9] target-xtensa: implement FP coprocessor option

2012-09-08 Thread Max Filippov
This series implements floating point coprocessor and coprocessor context options for xtensa and fixes a couple of bugs to make it work. Max Filippov (9): softfloat: make float_muladd_negate_* flags independent target-xtensa: handle boolean option in overlays target-xtensa: specialize

[Qemu-devel] [PATCH 1/9] softfloat: make float_muladd_negate_* flags independent

2012-09-08 Thread Max Filippov
Flags passed into float{32,64}_muladd are treated as bits; assign independent bits to float_muladd_negate_* to allow precise control over what gets negated in float{32,64}_muladd. Signed-off-by: Max Filippov --- fpu/softfloat.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff

[Qemu-devel] [PATCH 2/9] target-xtensa: handle boolean option in overlays

2012-09-08 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/overlay_tool.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/overlay_tool.h b/target-xtensa/overlay_tool.h index a3a5650..e395053 100644 --- a/target-xtensa/overlay_tool.h +++ b/target-xtensa/overlay_tool.h

[Qemu-devel] [PATCH 3/9] target-xtensa: specialize softfloat NaN rules

2012-09-08 Thread Max Filippov
NaN propagation rule: leftmost NaN in the expression gets propagated to the result. Signed-off-by: Max Filippov --- fpu/softfloat-specialize.h |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 4902450

[Qemu-devel] [PATCH 4/9] target-xtensa: add FP registers

2012-09-08 Thread Max Filippov
There are 16 32-bit FP registers (f0 - f15), control and status user registers (fcr, fsr). See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- gdbstub.c |8 +++ target-xtensa/cpu.h |3 ++ target-xtensa/helper.h|2 + target-xtensa

[Qemu-devel] [PATCH 5/9] target-xtensa: implement LSCX and LSCI groups

2012-09-08 Thread Max Filippov
These are load/store instructions for FP registers with immediate or register index and optional base post-update. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 58 +--- 1 files changed, 54 insertions

[Qemu-devel] [PATCH 6/9] target-xtensa: implement FP0 arithmetic

2012-09-08 Thread Max Filippov
These are FP arithmetic opcodes. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/helper.h|7 + target-xtensa/op_helper.c | 37 +++ target-xtensa/translate.c | 61 - 3 files

[Qemu-devel] [PATCH 7/9] target-xtensa: implement FP0 conversions

2012-09-08 Thread Max Filippov
These are FP to integer and integer to FP conversion opcodes. See ISA, 4.3.10 for more details. Note that utrunc.s implementation follows ISS behaviour, not ISA. Signed-off-by: Max Filippov --- target-xtensa/helper.h|4 +++ target-xtensa/op_helper.c | 43

[Qemu-devel] [PATCH 9/9] target-xtensa: implement coprocessor context option

2012-09-08 Thread Max Filippov
In case Coprocessor Context option is enabled CPENABLE SR bits control whether access to coprocessors is allowed or would rise one of CoprocessorXDisabled exceptions. See ISA, 4.4.5 for more details. FP is coprocessor 0. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |5

[Qemu-devel] [PATCH 8/9] target-xtensa: implement FP1 group

2012-09-08 Thread Max Filippov
These are comparison and conditional move opcodes. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/helper.h|8 target-xtensa/op_helper.c | 47 ++ target-xtensa/translate.c | 81

Re: [Qemu-devel] [PATCH 3/9] target-xtensa: specialize softfloat NaN rules

2012-09-09 Thread Max Filippov
On Sun, Sep 9, 2012 at 1:31 PM, Peter Maydell wrote: > On 9 September 2012 02:29, Max Filippov wrote: >> @@ -262,9 +263,13 @@ float32 float32_maybe_silence_nan( float32 a_ ) >> #error Rules for silencing a signaling NaN are target-specific >> # endif >&g

Re: [Qemu-devel] [PATCH 6/9] target-xtensa: implement FP0 arithmetic

2012-09-09 Thread Max Filippov
On Sun, Sep 9, 2012 at 2:05 PM, Peter Maydell wrote: > On 9 September 2012 02:29, Max Filippov wrote: >> +float32 HELPER(abs_s)(float32 v) >> +{ >> +return float32_abs(v); >> +} >> + >> +float32 HELPER(neg_s)(float32 v) >> +{ >> +return

Re: [Qemu-devel] [PATCH 7/9] target-xtensa: implement FP0 conversions

2012-09-09 Thread Max Filippov
On Sun, Sep 9, 2012 at 3:06 PM, Peter Maydell wrote: > On 9 September 2012 02:29, Max Filippov wrote: >> +uint32_t HELPER(ftoui)(float32 v, uint32_t rounding_mode, uint32_t scale) >> +{ >> +float_status fp_status = {0}; >> +float32 zero = {0}; > > This p

Re: [Qemu-devel] [PATCH 3/9] target-xtensa: specialize softfloat NaN rules

2012-09-09 Thread Max Filippov
On Sun, Sep 9, 2012 at 4:13 PM, Max Filippov wrote: > On Sun, Sep 9, 2012 at 1:31 PM, Peter Maydell > wrote: >> the Xtensa ISA it says it doesn't have signaling NaNs. Maybe >> it would be better to have a define for NO_SIGNALING_NANS >> which made float*_is_signal

[Qemu-devel] [PATCH v2 00/10] target-xtensa: implement FP coprocessor option

2012-09-09 Thread Max Filippov
FP-to-integer convertors with float32_scalbn - reimplement comparison with zero in FP-to-integer convertors Max Filippov (10): softfloat: make float_muladd_negate_* flags independent softfloat: add NO_SIGNALING_NANS target-xtensa: handle boolean option in overlays target-xtensa: special

[Qemu-devel] [PATCH v2 10/10] target-xtensa: implement coprocessor context option

2012-09-09 Thread Max Filippov
In case Coprocessor Context option is enabled CPENABLE SR bits control whether access to coprocessors is allowed or would rise one of CoprocessorXDisabled exceptions. See ISA, 4.4.5 for more details. FP is coprocessor 0. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |5

[Qemu-devel] [PATCH v2 05/10] target-xtensa: add FP registers

2012-09-09 Thread Max Filippov
There are 16 32-bit FP registers (f0 - f15), control and status user registers (fcr, fsr). See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- Changes v1->v2: - add float32_val/make_float32 to fp registers accessors gdbstub.c |8 +++ target-xtensa/cp

[Qemu-devel] [PATCH v2 06/10] target-xtensa: implement LSCX and LSCI groups

2012-09-09 Thread Max Filippov
These are load/store instructions for FP registers with immediate or register index and optional base post-update. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 58 +--- 1 files changed, 54 insertions

[Qemu-devel] [PATCH v2 08/10] target-xtensa: implement FP0 conversions

2012-09-09 Thread Max Filippov
These are FP to integer and integer to FP conversion opcodes. See ISA, 4.3.10 for more details. Note that utrunc.s implementation follows ISS behaviour, not ISA. Signed-off-by: Max Filippov --- Changes v1->v2: - replace float32_mul/div in FP-to-integer convertors with float32_sca

Re: [Qemu-devel] [PATCH v2 08/10] target-xtensa: implement FP0 conversions

2012-09-09 Thread Max Filippov
On Sun, Sep 9, 2012 at 8:16 PM, Peter Maydell wrote: > On 9 September 2012 17:04, Max Filippov wrote: >> These are FP to integer and integer to FP conversion opcodes. >> See ISA, 4.3.10 for more details. >> >> Note that utrunc.s implementation follows ISS behaviour,

[Qemu-devel] [PATCH v2 02/10] softfloat: add NO_SIGNALING_NANS

2012-09-09 Thread Max Filippov
Architectures that don't have signaling NaNs can define NO_SIGNALING_NANS, it will make float*_is_quiet_nan return 1 for any NaN and float*_is_signaling_nan always return 0. Signed-off-by: Max Filippov --- fpu/softfloat-specialize.h | 64

[Qemu-devel] [PATCH v2 07/10] target-xtensa: implement FP0 arithmetic

2012-09-09 Thread Max Filippov
These are FP arithmetic opcodes. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/helper.h|7 + target-xtensa/op_helper.c | 37 +++ target-xtensa/translate.c | 61 - 3 files

[Qemu-devel] [PATCH v2 09/10] target-xtensa: implement FP1 group

2012-09-09 Thread Max Filippov
These are comparison and conditional move opcodes. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/helper.h|8 target-xtensa/op_helper.c | 47 ++ target-xtensa/translate.c | 81

[Qemu-devel] [PATCH v2 01/10] softfloat: make float_muladd_negate_* flags independent

2012-09-09 Thread Max Filippov
Flags passed into float{32,64}_muladd are treated as bits; assign independent bits to float_muladd_negate_* to allow precise control over what gets negated in float{32,64}_muladd. Signed-off-by: Max Filippov Reviewed-by: Aurelien Jarno --- fpu/softfloat.h |2 +- 1 files changed, 1

[Qemu-devel] [PATCH v2 03/10] target-xtensa: handle boolean option in overlays

2012-09-09 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/overlay_tool.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/overlay_tool.h b/target-xtensa/overlay_tool.h index a3a5650..e395053 100644 --- a/target-xtensa/overlay_tool.h +++ b/target-xtensa/overlay_tool.h

[Qemu-devel] [PATCH v2 04/10] target-xtensa: specialize softfloat NaN rules

2012-09-09 Thread Max Filippov
NaN propagation rule: leftmost NaN in the expression gets propagated to the result. Signed-off-by: Max Filippov --- Changes v1->v2: - drop float32_maybe_silence_nan specialization fpu/softfloat-specialize.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/

Re: [Qemu-devel] [PATCH v2 08/10] target-xtensa: implement FP0 conversions

2012-09-09 Thread Max Filippov
On Sun, Sep 9, 2012 at 9:24 PM, Marc Gauthier wrote: > Hi Max, > > Max Filippov wrote: >> On Sun, Sep 9, 2012 at 8:16 PM, Peter Maydell >> wrote: >> > On 9 September 2012 17:04, Max Filippov wrote: >> >> These are FP to integer and integer to FP con

Re: [Qemu-devel] Breakage

2012-09-17 Thread Max Filippov
udio-card-list=pcspk > > It looks like this particular configuration never worked, since > xtensa-softmmu was introduced (commit > cfa550c6acc6718c3f932e858366e3e1e81266d6). Other embedded platforms (I've tried cris-softmmu, lm32-softmmu, or32-softmmu, sh4-softmmu) give the same result. > Does it even make sense to have a PC-speaker on a Xtensa machine? > Should the machine have a i8254 PIT? I doubt that it's meaningful for any of the mentioned _architectures_, definitely not for xtensa. -- Thanks. -- Max

Re: [Qemu-devel] Shifts, ppc[64], xtensa

2012-09-18 Thread Max Filippov
wer's tcg - gototb's target was expected to be > always filled via tb_set_jmp_target (even though it's clearly not what > tcg/README prescribes, sorry about that). -- Thanks. -- Max

[Qemu-devel] [PATCH v3 00/10] target-xtensa: implement FP coprocessor option

2012-09-18 Thread Max Filippov
d drop float32_maybe_silence_nan specialization - fix fp registers access in gdbstub - replace float32_mul/div in FP-to-integer convertors with float32_scalbn - reimplement comparison with zero in FP-to-integer convertors Max Filippov (10): softfloat: make float_muladd_negate_* flags independent softfloa

[Qemu-devel] [PATCH v3 04/10] target-xtensa: specialize softfloat NaN rules

2012-09-18 Thread Max Filippov
NaN propagation rule: leftmost NaN in the expression gets propagated to the result. Signed-off-by: Max Filippov --- fpu/softfloat-specialize.h |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 50b54b8

[Qemu-devel] [PATCH v3 05/10] target-xtensa: add FP registers

2012-09-18 Thread Max Filippov
There are 16 32-bit FP registers (f0 - f15), control and status user registers (fcr, fsr). See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- gdbstub.c |8 +++ target-xtensa/cpu.h |3 ++ target-xtensa/helper.h|2 + target-xtensa

[Qemu-devel] [PATCH v3 08/10] target-xtensa: implement FP0 conversions

2012-09-18 Thread Max Filippov
These are FP to integer and integer to FP conversion opcodes. See ISA, 4.3.10 for more details. Note that ISA description for utrunc.s is currently incorrect and will be fixed in future revisions. Signed-off-by: Max Filippov --- target-xtensa/helper.h|4 +++ target-xtensa/op_helper.c

Re: [Qemu-devel] [PATCH v2 08/10] target-xtensa: implement FP0 conversions

2012-09-18 Thread Max Filippov
On Sun, Sep 9, 2012 at 8:38 PM, Max Filippov wrote: > On Sun, Sep 9, 2012 at 8:16 PM, Peter Maydell > wrote: >> On 9 September 2012 17:04, Max Filippov wrote: >>> These are FP to integer and integer to FP conversion opcodes. >>> See ISA, 4.3.10 for more detai

[Qemu-devel] [PATCH v3 03/10] target-xtensa: handle boolean option in overlays

2012-09-18 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/overlay_tool.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-xtensa/overlay_tool.h b/target-xtensa/overlay_tool.h index a3a5650..e395053 100644 --- a/target-xtensa/overlay_tool.h +++ b/target-xtensa/overlay_tool.h

[Qemu-devel] [PATCH v3 07/10] target-xtensa: implement FP0 arithmetic

2012-09-18 Thread Max Filippov
These are FP arithmetic opcodes. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/helper.h|7 + target-xtensa/op_helper.c | 37 +++ target-xtensa/translate.c | 61 - 3 files

[Qemu-devel] [PATCH v3 06/10] target-xtensa: implement LSCX and LSCI groups

2012-09-18 Thread Max Filippov
These are load/store instructions for FP registers with immediate or register index and optional base post-update. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/translate.c | 58 +--- 1 files changed, 54 insertions

[Qemu-devel] [PATCH v3 01/10] softfloat: make float_muladd_negate_* flags independent

2012-09-18 Thread Max Filippov
Flags passed into float{32,64}_muladd are treated as bits; assign independent bits to float_muladd_negate_* to allow precise control over what gets negated in float{32,64}_muladd. Signed-off-by: Max Filippov Reviewed-by: Aurelien Jarno --- fpu/softfloat.h |2 +- 1 files changed, 1

[Qemu-devel] [PATCH v3 10/10] target-xtensa: implement coprocessor context option

2012-09-18 Thread Max Filippov
In case Coprocessor Context option is enabled CPENABLE SR bits control whether access to coprocessors is allowed or would rise one of CoprocessorXDisabled exceptions. See ISA, 4.4.5 for more details. FP is coprocessor 0. Signed-off-by: Max Filippov --- target-xtensa/cpu.h |5

[Qemu-devel] [PATCH v3 02/10] softfloat: add NO_SIGNALING_NANS

2012-09-18 Thread Max Filippov
Architectures that don't have signaling NaNs can define NO_SIGNALING_NANS, it will make float*_is_quiet_nan return 1 for any NaN and float*_is_signaling_nan always return 0. Signed-off-by: Max Filippov --- fpu/softfloat-specialize.h | 67

[Qemu-devel] [PATCH v3 09/10] target-xtensa: implement FP1 group

2012-09-18 Thread Max Filippov
These are comparison and conditional move opcodes. See ISA, 4.3.10 for more details. Signed-off-by: Max Filippov --- target-xtensa/helper.h|8 target-xtensa/op_helper.c | 47 ++ target-xtensa/translate.c | 81

Re: [Qemu-devel] Shifts, ppc[64], xtensa

2012-09-19 Thread Max Filippov
On Wed, Sep 19, 2012 at 4:49 PM, malc wrote: > On Wed, 19 Sep 2012, Max Filippov wrote: > >> On Tue, Sep 18, 2012 at 11:52 PM, malc wrote: >> > >> > Looks like PPC/PPC64 is also hit by shift issues, on top of that xtensa >> >> malc, could you pleas

Re: [Qemu-devel] [PATCH RFT qom-cpu for-next] gdbstub: Fix gdb_register_coprocessor() register counting

2013-08-16 Thread Max Filippov
b_handle_packet(). >> >> Reported-by: Aneesh Kumar K.V >> Cc: qemu-sta...@nongnu.org (for 1.6) >> Cc: Peter Maydell >> Cc: Max Filippov >> Signed-off-by: Andreas Färber >> --- >> gdbstub.c | 6 -- >> include/qom/cpu.h | 2 ++ >>

[Qemu-devel] [PATCH] target-xtensa: add in_asm logging

2013-08-24 Thread Max Filippov
Signed-off-by: Max Filippov --- target-xtensa/translate.c | 8 1 file changed, 8 insertions(+) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 504cc53..c82d988 100644 --- a/target-xtensa/translate.c +++ b/target-xtensa/translate.c @@ -3018,6 +3018,14 @@ void

Re: [Qemu-devel] [PATCH 07/47] hw/arm/Makefile.objs: CONFIG_* created for each board

2013-08-25 Thread Max Filippov
| 35 --- > 2 files changed, 41 insertions(+), 7 deletions(-) [...] > +obj-$(CONFIG_STRONARM) += strongarm.o Typo in config symbol name. -- Thanks. -- Max

Re: [Qemu-devel] [PATCH 09/47] hw/m68k/Makefile.objs: Conditionally build boards

2013-08-25 Thread Max Filippov
336 100644 > --- a/default-configs/m68k-softmmu.mak > +++ b/default-configs/m68k-softmmu.mak > @@ -4,3 +4,6 @@ include pci.mak > include usb.mak > CONFIG_COLDFIRE=y > CONFIG_PTIMER=y > +CONFIG_AN5206=y > +CONFIG_DUMMY_M68K=y > +CONFIG_MCF5208=y -- Thanks. -- Max

[Qemu-devel] [PATCH 5/5] qemu-iotests: Overlapping cluster allocations

2013-08-26 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 107 + tests/qemu-iotests/060.out | 43 ++ tests/qemu-iotests/group | 1 + 3 files changed, 151

[Qemu-devel] [PATCH 4/5] qcow2: Check allocations in qcow2_check

2013-08-26 Thread Max Reitz
Adds a new function checking for overlapping cluster allocations. Furthermore, qcow2_check now marks the image as consistent if no corruptions have been found. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 414 ++ block/qcow2.c

[Qemu-devel] [PATCH 2/5] qcow2: Metadata overlap checks

2013-08-26 Thread Max Reitz
-by: Max Reitz --- block/qcow2-refcount.c | 142 + block/qcow2.h | 28 ++ 2 files changed, 170 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 1244693..c8141c8 100644 --- a/block/qcow2-refcount.c

[Qemu-devel] [PATCH 1/5] qcow2: Add corrupt bit

2013-08-26 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 44

[Qemu-devel] [PATCH 3/5] qcow2: Employ metadata overlap checks

2013-08-26 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 23 +++ block/qcow2-snapshot.c | 24

[Qemu-devel] [PATCH 0/5] qcow2: Add metadata overlap checks

2013-08-26 Thread Max Reitz
If a qcow2 image file becomes corrupted, any write may inadvertently overwrite important metadata structures such as the L1 table. This series adds functionality for detecting, preventing and (to some extent) repairing such collisions. Max Reitz (5): qcow2: Add corrupt bit qcow2: Metadata

Re: [Qemu-devel] [PATCH 4/5] qcow2: Check allocations in qcow2_check

2013-08-26 Thread Max Reitz
Hi, On Mon, Aug 26, 2013 at 15:04 +0200, Max Reitz wrote: Adds a new function checking for overlapping cluster allocations. Furthermore, qcow2_check now marks the image as consistent if no corruptions have been found. Signed-off-by: Max Reitz Such overlappings are often (if not always) found

[Qemu-devel] [PATCH 1/5] qcow2: Add corrupt bit

2013-08-26 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 44

[Qemu-devel] [PATCH 0/5] qcow2: Add metadata overlap checks

2013-08-26 Thread Max Reitz
If a qcow2 image file becomes corrupted, any write may inadvertently overwrite important metadata structures such as the L1 table. This series adds functionality for detecting, preventing and (to some extent) repairing such collisions. Max Reitz (5): qcow2: Add corrupt bit qcow2: Metadata

[Qemu-devel] [PATCH 2/5] qcow2: Metadata overlap checks

2013-08-26 Thread Max Reitz
-by: Max Reitz --- block/qcow2-refcount.c | 142 + block/qcow2.h | 28 ++ 2 files changed, 170 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 1244693..c8141c8 100644 --- a/block/qcow2-refcount.c

[Qemu-devel] [PATCH 4/5] qcow2: Check allocations in qcow2_check

2013-08-26 Thread Max Reitz
Adds a new function checking for overlapping cluster allocations. Furthermore, qcow2_check now marks the image as consistent if no corruptions have been found. Signed-off-by: Max Reitz --- block/qcow2-cluster.c | 414 ++ block/qcow2.c

[Qemu-devel] [PATCH 3/5] qcow2: Employ metadata overlap checks

2013-08-26 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 23 +++ block/qcow2-snapshot.c | 24

[Qemu-devel] [PATCH 5/5] qemu-iotests: Overlapping cluster allocations

2013-08-26 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 107 + tests/qemu-iotests/060.out | 43 ++ tests/qemu-iotests/group | 1 + 3 files changed, 151

Re: [Qemu-devel] [PATCH 0/5] qcow2: Add metadata overlap checks

2013-08-26 Thread Max Reitz
Hi, Okay, so this did arrive after all (albeit 4 h late) – sorry for the duplicate (see the series from 15:18). Kind regards, Max

Re: [Qemu-devel] [PATCH 1/5] qcow2: Add corrupt bit

2013-08-27 Thread Max Reitz
Am 27.08.2013 11:54, schrieb Kevin Wolf: Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful

Re: [Qemu-devel] [PATCH 2/5] qcow2: Metadata overlap checks

2013-08-27 Thread Max Reitz
Am 27.08.2013 12:17, schrieb Kevin Wolf: Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used

Re: [Qemu-devel] [PATCH 3/5] qcow2: Employ metadata overlap checks

2013-08-27 Thread Max Reitz
Am 27.08.2013 13:32, schrieb Kevin Wolf: Am 26.08.2013 um 15:04 hat Max Reitz geschrieben: The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17

Re: [Qemu-devel] trigger a gpio interrupt inside qemu

2013-08-27 Thread Max Filippov
ve the irq at -12002... > irq:[927016]receive the irq at -12002... > irq:[927017]receive the irq at -12002... > irq:[927018]receive the irq at -12002... > ... > can somebody tell me what's wrong? You have raised IRQ in your pl061_raise_irq(), but you haven't lowered it. -- Thanks. -- Max

[Qemu-devel] [PATCH 2/3] qcow2: Implement bdrv_amend_options

2013-08-28 Thread Max Reitz
-by: Max Reitz --- block/qcow2-cluster.c | 66 ++ block/qcow2.c | 182 ++ block/qcow2.h | 2 + 3 files changed, 250 insertions(+) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index cca76d4..ac50db2

[Qemu-devel] [PATCH 0/3] block/qcow2: Image file option amendment

2013-08-28 Thread Max Reitz
This series adds support to qemu-img, block and qcow2 for amending image options on existing image files. Max Reitz (3): block: Image file option amendment qcow2: Implement bdrv_amend_options qemu-iotest: qcow2 image option amendment block.c| 8 ++ block/qcow2

[Qemu-devel] [PATCH 3/3] qemu-iotest: qcow2 image option amendment

2013-08-28 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- This test is numbered 061 for not interfering with my "metadata overlap checks" series (although I will have to adapt my code to those new checks anyway when/if they are included in master). --- tests/qe

[Qemu-devel] [PATCH 1/3] block: Image file option amendment

2013-08-28 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c

Re: [Qemu-devel] Fwd: trigger a gpio interrupt inside qemu

2013-08-28 Thread Max Filippov
l qemu_set_irq(gPl061->irq, 0) and write to that register from your driver's ISR. Or you can choose an edge-triggered IRQ to play with. > 2013/8/27 Max Filippov >> >> On Tue, Aug 27, 2013 at 3:55 PM, she roy wrote: >> > How to lower it? Thank you very much! >&g

Re: [Qemu-devel] Fwd: trigger a gpio interrupt inside qemu

2013-08-28 Thread Max Filippov
led by level. You need to update GPIOIC register from your driver's ISR to clear it. > > 2013/8/28 Max Filippov >> >> On Wed, Aug 28, 2013 at 12:01 PM, she roy wrote: >> > I tested qemu_irq_pulse(gPl061->irq); the guest did not generate an >> > interr

Re: [Qemu-devel] Fwd: trigger a gpio interrupt inside qemu

2013-08-28 Thread Max Filippov
On Wed, Aug 28, 2013 at 12:27 PM, Max Filippov wrote: > On Wed, Aug 28, 2013 at 12:19 PM, she roy wrote: >> PL061 has a register GPIOIS to control if the interrupt is lever-triggered >> or edge-triggered, I will try this. Thanks. > > This register defines which event on

Re: [Qemu-devel] [PATCH 2/3] qcow2: Implement bdrv_amend_options

2013-08-28 Thread Max Reitz
Hi, Am 28.08.2013 13:06, schrieb Kevin Wolf: Am 28.08.2013 um 10:08 hat Max Reitz geschrieben: Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags

Re: [Qemu-devel] [PATCH 3/3] qemu-iotest: qcow2 image option amendment

2013-08-28 Thread Max Reitz
Am 28.08.2013 13:40, schrieb Kevin Wolf: Am 28.08.2013 um 10:08 hat Max Reitz geschrieben: Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- This test is numbered 061 for not interfering with my "metadata overlap checks" series (although I will have t

Re: [Qemu-devel] [PATCH 2/3] qcow2: Implement bdrv_amend_options

2013-08-28 Thread Max Reitz
Hi, Am 28.08.2013 13:48, schrieb Kevin Wolf: Am 28.08.2013 um 13:39 hat Max Reitz geschrieben: +/* clear incompatible features */ +if (s->incompatible_features & QCOW2_INCOMPAT_DIRTY) { +BdrvCheckResult result; +ret = qcow2_check(bs, &result, BDRV

Re: [Qemu-devel] [PATCH 3/3] qemu-iotest: qcow2 image option amendment

2013-08-28 Thread Max Reitz
Hi, Am 28.08.2013 13:54, schrieb Kevin Wolf: Am 28.08.2013 um 13:47 hat Max Reitz geschrieben: Am 28.08.2013 13:40, schrieb Kevin Wolf: Am 28.08.2013 um 10:08 hat Max Reitz geschrieben: Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- This test is numbered

[Qemu-devel] [PATCH v2 0/5] qcow2: Add metadata overlap checks

2013-08-28 Thread Max Reitz
ality Max Reitz (5): qcow2: Add corrupt bit qcow2: Metadata overlap checks qcow2: Employ metadata overlap checks qcow2: More complete consistency check qemu-iotests: Overlapping cluster allocations block/qcow2-cache.c| 17 ++ block/qcow2-cluster.c | 25 ++- block/

[Qemu-devel] [PATCH v2 1/5] qcow2: Add corrupt bit

2013-08-28 Thread Max Reitz
This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful). Signed-off-by: Max Reitz --- block/qcow2.c | 45

[Qemu-devel] [PATCH v2 5/5] qemu-iotests: Overlapping cluster allocations

2013-08-28 Thread Max Reitz
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz --- tests/qemu-iotests/060 | 111 + tests/qemu-iotests/060.out | 37 +++ tests/qemu-iotests/group | 1 + 3 files changed, 149 insertions

[Qemu-devel] [PATCH v2 4/5] qcow2: More complete consistency check

2013-08-28 Thread Max Reitz
The qcow2_check_refcounts function has been extended to be able to fix OFLAG_COPIED errors and multiple references on refcount blocks. If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz --- block

[Qemu-devel] [PATCH v2 2/5] qcow2: Metadata overlap checks

2013-08-28 Thread Max Reitz
-by: Max Reitz --- block/qcow2-refcount.c| 148 ++ block/qcow2.h | 28 + include/monitor/monitor.h | 1 + monitor.c | 1 + 4 files changed, 178 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2

[Qemu-devel] [PATCH v2 3/5] qcow2: Employ metadata overlap checks

2013-08-28 Thread Max Reitz
The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17 + block/qcow2-cluster.c | 21 + block/qcow2-snapshot.c | 22

Re: [Qemu-devel] [PATCH v2 1/5] qcow2: Add corrupt bit

2013-08-29 Thread Max Reitz
Am 29.08.2013 10:23, schrieb Kevin Wolf: Am 28.08.2013 um 16:55 hat Max Reitz geschrieben: This adds an incompatible bit indicating corruption to qcow2. Any image with this bit set may not be written to unless for repairing (and subsequently clearing the bit if the repair has been successful

Re: [Qemu-devel] [PATCH v2 2/5] qcow2: Metadata overlap checks

2013-08-29 Thread Max Reitz
Am 29.08.2013 10:51, schrieb Kevin Wolf: Am 28.08.2013 um 16:55 hat Max Reitz geschrieben: Two new functions are added; the first one checks a given range in the image file for overlaps with metadata (main header, L1 tables, L2 tables, refcount table and blocks). The second one should be used

[Qemu-devel] [PATCH] option: Add assigned flag to QEMUOptionParameter

2013-08-29 Thread Max Reitz
Adds an "assigned" flag to QEMUOptionParameter which is cleared at the beginning of parse_option_parameters and set on (successful) set_option_parameter and set_option_parameter_int. Signed-off-by: Max Reitz --- include/qemu/option.h | 1 + util/qemu-option.c| 9 + 2 fil

Re: [Qemu-devel] [PATCH v2 3/5] qcow2: Employ metadata overlap checks

2013-08-29 Thread Max Reitz
Am 29.08.2013 11:18, schrieb Kevin Wolf: Am 28.08.2013 um 16:55 hat Max Reitz geschrieben: The pre-write overlap check function is now called before most of the qcow2 writes (aborting it on collision or other error). Signed-off-by: Max Reitz --- block/qcow2-cache.c| 17

[Qemu-devel] [PATCH] qcow2-refcount: Snapshot update for zero clusters

2013-08-29 Thread Max Reitz
Do not try to update the refcount for zero clusters in qcow2_update_snapshot_refcount. Signed-off-by: Max Reitz --- block/qcow2-refcount.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 1244693..7555242

[Qemu-devel] [PATCH v2 0/3] block/qcow2: Image file option amendment

2013-08-29 Thread Max Reitz
Zero cluster expansion for inactive L2 tables - Correct handling of preallocated zero clusters - More test cases Max Reitz (3): block: Image file option amendment qcow2: Implement bdrv_amend_options qemu-iotest: qcow2 image option amendment block.c| 8 ++ block/

[Qemu-devel] [PATCH v2 3/3] qemu-iotest: qcow2 image option amendment

2013-08-29 Thread Max Reitz
Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz --- tests/qemu-iotests/061 | 152 ++ tests/qemu-iotests/061.out | 318 + tests/qemu-iotests/group | 1 + 3 files changed, 471 insertions(+) create

[Qemu-devel] [PATCH v2 1/3] block: Image file option amendment

2013-08-29 Thread Max Reitz
This patch adds the "amend" option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz --- block.c

[Qemu-devel] [PATCH v2 2/3] qcow2: Implement bdrv_amend_options

2013-08-29 Thread Max Reitz
-by: Max Reitz --- block/qcow2-cluster.c | 154 ++ block/qcow2.c | 184 ++ block/qcow2.h | 2 + 3 files changed, 340 insertions(+) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c

Re: [Qemu-devel] [PATCH v2 4/5] qcow2: More complete consistency check

2013-08-29 Thread Max Reitz
Am 29.08.2013 13:36, schrieb Kevin Wolf: Am 28.08.2013 um 16:55 hat Max Reitz geschrieben: The qcow2_check_refcounts function has been extended to be able to fix OFLAG_COPIED errors and multiple references on refcount blocks. If no corruptions remain after an image repair (and no errors have

Re: [Qemu-devel] [PATCH] qcow2-refcount: Snapshot update for zero clusters

2013-08-29 Thread Max Reitz
Am 29.08.2013 14:30, schrieb Eric Blake: On 08/29/2013 04:16 AM, Max Reitz wrote: Do not try to update the refcount for zero clusters in qcow2_update_snapshot_refcount. Why? What does this fix? (Hint - your commit message could use more details, and you should add a testsuite addition that

<    1   2   3   4   5   6   7   8   9   10   >