From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5I9Z-00071I-Q4 for qemu-devel@nongnu.org; Mon, 20 Jan 2014 11:56:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W5I9P-0006Ia-UL for qemu-devel@nongnu.org; Mon, 20 Jan 2014 11:56:49 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:49585) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5I9P-0006I5-PT for qemu-devel@nongnu.org; Mon, 20 Jan 2014 11:56:39 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Jan 2014 11:56:38 -0500 Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id BAC976E8041 for ; Mon, 20 Jan 2014 11:56:30 -0500 (EST) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by b01cxnp22034.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s0KGuYIn8061238 for ; Mon, 20 Jan 2014 16:56:34 GMT Received: from d01av01.pok.ibm.com (localhost [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s0KGuY4t026876 for ; Mon, 20 Jan 2014 11:56:34 -0500 From: "Jason J. Herne" Date: Mon, 20 Jan 2014 11:56:31 -0500 Message-Id: <1390236993-21783-2-git-send-email-jjherne@us.ibm.com> In-Reply-To: <1390236993-21783-1-git-send-email-jjherne@us.ibm.com> References: <1390236993-21783-1-git-send-email-jjherne@us.ibm.com> Subject: [Qemu-devel] [PATCH 1/3] s390-sclp: Define New SCLP Codes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: afaerber@suse.de, borntraeger@de.ibm.com, agraf@suse.de, qemu-devel@nongnu.org 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