Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752850AbeAQLaG (ORCPT + 1 other); Wed, 17 Jan 2018 06:30:06 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45006 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752578AbeAQLaE (ORCPT ); Wed, 17 Jan 2018 06:30:04 -0500 Subject: Re: [PATCH 5/6] KVM: s390: wire up seb feature From: Christian Borntraeger To: Paolo Bonzini , kvm@vger.kernel.org Cc: Martin Schwidefsky , linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, Heiko Carstens , Cornelia Huck , Greg Kroah-Hartman , Jon Masters , Marcus Meissner , Jiri Kosina References: <1516182519-10623-1-git-send-email-schwidefsky@de.ibm.com> <1516182519-10623-6-git-send-email-schwidefsky@de.ibm.com> <4fa9b6fa-40cb-b51e-0aa8-2e21bd93d526@de.ibm.com> <0a8dad23-0d88-cb10-d943-ac9ee265df7f@de.ibm.com> Date: Wed, 17 Jan 2018 12:29:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <0a8dad23-0d88-cb10-d943-ac9ee265df7f@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18011711-0020-0000-0000-000003EBA51B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011711-0021-0000-0000-0000427DDFB9 Message-Id: <23083bfd-7fd9-0b03-53ba-fa5f4d46a6b6@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-17_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801170166 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/17/2018 12:28 PM, Christian Borntraeger wrote: > > > On 01/17/2018 12:22 PM, Paolo Bonzini wrote: >>> while this is kvm code, my current plan is to submit the "final" >>> version after review and probably some fixes/renames via Martin >>> together with the other patches. Are you ok with that? Right now it >>> seems that the CAP number is still fine. >> Sure, though there will be a capability introduced by PPC for similar >> purposes, so check for conflicts. >> >> On 17/01/2018 12:18, Christian Borntraeger wrote: >>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c >>> index 2c93cbb..0c18f73 100644 >>> --- a/arch/s390/kvm/kvm-s390.c >>> +++ b/arch/s390/kvm/kvm-s390.c >>> @@ -421,6 +421,9 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) >>> case KVM_CAP_S390_GS: >>> r = test_facility(133); >>> break; >>> + case KVM_CAP_S390_SEB: >>> + r = test_facility(82); >>> + break; >>> default: >>> r = 0; >> >> Can you add a generic "test facility" capability and ioctl? > > The problem is not that I announce the facility, I in fact announce that the > programmatic interface is available (the sebc sync reg and the usage of that field). > (So the CAP is part of this patch to have both in lockstep) > A non-existing facility will then just disable that programmatic interface. To put it differently. CAP_S390_GS and CAP_S390_SEB could also just do a return 1; and the QEMU has to check both (which it probably does anyway) Christian