From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [PATCH] KVM: s390: we are always in czam mode Date: Tue, 29 Aug 2017 16:48:50 +0200 Message-ID: References: <20170829143108.14703-1-david@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , "Jason J . Herne" , Cornelia Huck To: David Hildenbrand Return-path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37627 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753635AbdH2OtA (ORCPT ); Tue, 29 Aug 2017 10:49:00 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7TEmw7S125750 for ; Tue, 29 Aug 2017 10:49:00 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2cn9fyay3g-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 29 Aug 2017 10:48:59 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Aug 2017 15:48:54 +0100 In-Reply-To: <20170829143108.14703-1-david@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: applied to next (with Connys language fixes) On 08/29/2017 04:31 PM, David Hildenbrand wrote: > Indepenent of the underlying hardware, kvm will now always handle > SIGP SET ARCHITECTURE as if czam is enabled. Therefore, let's not > only forward that bit but always set it. > > While at it, add a comment regarding STHYI. > > Signed-off-by: David Hildenbrand > --- > arch/s390/kvm/kvm-s390.c | 4 ++++ > arch/s390/tools/gen_facilities.c | 1 - > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c > index 84c069afc02f..39115f5a38df 100644 > --- a/arch/s390/kvm/kvm-s390.c > +++ b/arch/s390/kvm/kvm-s390.c > @@ -1927,6 +1927,10 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) > memcpy(kvm->arch.model.fac_list, kvm->arch.model.fac_mask, > S390_ARCH_FAC_LIST_SIZE_BYTE); > > + /* we are always in czam mode - even on pre z14 machines */ > + set_kvm_facility(kvm->arch.model.fac_mask, 138); > + set_kvm_facility(kvm->arch.model.fac_list, 138); > + /* we emulate STHYI in kvm */ > set_kvm_facility(kvm->arch.model.fac_mask, 74); > set_kvm_facility(kvm->arch.model.fac_list, 74); > if (MACHINE_HAS_TLB_GUEST) { > diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c > index 601bfcf99e2a..19f12cef5bdf 100644 > --- a/arch/s390/tools/gen_facilities.c > +++ b/arch/s390/tools/gen_facilities.c > @@ -80,7 +80,6 @@ static struct facility_def facility_defs[] = { > 78, /* enhanced-DAT 2 */ > 130, /* instruction-execution-protection */ > 131, /* enhanced-SOP 2 and side-effect */ > - 138, /* configuration z/architecture mode (czam) */ > 139, /* multiple epoch facility */ > 146, /* msa extension 8 */ > -1 /* END */ >