From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [PATCH 05/11] KVM: s390: Support Configuration z/Architecture Mode Date: Mon, 28 Aug 2017 16:42:44 +0200 Message-ID: <08772002-59da-6eb7-6478-05946a68eabf@de.ibm.com> References: <1503907651-65296-1-git-send-email-borntraeger@de.ibm.com> <1503907651-65296-2-git-send-email-borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , KVM , linux-s390 , "Jason J. Herne" To: David Hildenbrand , Cornelia Huck Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38148 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751170AbdH1Omu (ORCPT ); Mon, 28 Aug 2017 10:42:50 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7SEfBtV096966 for ; Mon, 28 Aug 2017 10:42:50 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2cmh9c8gwx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Aug 2017 10:42:50 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 28 Aug 2017 15:42:48 +0100 In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 08/28/2017 04:38 PM, David Hildenbrand wrote: > On 28.08.2017 16:24, Christian Borntraeger wrote: >> >> >> On 08/28/2017 04:06 PM, David Hildenbrand wrote: >>> On 28.08.2017 10:07, Christian Borntraeger wrote: >>>> From: "Jason J. Herne" >>>> >>>> kvm has always supported the concept of starting in z/Arch mode so let's >>>> reflect the feature bit to the guest. >>>> >>>> Also, we change sigp set architecture to reject any request to change >>>> architecture modes. >>> >>> Hm ... this seems to imply that CZAM is always set, but what about >>> running on old user space (possibly on old hw)? Old QEMU will not enable >>> CZAM. >> >> 3 cases. >> 1. very old QEMU without user sigp >> 2. old QEMU with user sigp/without CPU model >> 3. new QEMU with user sigp/cpu model >> >> I think we agree that cases 2 and 3 should not matter at all for this kernel patch >> as the sigp is handled by QEMU. >> >> >> >> This is case 1: >>> And especially old user space will rely on SET ARCHITECTURE being >>> handled in the kernel. >> >> >> Yes, and it continues to be handled in the kernel. It is just that the guest >> will now see a different sigp return code. Before, our sigp implementation lied >> to the guest in a way that worked for Linux (we lied by saying "yes, we switched"). >> We now say "sorry, we are already in zarch mode, sigp ignored" which also works >> perfectly fine for Linux. And IMHO it is even the better choice even without >> STFLE.138 being set as it matches what an old hardware would do when in zarch mode. > > Ok, if it worked for relevant Linux versions, than it should indeed be fine. I checked back to 2006 and Linux never checked the return value for this sigp.