qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 01/11] s390x/kvm: Rework cmma management


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH 01/11] s390x/kvm: Rework cmma management
Date: Wed, 12 Jul 2017 15:49:03 +0200

On Wed, 12 Jul 2017 14:57:35 +0200
Christian Borntraeger <address@hidden> wrote:

> From: Janosch Frank <address@hidden>
> 
> Let's keep track of cmma enablement and move the mem_path check into
> the actual enablement. This now also warns users that do not use
> cpu-models about disabled cmma when using huge pages.
> 
> Signed-off-by: Janosch Frank <address@hidden>
> Signed-off-by: Christian Borntraeger <address@hidden>
> ---
>  target/s390x/cpu.h |  1 +
>  target/s390x/kvm.c | 26 +++++++++++++++++---------
>  2 files changed, 18 insertions(+), 9 deletions(-)

> @@ -177,6 +179,11 @@ int kvm_s390_set_mem_limit(KVMState *s, uint64_t 
> new_limit, uint64_t *hw_limit)
>      return kvm_vm_ioctl(s, KVM_SET_DEVICE_ATTR, &attr);
>  }
>  
> +int kvm_s390_cmma_active(void)
> +{
> +    return active_cmma;
> +}

This is rather "has cmma ever been enabled"...

> +
>  static bool kvm_s390_cmma_available(void)
>  {
>      static bool initialized, value;
> @@ -197,7 +204,7 @@ void kvm_s390_cmma_reset(void)
>          .attr = KVM_S390_VM_MEM_CLR_CMMA,
>      };
>  
> -    if (mem_path || !kvm_s390_cmma_available()) {
> +    if (!kvm_s390_cmma_active()) {
>          return;
>      }

...as you don't clear it on reset, right?

Confused me a bit at first, but

Reviewed-by: Cornelia Huck <address@hidden>



reply via email to

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