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 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 From: "Jason J. Herne" Date: Thu, 31 Oct 2013 13:21:27 -0400 Message-Id: <1383240094-28760-2-git-send-email-jjherne@us.ibm.com> In-Reply-To: <1383240094-28760-1-git-send-email-jjherne@us.ibm.com> References: <1383240094-28760-1-git-send-email-jjherne@us.ibm.com> Subject: [Qemu-devel] [PATCH 1/8 v4] s390-sclp: Define New SCLP Codes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Cc: "Jason J. Herne" 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 -- 1.8.3.2