[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 07 Jul 2021 13:42:23 +0200
From: Cornelia Huck <cohuck@...hat.com>
To: Janis Schoetterl-Glausch <scgl@...ux.vnet.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Janis Schoetterl-Glausch <scgl@...ux.ibm.com>,
Janosch Frank <frankja@...ux.ibm.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>
Cc: David Hildenbrand <david@...hat.com>,
Claudio Imbrenda <imbrenda@...ux.ibm.com>,
"open list:KERNEL VIRTUAL MACHINE for s390 (KVM/s390)"
<kvm@...r.kernel.org>,
"open list:S390" <linux-s390@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] KVM: s390: Enable specification exception interpretation
On Wed, Jul 07 2021, Janis Schoetterl-Glausch <scgl@...ux.vnet.ibm.com> wrote:
> On 7/7/21 10:54 AM, Cornelia Huck wrote:
>
> [...]
>
>>
>>>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>>>> index b655a7d82bf0..aadd589a3755 100644
>>>> --- a/arch/s390/kvm/kvm-s390.c
>>>> +++ b/arch/s390/kvm/kvm-s390.c
>>>> @@ -3200,6 +3200,8 @@ static int kvm_s390_vcpu_setup(struct kvm_vcpu *vcpu)
>>>> vcpu->arch.sie_block->ecb |= ECB_SRSI;
>>>> if (test_kvm_facility(vcpu->kvm, 73))
>>>> vcpu->arch.sie_block->ecb |= ECB_TE;
>>
>> Maybe add
>>
>> /* no facility bit, but safe as the hardware may ignore it */
>>
>> or something like that, so that we don't stumble over that in the future?
>
> Well, the hardware being allowed to ignore the bit makes its introduction
> without an indication forward compatible because it does not require vSIE to be adapted.
> The reserved bits are implicitly set to 0 which means new features are disabled
> by default and one observes all the interception one expects.
>
> Maybe this:
>
> /* no facility bit, can opt in because we do not need
> to observe specification exception intercepts */
>
> ?
Works for me as well.
>
>>
>>>> + if (!kvm_is_ucontrol(vcpu->kvm))
>>>> + vcpu->arch.sie_block->ecb |= ECB_SPECI;
>>>>
>>>> if (test_kvm_facility(vcpu->kvm, 8) && vcpu->kvm->arch.use_pfmfi)
>>>> vcpu->arch.sie_block->ecb2 |= ECB2_PFMFI;
>>
>> Reviewed-by: Cornelia Huck <cohuck@...hat.com>
>>
Powered by blists - more mailing lists