Hello Paolo,
+-- On Mon, 25 Jan 2016, Paolo Bonzini wrote --+
| This should be handled correctly by address_space_translate_internal:
|
| if (memory_region_is_ram(mr)) {
| diff = int128_sub(section->size, int128_make64(addr));
| *plen = int128_get64(int128_min(diff, int128_m
On 25/01/2016 19:19, P J P wrote:
> +-- On Mon, 25 Jan 2016, Paolo Bonzini wrote --+
> | > static inline bool memory_access_is_direct(MemoryRegion *mr, bool
> is_write)
> | > {
> | > if (memory_region_is_ram(mr)) {
> | > -return !(is_write && mr->readonly);
> | > +return (
+-- On Mon, 25 Jan 2016, Paolo Bonzini wrote --+
| > static inline bool memory_access_is_direct(MemoryRegion *mr, bool is_write)
| > {
| > if (memory_region_is_ram(mr)) {
| > -return !(is_write && mr->readonly);
| > +return (is_write && !mr->readonly);
|
| Read or write?
On 25/01/2016 15:29, P J P wrote:
> diff --git a/exec.c b/exec.c
> index 0a4a0c5..98d97d3 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -375,7 +375,7 @@ address_space_translate_internal(AddressSpaceDispatch *d,
> hwaddr addr, hwaddr *x
> static inline bool memory_access_is_direct(MemoryRegion *mr,
From: Prasad J Pandit
While checking r/w access in 'memory_access_is_direct' routine
a glitch in the expression leads to segmentation fault while
performing dma read operation.
Reported-by: Donghai Zdh
Signed-off-by: Prasad J Pandit
---
exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio