Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 1 | /* controlvmcompletionstatus.c |
| 2 | * |
Benjamin Romer | 6f14cc1 | 2015-07-16 12:40:48 -0400 | [diff] [blame] | 3 | * Copyright (C) 2010 - 2015 UNISYS CORPORATION |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 4 | * All Rights Reserved. |
| 5 | * |
Benjamin Romer | 6f14cc1 | 2015-07-16 12:40:48 -0400 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or modify it |
| 7 | * under the terms and conditions of the GNU General Public License, |
| 8 | * version 2, as published by the Free Software Foundation. |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or |
| 13 | * NON INFRINGEMENT. See the GNU General Public License for more |
| 14 | * details. |
| 15 | */ |
| 16 | |
| 17 | /* Defines for all valid values returned in the response message header |
| 18 | * completionStatus field. See controlvmchannel.h for description of |
| 19 | * the header: _CONTROLVM_MESSAGE_HEADER. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __CONTROLVMCOMPLETIONSTATUS_H__ |
| 23 | #define __CONTROLVMCOMPLETIONSTATUS_H__ |
| 24 | |
| 25 | /* General Errors------------------------------------------------------[0-99] */ |
| 26 | #define CONTROLVM_RESP_SUCCESS 0 |
| 27 | #define CONTROLVM_RESP_ERROR_ALREADY_DONE 1 |
| 28 | #define CONTROLVM_RESP_ERROR_IOREMAP_FAILED 2 |
| 29 | #define CONTROLVM_RESP_ERROR_KMALLOC_FAILED 3 |
| 30 | #define CONTROLVM_RESP_ERROR_MESSAGE_ID_UNKNOWN 4 |
| 31 | #define CONTROLVM_RESP_ERROR_MESSAGE_ID_INVALID_FOR_CLIENT 5 |
| 32 | |
| 33 | /* CONTROLVM_INIT_CHIPSET-------------------------------------------[100-199] */ |
| 34 | #define CONTROLVM_RESP_ERROR_CLIENT_SWITCHCOUNT_NONZERO 100 |
| 35 | #define CONTROLVM_RESP_ERROR_EXPECTED_CHIPSET_INIT 101 |
| 36 | |
| 37 | /* Maximum Limit----------------------------------------------------[200-299] */ |
| 38 | #define CONTROLVM_RESP_ERROR_MAX_BUSES 201 /* BUS_CREATE */ |
| 39 | #define CONTROLVM_RESP_ERROR_MAX_DEVICES 202 /* DEVICE_CREATE */ |
| 40 | /* Payload and Parameter Related------------------------------------[400-499] */ |
| 41 | #define CONTROLVM_RESP_ERROR_PAYLOAD_INVALID 400 /* SWITCH_ATTACHEXTPORT, |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 42 | * DEVICE_CONFIGURE |
| 43 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 44 | #define CONTROLVM_RESP_ERROR_INITIATOR_PARAMETER_INVALID 401 /* Multiple */ |
| 45 | #define CONTROLVM_RESP_ERROR_TARGET_PARAMETER_INVALID 402 /* DEVICE_CONFIGURE */ |
| 46 | #define CONTROLVM_RESP_ERROR_CLIENT_PARAMETER_INVALID 403 /* DEVICE_CONFIGURE */ |
| 47 | /* Specified[Packet Structure] Value-------------------------------[500-599] */ |
| 48 | #define CONTROLVM_RESP_ERROR_BUS_INVALID 500 /* SWITCH_ATTACHINTPORT, |
| 49 | * BUS_CONFIGURE, |
| 50 | * DEVICE_CREATE, |
| 51 | * DEVICE_CONFIG |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 52 | * DEVICE_DESTROY |
| 53 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 54 | #define CONTROLVM_RESP_ERROR_DEVICE_INVALID 501 /* SWITCH_ATTACHINTPORT */ |
| 55 | /* DEVICE_CREATE, |
| 56 | * DEVICE_CONFIGURE, |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 57 | * DEVICE_DESTROY |
| 58 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 59 | #define CONTROLVM_RESP_ERROR_CHANNEL_INVALID 502 /* DEVICE_CREATE, |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 60 | * DEVICE_CONFIGURE |
| 61 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 62 | /* Partition Driver Callback Interface----------------------[600-699] */ |
| 63 | #define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_FAILURE 604 /* BUS_CREATE, |
| 64 | * BUS_DESTROY, |
| 65 | * DEVICE_CREATE, |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 66 | * DEVICE_DESTROY |
| 67 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 68 | /* Unable to invoke VIRTPCI callback */ |
Benjamin Romer | 3239c1c | 2014-08-05 14:57:51 -0400 | [diff] [blame] | 69 | #define CONTROLVM_RESP_ERROR_VIRTPCI_DRIVER_CALLBACK_ERROR 605 |
| 70 | /* BUS_CREATE, |
| 71 | * BUS_DESTROY, |
| 72 | * DEVICE_CREATE, |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 73 | * DEVICE_DESTROY |
| 74 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 75 | /* VIRTPCI Callback returned error */ |
Benjamin Romer | 3239c1c | 2014-08-05 14:57:51 -0400 | [diff] [blame] | 76 | #define CONTROLVM_RESP_ERROR_GENERIC_DRIVER_CALLBACK_ERROR 606 |
| 77 | /* SWITCH_ATTACHEXTPORT, |
| 78 | * SWITCH_DETACHEXTPORT |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 79 | * DEVICE_CONFIGURE |
| 80 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 81 | |
| 82 | /* generic device callback returned error */ |
| 83 | /* Bus Related------------------------------------------------------[700-799] */ |
| 84 | #define CONTROLVM_RESP_ERROR_BUS_DEVICE_ATTACHED 700 /* BUS_DESTROY */ |
| 85 | /* Channel Related--------------------------------------------------[800-899] */ |
| 86 | #define CONTROLVM_RESP_ERROR_CHANNEL_TYPE_UNKNOWN 800 /* GET_CHANNELINFO, |
Erik Arfvidson | 1c192718 | 2015-11-17 13:34:59 -0500 | [diff] [blame] | 87 | * DEVICE_DESTROY |
| 88 | */ |
Ken Cox | 12e364b | 2014-03-04 07:58:07 -0600 | [diff] [blame] | 89 | #define CONTROLVM_RESP_ERROR_CHANNEL_SIZE_TOO_SMALL 801 /* DEVICE_CREATE */ |
| 90 | /* Chipset Shutdown Related---------------------------------------[1000-1099] */ |
| 91 | #define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_FAILED 1000 |
| 92 | #define CONTROLVM_RESP_ERROR_CHIPSET_SHUTDOWN_ALREADY_ACTIVE 1001 |
| 93 | |
| 94 | /* Chipset Stop Related-------------------------------------------[1100-1199] */ |
| 95 | #define CONTROLVM_RESP_ERROR_CHIPSET_STOP_FAILED_BUS 1100 |
| 96 | #define CONTROLVM_RESP_ERROR_CHIPSET_STOP_FAILED_SWITCH 1101 |
| 97 | |
| 98 | /* Device Related-------------------------------------------------[1400-1499] */ |
| 99 | #define CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT 1400 |
| 100 | |
| 101 | #endif /* __CONTROLVMCOMPLETIONSTATUS_H__ not defined */ |