[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH v3 05/10] tools/light: pci: describe [MAKE|REVERT]_ASSIGNABLE commands
From: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> Add protocol for two more commands, one to make a PCI device assignable, and other - to revert its state back. Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx> --- tools/include/pcid.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/tools/include/pcid.h b/tools/include/pcid.h index 452bdc11cf..118f8105cf 100644 --- a/tools/include/pcid.h +++ b/tools/include/pcid.h @@ -98,6 +98,44 @@ #define PCID_CMD_LIST_ASSIGNABLE "list_assignable" #define PCID_MSG_FIELD_DEVICES "devices" +/* + ******************************************************************************* + * Make device assignable + * + * This command makes given device assignable by ensuring that OS + * will not try to access it. + * + * Request (see other mandatory fields above): + * - "cmd" field of the request must be set to "make_assignable". + * - "sbdf" SBDF of the device in format defined by PCID_SBDF_FMT. + * - "rebind" = true if daemon needs to save original driver name, + * so device later can be rebound back. + * + * Response (see other mandatory fields above): + * - "resp" field of the response must be set to "make_assignable". + */ +#define PCID_CMD_MAKE_ASSIGNABLE "make_assignable" +#define PCID_MSG_FIELD_REBIND "rebind" + +/* + ******************************************************************************* + * Revert device from assignable state + * + * This command reverts effect of "make_assignable" command. Basically, + * now device can be used by OS again. + * + * Request (see other mandatory fields above): + * - "cmd" field of the request must be set to "revert_assignable". + * - "sbdf" SBDF of the device in format defined by PCID_SBDF_FMT. + * - "rebind" = true if daemon needs to rebind device back to it's + * original driver, which name was saved by "make_assignable" command + * + * Response (see other mandatory fields above): + * - "resp" field of the response must be set to "revert_assignable". + */ +#define PCID_CMD_REVERT_ASSIGNABLE "revert_assignable" + + int libxl_pcid_process(libxl_ctx *ctx); #endif /* PCID_H */ -- 2.34.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |