All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] tools: add support for FreeBSD
@ 2014-06-19 16:32 Roger Pau Monne
  2014-06-19 16:32 ` [PATCH v3 1/5] configure: set blktap2 availability on configure Roger Pau Monne
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Roger Pau Monne @ 2014-06-19 16:32 UTC (permalink / raw)
  To: xen-devel

This are the remaining bits regarding FreeBSD support in the tools.

Thanks, Roger.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v3 1/5] configure: set blktap2 availability on configure
  2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
@ 2014-06-19 16:32 ` Roger Pau Monne
  2014-06-19 16:41   ` David Vrabel
  2014-06-19 16:32 ` [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2} Roger Pau Monne
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Roger Pau Monne @ 2014-06-19 16:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne

blktap2 will be enabled by default on Linux systems only, also give
the oportunity to disable it from configure.

Remove the gate in the Makefile that only allows enabling blktap{1,2}
on Linux, since this is now done in a more flexible way on configure.

Please re-run autoconf after applying this patch.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
 config/Tools.mk.in |    1 +
 tools/Makefile     |    5 +----
 tools/configure.ac |   18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/config/Tools.mk.in b/config/Tools.mk.in
index 84b2612..852c941 100644
--- a/config/Tools.mk.in
+++ b/config/Tools.mk.in
@@ -54,6 +54,7 @@ CONFIG_SEABIOS      := @seabios@
 CONFIG_QEMU_TRAD    := @qemu_traditional@
 CONFIG_QEMU_XEN     := @qemu_xen@
 CONFIG_BLKTAP1      := @blktap1@
+CONFIG_BLKTAP2      := @blktap2@
 CONFIG_VTPM         := @vtpm@
 CONFIG_QEMUU_EXTRA_ARGS:= @EXTRA_QEMUU_CONFIGURE_ARGS@
 
diff --git a/tools/Makefile b/tools/Makefile
index 63382b1..4682f43 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -16,11 +16,8 @@ SUBDIRS-y += console
 SUBDIRS-y += xenmon
 SUBDIRS-y += xenstat
 SUBDIRS-$(CONFIG_Linux) += memshr 
-ifeq ($(CONFIG_X86)$(CONFIG_Linux),yy)
 SUBDIRS-$(CONFIG_BLKTAP1) += blktap
-endif
-SUBDIRS-$(CONFIG_Linux) += blktap2
-SUBDIRS-$(CONFIG_NetBSD) += blktap2
+SUBDIRS-$(CONFIG_BLKTAP2) += blktap2
 SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
 SUBDIRS-y += libfsimage
 SUBDIRS-$(CONFIG_Linux) += libvchan
diff --git a/tools/configure.ac b/tools/configure.ac
index 9db798b..836bbba 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -58,6 +58,24 @@ AX_ARG_DEFAULT_ENABLE([seabios], [Disable SeaBIOS])
 AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of tools])
 AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools])
 
+dnl Enable blktap2 on Linux only.
+AC_ARG_ENABLE([blktap2],
+    AS_HELP_STRING([--enable-blktap2],
+                   [Enable blktap2, (DEFAULT is on for Linux, otherwise off)]),,[
+    case "$host_os" in
+        linux*)
+           enable_blktap2="yes";;
+        *) enable_blktap2="no";;
+    esac
+])
+AS_IF([test "x$enable_blktap2" = "xyes"], [
+AC_DEFINE([HAVE_BLKTAP2], [1], [Blktap2 enabled])
+    blktap2=y],[
+    blktap2=n
+])
+AC_SUBST(blktap2)
+
+
 AC_ARG_ENABLE([qemu-traditional],
     AS_HELP_STRING([--enable-qemu-traditional],
                    [Enable qemu traditional device model, (DEFAULT is on for Linux or NetBSD x86, otherwise off)]),,[
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2}
  2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
  2014-06-19 16:32 ` [PATCH v3 1/5] configure: set blktap2 availability on configure Roger Pau Monne
@ 2014-06-19 16:32 ` Roger Pau Monne
  2014-06-19 17:35   ` Wei Liu
  2014-06-19 16:32 ` [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Roger Pau Monne @ 2014-06-19 16:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne

libaio is only required for blktap{1,2}, so make the check conditional
on whether the user has requested blktap{1,2} or not.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
Please re-run autoconf after applying this patch.
---
Changes since v2:
 - Make libaio test conditional on whether blktap2 is also enabled.
---
 tools/configure.ac |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/configure.ac b/tools/configure.ac
index 836bbba..6d70f04 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -262,7 +262,9 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [
 AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"])
 ])
 AC_SUBST(zlib)
+AS_IF([test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"], [
 AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])])
+])
 AC_SUBST(system_aio)
 AC_CHECK_LIB([crypto], [MD5], [], [AC_MSG_ERROR([Could not find libcrypto])])
 AX_CHECK_EXTFS
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation
  2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
  2014-06-19 16:32 ` [PATCH v3 1/5] configure: set blktap2 availability on configure Roger Pau Monne
  2014-06-19 16:32 ` [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2} Roger Pau Monne
@ 2014-06-19 16:32 ` Roger Pau Monne
  2014-06-19 16:42   ` Andrew Cooper
  2014-06-19 16:32 ` [PATCH v3 4/5] libxl: remove the gate that only allows block or regular backing images Roger Pau Monne
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Roger Pau Monne @ 2014-06-19 16:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne

Add the FreeBSD specific uuid implementation. Since uuid_t is not
defined as an array, but as a struct on FreeBSD, use a union with a
array in order to be able to return the uuid as a bytearray.

Also, added a libxl internal compile time assert macro, that is used
to assert that the size of uuid_t is the same as the union used in
libxl.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
Changes since v2:
 - Unify the FreeBSD and NetBSD uuid implementations as much as
   possible.
---
 tools/libxl/libxl_internal.h |    4 ++++
 tools/libxl/libxl_uuid.c     |   40 ++++++++++++++++++++++++++++++++--------
 tools/libxl/libxl_uuid.h     |   12 +++++++-----
 3 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index a0d4f24..0784403 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -3179,6 +3179,10 @@ int libxl__uint64_parse_json(libxl__gc *gc, const libxl__json_object *o,
                              void *p);
 int libxl__string_parse_json(libxl__gc *gc, const libxl__json_object *o,
                              char **p);
+/*
+ * Compile time assertion
+ */
+#define BUILD_BUG_ON(p) ((void)sizeof(char[1 - 2 * !!(p)]))
 
 #endif
 
diff --git a/tools/libxl/libxl_uuid.c b/tools/libxl/libxl_uuid.c
index 172b7d1..7d4a032 100644
--- a/tools/libxl/libxl_uuid.c
+++ b/tools/libxl/libxl_uuid.c
@@ -59,21 +59,35 @@ uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid)
     return uuid->uuid;
 }
 
-#elif defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
 
 int libxl_uuid_is_nil(const libxl_uuid *uuid)
 {
     uint32_t status;
-    return uuid_is_nil((uuid_t *)uuid->uuid, &status);
+
+    return uuid_is_nil(&uuid->uuid, &status);
 }
 
 void libxl_uuid_generate(libxl_uuid *uuid)
 {
     uint32_t status;
-    uuid_create((uuid_t *)uuid->uuid, &status);
+
+    BUILD_BUG_ON(sizeof(libxl_uuid) != sizeof(uuid_t));
+    uuid_create(&uuid->uuid, &status);
     assert(status == uuid_s_ok);
 }
 
+#ifdef __FreeBSD__
+int libxl_uuid_from_string(libxl_uuid *uuid, const char *in)
+{
+    uint32_t status;
+
+    uuid_from_string(in, &uuid->uuid, &status);
+    if (status != uuid_s_ok)
+        return -1;
+    return 0;
+}
+#else
 #define LIBXL__UUID_PTRS(uuid) &uuid[0], &uuid[1], &uuid[2], &uuid[3], \
                                &uuid[4], &uuid[5], &uuid[6], &uuid[7], \
                                &uuid[8], &uuid[9], &uuid[10],&uuid[11], \
@@ -85,33 +99,43 @@ int libxl_uuid_from_string(libxl_uuid *uuid, const char *in)
     return 0;
 }
 #undef LIBXL__UUID_PTRS
+#endif
 
 void libxl_uuid_copy(libxl_ctx *ctx_opt, libxl_uuid *dst,
                      const libxl_uuid *src)
 {
-     memcpy(dst->uuid, src->uuid, sizeof(dst->uuid));
+    memcpy(&dst->uuid, &src->uuid, sizeof(dst->uuid));
 }
 
 void libxl_uuid_clear(libxl_uuid *uuid)
 {
-     memset(uuid->uuid, 0, sizeof(uuid->uuid));
+    memset(&uuid->uuid, 0, sizeof(uuid->uuid));
 }
 
+#ifdef __FreeBSD__
+int libxl_uuid_compare(const libxl_uuid *uuid1, const libxl_uuid *uuid2)
+{
+
+    return uuid_compare(&uuid1->uuid, &uuid2->uuid, NULL);
+}
+#else
 int libxl_uuid_compare(const libxl_uuid *uuid1, const libxl_uuid *uuid2)
 {
      return memcmp(uuid1->uuid, uuid2->uuid, sizeof(uuid1->uuid));
 }
+#endif
 
 const uint8_t *libxl_uuid_bytearray_const(const libxl_uuid *uuid)
 {
-    return uuid->uuid;
+
+    return uuid->uuid_raw;
 }
 
 uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid)
 {
-    return uuid->uuid;
-}
 
+    return uuid->uuid_raw;
+}
 #else
 
 #error "Please update libxl_uuid.c for your OS"
diff --git a/tools/libxl/libxl_uuid.h b/tools/libxl/libxl_uuid.h
index 0c2a1e7..196b5bc 100644
--- a/tools/libxl/libxl_uuid.h
+++ b/tools/libxl/libxl_uuid.h
@@ -33,20 +33,22 @@ typedef struct {
 
 #define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(((uint8_t *)arg.uuid))
 
-#elif defined(__NetBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
 
 #include <uuid.h>
+#include <stdint.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <assert.h>
 
-#define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(arg.uuid)
-
-typedef struct {
-    uint8_t uuid[16];
+typedef union {
+    uuid_t uuid;
+    uint8_t uuid_raw[16];
 } libxl_uuid;
 
+#define LIBXL_UUID_BYTES(arg) LIBXL__UUID_BYTES(arg.uuid_raw)
+
 #else
 
 #error "Please update libxl_uuid.h for your OS"
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 4/5] libxl: remove the gate that only allows block or regular backing images
  2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
                   ` (2 preceding siblings ...)
  2014-06-19 16:32 ` [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
@ 2014-06-19 16:32 ` Roger Pau Monne
  2014-06-19 16:32 ` [PATCH v3 5/5] libxc: fix printf formatting error surfaced by 66f8c6 Roger Pau Monne
  2014-06-27 13:38 ` [PATCH v3 0/5] tools: add support for FreeBSD Ian Campbell
  5 siblings, 0 replies; 14+ messages in thread
From: Roger Pau Monne @ 2014-06-19 16:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne

On FreeBSD ZVOLs/disks/partitions are char devices, so libxl must
allow it's usage. This is already taken care in the OS-specific bits
of libxl by libxl__try_phy_backend, so remove the generic gate.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
Changes since v2:
 - Remove the generic gate instead of adding support for char devices.
---
 tools/libxl/libxl_device.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index 90ae564..7d53831 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -265,12 +265,6 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
                         disk->vdev, disk->pdev_path);
             return ERROR_INVAL;
         }
-        if (!S_ISBLK(a.stab.st_mode) &
-            !S_ISREG(a.stab.st_mode)) {
-            LOG(ERROR, "Disk vdev=%s phys path is not a block dev or file: %s",
-                       disk->vdev, disk->pdev_path);
-            return ERROR_INVAL;
-        }
     }
 
     if (disk->backend != LIBXL_DISK_BACKEND_UNKNOWN) {
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 5/5] libxc: fix printf formatting error surfaced by 66f8c6
  2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
                   ` (3 preceding siblings ...)
  2014-06-19 16:32 ` [PATCH v3 4/5] libxl: remove the gate that only allows block or regular backing images Roger Pau Monne
@ 2014-06-19 16:32 ` Roger Pau Monne
  2014-06-27 13:38 ` [PATCH v3 0/5] tools: add support for FreeBSD Ian Campbell
  5 siblings, 0 replies; 14+ messages in thread
From: Roger Pau Monne @ 2014-06-19 16:32 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne

The privcmd hypercall op and arguments on BSDs are unsigned long, so
use the proper printf format especifiers.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
 tools/libxc/xenctrl_osdep_ENOSYS.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xenctrl_osdep_ENOSYS.c b/tools/libxc/xenctrl_osdep_ENOSYS.c
index abdf3d5..dd59dcd 100644
--- a/tools/libxc/xenctrl_osdep_ENOSYS.c
+++ b/tools/libxc/xenctrl_osdep_ENOSYS.c
@@ -27,7 +27,11 @@ static int ENOSYS_privcmd_close(xc_interface *xch, xc_osdep_handle h)
 
 static int ENOSYS_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h, privcmd_hypercall_t *hypercall)
 {
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+    IPRINTF(xch, "ENOSYS_privcmd %lx: hypercall: %02lu(%#lx,%#lx,%#lx,%#lx,%#lx)\n",
+#else
     IPRINTF(xch, "ENOSYS_privcmd %lx: hypercall: %02lld(%#llx,%#llx,%#llx,%#llx,%#llx)\n",
+#endif
             h, hypercall->op,
             hypercall->arg[0], hypercall->arg[1], hypercall->arg[2],
             hypercall->arg[3], hypercall->arg[4]);
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/5] configure: set blktap2 availability on configure
  2014-06-19 16:32 ` [PATCH v3 1/5] configure: set blktap2 availability on configure Roger Pau Monne
@ 2014-06-19 16:41   ` David Vrabel
  2014-06-19 16:46     ` Roger Pau Monné
  0 siblings, 1 reply; 14+ messages in thread
From: David Vrabel @ 2014-06-19 16:41 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Ian Jackson, Ian Campbell

On 19/06/14 17:32, Roger Pau Monne wrote:
> blktap2 will be enabled by default on Linux systems only, also give
> the oportunity to disable it from configure.

I think it should be disabled by blktap2 on Linux as well.  It requires
a non-upstream driver to work.

David

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation
  2014-06-19 16:32 ` [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
@ 2014-06-19 16:42   ` Andrew Cooper
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Cooper @ 2014-06-19 16:42 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Ian Jackson, Ian Campbell

On 19/06/14 17:32, Roger Pau Monne wrote:
> Add the FreeBSD specific uuid implementation. Since uuid_t is not
> defined as an array, but as a struct on FreeBSD, use a union with a
> array in order to be able to return the uuid as a bytearray.
>
> Also, added a libxl internal compile time assert macro, that is used
> to assert that the size of uuid_t is the same as the union used in
> libxl.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> ---
> Changes since v2:
>  - Unify the FreeBSD and NetBSD uuid implementations as much as
>    possible.
> ---
>  tools/libxl/libxl_internal.h |    4 ++++
>  tools/libxl/libxl_uuid.c     |   40 ++++++++++++++++++++++++++++++++--------
>  tools/libxl/libxl_uuid.h     |   12 +++++++-----
>  3 files changed, 43 insertions(+), 13 deletions(-)
>
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index a0d4f24..0784403 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -3179,6 +3179,10 @@ int libxl__uint64_parse_json(libxl__gc *gc, const libxl__json_object *o,
>                               void *p);
>  int libxl__string_parse_json(libxl__gc *gc, const libxl__json_object *o,
>                               char **p);
> +/*
> + * Compile time assertion
> + */
> +#define BUILD_BUG_ON(p) ((void)sizeof(char[1 - 2 * !!(p)]))
>  

Please prefer _Static_assert if available.

c/s d5a3bc1a214 is the way I did this for libxc.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/5] configure: set blktap2 availability on configure
  2014-06-19 16:41   ` David Vrabel
@ 2014-06-19 16:46     ` Roger Pau Monné
  2014-06-19 16:47       ` David Vrabel
  0 siblings, 1 reply; 14+ messages in thread
From: Roger Pau Monné @ 2014-06-19 16:46 UTC (permalink / raw)
  To: David Vrabel, xen-devel; +Cc: Ian Jackson, Ian Campbell

On 19/06/14 18:41, David Vrabel wrote:
> On 19/06/14 17:32, Roger Pau Monne wrote:
>> blktap2 will be enabled by default on Linux systems only, also give
>> the oportunity to disable it from configure.
> 
> I think it should be disabled by blktap2 on Linux as well.  It requires
> a non-upstream driver to work.

This was my original intention, but after discussion with Ian C he felt
that it would be better to leave it out of the FreeBSD support series:

http://marc.info/?l=xen-devel&m=140204739305306

If there's consensus about disabling blktap2 globally I can send a patch
for it, but I would prefer to leave it out of the FreeBSD support series.

Roger.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/5] configure: set blktap2 availability on configure
  2014-06-19 16:46     ` Roger Pau Monné
@ 2014-06-19 16:47       ` David Vrabel
  0 siblings, 0 replies; 14+ messages in thread
From: David Vrabel @ 2014-06-19 16:47 UTC (permalink / raw)
  To: Roger Pau Monné, xen-devel; +Cc: Ian Jackson, Ian Campbell

On 19/06/14 17:46, Roger Pau Monné wrote:
> On 19/06/14 18:41, David Vrabel wrote:
>> On 19/06/14 17:32, Roger Pau Monne wrote:
>>> blktap2 will be enabled by default on Linux systems only, also give
>>> the oportunity to disable it from configure.
>>
>> I think it should be disabled by blktap2 on Linux as well.  It requires
>> a non-upstream driver to work.
> 
> This was my original intention, but after discussion with Ian C he felt
> that it would be better to leave it out of the FreeBSD support series:
> 
> http://marc.info/?l=xen-devel&m=140204739305306
> 
> If there's consensus about disabling blktap2 globally I can send a patch
> for it, but I would prefer to leave it out of the FreeBSD support series.

Oh, that sounds fine.

David

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2}
  2014-06-19 16:32 ` [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2} Roger Pau Monne
@ 2014-06-19 17:35   ` Wei Liu
  2014-06-19 17:46     ` Roger Pau Monné
  0 siblings, 1 reply; 14+ messages in thread
From: Wei Liu @ 2014-06-19 17:35 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Ian Campbell, wei.liu2

On Thu, Jun 19, 2014 at 06:32:45PM +0200, Roger Pau Monne wrote:
> libaio is only required for blktap{1,2}, so make the check conditional
> on whether the user has requested blktap{1,2} or not.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> ---
> Please re-run autoconf after applying this patch.
> ---
> Changes since v2:
>  - Make libaio test conditional on whether blktap2 is also enabled.
> ---
>  tools/configure.ac |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/tools/configure.ac b/tools/configure.ac
> index 836bbba..6d70f04 100644
> --- a/tools/configure.ac
> +++ b/tools/configure.ac
> @@ -262,7 +262,9 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [
>  AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"])
>  ])
>  AC_SUBST(zlib)
> +AS_IF([test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"], [
>  AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])])
> +])

Libaio is needed by QEMU as well.

Wei.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2}
  2014-06-19 17:35   ` Wei Liu
@ 2014-06-19 17:46     ` Roger Pau Monné
  2014-06-27 11:44       ` Ian Campbell
  0 siblings, 1 reply; 14+ messages in thread
From: Roger Pau Monné @ 2014-06-19 17:46 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Ian Jackson, Ian Campbell

On 19/06/14 19:35, Wei Liu wrote:
> On Thu, Jun 19, 2014 at 06:32:45PM +0200, Roger Pau Monne wrote:
>> libaio is only required for blktap{1,2}, so make the check conditional
>> on whether the user has requested blktap{1,2} or not.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
>> Cc: Ian Campbell <ian.campbell@citrix.com>
>> ---
>> Please re-run autoconf after applying this patch.
>> ---
>> Changes since v2:
>>  - Make libaio test conditional on whether blktap2 is also enabled.
>> ---
>>  tools/configure.ac |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/tools/configure.ac b/tools/configure.ac
>> index 836bbba..6d70f04 100644
>> --- a/tools/configure.ac
>> +++ b/tools/configure.ac
>> @@ -262,7 +262,9 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [
>>  AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"])
>>  ])
>>  AC_SUBST(zlib)
>> +AS_IF([test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"], [
>>  AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])])
>> +])
> 
> Libaio is needed by QEMU as well.

Not on FreeBSD, and Qemu already runs it's own configure script, so I
don't think we need to check for everything that Qemu needs here.

Roger.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2}
  2014-06-19 17:46     ` Roger Pau Monné
@ 2014-06-27 11:44       ` Ian Campbell
  0 siblings, 0 replies; 14+ messages in thread
From: Ian Campbell @ 2014-06-27 11:44 UTC (permalink / raw)
  To: Roger Pau Monné; +Cc: xen-devel, Wei Liu, Ian Jackson

On Thu, 2014-06-19 at 19:46 +0200, Roger Pau Monné wrote:
> On 19/06/14 19:35, Wei Liu wrote:
> > On Thu, Jun 19, 2014 at 06:32:45PM +0200, Roger Pau Monne wrote:
> >> libaio is only required for blktap{1,2}, so make the check conditional
> >> on whether the user has requested blktap{1,2} or not.
> >>
> >> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> >> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
> >> Cc: Ian Campbell <ian.campbell@citrix.com>
> >> ---
> >> Please re-run autoconf after applying this patch.
> >> ---
> >> Changes since v2:
> >>  - Make libaio test conditional on whether blktap2 is also enabled.
> >> ---
> >>  tools/configure.ac |    2 ++
> >>  1 files changed, 2 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/tools/configure.ac b/tools/configure.ac
> >> index 836bbba..6d70f04 100644
> >> --- a/tools/configure.ac
> >> +++ b/tools/configure.ac
> >> @@ -262,7 +262,9 @@ AC_CHECK_HEADER([lzo/lzo1x.h], [
> >>  AC_CHECK_LIB([lzo2], [lzo1x_decompress], [zlib="$zlib -DHAVE_LZO1X -llzo2"])
> >>  ])
> >>  AC_SUBST(zlib)
> >> +AS_IF([test "x$enable_blktap1" = "xyes" || test "x$enable_blktap2" = "xyes"], [
> >>  AC_CHECK_LIB([aio], [io_setup], [], [AC_MSG_ERROR([Could not find libaio])])
> >> +])
> > 
> > Libaio is needed by QEMU as well.
> 
> Not on FreeBSD, and Qemu already runs it's own configure script, so I
> don't think we need to check for everything that Qemu needs here.

We do check for some stuff because qemu needs it, so we can fail sooner.
I'm happy to ack and accept this patch as it is though.

I'd really like to see if we could pull the clone of external trees
earlier so we can run qemu's configure sooner and perhaps fail sooner.
I'm even wondering if we can cause things to be cloned at configure
time.

Anyway, one for another day, I reckon.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 0/5] tools: add support for FreeBSD
  2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
                   ` (4 preceding siblings ...)
  2014-06-19 16:32 ` [PATCH v3 5/5] libxc: fix printf formatting error surfaced by 66f8c6 Roger Pau Monne
@ 2014-06-27 13:38 ` Ian Campbell
  5 siblings, 0 replies; 14+ messages in thread
From: Ian Campbell @ 2014-06-27 13:38 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel


On Thu, 2014-06-19 at 18:32 +0200, Roger Pau Monne wrote:
> This are the remaining bits regarding FreeBSD support in the tools.

Acked + applied all but the UUID one, the _Static_assert thing seems
like a good idea.

Ian.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-06-27 13:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19 16:32 [PATCH v3 0/5] tools: add support for FreeBSD Roger Pau Monne
2014-06-19 16:32 ` [PATCH v3 1/5] configure: set blktap2 availability on configure Roger Pau Monne
2014-06-19 16:41   ` David Vrabel
2014-06-19 16:46     ` Roger Pau Monné
2014-06-19 16:47       ` David Vrabel
2014-06-19 16:32 ` [PATCH v3 2/5] configure: make the libaio test conditional on blktap{1, 2} Roger Pau Monne
2014-06-19 17:35   ` Wei Liu
2014-06-19 17:46     ` Roger Pau Monné
2014-06-27 11:44       ` Ian Campbell
2014-06-19 16:32 ` [PATCH v3 3/5] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
2014-06-19 16:42   ` Andrew Cooper
2014-06-19 16:32 ` [PATCH v3 4/5] libxl: remove the gate that only allows block or regular backing images Roger Pau Monne
2014-06-19 16:32 ` [PATCH v3 5/5] libxc: fix printf formatting error surfaced by 66f8c6 Roger Pau Monne
2014-06-27 13:38 ` [PATCH v3 0/5] tools: add support for FreeBSD Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.