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: Janosch Frank
Subject: Re: [Qemu-devel] [PATCH 01/11] s390x/kvm: Rework cmma management
Date: Thu, 13 Jul 2017 07:37:17 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 12.07.2017 15:49, Cornelia Huck wrote:
> 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?

I guess you mean KVM_S390_VM_MEM_CLR_CMMA, yes that only
manipulates/clears the PGSTE values but can not disable the cmma
facility. Disabling that on a running VM would be "interesting" at best.

> 
> Confused me a bit at first, but
> 
> Reviewed-by: Cornelia Huck <address@hidden>

Thanks!


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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