qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/29] kvm: accept non-mapped memory in kvm_dirt


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH 10/29] kvm: accept non-mapped memory in kvm_dirty_pages_log_change
Date: Tue, 26 May 2015 16:10:40 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, 04/27 18:28, Paolo Bonzini wrote:
> It is okay if memory is not mapped into the guest but has dirty logging
> enabled.  When this happens, KVM will not do anything and only accesses
> from the host will be logged.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>

Could you explain where this change is needed?

Fam

> ---
>  kvm-all.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/kvm-all.c b/kvm-all.c
> index 989fdd9..616bf04 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -335,12 +335,10 @@ static int kvm_dirty_pages_log_change(hwaddr phys_addr,
>      KVMSlot *mem = kvm_lookup_matching_slot(s, phys_addr, phys_addr + size);
>  
>      if (mem == NULL)  {
> -        fprintf(stderr, "BUG: %s: invalid parameters " TARGET_FMT_plx "-"
> -                TARGET_FMT_plx "\n", __func__, phys_addr,
> -                (hwaddr)(phys_addr + size - 1));
> -        return -EINVAL;
> +        return 0;
> +    } else {
> +        return kvm_slot_dirty_pages_log_change(mem, log_dirty);
>      }
> -    return kvm_slot_dirty_pages_log_change(mem, log_dirty);
>  }
>  
>  static void kvm_log_start(MemoryListener *listener,
> -- 
> 1.8.3.1
> 
> 
> 



reply via email to

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