From patchwork Tue Jun 25 15:03:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Collin Walling X-Patchwork-Id: 11015891 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C0CD14B6 for ; Tue, 25 Jun 2019 15:06:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F38428A3B for ; Tue, 25 Jun 2019 15:06:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73C5E28C51; Tue, 25 Jun 2019 15:06:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0719A28C4D for ; Tue, 25 Jun 2019 15:06:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732066AbfFYPGx (ORCPT ); Tue, 25 Jun 2019 11:06:53 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34096 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730607AbfFYPGx (ORCPT ); Tue, 25 Jun 2019 11:06:53 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5PF5hb7139112; Tue, 25 Jun 2019 11:06:41 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0b-001b2d01.pphosted.com with ESMTP id 2tbmka469y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jun 2019 11:06:28 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x5PExdV4019954; Tue, 25 Jun 2019 15:04:06 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma01dal.us.ibm.com with ESMTP id 2t9by70tjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 25 Jun 2019 15:04:06 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5PF45YY11207428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 15:04:05 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9F231B2067; Tue, 25 Jun 2019 15:04:05 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90382B2065; Tue, 25 Jun 2019 15:04:05 +0000 (GMT) Received: from collin-T470p.pok.ibm.com (unknown [9.63.14.221]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 25 Jun 2019 15:04:05 +0000 (GMT) From: Collin Walling To: cohuck@redhat.com, david@redhat.com, pbonzini@redhat.com, kvm@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH v5 0/2] Use DIAG318 to set Control Program Name & Version Codes Date: Tue, 25 Jun 2019 11:03:40 -0400 Message-Id: <1561475022-18348-1-git-send-email-walling@linux.ibm.com> X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-25_11:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906250116 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Changelog: v5 - s/cpc/diag318_info in order to make the relevant data more clear - removed mutex locks for diag318_info get/set v4 - removed setup.c changes introduced in bullet 1 of v3 - kept diag318_info struct cleanup - analogous QEMU patches: https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg00164.html v3 - kernel patch for diag 0x318 instruction call fixup [removed in v4] - removed CPU model code - cleaned up diag318_info struct - cpnc is no longer unshadowed as it was not needed - rebased on 5.1.0-rc3 This instruction call is executed once-and-only-once during Kernel setup. The availability of this instruction depends on Read Info byte 134, bit 0. DIAG 318's functionality is also emulated by KVM, which means we can enable this feature for a guest even if the host kernel cannot support it. This feature is made available starting with the zEC12-full model (see analogous QEMU patches). The diag318_info is composed of a Control Program Name Code (CPNC) and a Control Program Version Code (CPVC). These values are used for problem diagnosis and allows IBM to identify control program information by answering the following question: "What environment is this guest running in?" (CPNC) "What are more details regarding the OS?" (CPVC) In the future, we will implement the CPVC to convey more information about the OS. For now, we set this field to 0 until we come up with a solid plan. Collin Walling (2): s390/setup: diag318: refactor struct s390/kvm: diagnose 318 handling Documentation/virtual/kvm/devices/vm.txt | 14 ++++++ arch/s390/include/asm/diag.h | 6 +-- arch/s390/include/asm/kvm_host.h | 5 +- arch/s390/include/uapi/asm/kvm.h | 4 ++ arch/s390/kernel/setup.c | 3 +- arch/s390/kvm/diag.c | 17 +++++++ arch/s390/kvm/kvm-s390.c | 81 ++++++++++++++++++++++++++++++++ arch/s390/kvm/kvm-s390.h | 1 + arch/s390/kvm/vsie.c | 2 + 9 files changed, 126 insertions(+), 7 deletions(-)