summaryrefslogtreecommitdiff
path: root/drivers/block/xen-blkback/common.h
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2015-02-05 17:09:56 +0000
committerDavid Vrabel <david.vrabel@citrix.com>2015-02-10 16:04:46 +0000
commitb042a3ca949053231950a1b15f31cccca9e305f3 (patch)
tree4ae59a2823b7373329d55ec4f95476d2b9ace6f4 /drivers/block/xen-blkback/common.h
parent3bb8c98e5612f069010ad04e5f463389e2eb6563 (diff)
downloadlinux-next-b042a3ca949053231950a1b15f31cccca9e305f3.tar.gz
xen-blkback: default to X86_32 ABI on x86
Prior to the existance of 64-bit backends using the X86_64 ABI, frontends used the X86_32 ABI. These old frontends do not specify the ABI and when used with a 64-bit backend do not work. On x86, default to the X86_32 ABI if one is not specified. Backends on ARM continue to default to their NATIVE ABI. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Diffstat (limited to 'drivers/block/xen-blkback/common.h')
-rw-r--r--drivers/block/xen-blkback/common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/block/xen-blkback/common.h b/drivers/block/xen-blkback/common.h
index f65b807e3236..78b0411e5ed5 100644
--- a/drivers/block/xen-blkback/common.h
+++ b/drivers/block/xen-blkback/common.h
@@ -214,6 +214,15 @@ enum blkif_protocol {
BLKIF_PROTOCOL_X86_64 = 3,
};
+/*
+ * Default protocol if the frontend doesn't specify one.
+ */
+#ifdef CONFIG_X86
+# define BLKIF_PROTOCOL_DEFAULT BLKIF_PROTOCOL_X86_32
+#else
+# define BLKIF_PROTOCOL_DEFAULT BLKIF_PROTOCOL_NATIVE
+#endif
+
struct xen_vbd {
/* What the domain refers to this vbd as. */
blkif_vdev_t handle;