qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 8/8] exec: add read callback for notdirty memory


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 8/8] exec: add read callback for notdirty memory region
Date: Thu, 13 Sep 2018 12:53:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 12/09/2018 18:01, Li Qiang wrote:
> From: Li Qiang <address@hidden>
> 
> Signed-off-by: Li Qiang <address@hidden>

This cannot happen, since TLB_NOTDIRTY is only added to the addr_write
member (see accel/tcg/cputlb.c).

Paolo

> ---
>  exec.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/exec.c b/exec.c
> index 6826c8337d..3cd5ad2cae 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -2681,6 +2681,11 @@ void memory_notdirty_write_complete(NotDirtyInfo *ndi)
>      }
>  }
>  
> +static uint64_t notdirty_mem_read(void *opaque, hwaddr addr, unsigned size)
> +{
> +    return 0;
> +}
> +
>  /* Called within RCU critical section.  */
>  static void notdirty_mem_write(void *opaque, hwaddr ram_addr,
>                                 uint64_t val, unsigned size)
> @@ -2702,6 +2707,7 @@ static bool notdirty_mem_accepts(void *opaque, hwaddr 
> addr,
>  }
>  
>  static const MemoryRegionOps notdirty_mem_ops = {
> +    .read = notdirty_mem_read,
>      .write = notdirty_mem_write,
>      .valid.accepts = notdirty_mem_accepts,
>      .endianness = DEVICE_NATIVE_ENDIAN,
> @@ -2965,6 +2971,7 @@ static uint16_t dummy_section(PhysPageMap *map, 
> FlatView *fv, MemoryRegion *mr)
>      return phys_section_add(map, &section);
>  }
>  
> +
>  static void readonly_mem_write(void *opaque, hwaddr addr,
>                                 uint64_t val, unsigned size)
>  {
> 




reply via email to

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