From patchwork Mon Mar 30 14:28:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Mueller X-Patchwork-Id: 6121781 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90FEE9F1BE for ; Mon, 30 Mar 2015 14:35:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 17725202B4 for ; Mon, 30 Mar 2015 14:35:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8CAD2021A for ; Mon, 30 Mar 2015 14:35:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753745AbbC3OfM (ORCPT ); Mon, 30 Mar 2015 10:35:12 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:52097 "EHLO e06smtp14.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752893AbbC3O2r (ORCPT ); Mon, 30 Mar 2015 10:28:47 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Mar 2015 15:28:46 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 30 Mar 2015 15:28:43 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 4F3BB17D8066; Mon, 30 Mar 2015 15:29:12 +0100 (BST) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2UESgR85243316; Mon, 30 Mar 2015 14:28:42 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2UESfPR015060; Mon, 30 Mar 2015 08:28:42 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t2UESdi4014992; Mon, 30 Mar 2015 08:28:40 -0600 From: Michael Mueller To: qemu-devel@nongnu.org, kvm@vger.kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Eduardo Habkost , Gleb Natapov , Alexander Graf , Christian Borntraeger , "Jason J. Herne" , Cornelia Huck , Paolo Bonzini , Michael Mueller , Andreas Faerber , Richard Henderson , Daniel Hansel Subject: [PATCH v4 02/15] target-s390x: Introduce cpu facilities Date: Mon, 30 Mar 2015 16:28:15 +0200 Message-Id: <1427725708-52100-3-git-send-email-mimu@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> References: <1427725708-52100-1-git-send-email-mimu@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15033014-0017-0000-0000-0000038C64AA Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, UPPERCASE_50_75 autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch introduces S390 CPU facility bit numbers and names as well as the architectural facility size limit in bytes. Signed-off-by: Michael Mueller --- target-s390x/cpu-facilities.h | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 target-s390x/cpu-facilities.h diff --git a/target-s390x/cpu-facilities.h b/target-s390x/cpu-facilities.h new file mode 100644 index 0000000..db1f064 --- /dev/null +++ b/target-s390x/cpu-facilities.h @@ -0,0 +1,86 @@ +/* + * CPU facilities for s390 + * + * Copyright 2015 IBM Corp. + * + * Author(s): Michael Mueller + * + * This work is licensed under the terms of the GNU GPL, version 2 or (at + * your option) any later version. See the COPYING file in the top-level + * directory. + */ + +#ifndef TARGET_S390X_CPU_FACILITIES_H +#define TARGET_S390X_CPU_FACILITIES_H + +/* architectural size of facilities is 2KB */ +#define FAC_LIST_ARCH_S390_SIZE_UINT8 (1<<11) + +/* CPU facility bits */ +typedef enum { + FAC_N3 = 0, + FAC_ZARCH = 1, + FAC_ZARCH_ACTIVE = 2, + FAC_DAT_ENH = 3, + FAC_ASN_LX_REUSE = 6, + FAC_STFLE = 7, + FAC_ENHANCED_DAT_1 = 8, + FAC_SENSE_RUNNING_STATUS = 9, + FAC_CONDITIONAL_SSKE = 10, + FAC_CONFIGURATION_TOPOLOGY = 11, + FAC_IPTE_RANGE = 13, + FAC_NONQ_KEY_SETTING = 14, + FAC_EXTENDED_TRANSLATION_2 = 16, + FAC_MESSAGE_SECURITY_ASSIST = 17, + FAC_LONG_DISPLACEMENT = 18, + FAC_LONG_DISPLACEMENT_FAST = 19, + FAC_HFP_MADDSUB = 20, + FAC_EXTENDED_IMMEDIATE = 21, + FAC_EXTENDED_TRANSLATION_3 = 22, + FAC_HFP_UNNORMALIZED_EXT = 23, + FAC_ETF2_ENH = 24, + FAC_STORE_CLOCK_FAST = 25, + FAC_PARSING_ENH = 26, + FAC_MOVE_WITH_OPTIONAL_SPEC = 27, + FAC_TOD_CLOCK_STEERING = 28, + FAC_ETF3_ENH = 30, + FAC_EXTRACT_CPU_TIME = 31, + FAC_COMPARE_AND_SWAP_AND_STORE = 32, + FAC_COMPARE_AND_SWAP_AND_STORE_2 = 33, + FAC_GENERAL_INSTRUCTIONS_EXT = 34, + FAC_EXECUTE_EXT = 35, + FAC_ENHANCED_MONITOR = 36, + FAC_FLOATING_POINT_EXT = 37, + FAC_LOAD_PROGRAM_PARAMETERS = 40, + FAC_FLOATING_POINT_SUPPPORT_ENH = 41, + FAC_DFP = 42, + FAC_DFP_FAST = 43, + FAC_PFPO = 44, + FAC_MULTI_45 = 45, + FAC_CMPSC_ENH = 47, + FAC_DFP_ZONED_CONVERSION = 48, + FAC_MULTI_49 = 49, + FAC_CONSTRAINT_TRANSACTIONAL_EXE = 50, + FAC_LOCAL_TLB_CLEARING = 51, + FAC_INTERLOCKED_ACCESS_2 = 52, + FAC_LOAD_STORE_ON_COND_2 = 53, + FAC_MESSAGE_SECURITY_ASSIST_5 = 57, + FAC_RESET_REFERENCE_BITS_MULTIPLE = 66, + FAC_CPU_MEASUREMENT_COUNTER = 67, + FAC_CPU_MEASUREMENT_SAMPLING = 68, + FAC_TRANSACTIONAL_EXE = 73, + /* + * The store-hypervisor-information facility #74 is + * z/VM related and when added to be handled by QEMU + * when hosted on LPAR. (see: SC24-6179-05 page 953) + */ + FAC_ACCESS_EXCEPTION_FS_INDICATION = 75, + FAC_MESSAGE_SECURITY_ASSIST_3 = 76, + FAC_MESSAGE_SECURITY_ASSIST_4 = 77, + FAC_ENHANCED_DAT_2 = 78, + FAC_DFP_PACKED_CONVERSION = 80, + FAC_VECTOR = 129, + FAC_STORE_CPU_COUNTER_MULTI = 142, +} S390Facility; + +#endif