[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [RFC PATCH] exec: Support non-direct memory writes in cpu

From: Paolo Bonzini
Subject: Re: [Qemu-arm] [RFC PATCH] exec: Support non-direct memory writes in cpu_memory_rw_debug
Date: Wed, 29 Jun 2016 17:55:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1

On 28/06/2016 23:44, Andrey Smirnov wrote:
> Add code to support writing to memory mapped peripherals via
> cpu_memory_rw_debug(). The code of that function already supports
> reading from such memory regions, so this commit makes that
> functionality "symmetric".

It's not entirely symmetric however, as you cannot write to the MMIO
registers of romd devices.  Is this correct?  So I'll leave to others
the review of whether the functionality is appropriate.  Regarding the code:

> @@ -2621,7 +2625,7 @@ static MemTxResult 
> address_space_write_continue(AddressSpace *as, hwaddr addr,
>  }
>  MemTxResult address_space_write(AddressSpace *as, hwaddr addr, MemTxAttrs 
> attrs,
> -                                const uint8_t *buf, int len)
> +                                const uint8_t *buf, int len, bool force)

I would prefer to leave this API as is, and instead add a new API such
as address_space_write_debug or address_space_program.  It's okay to add
the "force" argument to address_space_write_continue.

> +typedef enum {
> +    MEMTX_READ,
> +} MemTxType;

This needs comments.  If you go with address_space_write_debug, rename



reply via email to

[Prev in Thread] Current Thread [Next in Thread]