From patchwork Thu Oct 31 17:21:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason J. Herne" X-Patchwork-Id: 287571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A59012C03EC for ; Fri, 1 Nov 2013 04:22:35 +1100 (EST) Received: from localhost ([::1]:58530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbvx3-0003BU-H3 for incoming@patchwork.ozlabs.org; Thu, 31 Oct 2013 13:22:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbvwN-0003AC-2L for qemu-devel@nongnu.org; Thu, 31 Oct 2013 13:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbvwE-0002VJ-0d for qemu-devel@nongnu.org; Thu, 31 Oct 2013 13:21:51 -0400 Received: from e8.ny.us.ibm.com ([32.97.182.138]:36345) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbvwD-0002UX-Ju for qemu-devel@nongnu.org; Thu, 31 Oct 2013 13:21:41 -0400 Received: from /spool/local by e8.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 31 Oct 2013 13:21:40 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e8.ny.us.ibm.com (192.168.1.108) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 31 Oct 2013 13:21:37 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id A6C716E8057 for ; Thu, 31 Oct 2013 13:21:35 -0400 (EDT) Received: from d01av05.pok.ibm.com (d01av05.pok.ibm.com [9.56.224.195]) by b01cxnp23033.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9VHLbqL3080556 for ; Thu, 31 Oct 2013 17:21:37 GMT Received: from d01av05.pok.ibm.com (localhost [127.0.0.1]) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9VHLZK8006186 for ; Thu, 31 Oct 2013 13:21:36 -0400 Received: from jason-ThinkPad-W500.endicott.ibm.com (jason-thinkpad-w500.endicott.ibm.com [9.60.75.166] (may be forged)) by d01av05.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r9VHLYvi006083; Thu, 31 Oct 2013 13:21:34 -0400 From: "Jason J. Herne" To: afaerber@suse.de, agraf@suse.de, borntraeger@de.ibm.com, jfrei@linux.vnet.ibm.com, imammedo@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com Date: Thu, 31 Oct 2013 13:21:27 -0400 Message-Id: <1383240094-28760-2-git-send-email-jjherne@us.ibm.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1383240094-28760-1-git-send-email-jjherne@us.ibm.com> References: <1383240094-28760-1-git-send-email-jjherne@us.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13103117-0320-0000-0000-00000195F5BD X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 32.97.182.138 Cc: "Jason J. Herne" Subject: [Qemu-devel] [PATCH 1/8 v4] s390-sclp: Define New SCLP Codes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: "Jason J. Herne" Define new SCLP codes to improve code readability. Signed-off-by: Jason J. Herne --- hw/s390x/sclp.c | 2 +- include/hw/s390x/sclp.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c index 86d6ae0..cb035e9 100644 --- a/hw/s390x/sclp.c +++ b/hw/s390x/sclp.c @@ -45,7 +45,7 @@ static void sclp_execute(SCCB *sccb, uint64_t code) { S390SCLPDevice *sdev = get_event_facility(); - switch (code) { + switch (code & SCLP_CMD_CODE_MASK) { case SCLP_CMDW_READ_SCP_INFO: case SCLP_CMDW_READ_SCP_INFO_FORCED: read_SCP_info(sccb); diff --git a/include/hw/s390x/sclp.h b/include/hw/s390x/sclp.h index 231a38a..74e8d94 100644 --- a/include/hw/s390x/sclp.h +++ b/include/hw/s390x/sclp.h @@ -17,6 +17,8 @@ #include #include +#define SCLP_CMD_CODE_MASK 0xffff00ff + /* SCLP command codes */ #define SCLP_CMDW_READ_SCP_INFO 0x00020001 #define SCLP_CMDW_READ_SCP_INFO_FORCED 0x00120001 @@ -26,6 +28,12 @@ #define SCLP_CMD_WRITE_EVENT_DATA 0x00760005 #define SCLP_CMD_WRITE_EVENT_MASK 0x00780005 +/* CPU hotplug SCLP codes */ +#define SCLP_HAS_CPU_INFO 0x0C00000000000000ULL +#define SCLP_CMDW_READ_CPU_INFO 0x00010001 +#define SCLP_CMDW_CONFIGURE_CPU 0x00110001 +#define SCLP_CMDW_DECONFIGURE_CPU 0x00100001 + /* SCLP response codes */ #define SCLP_RC_NORMAL_READ_COMPLETION 0x0010 #define SCLP_RC_NORMAL_COMPLETION 0x0020