[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <98d3b4fb-f875-d833-2a75-5412cd426ec7@linux.ibm.com>
Date: Wed, 1 Sep 2021 11:46:02 +0200
From: Pierre Morel <pmorel@...ux.ibm.com>
To: David Hildenbrand <david@...hat.com>, kvm@...r.kernel.org
Cc: linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
borntraeger@...ibm.com, frankja@...ux.ibm.com, cohuck@...hat.com,
thuth@...hat.com, imbrenda@...ux.ibm.com, hca@...ux.ibm.com,
gor@...ux.ibm.com
Subject: Re: [PATCH v3 2/3] s390x: KVM: Implementation of Multiprocessor
Topology-Change-Report
On 8/31/21 4:03 PM, David Hildenbrand wrote:
> On 03.08.21 10:26, Pierre Morel wrote:
...snip...
>> @@ -819,6 +820,23 @@ int kvm_vm_ioctl_enable_cap(struct kvm *kvm,
>> struct kvm_enable_cap *cap)
>> icpt_operexc_on_all_vcpus(kvm);
>> r = 0;
>> break;
>> + case KVM_CAP_S390_CPU_TOPOLOGY:
>> + mutex_lock(&kvm->lock);
>> + if (kvm->created_vcpus) {
>> + r = -EBUSY;
>> + } else {
>> + set_kvm_facility(kvm->arch.model.fac_mask, 11);
>> + set_kvm_facility(kvm->arch.model.fac_list, 11);
>> + r = 0;
>> + }
>> + mutex_unlock(&kvm->lock);
>> + VM_EVENT(kvm, 3, "ENABLE: CPU TOPOLOGY %s",
>> + r ? "(not available)" : "(success)");
>> + break;
>> +
>> + r = -EINVAL;
>> + break;
>> +
>> default:
>> r = -EINVAL;
>> break;
This above enables the facility 11.
...snip...
>> @@ -3198,6 +3239,11 @@ static int kvm_s390_vcpu_setup(struct kvm_vcpu
>> *vcpu)
>> vcpu->arch.sie_block->ecb |= ECB_HOSTPROTINT;
>> if (test_kvm_facility(vcpu->kvm, 9))
>> vcpu->arch.sie_block->ecb |= ECB_SRSI;
>> +
>> + /* PTF needs both host and guest facilities to enable
>> interpretation */
>> + if (test_kvm_facility(vcpu->kvm, 11) && test_facility(11))
>> + vcpu->arch.sie_block->ecb |= ECB_PTF;
>
>
> Again, doesn't test_kvm_facility(vcpu->kvm, 11) imply that we have host
> support by checking fac_mask?
>
--
Pierre Morel
IBM Lab Boeblingen
Powered by blists - more mailing lists