qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v7 3/4] kvm: split too big memory section on several memslots


From: Peter Xu
Subject: Re: [PATCH v7 3/4] kvm: split too big memory section on several memslots
Date: Wed, 25 Sep 2019 11:12:11 +0800
User-agent: Mutt/1.11.4 (2019-03-13)

On Tue, Sep 24, 2019 at 10:47:50AM -0400, Igor Mammedov wrote:

[...]

> @@ -2877,6 +2912,7 @@ static bool kvm_accel_has_memory(MachineState *ms, 
> AddressSpace *as,
>  
>      for (i = 0; i < kvm->nr_as; ++i) {
>          if (kvm->as[i].as == as && kvm->as[i].ml) {
> +            size = MIN(kvm_max_slot_size, size);
>              return NULL != kvm_lookup_matching_slot(kvm->as[i].ml,
>                                                      start_addr, size);
>          }

Ideally we could also check that the whole (start_addr, size) region
is covered by KVM memslots here, but with current code I can't think
of a case where the result doesn't match with only checking the 1st
memslot. So I assume it's fine.

Reviewed-by: Peter Xu <address@hidden>

-- 
Peter Xu



reply via email to

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