Re: [Qemu-devel] [PATCH v2 01/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
On Tue, Mar 1, 2016 at 1:05 PM, Eric Blake wrote: > On 03/01/2016 08:57 AM, Martin Galvan wrote: > > Missing a S-o-b line; we cannot accept patches unless you sign them: > http://wiki.qemu.org/Contribute/SubmitAPatch > https://git.kernel.org/cgit/linux/kernel/git/torvalds

[Qemu-devel] [PATCH v2 05/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- hw/arm/boot.c | 2 +- hw/arm/musicpal.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 0a56d34c..4dd18f6 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -290,7 +290,7 @@ static void set_kernel_args(const struct arm_boot_info *i

[Qemu-devel] [PATCH v2 11/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- hw/net/vmware_utils.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index c0dbb2f..6887178 100644 --- a/hw/net/vmware_utils.h +++ b/hw/net/vmware_utils.h @@ -26,33 +26,34 @@ * */ static inline void -vmw_

[Qemu-devel] [PATCH v2 10/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- scripts/coverity-model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coverity-model.c b/scripts/coverity-model.c index ee5bf9d..97759b0 100644 --- a/scripts/coverity-model.c +++ b/scripts/coverity-model.c @@ -68,7 +68,7 @@ static void __bufread(uint8_t *buf, ssi

[Qemu-devel] [PATCH v2 12/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- include/hw/sparc/sun4m.h | 6 +++--- target-sparc/cpu.h| 2 +- target-sparc/mmu_helper.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/hw/sparc/sun4m.h b/include/hw/sparc/sun4m.h index 9c17425..fe0de1e 100644 --- a/include/hw/sparc/sun4m.h +++ b/in

[Qemu-devel] [PATCH v2 09/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- include/qom/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 1df7cb4..0d23e0a 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -148,7 +148,7 @@ typedef struct CPUClass { int is_write,

[Qemu-devel] [PATCH v2 08/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index e99ca8c..9f5212a 100644 --- a/monitor.c +++ b/monitor.c @@ -1175,7 +1175,8 @@ static void monitor_printc(Monitor *mon, int c) static void memory_dump(Monitor *mon, int count, int format

[Qemu-devel] [PATCH v2 06/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- hw/audio/marvell_88w8618.c | 2 +- hw/audio/milkymist-ac97.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index a6ca180..c4edf99 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -64,

[Qemu-devel] [PATCH v2 03/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- disas/cris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/cris.c b/disas/cris.c index 7f35bc0..241db56 100644 --- a/disas/cris.c +++ b/disas/cris.c @@ -2555,7 +2555,7 @@ print_insn_cris_generic (bfd_vma memaddr, disassemble_info *info,

[Qemu-devel] [PATCH v2 04/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- disas/sh4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/sh4.c b/disas/sh4.c index 8b0415d..24653a4 100644 --- a/disas/sh4.c +++ b/disas/sh4.c @@ -2031,7 +2031,7 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info) if (disp_pc && strcmp (op->n

[Qemu-devel] [PATCH v2 07/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- hw/net/xgmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 0c5f793..b992435 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -203,8 +203,8 @@ static void xgmac_write_desc(XgmacState *s, struct desc *d, int rx) static void x

[Qemu-devel] [PATCH v2 13/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- dma-helpers.c| 2 +- gdbstub.c| 3 ++- hw/dma/sun4m_iommu.c | 4 ++-- hw/net/dp8393x.c | 8 hw/net/mcf_fec.c | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index 4ad0bca..8e56ec5 100644 --- a/dma-hel

[Qemu-devel] [PATCH v2 01/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- cpus.c| 2 +- exec.c| 29 +++-- include/exec/cpu-all.h| 2 +- include/exec/cpu-common.h | 10 +- include/exec/memory.h | 10 +- kvm-all.c | 2 +- 6 files changed, 28 insertions(+), 27 del

[Qemu-devel] [PATCH v2 02/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
--- disas/s390.c | 3 ++- hw/s390x/virtio-ccw.c | 2 +- target-s390x/mmu_helper.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/disas/s390.c b/disas/s390.c index 1f167d2..fff6135 100644 --- a/disas/s390.c +++ b/disas/s390.c @@ -287,7 +287,8 @@ print_insn

[Qemu-devel] [PATCH v2 00/13] Use unsigned types for the 'len' argument of all memory read/write functions

2016-03-01 Thread Martin Galvan
Changes in v2: * Split the patch in several parts so the various submaintainers can look at it. When looking at address_space_read_continue I noticed the 'len' variable was a signed int, while it clearly should be a hwaddr or some other unsigned type. I started looking around and saw that this err

Re: [Qemu-devel] [PING][PATCH] Use unsigned types for the 'len' argument of all memory read/write functions

2016-02-29 Thread Martin Galvan
On Mon, Feb 29, 2016 at 11:59 AM, Paolo Bonzini wrote: > Hi Martin, > > despite the apparent simplicity, this patch is very hard to review. I > suggest splitting it in several parts so that the various submaintainers > can look at it. I can take a look at cpus.c, exec.c, kvm-all.c and > include/

[Qemu-devel] [PING][PATCH] Use unsigned types for the 'len' argument of all memory read/write functions

2016-02-29 Thread Martin Galvan
erparts as much as possible. If this patch goes in, I may keep working on some other type errors I saw. Signed-off-by: Martin Galvan --- cpus.c | 2 +- disas/cris.c | 2 +- disas/s390.c | 3 ++- disas/sh4.c| 2 +- dma

[Qemu-devel] [PATCH] Use unsigned types for the 'len' argument of all memory read/write functions

2016-02-22 Thread Martin Galvan
erparts as much as possible. If this patch goes in, I may keep working on some other type errors I saw. Signed-off-by: Martin Galvan --- cpus.c | 2 +- disas/cris.c | 2 +- disas/s390.c | 3 ++- disas/sh4.c| 2 +- dma

Re: [Qemu-devel] [PATCH] Target-arm: Add the Cortex-M4 CPU

2015-05-29 Thread Martin Galvan
On Fri, May 29, 2015 at 4:15 PM, Liviu Ionescu wrote: > this is fine with me. > > unfortunately I cannot review your patch, since I have not enough experience > with that part of qemu. I think Peter M is the maintainer for Target-ARM. Peter, is this OK to commit? -- Martin Galv

Re: [Qemu-devel] [Patch v4 6/8] target_arm: Change the reset values based on the ELF entry

2014-10-07 Thread Martin Galvan
On Tue, Oct 7, 2014 at 11:13 AM, Alistair Francis wrote: > The Netduino 2 machine won't run unless the reset_pc is based > on the ELF entry point. > > Signed-off-by: Alistair Francis > Signed-off-by: Peter Crosthwaite > --- > V2: > - Malloc straight away, thanks to Peter C > > hw/arm/armv7m.c

Re: [Qemu-devel] [PATCH] cpu-exec: Don't mask out external interrupts when single-stepping an invalid instruction.

2014-09-15 Thread Martin Galvan
haviour be? I think we should return control back to gdb, but we shouldn't try to translate that instruction again. How could we handle this in a clean way? On Fri, Sep 12, 2014 at 12:50 PM, Martin Galvan wrote: > On Fri, Sep 12, 2014 at 12:37 PM, Richard Henderson wrote: >> Alpha do_

Re: [Qemu-devel] [PATCH] cpu-exec: Don't mask out external interrupts when single-stepping an invalid instruction.

2014-09-12 Thread Martin Galvan
On Fri, Sep 12, 2014 at 12:37 PM, Richard Henderson wrote: > Alpha do_interrupt doesn't mess with cpu->interrupt_request at all, and > doesn't > generate two calls to do_interrupt. The one call finds the vector for the > given interrupt, modifies the PC, and swaps to the shadow register bank. >

Re: [Qemu-devel] [PATCH] cpu-exec: Don't mask out external interrupts when single-stepping an invalid instruction.

2014-09-12 Thread Martin Galvan
On Thu, Sep 11, 2014 at 8:52 PM, Richard Henderson wrote: > On 09/11/2014 03:13 PM, Peter Maydell wrote: > In particular, I'd expect the invalid exception to be recognized, and then the > cpu loop exited, before the single-step exception could overwrite it. E.g. > how > things work on alpha: > >

[Qemu-devel] [PATCH] cpu-exec: Don't mask out external interrupts when single-stepping an invalid instruction.

2014-09-11 Thread Martin Galvan
've added an additional flag, SSTEP_EXCEPTION, that will be set in the exception_with_syndrome instruction generated when trying to translate the invalid instruction and will be cleared after checking for cpu->singlestep_enabled in cpu_exec. Signed-off-by: Martin Galvan --- The long

Re: [Qemu-devel] [RFC v1 4/6] target_arm: Update armv7_init to support more parameters

2014-09-10 Thread Martin Galvan
On Tue, Sep 9, 2014 at 8:43 PM, Alistair Francis wrote: > On Wed, Sep 10, 2014 at 12:03 AM, Martin Galvan > wrote: >>>> @@ -259,7 +272,13 @@ qemu_irq *armv7m_init(MemoryRegion *system_memory, >>>> vmstate_register_ram_global(hack); >>>>

Re: [Qemu-devel] [RFC v1 4/6] target_arm: Update armv7_init to support more parameters

2014-09-09 Thread Martin Galvan
>> @@ -259,7 +272,13 @@ qemu_irq *armv7m_init(MemoryRegion *system_memory, >> vmstate_register_ram_global(hack); >> memory_region_add_subregion(system_memory, 0xf000, hack); >> >> -qemu_register_reset(armv7m_reset, cpu); >> +reset_args = (ARMV7MResetArgs) { >> +.cpu =

Re: [Qemu-devel] [PATCH v3] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-09-08 Thread Martin Galvan
On Sat, Sep 6, 2014 at 8:00 AM, Peter Crosthwaite wrote: > On Sat, Sep 6, 2014 at 8:42 PM, Peter Maydell > wrote: >> On 6 September 2014 03:45, Peter Crosthwaite >> wrote: >>> CC Alistair who is into ARMv7M >>> >>> On Sat, Sep

[Qemu-devel] [PATCH v3] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-09-05 Thread Martin Galvan
tex-M. Signed-off-by: Martin Galvan --- Changed in v3: Fixed a few style issues. Changed in v2: We're not adding initial_MSP and initial_PC to the CPU state. Instead, we're loading the initial values using ldl_phys. target-arm/cpu.c | 34 +++--- 1 f

Re: [Qemu-devel] [PATCH v2] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-09-05 Thread Martin Galvan
Once again, you're right. I'll fix that right away and send v3. On Fri, Sep 5, 2014 at 2:43 PM, Peter Maydell wrote: > On 4 September 2014 19:12, Martin Galvan > wrote: > > Thanks for this patch. I think it's generally right > but could use a little tweaking for s

[Qemu-devel] [PATCH v2] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-09-04 Thread Martin Galvan
When calling qemu_system_reset after startup on a Cortex-M CPU, the initial values of PC, MSP and the Thumb bit weren't set correctly. In particular, since Thumb was 0, a Usage Fault would arise immediately after trying to excecute any instruction on a Cortex-M. Signed-off-by: Martin G

Re: [Qemu-devel] [PATCH] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-08-19 Thread Martin Galvan
On Tue, Aug 19, 2014 at 11:16 AM, Peter Maydell wrote: > On 19 August 2014 14:25, Martin Galvan > wrote: >> On Tue, Aug 19, 2014 at 10:06 AM, Peter Maydell >> wrote: >>> I'm afraid this looks like the wrong fix for the problem you're seeing. >>> Th

Re: [Qemu-devel] [PATCH] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-08-19 Thread Martin Galvan
On Tue, Aug 19, 2014 at 10:06 AM, Peter Maydell wrote: > > On 11 August 2014 17:50, Martin Galvan > wrote: > > When calling qemu_system_reset after startup on a Cortex-M CPU, the initial > > values of PC, MSP and the Thumb bit weren't set correctly. In particular, >

Re: [Qemu-devel] [PATCH] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-08-18 Thread Martin Galvan
Ping http://patchwork.ozlabs.org/patch/379134/ On Mon, Aug 11, 2014 at 1:50 PM, Martin Galvan < martin.gal...@tallertechnologies.com> wrote: > When calling qemu_system_reset after startup on a Cortex-M CPU, the > initial values of PC, MSP and the Thumb bit weren't set correctly

[Qemu-devel] [PATCH] target-arm: Fix resetting issues on ARMv7-M CPUs

2014-08-11 Thread Martin Galvan
When calling qemu_system_reset after startup on a Cortex-M CPU, the initial values of PC, MSP and the Thumb bit weren't set correctly. In particular, since Thumb was 0, an Usage Fault would arise immediately after trying to excecute any instruction on a Cortex-M. Signed-off-by: Martin G