[virtio-magma] Update magma, removes unused interfaces

Change-Id: I5c8a44ca03f1d250dc9b01ce919f7784c1008a63
diff --git a/drivers/virtio/virtio_magma.c b/drivers/virtio/virtio_magma.c
index 1704301..efa3e08 100644
--- a/drivers/virtio/virtio_magma.c
+++ b/drivers/virtio/virtio_magma.c
@@ -1415,7 +1415,6 @@
 	case VIRTIO_MAGMA_CMD_CLEAN_CACHE:
 	case VIRTIO_MAGMA_CMD_SET_CACHE_POLICY:
 	case VIRTIO_MAGMA_CMD_GET_BUFFER_CACHE_POLICY:
-	case VIRTIO_MAGMA_CMD_GET_BUFFER_IS_MAPPABLE:
 	case VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU:
 	case VIRTIO_MAGMA_CMD_UNMAP_BUFFER_GPU:
 	case VIRTIO_MAGMA_CMD_COMMIT_BUFFER:
diff --git a/include/uapi/linux/virtio_magma.h b/include/uapi/linux/virtio_magma.h
index 2243eef..aaf5e0e 100644
--- a/include/uapi/linux/virtio_magma.h
+++ b/include/uapi/linux/virtio_magma.h
@@ -27,19 +27,12 @@
 	VIRTIO_MAGMA_CMD_RELEASE_CONTEXT = 0x1007,
 	VIRTIO_MAGMA_CMD_CREATE_BUFFER = 0x1008,
 	VIRTIO_MAGMA_CMD_RELEASE_BUFFER = 0x1009,
-	VIRTIO_MAGMA_CMD_DUPLICATE_HANDLE = 0x100A,
 	VIRTIO_MAGMA_CMD_RELEASE_BUFFER_HANDLE = 0x100B,
 	VIRTIO_MAGMA_CMD_GET_BUFFER_ID = 0x100C,
 	VIRTIO_MAGMA_CMD_GET_BUFFER_SIZE = 0x100D,
 	VIRTIO_MAGMA_CMD_CLEAN_CACHE = 0x100E,
 	VIRTIO_MAGMA_CMD_SET_CACHE_POLICY = 0x100F,
 	VIRTIO_MAGMA_CMD_GET_BUFFER_CACHE_POLICY = 0x1010,
-	VIRTIO_MAGMA_CMD_GET_BUFFER_IS_MAPPABLE = 0x1011,
-	VIRTIO_MAGMA_CMD_SET_BUFFER_MAPPING_ADDRESS_RANGE = 0x1012,
-	VIRTIO_MAGMA_CMD_MAP = 0x1013,
-	VIRTIO_MAGMA_CMD_MAP_ALIGNED = 0x1014,
-	VIRTIO_MAGMA_CMD_MAP_SPECIFIC = 0x1015,
-	VIRTIO_MAGMA_CMD_UNMAP = 0x1016,
 	VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU = 0x1017,
 	VIRTIO_MAGMA_CMD_UNMAP_BUFFER_GPU = 0x1018,
 	VIRTIO_MAGMA_CMD_COMMIT_BUFFER = 0x1019,
@@ -65,8 +58,6 @@
 	VIRTIO_MAGMA_CMD_INITIALIZE_LOGGING = 0x1033,
 	VIRTIO_MAGMA_CMD_POLL = 0x1034,
 	VIRTIO_MAGMA_CMD_CONNECTION_ACCESS_PERFORMANCE_COUNTERS = 0x1035,
-	VIRTIO_MAGMA_CMD_MAP_CONSTRAINED = 0x1036,
-	VIRTIO_MAGMA_CMD_BUFFER_SET_PADDING = 0x1037,
 	VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS = 0x1038,
 	VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL = 0x1039,
 	VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL = 0x103A,
@@ -89,19 +80,12 @@
 	VIRTIO_MAGMA_RESP_RELEASE_CONTEXT = 0x2007,
 	VIRTIO_MAGMA_RESP_CREATE_BUFFER = 0x2008,
 	VIRTIO_MAGMA_RESP_RELEASE_BUFFER = 0x2009,
-	VIRTIO_MAGMA_RESP_DUPLICATE_HANDLE = 0x200A,
 	VIRTIO_MAGMA_RESP_RELEASE_BUFFER_HANDLE = 0x200B,
 	VIRTIO_MAGMA_RESP_GET_BUFFER_ID = 0x200C,
 	VIRTIO_MAGMA_RESP_GET_BUFFER_SIZE = 0x200D,
 	VIRTIO_MAGMA_RESP_CLEAN_CACHE = 0x200E,
 	VIRTIO_MAGMA_RESP_SET_CACHE_POLICY = 0x200F,
 	VIRTIO_MAGMA_RESP_GET_BUFFER_CACHE_POLICY = 0x2010,
-	VIRTIO_MAGMA_RESP_GET_BUFFER_IS_MAPPABLE = 0x2011,
-	VIRTIO_MAGMA_RESP_SET_BUFFER_MAPPING_ADDRESS_RANGE = 0x2012,
-	VIRTIO_MAGMA_RESP_MAP = 0x2013,
-	VIRTIO_MAGMA_RESP_MAP_ALIGNED = 0x2014,
-	VIRTIO_MAGMA_RESP_MAP_SPECIFIC = 0x2015,
-	VIRTIO_MAGMA_RESP_UNMAP = 0x2016,
 	VIRTIO_MAGMA_RESP_MAP_BUFFER_GPU = 0x2017,
 	VIRTIO_MAGMA_RESP_UNMAP_BUFFER_GPU = 0x2018,
 	VIRTIO_MAGMA_RESP_COMMIT_BUFFER = 0x2019,
@@ -127,8 +111,6 @@
 	VIRTIO_MAGMA_RESP_INITIALIZE_LOGGING = 0x2033,
 	VIRTIO_MAGMA_RESP_POLL = 0x2034,
 	VIRTIO_MAGMA_RESP_CONNECTION_ACCESS_PERFORMANCE_COUNTERS = 0x2035,
-	VIRTIO_MAGMA_RESP_MAP_CONSTRAINED = 0x2036,
-	VIRTIO_MAGMA_RESP_BUFFER_SET_PADDING = 0x2037,
 	VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS = 0x2038,
 	VIRTIO_MAGMA_RESP_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL = 0x2039,
 	VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL = 0x203A,
@@ -167,8 +149,6 @@
 		case VIRTIO_MAGMA_RESP_CREATE_BUFFER: return "VIRTIO_MAGMA_RESP_CREATE_BUFFER";
 		case VIRTIO_MAGMA_CMD_RELEASE_BUFFER: return "VIRTIO_MAGMA_CMD_RELEASE_BUFFER";
 		case VIRTIO_MAGMA_RESP_RELEASE_BUFFER: return "VIRTIO_MAGMA_RESP_RELEASE_BUFFER";
-		case VIRTIO_MAGMA_CMD_DUPLICATE_HANDLE: return "VIRTIO_MAGMA_CMD_DUPLICATE_HANDLE";
-		case VIRTIO_MAGMA_RESP_DUPLICATE_HANDLE: return "VIRTIO_MAGMA_RESP_DUPLICATE_HANDLE";
 		case VIRTIO_MAGMA_CMD_RELEASE_BUFFER_HANDLE: return "VIRTIO_MAGMA_CMD_RELEASE_BUFFER_HANDLE";
 		case VIRTIO_MAGMA_RESP_RELEASE_BUFFER_HANDLE: return "VIRTIO_MAGMA_RESP_RELEASE_BUFFER_HANDLE";
 		case VIRTIO_MAGMA_CMD_GET_BUFFER_ID: return "VIRTIO_MAGMA_CMD_GET_BUFFER_ID";
@@ -181,18 +161,6 @@
 		case VIRTIO_MAGMA_RESP_SET_CACHE_POLICY: return "VIRTIO_MAGMA_RESP_SET_CACHE_POLICY";
 		case VIRTIO_MAGMA_CMD_GET_BUFFER_CACHE_POLICY: return "VIRTIO_MAGMA_CMD_GET_BUFFER_CACHE_POLICY";
 		case VIRTIO_MAGMA_RESP_GET_BUFFER_CACHE_POLICY: return "VIRTIO_MAGMA_RESP_GET_BUFFER_CACHE_POLICY";
-		case VIRTIO_MAGMA_CMD_GET_BUFFER_IS_MAPPABLE: return "VIRTIO_MAGMA_CMD_GET_BUFFER_IS_MAPPABLE";
-		case VIRTIO_MAGMA_RESP_GET_BUFFER_IS_MAPPABLE: return "VIRTIO_MAGMA_RESP_GET_BUFFER_IS_MAPPABLE";
-		case VIRTIO_MAGMA_CMD_SET_BUFFER_MAPPING_ADDRESS_RANGE: return "VIRTIO_MAGMA_CMD_SET_BUFFER_MAPPING_ADDRESS_RANGE";
-		case VIRTIO_MAGMA_RESP_SET_BUFFER_MAPPING_ADDRESS_RANGE: return "VIRTIO_MAGMA_RESP_SET_BUFFER_MAPPING_ADDRESS_RANGE";
-		case VIRTIO_MAGMA_CMD_MAP: return "VIRTIO_MAGMA_CMD_MAP";
-		case VIRTIO_MAGMA_RESP_MAP: return "VIRTIO_MAGMA_RESP_MAP";
-		case VIRTIO_MAGMA_CMD_MAP_ALIGNED: return "VIRTIO_MAGMA_CMD_MAP_ALIGNED";
-		case VIRTIO_MAGMA_RESP_MAP_ALIGNED: return "VIRTIO_MAGMA_RESP_MAP_ALIGNED";
-		case VIRTIO_MAGMA_CMD_MAP_SPECIFIC: return "VIRTIO_MAGMA_CMD_MAP_SPECIFIC";
-		case VIRTIO_MAGMA_RESP_MAP_SPECIFIC: return "VIRTIO_MAGMA_RESP_MAP_SPECIFIC";
-		case VIRTIO_MAGMA_CMD_UNMAP: return "VIRTIO_MAGMA_CMD_UNMAP";
-		case VIRTIO_MAGMA_RESP_UNMAP: return "VIRTIO_MAGMA_RESP_UNMAP";
 		case VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU: return "VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU";
 		case VIRTIO_MAGMA_RESP_MAP_BUFFER_GPU: return "VIRTIO_MAGMA_RESP_MAP_BUFFER_GPU";
 		case VIRTIO_MAGMA_CMD_UNMAP_BUFFER_GPU: return "VIRTIO_MAGMA_CMD_UNMAP_BUFFER_GPU";
@@ -243,10 +211,6 @@
 		case VIRTIO_MAGMA_RESP_POLL: return "VIRTIO_MAGMA_RESP_POLL";
 		case VIRTIO_MAGMA_CMD_CONNECTION_ACCESS_PERFORMANCE_COUNTERS: return "VIRTIO_MAGMA_CMD_CONNECTION_ACCESS_PERFORMANCE_COUNTERS";
 		case VIRTIO_MAGMA_RESP_CONNECTION_ACCESS_PERFORMANCE_COUNTERS: return "VIRTIO_MAGMA_RESP_CONNECTION_ACCESS_PERFORMANCE_COUNTERS";
-		case VIRTIO_MAGMA_CMD_MAP_CONSTRAINED: return "VIRTIO_MAGMA_CMD_MAP_CONSTRAINED";
-		case VIRTIO_MAGMA_RESP_MAP_CONSTRAINED: return "VIRTIO_MAGMA_RESP_MAP_CONSTRAINED";
-		case VIRTIO_MAGMA_CMD_BUFFER_SET_PADDING: return "VIRTIO_MAGMA_CMD_BUFFER_SET_PADDING";
-		case VIRTIO_MAGMA_RESP_BUFFER_SET_PADDING: return "VIRTIO_MAGMA_RESP_BUFFER_SET_PADDING";
 		case VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS: return "VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS";
 		case VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS: return "VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS";
 		case VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL: return "VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL";
@@ -293,19 +257,12 @@
 		case VIRTIO_MAGMA_CMD_RELEASE_CONTEXT: return VIRTIO_MAGMA_RESP_RELEASE_CONTEXT;
 		case VIRTIO_MAGMA_CMD_CREATE_BUFFER: return VIRTIO_MAGMA_RESP_CREATE_BUFFER;
 		case VIRTIO_MAGMA_CMD_RELEASE_BUFFER: return VIRTIO_MAGMA_RESP_RELEASE_BUFFER;
-		case VIRTIO_MAGMA_CMD_DUPLICATE_HANDLE: return VIRTIO_MAGMA_RESP_DUPLICATE_HANDLE;
 		case VIRTIO_MAGMA_CMD_RELEASE_BUFFER_HANDLE: return VIRTIO_MAGMA_RESP_RELEASE_BUFFER_HANDLE;
 		case VIRTIO_MAGMA_CMD_GET_BUFFER_ID: return VIRTIO_MAGMA_RESP_GET_BUFFER_ID;
 		case VIRTIO_MAGMA_CMD_GET_BUFFER_SIZE: return VIRTIO_MAGMA_RESP_GET_BUFFER_SIZE;
 		case VIRTIO_MAGMA_CMD_CLEAN_CACHE: return VIRTIO_MAGMA_RESP_CLEAN_CACHE;
 		case VIRTIO_MAGMA_CMD_SET_CACHE_POLICY: return VIRTIO_MAGMA_RESP_SET_CACHE_POLICY;
 		case VIRTIO_MAGMA_CMD_GET_BUFFER_CACHE_POLICY: return VIRTIO_MAGMA_RESP_GET_BUFFER_CACHE_POLICY;
-		case VIRTIO_MAGMA_CMD_GET_BUFFER_IS_MAPPABLE: return VIRTIO_MAGMA_RESP_GET_BUFFER_IS_MAPPABLE;
-		case VIRTIO_MAGMA_CMD_SET_BUFFER_MAPPING_ADDRESS_RANGE: return VIRTIO_MAGMA_RESP_SET_BUFFER_MAPPING_ADDRESS_RANGE;
-		case VIRTIO_MAGMA_CMD_MAP: return VIRTIO_MAGMA_RESP_MAP;
-		case VIRTIO_MAGMA_CMD_MAP_ALIGNED: return VIRTIO_MAGMA_RESP_MAP_ALIGNED;
-		case VIRTIO_MAGMA_CMD_MAP_SPECIFIC: return VIRTIO_MAGMA_RESP_MAP_SPECIFIC;
-		case VIRTIO_MAGMA_CMD_UNMAP: return VIRTIO_MAGMA_RESP_UNMAP;
 		case VIRTIO_MAGMA_CMD_MAP_BUFFER_GPU: return VIRTIO_MAGMA_RESP_MAP_BUFFER_GPU;
 		case VIRTIO_MAGMA_CMD_UNMAP_BUFFER_GPU: return VIRTIO_MAGMA_RESP_UNMAP_BUFFER_GPU;
 		case VIRTIO_MAGMA_CMD_COMMIT_BUFFER: return VIRTIO_MAGMA_RESP_COMMIT_BUFFER;
@@ -331,8 +288,6 @@
 		case VIRTIO_MAGMA_CMD_INITIALIZE_LOGGING: return VIRTIO_MAGMA_RESP_INITIALIZE_LOGGING;
 		case VIRTIO_MAGMA_CMD_POLL: return VIRTIO_MAGMA_RESP_POLL;
 		case VIRTIO_MAGMA_CMD_CONNECTION_ACCESS_PERFORMANCE_COUNTERS: return VIRTIO_MAGMA_RESP_CONNECTION_ACCESS_PERFORMANCE_COUNTERS;
-		case VIRTIO_MAGMA_CMD_MAP_CONSTRAINED: return VIRTIO_MAGMA_RESP_MAP_CONSTRAINED;
-		case VIRTIO_MAGMA_CMD_BUFFER_SET_PADDING: return VIRTIO_MAGMA_RESP_BUFFER_SET_PADDING;
 		case VIRTIO_MAGMA_CMD_CONNECTION_ENABLE_PERFORMANCE_COUNTERS: return VIRTIO_MAGMA_RESP_CONNECTION_ENABLE_PERFORMANCE_COUNTERS;
 		case VIRTIO_MAGMA_CMD_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL: return VIRTIO_MAGMA_RESP_CONNECTION_CREATE_PERFORMANCE_COUNTER_BUFFER_POOL;
 		case VIRTIO_MAGMA_CMD_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL: return VIRTIO_MAGMA_RESP_CONNECTION_RELEASE_PERFORMANCE_COUNTER_BUFFER_POOL;
@@ -418,17 +373,6 @@
 	struct virtio_magma_ctrl_hdr hdr;
 } __attribute((packed));
 
-struct virtio_magma_duplicate_handle_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le32 buffer_handle;
-} __attribute((packed));
-
-struct virtio_magma_duplicate_handle_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 buffer_handle_out;
-	__le64 result_return;
-} __attribute((packed));
-
 struct virtio_magma_release_buffer_handle_ctrl {
 	struct virtio_magma_ctrl_hdr hdr;
 	__le32 buffer_handle;
@@ -494,79 +438,6 @@
 	__le64 result_return;
 } __attribute((packed));
 
-struct virtio_magma_get_buffer_is_mappable_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 buffer;
-	__le32 flags;
-} __attribute((packed));
-
-struct virtio_magma_get_buffer_is_mappable_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 is_mappable_out;
-	__le64 result_return;
-} __attribute((packed));
-
-struct virtio_magma_set_buffer_mapping_address_range_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 buffer;
-	__le32 handle;
-} __attribute((packed));
-
-struct virtio_magma_set_buffer_mapping_address_range_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 result_return;
-} __attribute((packed));
-
-struct virtio_magma_map_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 connection;
-	__le64 buffer;
-} __attribute((packed));
-
-struct virtio_magma_map_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 addr_out;
-	__le64 result_return;
-} __attribute((packed));
-
-struct virtio_magma_map_aligned_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 connection;
-	__le64 buffer;
-	__le64 alignment;
-} __attribute((packed));
-
-struct virtio_magma_map_aligned_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 addr_out;
-	__le64 result_return;
-} __attribute((packed));
-
-struct virtio_magma_map_specific_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 connection;
-	__le64 buffer;
-	__le64 addr;
-	__le64 offset;
-	__le64 length;
-} __attribute((packed));
-
-struct virtio_magma_map_specific_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 result_return;
-} __attribute((packed));
-
-struct virtio_magma_unmap_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 connection;
-	__le64 buffer;
-} __attribute((packed));
-
-struct virtio_magma_unmap_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 result_return;
-} __attribute((packed));
-
 struct virtio_magma_map_buffer_gpu_ctrl {
 	struct virtio_magma_ctrl_hdr hdr;
 	__le64 connection;
@@ -848,33 +719,6 @@
 	__le64 result_return;
 } __attribute((packed));
 
-struct virtio_magma_map_constrained_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 connection;
-	__le64 buffer;
-	__le64 length;
-	__le64 upper_limit;
-	__le64 alignment;
-} __attribute((packed));
-
-struct virtio_magma_map_constrained_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 addr_out;
-	__le64 result_return;
-} __attribute((packed));
-
-struct virtio_magma_buffer_set_padding_ctrl {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 connection;
-	__le64 buffer;
-	__le64 padding;
-} __attribute((packed));
-
-struct virtio_magma_buffer_set_padding_resp {
-	struct virtio_magma_ctrl_hdr hdr;
-	__le64 result_return;
-} __attribute((packed));
-
 struct virtio_magma_connection_enable_performance_counters_ctrl {
 	struct virtio_magma_ctrl_hdr hdr;
 	__le64 connection;