Commit c8684a9d authored by David Binder's avatar David Binder Committed by Greg Kroah-Hartman

staging: unisys: visorbus: Merge vmcallinterface.h into visorchipset.c

The contents of vmcallinterface.h are better placed within
visorchipset.c from an organizational perspective. The values are only
used in that file.
Signed-off-by: default avatarDavid Binder <david.binder@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Reviewed-by: default avatarTim Sell <timothy.sell@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c02c6a0c
......@@ -20,7 +20,6 @@
#include "visorbus.h"
#include "visorbus_private.h"
#include "vmcallinterface.h"
static const guid_t visor_vhba_channel_guid = VISOR_VHBA_CHANNEL_GUID;
static const guid_t visor_siovm_guid = VISOR_SIOVM_GUID;
......@@ -54,6 +53,47 @@ struct parser_context {
char data[0];
};
/*
* VMCALL_CONTROLVM_ADDR: Used by all guests, not just IO.
*
* Note: When a new VMCALL is added:
* - The 1st 2 hex digits correspond to one of the VMCALL_MONITOR_INTERFACE
* types.
* - The next 2 hex digits are the nth relative instance of within a type.
* E.G. for VMCALL_VIRTPART_RECYCLE_PART,
* - The 0x02 identifies it as a VMCALL_VIRTPART type.
* - The 0x01 identifies it as the 1st instance of a VMCALL_VIRTPART type of
* VMCALL.
*/
#define VMCALL_CONTROLVM_ADDR 0x0501
enum vmcall_result {
VMCALL_RESULT_SUCCESS = 0,
VMCALL_RESULT_INVALID_PARAM = 1,
VMCALL_RESULT_DATA_UNAVAILABLE = 2,
VMCALL_RESULT_FAILURE_UNAVAILABLE = 3,
VMCALL_RESULT_DEVICE_ERROR = 4,
VMCALL_RESULT_DEVICE_NOT_READY = 5
};
/*
* struct vmcall_io_controlvm_addr_params - Structure for IO VMCALLS. Has
* parameters to VMCALL_CONTROLVM_ADDR
* interface.
* @address: The Guest-relative physical address of the ControlVm channel.
* This VMCall fills this in with the appropriate address.
* Contents provided by this VMCALL (OUT).
* @channel_bytes: The size of the ControlVm channel in bytes This VMCall fills
* this in with the appropriate address. Contents provided by
* this VMCALL (OUT).
* @unused: Unused Bytes in the 64-Bit Aligned Struct.
*/
struct vmcall_io_controlvm_addr_params {
u64 address;
u32 channel_bytes;
u8 unused[4];
} __packed;
struct vmcall_controlvm_addr {
struct vmcall_io_controlvm_addr_params params;
int err;
......
/*
* Copyright (C) 2010 - 2015 UNISYS CORPORATION
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
* NON INFRINGEMENT. See the GNU General Public License for more
* details.
*/
#ifndef __VMCALLINTERFACE_H__
#define __VMCALLINTERFACE_H__
/*
* VMCALL_CONTROLVM_ADDR: Used by all guests, not just IO.
*
* Note: When a new VMCALL is added:
* - The 1st 2 hex digits correspond to one of the VMCALL_MONITOR_INTERFACE
* types.
* - The next 2 hex digits are the nth relative instance of within a type.
* E.G. for VMCALL_VIRTPART_RECYCLE_PART,
* - The 0x02 identifies it as a VMCALL_VIRTPART type.
* - The 0x01 identifies it as the 1st instance of a VMCALL_VIRTPART type of
* VMCALL.
*/
#define VMCALL_CONTROLVM_ADDR 0x0501
enum vmcall_result {
VMCALL_RESULT_SUCCESS = 0,
VMCALL_RESULT_INVALID_PARAM = 1,
VMCALL_RESULT_DATA_UNAVAILABLE = 2,
VMCALL_RESULT_FAILURE_UNAVAILABLE = 3,
VMCALL_RESULT_DEVICE_ERROR = 4,
VMCALL_RESULT_DEVICE_NOT_READY = 5
};
/*
* struct vmcall_io_controlvm_addr_params - Structure for IO VMCALLS. Has
* parameters to VMCALL_CONTROLVM_ADDR
* interface.
* @address: The Guest-relative physical address of the ControlVm channel.
* This VMCall fills this in with the appropriate address.
* Contents provided by this VMCALL (OUT).
* @channel_bytes: The size of the ControlVm channel in bytes This VMCall fills
* this in with the appropriate address. Contents provided by
* this VMCALL (OUT).
* @unused: Unused Bytes in the 64-Bit Aligned Struct.
*/
struct vmcall_io_controlvm_addr_params {
u64 address;
u32 channel_bytes;
u8 unused[4];
} __packed;
/* __VMCALLINTERFACE_H__ */
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment