* [PATCH v2 00/17] tools: add support for FreeBSD
@ 2014-06-02 15:08 Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 01/17] configure: make the libaio test conditional on blktap1 Roger Pau Monne
` (17 more replies)
0 siblings, 18 replies; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel
This patch series adds support for using the tools on FreeBSD. The
series can also be found on my git repo:
git://xenbits.xen.org/people/royger/xen.git branch freebsd_tools_v2
http://xenbits.xen.org/gitweb/?p=people/royger/xen.git;a=shortlog;h=refs/heads/freebsd_tools_v2
Some of the patches have already been acked, and they are marked with
a * in the following list:
[PATCH v2 01/17] configure: make the libaio test conditional on
[PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by
[PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled
*[PATCH v2 04/17] include: import FreeBSD headers for evtchn and
[PATCH v2 05/17] libxc: add support for FreeBSD
[PATCH v2 06/17] libxc: remove broken endianess gate on lz4
[PATCH v2 07/17] xenstored: unify xenstored OS-specific bits
[PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths
[PATCH v2 09/17] console: add FreeBSD includes
[PATCH v2 10/17] init: add FreeBSD xencommons init script
[PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
[PATCH v2 12/17] libxl: add FreeBSD OS support
[PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation
*[PATCH v2 14/17] libxl: only include utmp.h if it's present
[PATCH v2 15/17] libxl: allow usage of char devices as block
*[PATCH v2 16/17] hvmloader: remove size_t typedef and include
[PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS
Thanks, Roger.
^ permalink raw reply [flat|nested] 42+ messages in thread
* [PATCH v2 01/17] configure: make the libaio test conditional on blktap1
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:06 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by default Roger Pau Monne
` (16 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
libaio is only required for blktap1, so make the check conditional on
whether the user has requested blktap1 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.
---
tools/configure.ac | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/configure.ac b/tools/configure.ac
index 25d7ca3..3b30560 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -224,7 +224,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"], [
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] 42+ messages in thread
* [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by default
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 01/17] configure: make the libaio test conditional on blktap1 Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:07 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled Roger Pau Monne
` (15 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
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 rerun configure after applying.
---
tools/configure.ac | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tools/configure.ac b/tools/configure.ac
index 3b30560..1684405 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -61,12 +61,17 @@ AX_ARG_DEFAULT_DISABLE([blktap1], [Enable blktap1 tools])
AC_ARG_ENABLE([qemu-traditional],
AS_HELP_STRING([--enable-qemu-traditional],
- [Enable qemu traditional device model, (DEFAULT is on for x86, otherwise off)]),,[
+ [Enable qemu traditional device model, (DEFAULT is on for Linux or NetBSD x86, otherwise off)]),,[
case "$host_cpu" in
i[[3456]]86|x86_64)
enable_qemu_traditional="yes";;
*) enable_qemu_traditional="no";;
esac
+ case "$host_os" in
+ freebsd*)
+ enable_qemu_traditional="no";;
+ esac
+
])
AS_IF([test "x$enable_qemu_traditional" = "xyes"], [
AC_DEFINE([HAVE_QEMU_TRADITIONAL], [1], [Qemu traditional enabled])
--
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] 42+ messages in thread
* [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 01/17] configure: make the libaio test conditional on blktap1 Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by default Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:09 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 04/17] include: import FreeBSD headers for evtchn and privcmd devices Roger Pau Monne
` (14 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
ROMBIOS only works with qemu-traditional, so if it is disabled,
disable ROMBIOS also.
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 rerun configure after applying.
---
tools/configure.ac | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/tools/configure.ac b/tools/configure.ac
index 1684405..9dcfe81 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -54,7 +54,6 @@ AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools])
AX_ARG_DEFAULT_ENABLE([ocamltools], [Disable Ocaml tools])
AX_ARG_DEFAULT_ENABLE([xsmpolicy], [Disable XSM policy compilation])
AX_ARG_DEFAULT_DISABLE([ovmf], [Enable OVMF])
-AX_ARG_DEFAULT_ENABLE([rombios], [Disable ROM BIOS])
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])
@@ -80,6 +79,22 @@ AC_DEFINE([HAVE_QEMU_TRADITIONAL], [1], [Qemu traditional enabled])
])
AC_SUBST(qemu_traditional)
+AC_ARG_ENABLE([rombios],
+ AS_HELP_STRING([--enable-rombios],
+ [Enable ROMBIOS, (DEFAULT is on if qemu-traditional is enabled, otherwise off)]),,[
+ AS_IF([test "x$enable_qemu_traditional" = "xyes"], [
+ enable_rombios="yes"
+ ], [
+ enable_rombios="no"
+ ])
+])
+AS_IF([test "x$enable_rombios" = "xyes"], [
+AC_DEFINE([HAVE_ROMBIOS], [1], [ROMBIOS enabled])
+ rombios=y],[
+ rombios=n
+])
+AC_SUBST(rombios)
+
AC_ARG_WITH([system-qemu],
AS_HELP_STRING([--with-system-qemu@<:@=PATH@:>@],
[Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
--
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] 42+ messages in thread
* [PATCH v2 04/17] include: import FreeBSD headers for evtchn and privcmd devices
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (2 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 05/17] libxc: add support for FreeBSD Roger Pau Monne
` (13 subsequent siblings)
17 siblings, 0 replies; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
tools/include/xen-sys/FreeBSD/evtchn.h | 87 +++++++++++++++++++++++++++++++
tools/include/xen-sys/FreeBSD/privcmd.h | 64 ++++++++++++++++++++++
2 files changed, 151 insertions(+), 0 deletions(-)
create mode 100644 tools/include/xen-sys/FreeBSD/evtchn.h
create mode 100644 tools/include/xen-sys/FreeBSD/privcmd.h
diff --git a/tools/include/xen-sys/FreeBSD/evtchn.h b/tools/include/xen-sys/FreeBSD/evtchn.h
new file mode 100644
index 0000000..00fa67e
--- /dev/null
+++ b/tools/include/xen-sys/FreeBSD/evtchn.h
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * evtchn.h
+ *
+ * Interface to /dev/xen/evtchn.
+ *
+ * Copyright (c) 2003-2005, K A Fraser
+ *
+ * This file may be distributed separately from the Linux kernel, or
+ * incorporated into other software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef __XEN_EVTCHN_H__
+#define __XEN_EVTCHN_H__
+
+/*
+ * Bind a fresh port to VIRQ @virq.
+ */
+#define IOCTL_EVTCHN_BIND_VIRQ \
+ _IOWR('E', 4, struct ioctl_evtchn_bind_virq)
+struct ioctl_evtchn_bind_virq {
+ unsigned int virq;
+ unsigned int port;
+};
+
+/*
+ * Bind a fresh port to remote <@remote_domain, @remote_port>.
+ */
+#define IOCTL_EVTCHN_BIND_INTERDOMAIN \
+ _IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
+struct ioctl_evtchn_bind_interdomain {
+ unsigned int remote_domain, remote_port;
+ unsigned int port;
+};
+
+/*
+ * Allocate a fresh port for binding to @remote_domain.
+ */
+#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \
+ _IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
+struct ioctl_evtchn_bind_unbound_port {
+ unsigned int remote_domain;
+ unsigned int port;
+};
+
+/*
+ * Unbind previously allocated @port.
+ */
+#define IOCTL_EVTCHN_UNBIND \
+ _IOW('E', 7, struct ioctl_evtchn_unbind)
+struct ioctl_evtchn_unbind {
+ unsigned int port;
+};
+
+/*
+ * Send event to previously allocated @port.
+ */
+#define IOCTL_EVTCHN_NOTIFY \
+ _IOW('E', 8, struct ioctl_evtchn_notify)
+struct ioctl_evtchn_notify {
+ unsigned int port;
+};
+
+/* Clear and reinitialise the event buffer. Clear error condition. */
+#define IOCTL_EVTCHN_RESET \
+ _IO('E', 9)
+
+#endif /* __XEN_EVTCHN_H__ */
diff --git a/tools/include/xen-sys/FreeBSD/privcmd.h b/tools/include/xen-sys/FreeBSD/privcmd.h
new file mode 100644
index 0000000..a2a16ed
--- /dev/null
+++ b/tools/include/xen-sys/FreeBSD/privcmd.h
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * privcmd.h
+ *
+ * Interface to /proc/xen/privcmd.
+ *
+ * Copyright (c) 2003-2005, K A Fraser
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation; or, when distributed
+ * separately from the Linux kernel or incorporated into other
+ * software packages, subject to the following license:
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this source file (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy, modify,
+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef __XEN_PRIVCMD_H__
+#define __XEN_PRIVCMD_H__
+
+struct ioctl_privcmd_hypercall
+{
+ unsigned long op; /* hypercall number */
+ unsigned long arg[5]; /* arguments */
+ long retval; /* return value */
+};
+typedef struct ioctl_privcmd_hypercall privcmd_hypercall_t;
+
+struct ioctl_privcmd_mmapbatch {
+ int num; /* number of pages to populate */
+ domid_t dom; /* target domain */
+ unsigned long addr; /* virtual address */
+ const xen_pfn_t *arr; /* array of mfns */
+ int *err; /* array of error codes */
+};
+typedef struct ioctl_privcmd_mmapbatch privcmd_mmapbatch_t;
+
+typedef struct privcmd_mmap_entry {
+ unsigned long va;
+ unsigned long mfn;
+ unsigned long npages;
+} privcmd_mmap_entry_t;
+
+#define IOCTL_PRIVCMD_HYPERCALL \
+ _IOWR('E', 0, struct ioctl_privcmd_hypercall)
+#define IOCTL_PRIVCMD_MMAPBATCH \
+ _IOWR('E', 1, struct ioctl_privcmd_mmapbatch)
+
+#endif /* !__XEN_PRIVCMD_H__ */
--
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] 42+ messages in thread
* [PATCH v2 05/17] libxc: add support for FreeBSD
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (3 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 04/17] include: import FreeBSD headers for evtchn and privcmd devices Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:11 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 06/17] libxc: remove broken endianess gate on lz4 decompressor Roger Pau Monne
` (12 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Add the FreeBSD implementation of the privcmd and evtchn devices
interface.
The evtchn device interface is the same as the Linux one, while the
privcmd map interface is simplified because FreeBSD only supports
IOCTL_PRIVCMD_MMAPBATCH.
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/Makefile | 1 +
tools/libxc/xc_freebsd.c | 72 +++++++
tools/libxc/xc_freebsd_osdep.c | 405 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 478 insertions(+), 0 deletions(-)
create mode 100644 tools/libxc/xc_freebsd.c
create mode 100644 tools/libxc/xc_freebsd_osdep.c
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index a74b19e..16c61f1 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -36,6 +36,7 @@ CTRL_SRCS-y += xtl_core.c
CTRL_SRCS-y += xtl_logger_stdio.c
CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c xc_linux_osdep.c
+CTRL_SRCS-$(CONFIG_FreeBSD) += xc_freebsd.c xc_freebsd_osdep.c
CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c
diff --git a/tools/libxc/xc_freebsd.c b/tools/libxc/xc_freebsd.c
new file mode 100644
index 0000000..8d169f4
--- /dev/null
+++ b/tools/libxc/xc_freebsd.c
@@ -0,0 +1,72 @@
+/******************************************************************************
+ *
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library 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. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "xc_private.h"
+
+/* Optionally flush file to disk and discard page cache */
+void discard_file_cache(xc_interface *xch, int fd, int flush)
+{
+ off_t cur = 0;
+ int saved_errno = errno;
+
+ if ( flush && (fsync(fd) < 0) )
+ goto out;
+
+ /*
+ * Calculate last page boundary of amount written so far
+ * unless we are flushing in which case entire cache
+ * is discarded.
+ */
+ if ( !flush )
+ {
+ if ( (cur = lseek(fd, 0, SEEK_CUR)) == (off_t)-1 )
+ cur = 0;
+ cur &= ~(XC_PAGE_SIZE-1);
+ }
+
+ /* Discard from the buffer cache. */
+ if ( posix_fadvise(fd, 0, cur, POSIX_FADV_DONTNEED) < 0 )
+ goto out;
+
+ out:
+ errno = saved_errno;
+}
+
+void *xc_memalign(xc_interface *xch, size_t alignment, size_t size)
+{
+ int ret;
+ void *ptr;
+
+ ret = posix_memalign(&ptr, alignment, size);
+ if ( ret != 0 || !ptr )
+ return NULL;
+
+ return ptr;
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/tools/libxc/xc_freebsd_osdep.c b/tools/libxc/xc_freebsd_osdep.c
new file mode 100644
index 0000000..151d3bf
--- /dev/null
+++ b/tools/libxc/xc_freebsd_osdep.c
@@ -0,0 +1,405 @@
+ /******************************************************************************
+ *
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ *
+ * xc_gnttab functions:
+ * Copyright (c) 2007-2008, D G Murray <Derek.Murray@cl.cam.ac.uk>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library 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. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <sys/mman.h>
+#include <sys/ioctl.h>
+
+#include <xen/memory.h>
+#include <xen/sys/evtchn.h>
+
+#include "xenctrl.h"
+#include "xenctrlosdep.h"
+
+#define PRIVCMD_DEV "/dev/xen/privcmd"
+#define EVTCHN_DEV "/dev/xen/evtchn"
+
+#define PERROR(_m, _a...) xc_osdep_log(xch,XTL_ERROR,XC_INTERNAL_ERROR,_m \
+ " (%d = %s)", ## _a , errno, xc_strerror(xch, errno))
+
+/*------------------------- Privcmd device interface -------------------------*/
+static xc_osdep_handle freebsd_privcmd_open(xc_interface *xch)
+{
+ int flags, saved_errno;
+ int fd = open(PRIVCMD_DEV, O_RDWR);
+
+ if ( fd == -1 )
+ {
+ PERROR("Could not obtain handle on privileged command interface "
+ PRIVCMD_DEV);
+ return XC_OSDEP_OPEN_ERROR;
+ }
+
+ /*
+ * Although we return the file handle as the 'xc handle' the API
+ * does not specify / guarentee that this integer is in fact
+ * a file handle. Thus we must take responsiblity to ensure
+ * it doesn't propagate (ie leak) outside the process.
+ */
+ if ( (flags = fcntl(fd, F_GETFD)) < 0 )
+ {
+ PERROR("Could not get file handle flags");
+ goto error;
+ }
+
+ flags |= FD_CLOEXEC;
+
+ if ( fcntl(fd, F_SETFD, flags) < 0 )
+ {
+ PERROR("Could not set file handle flags");
+ goto error;
+ }
+
+ return (xc_osdep_handle)fd;
+
+ error:
+ saved_errno = errno;
+ close(fd);
+ errno = saved_errno;
+
+ return XC_OSDEP_OPEN_ERROR;
+}
+
+static int freebsd_privcmd_close(xc_interface *xch, xc_osdep_handle h)
+{
+ int fd = (int)h;
+
+ return close(fd);
+}
+
+/*------------------------ Privcmd hypercall interface -----------------------*/
+static void *freebsd_privcmd_alloc_hypercall_buffer(xc_interface *xch,
+ xc_osdep_handle h,
+ int npages)
+{
+ size_t size = npages * XC_PAGE_SIZE;
+ void *p;
+
+ /* Address returned by mmap is page aligned. */
+ p = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
+ -1, 0);
+ if (p == NULL)
+ return NULL;
+
+ /*
+ * Since FreeBSD doesn't have the MAP_LOCKED flag,
+ * lock memory using mlock.
+ */
+ if ( mlock(p, size) < 0 )
+ {
+ munmap(p, size);
+ return NULL;
+ }
+
+ return p;
+}
+
+static void freebsd_privcmd_free_hypercall_buffer(xc_interface *xch,
+ xc_osdep_handle h, void *ptr,
+ int npages)
+{
+
+ /* Unlock pages */
+ munlock(ptr, npages * XC_PAGE_SIZE);
+
+ munmap(ptr, npages * XC_PAGE_SIZE);
+}
+
+static int freebsd_privcmd_hypercall(xc_interface *xch, xc_osdep_handle h,
+ privcmd_hypercall_t *hypercall)
+{
+ int fd = (int)h;
+ int ret;
+
+ ret = ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall);
+
+ return (ret == 0) ? hypercall->retval : ret;
+}
+
+/*----------------------- Privcmd foreign map interface ----------------------*/
+static void *freebsd_privcmd_map_foreign_bulk(xc_interface *xch,
+ xc_osdep_handle h,
+ uint32_t dom, int prot,
+ const xen_pfn_t *arr, int *err,
+ unsigned int num)
+{
+ int fd = (int)h;
+ privcmd_mmapbatch_t ioctlx;
+ void *addr;
+ int rc;
+
+ addr = mmap(NULL, num << XC_PAGE_SHIFT, prot, MAP_SHARED, fd, 0);
+ if ( addr == MAP_FAILED )
+ {
+ PERROR("xc_map_foreign_batch: mmap failed");
+ return NULL;
+ }
+
+ ioctlx.num = num;
+ ioctlx.dom = dom;
+ ioctlx.addr = (unsigned long)addr;
+ ioctlx.arr = arr;
+ ioctlx.err = err;
+
+ rc = ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx);
+ if ( rc < 0 )
+ {
+ int saved_errno = errno;
+ PERROR("xc_map_foreign_batch: ioctl failed");
+ (void)munmap(addr, num << XC_PAGE_SHIFT);
+ errno = saved_errno;
+ return NULL;
+ }
+
+ return addr;
+}
+
+static void *freebsd_privcmd_map_foreign_range(xc_interface *xch,
+ xc_osdep_handle h,
+ uint32_t dom, int size, int prot,
+ unsigned long mfn)
+{
+ xen_pfn_t *arr;
+ int num;
+ int i;
+ void *ret;
+
+ num = (size + XC_PAGE_SIZE - 1) >> XC_PAGE_SHIFT;
+ arr = calloc(num, sizeof(xen_pfn_t));
+ if ( arr == NULL )
+ return NULL;
+
+ for ( i = 0; i < num; i++ )
+ arr[i] = mfn + i;
+
+ ret = xc_map_foreign_pages(xch, dom, prot, arr, num);
+ free(arr);
+ return ret;
+}
+
+static void *freebsd_privcmd_map_foreign_ranges(xc_interface *xch,
+ xc_osdep_handle h,
+ uint32_t dom, size_t size,
+ int prot, size_t chunksize,
+ privcmd_mmap_entry_t entries[],
+ int nentries)
+{
+ xen_pfn_t *arr;
+ int num_per_entry;
+ int num;
+ int i;
+ int j;
+ void *ret;
+
+ num_per_entry = chunksize >> XC_PAGE_SHIFT;
+ num = num_per_entry * nentries;
+ arr = calloc(num, sizeof(xen_pfn_t));
+ if ( arr == NULL )
+ return NULL;
+
+ for ( i = 0; i < nentries; i++ )
+ for ( j = 0; j < num_per_entry; j++ )
+ arr[i * num_per_entry + j] = entries[i].mfn + j;
+
+ ret = xc_map_foreign_pages(xch, dom, prot, arr, num);
+ free(arr);
+ return ret;
+}
+
+/*----------------------------- Privcmd handlers -----------------------------*/
+static struct xc_osdep_ops freebsd_privcmd_ops = {
+ .open = &freebsd_privcmd_open,
+ .close = &freebsd_privcmd_close,
+
+ .u.privcmd = {
+ .alloc_hypercall_buffer = &freebsd_privcmd_alloc_hypercall_buffer,
+ .free_hypercall_buffer = &freebsd_privcmd_free_hypercall_buffer,
+
+ .hypercall = &freebsd_privcmd_hypercall,
+
+ .map_foreign_bulk = &freebsd_privcmd_map_foreign_bulk,
+ .map_foreign_range = &freebsd_privcmd_map_foreign_range,
+ .map_foreign_ranges = &freebsd_privcmd_map_foreign_ranges,
+ },
+};
+
+/*-------------------------- Evtchn device interface -------------------------*/
+static xc_osdep_handle
+freebsd_evtchn_open(xc_evtchn *xce)
+{
+ int fd = open(EVTCHN_DEV, O_RDWR);
+ if ( fd == -1 )
+ return XC_OSDEP_OPEN_ERROR;
+
+ return (xc_osdep_handle)fd;
+}
+
+static int
+freebsd_evtchn_close(xc_evtchn *xce, xc_osdep_handle h)
+{
+ int fd = (int)h;
+ return close(fd);
+}
+
+static int
+freebsd_evtchn_fd(xc_evtchn *xce, xc_osdep_handle h)
+{
+ return (int)h;
+}
+
+/*------------------------------ Evtchn interface ----------------------------*/
+static int
+freebsd_evtchn_notify(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t port)
+{
+ int fd = (int)h;
+ struct ioctl_evtchn_notify notify;
+
+ notify.port = port;
+
+ return ioctl(fd, IOCTL_EVTCHN_NOTIFY, ¬ify);
+}
+
+static evtchn_port_or_error_t
+freebsd_evtchn_bind_unbound_port(xc_evtchn *xce, xc_osdep_handle h, int domid)
+{
+ int ret, fd = (int)h;
+ struct ioctl_evtchn_bind_unbound_port bind;
+
+ bind.remote_domain = domid;
+
+ ret = ioctl(fd, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
+ return ( ret == 0 ) ? bind.port : ret;
+}
+
+static evtchn_port_or_error_t
+freebsd_evtchn_bind_interdomain(xc_evtchn *xce, xc_osdep_handle h, int domid,
+ evtchn_port_t remote_port)
+{
+ int ret, fd = (int)h;
+ struct ioctl_evtchn_bind_interdomain bind;
+
+ bind.remote_domain = domid;
+ bind.remote_port = remote_port;
+
+ ret = ioctl(fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
+ return ( ret == 0 ) ? bind.port : ret;
+}
+
+static evtchn_port_or_error_t
+freebsd_evtchn_bind_virq(xc_evtchn *xce, xc_osdep_handle h, unsigned int virq)
+{
+ int ret, fd = (int)h;
+ struct ioctl_evtchn_bind_virq bind;
+
+ bind.virq = virq;
+
+ ret = ioctl(fd, IOCTL_EVTCHN_BIND_VIRQ, &bind);
+ return ( ret == 0 ) ? bind.port : ret;
+}
+
+static int
+freebsd_evtchn_unbind(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t port)
+{
+ int fd = (int)h;
+ struct ioctl_evtchn_unbind unbind;
+
+ unbind.port = port;
+
+ return ioctl(fd, IOCTL_EVTCHN_UNBIND, &unbind);
+}
+
+static evtchn_port_or_error_t
+freebsd_evtchn_pending(xc_evtchn *xce, xc_osdep_handle h)
+{
+ int fd = (int)h;
+ evtchn_port_t port;
+
+ if ( read(fd, &port, sizeof(port)) != sizeof(port) )
+ return -1;
+
+ return port;
+}
+
+static int
+freebsd_evtchn_unmask(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t port)
+{
+ int fd = (int)h;
+
+ if ( write(fd, &port, sizeof(port)) != sizeof(port) )
+ return -1;
+ return 0;
+}
+
+/*----------------------------- Evtchn handlers ------------------------------*/
+static struct xc_osdep_ops freebsd_evtchn_ops = {
+ .open = &freebsd_evtchn_open,
+ .close = &freebsd_evtchn_close,
+
+ .u.evtchn = {
+ .fd = &freebsd_evtchn_fd,
+ .notify = &freebsd_evtchn_notify,
+ .bind_unbound_port = &freebsd_evtchn_bind_unbound_port,
+ .bind_interdomain = &freebsd_evtchn_bind_interdomain,
+ .bind_virq = &freebsd_evtchn_bind_virq,
+ .unbind = &freebsd_evtchn_unbind,
+ .pending = &freebsd_evtchn_pending,
+ .unmask = &freebsd_evtchn_unmask,
+ },
+};
+
+/*---------------------------- FreeBSD interface -----------------------------*/
+static struct xc_osdep_ops *
+freebsd_osdep_init(xc_interface *xch, enum xc_osdep_type type)
+{
+ switch ( type )
+ {
+ case XC_OSDEP_PRIVCMD:
+ return &freebsd_privcmd_ops;
+ case XC_OSDEP_EVTCHN:
+ return &freebsd_evtchn_ops;
+ default:
+ return NULL;
+ }
+}
+
+xc_osdep_info_t xc_osdep_info = {
+ .name = "FreeBSD Native OS interface",
+ .init = &freebsd_osdep_init,
+ .fake = 0,
+};
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
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] 42+ messages in thread
* [PATCH v2 06/17] libxc: remove broken endianess gate on lz4 decompressor
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (4 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 05/17] libxc: add support for FreeBSD Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:14 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits Roger Pau Monne
` (11 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
The lz4 decompressor had wrongly implemented a gate between
little-endian and big-endian versions of get_unaligned_le{16/32},
which turns out to be broken on all architectures supported by Xen,
because __LITTLE_ENDIAN is not defined. Instead of trying to fix
this, just implement the little-endian version and remove the switch.
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/xc_dom_decompress_lz4.c | 1 -
xen/common/lz4/defs.h | 14 --------------
2 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/tools/libxc/xc_dom_decompress_lz4.c b/tools/libxc/xc_dom_decompress_lz4.c
index 08272fe..490ec56 100644
--- a/tools/libxc/xc_dom_decompress_lz4.c
+++ b/tools/libxc/xc_dom_decompress_lz4.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
-#include <endian.h>
#include <stdint.h>
#include "xg_private.h"
diff --git a/xen/common/lz4/defs.h b/xen/common/lz4/defs.h
index f46df08..d886a4e 100644
--- a/xen/common/lz4/defs.h
+++ b/xen/common/lz4/defs.h
@@ -12,7 +12,6 @@
#include <asm/byteorder.h>
#endif
-#ifdef __LITTLE_ENDIAN
static inline u16 INIT get_unaligned_le16(const void *p)
{
return le16_to_cpup(p);
@@ -22,19 +21,6 @@ static inline u32 INIT get_unaligned_le32(const void *p)
{
return le32_to_cpup(p);
}
-#else
-#include <asm/unaligned.h>
-
-static inline u16 INIT get_unaligned_le16(const void *p)
-{
- return le16_to_cpu(__get_unaligned(p, 2));
-}
-
-static inline u32 INIT get_unaligned_le32(void *p)
-{
- return le32_to_cpu(__get_unaligned(p, 4));
-}
-#endif
/*
* Detects 64 bits mode
--
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] 42+ messages in thread
* [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (5 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 06/17] libxc: remove broken endianess gate on lz4 decompressor Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:19 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths Roger Pau Monne
` (10 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
The Solaris implementation seems too different, so this patch only
folds both the Linux and NetBSD implementations.
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/xenstore/Makefile | 4 +-
tools/xenstore/xenstored_linux.c | 73 -------------------------------------
tools/xenstore/xenstored_netbsd.c | 73 -------------------------------------
tools/xenstore/xenstored_osdep.h | 17 +++++++++
tools/xenstore/xenstored_posix.c | 54 +++++++++++++++++++++++++++
5 files changed, 73 insertions(+), 148 deletions(-)
delete mode 100644 tools/xenstore/xenstored_linux.c
delete mode 100644 tools/xenstore/xenstored_netbsd.c
create mode 100644 tools/xenstore/xenstored_osdep.h
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index b626104..c0c7bb2 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -13,9 +13,9 @@ CLIENTS += xenstore-write xenstore-ls xenstore-watch
XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
-XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_linux.o xenstored_posix.o
+XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_posix.o
XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o xenstored_posix.o xenstored_probes.o
-XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_netbsd.o xenstored_posix.o
+XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_posix.o
XENSTORED_OBJS_$(CONFIG_MiniOS) = xenstored_minios.o
XENSTORED_OBJS += $(XENSTORED_OBJS_y)
diff --git a/tools/xenstore/xenstored_linux.c b/tools/xenstore/xenstored_linux.c
deleted file mode 100644
index cf40213..0000000
--- a/tools/xenstore/xenstored_linux.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/******************************************************************************
- *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (C) 2005 Rusty Russell IBM Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, version 2 of the
- * License.
- */
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-
-#include "xenstored_core.h"
-
-#define XENSTORED_PROC_KVA "/proc/xen/xsd_kva"
-#define XENSTORED_PROC_PORT "/proc/xen/xsd_port"
-
-evtchn_port_t xenbus_evtchn(void)
-{
- int fd;
- int rc;
- evtchn_port_t port;
- char str[20];
-
- fd = open(XENSTORED_PROC_PORT, O_RDONLY);
- if (fd == -1)
- return -1;
-
- rc = read(fd, str, sizeof(str) - 1);
- if (rc == -1)
- {
- int err = errno;
- close(fd);
- errno = err;
- return -1;
- }
-
- str[rc] = '\0';
- port = strtoul(str, NULL, 0);
-
- close(fd);
- return port;
-}
-
-void *xenbus_map(void)
-{
- int fd;
- void *addr;
-
- fd = open(XENSTORED_PROC_KVA, O_RDWR);
- if (fd == -1)
- return NULL;
-
- addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
- MAP_SHARED, fd, 0);
-
- if (addr == MAP_FAILED)
- addr = NULL;
-
- close(fd);
-
- return addr;
-}
-
-void xenbus_notify_running(void)
-{
-}
diff --git a/tools/xenstore/xenstored_netbsd.c b/tools/xenstore/xenstored_netbsd.c
deleted file mode 100644
index 1e94e41..0000000
--- a/tools/xenstore/xenstored_netbsd.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/******************************************************************************
- *
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * Copyright (C) 2005 Rusty Russell IBM Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation, version 2 of the
- * License.
- */
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-
-#include "xenstored_core.h"
-
-#define XENSTORED_PROC_KVA "/dev/xsd_kva"
-#define XENSTORED_PROC_PORT "/kern/xen/xsd_port"
-
-evtchn_port_t xenbus_evtchn(void)
-{
- int fd;
- int rc;
- evtchn_port_t port;
- char str[20];
-
- fd = open(XENSTORED_PROC_PORT, O_RDONLY);
- if (fd == -1)
- return -1;
-
- rc = read(fd, str, sizeof(str));
- if (rc == -1)
- {
- int err = errno;
- close(fd);
- errno = err;
- return -1;
- }
-
- str[rc] = '\0';
- port = strtoul(str, NULL, 0);
-
- close(fd);
- return port;
-}
-
-void *xenbus_map(void)
-{
- int fd;
- void *addr;
-
- fd = open(XENSTORED_PROC_KVA, O_RDWR);
- if (fd == -1)
- return NULL;
-
- addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
- MAP_SHARED, fd, 0);
-
- if (addr == MAP_FAILED)
- addr = NULL;
-
- close(fd);
-
- return addr;
-}
-
-void xenbus_notify_running(void)
-{
-}
diff --git a/tools/xenstore/xenstored_osdep.h b/tools/xenstore/xenstored_osdep.h
new file mode 100644
index 0000000..73c6461
--- /dev/null
+++ b/tools/xenstore/xenstored_osdep.h
@@ -0,0 +1,17 @@
+/*
+ * OS specific bits for xenstored
+ * Copyright (C) 2014 Citrix Systems R&D.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 2 of the
+ * License.
+ */
+
+#if defined(__linux__)
+#define XENSTORED_KVA_DEV "/proc/xen/xsd_kva"
+#define XENSTORED_PORT_DEV "/proc/xen/xsd_port"
+#elif defined(__NetBSD__)
+#define XENSTORED_KVA_DEV "/dev/xsd_kva"
+#define XENSTORED_PORT_DEV "/kern/xen/xsd_port"
+#endif
diff --git a/tools/xenstore/xenstored_posix.c b/tools/xenstore/xenstored_posix.c
index 0c93e6d..ce741e2 100644
--- a/tools/xenstore/xenstored_posix.c
+++ b/tools/xenstore/xenstored_posix.c
@@ -26,6 +26,7 @@
#include "utils.h"
#include "xenstored_core.h"
+#include "xenstored_osdep.h"
void write_pidfile(const char *pidfile)
{
@@ -99,3 +100,56 @@ void unmap_xenbus(void *interface)
{
munmap(interface, getpagesize());
}
+
+#ifndef __sun__
+evtchn_port_t xenbus_evtchn(void)
+{
+ int fd;
+ int rc;
+ evtchn_port_t port;
+ char str[20];
+
+ fd = open(XENSTORED_PORT_DEV, O_RDONLY);
+ if (fd == -1)
+ return -1;
+
+ rc = read(fd, str, sizeof(str) - 1);
+ if (rc == -1)
+ {
+ int err = errno;
+ close(fd);
+ errno = err;
+ return -1;
+ }
+
+ str[rc] = '\0';
+ port = strtoul(str, NULL, 0);
+
+ close(fd);
+ return port;
+}
+
+void *xenbus_map(void)
+{
+ int fd;
+ void *addr;
+
+ fd = open(XENSTORED_KVA_DEV, O_RDWR);
+ if (fd == -1)
+ return NULL;
+
+ addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
+ MAP_SHARED, fd, 0);
+
+ if (addr == MAP_FAILED)
+ addr = NULL;
+
+ close(fd);
+
+ return addr;
+}
+
+void xenbus_notify_running(void)
+{
+}
+#endif /* !__sun__ */
--
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] 42+ messages in thread
* [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (6 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:20 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 09/17] console: add FreeBSD includes Roger Pau Monne
` (9 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Add the path to FreeBSD special xenstored device, this is all that's
needed to get xenstored working on FreeBSD after the unification of
the implementations.
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/xenstore/Makefile | 1 +
tools/xenstore/xenstored_osdep.h | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index c0c7bb2..e34bd41 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -16,6 +16,7 @@ XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored
XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_posix.o
XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o xenstored_posix.o xenstored_probes.o
XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_posix.o
+XENSTORED_OBJS_$(CONFIG_FreeBSD) = xenstored_posix.o
XENSTORED_OBJS_$(CONFIG_MiniOS) = xenstored_minios.o
XENSTORED_OBJS += $(XENSTORED_OBJS_y)
diff --git a/tools/xenstore/xenstored_osdep.h b/tools/xenstore/xenstored_osdep.h
index 73c6461..b3e630c 100644
--- a/tools/xenstore/xenstored_osdep.h
+++ b/tools/xenstore/xenstored_osdep.h
@@ -14,4 +14,7 @@
#elif defined(__NetBSD__)
#define XENSTORED_KVA_DEV "/dev/xsd_kva"
#define XENSTORED_PORT_DEV "/kern/xen/xsd_port"
+#elif defined(__FreeBSD__)
+#define XENSTORED_KVA_DEV "/dev/xen/xenstored"
+#define XENSTORED_PORT_DEV "/dev/xen/xenstored"
#endif
--
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] 42+ messages in thread
* [PATCH v2 09/17] console: add FreeBSD includes
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (7 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:20 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 10/17] init: add FreeBSD xencommons init script Roger Pau Monne
` (8 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Add FreeBSD specific includes to the console daemon.
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 v1:
- Removed FreeBSD specific include of termios.h.
- Move sys/types.h include outside of the FreeBSD specific section.
---
tools/console/daemon/io.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 007ecf4..46719a8 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -37,12 +37,16 @@
#include <sys/mman.h>
#include <time.h>
#include <assert.h>
+#include <sys/types.h>
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <util.h>
#elif defined(__linux__)
#include <pty.h>
#elif defined(__sun__)
#include <stropts.h>
+#elif defined(__FreeBSD__)
+#include <sys/ioctl.h>
+#include <libutil.h>
#endif
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
--
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] 42+ messages in thread
* [PATCH v2 10/17] init: add FreeBSD xencommons init script
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (8 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 09/17] console: add FreeBSD includes Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:24 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge Roger Pau Monne
` (7 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
This is a clone of the NetBSD xencommons init script with some minor
modifications.
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/hotplug/FreeBSD/Makefile | 43 ++++++++++++
tools/hotplug/FreeBSD/rc.d/xencommons | 121 +++++++++++++++++++++++++++++++++
tools/hotplug/Makefile | 1 +
3 files changed, 165 insertions(+), 0 deletions(-)
create mode 100644 tools/hotplug/FreeBSD/Makefile
create mode 100644 tools/hotplug/FreeBSD/rc.d/xencommons
diff --git a/tools/hotplug/FreeBSD/Makefile b/tools/hotplug/FreeBSD/Makefile
new file mode 100644
index 0000000..c7ffc51
--- /dev/null
+++ b/tools/hotplug/FreeBSD/Makefile
@@ -0,0 +1,43 @@
+XEN_ROOT = $(CURDIR)/../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+# Xen script dir and scripts to go there.
+XEN_SCRIPTS =
+
+XEN_SCRIPT_DATA =
+
+XEN_RCD_PROG = rc.d/xencommons
+
+.PHONY: all
+all:
+
+.PHONY: build
+build:
+
+.PHONY: install
+install: all install-scripts install-rcd
+
+.PHONY: install-scripts
+install-scripts:
+ $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
+ set -e; for i in $(XEN_SCRIPTS); \
+ do \
+ $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ done
+ set -e; for i in $(XEN_SCRIPT_DATA); \
+ do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
+ done
+
+.PHONY: install-rcd
+install-rcd:
+ $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/rc.d
+ set -e; for i in $(XEN_RCD_PROG); \
+ do \
+ $(INSTALL_PROG) $$i $(DESTDIR)$(CONFIG_DIR)/rc.d; \
+ sed -i '' 's,@xen_script_dir@,$(DESTDIR)$(XEN_SCRIPT_DIR),g' $(DESTDIR)$(CONFIG_DIR)/$$i; \
+ done
+ $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(XEN_SCRIPT_DIR)
+
+.PHONY: clean
+clean:
diff --git a/tools/hotplug/FreeBSD/rc.d/xencommons b/tools/hotplug/FreeBSD/rc.d/xencommons
new file mode 100644
index 0000000..a797016
--- /dev/null
+++ b/tools/hotplug/FreeBSD/rc.d/xencommons
@@ -0,0 +1,121 @@
+#!/bin/sh
+#
+# PROVIDE: xencommons
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+. @xen_script_dir@/hotplugpath.sh
+
+LD_LIBRARY_PATH="${LIBDIR}"
+export LD_LIBRARY_PATH
+
+name="xencommons"
+start_precmd="xen_precmd"
+start_cmd="xen_startcmd"
+stop_cmd="xen_stop"
+status_cmd="xen_status"
+extra_commands="status"
+required_files="/dev/xen/privcmd"
+
+XENSTORED_PIDFILE="/var/run/xenstored.pid"
+XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid"
+#XENCONSOLED_TRACE="/var/log/xen/xenconsole-trace.log"
+#XENSTORED_TRACE="/var/log/xen/xenstore-trace.log"
+
+xen_precmd()
+{
+ mkdir -p /var/run/xenstored || exit 1
+}
+
+xen_startcmd()
+{
+ local time=0
+ local timeout=30
+
+ xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+ if test -z "$xenstored_pid"; then
+ printf "Cleaning xenstore database.\n"
+ if [ -z "${XENSTORED_ROOTDIR}" ]; then
+ XENSTORED_ROOTDIR="/var/lib/xenstored"
+ fi
+ rm -f ${XENSTORED_ROOTDIR}/tdb* >/dev/null 2>&1
+ printf "Starting xenservices: xenstored, xenconsoled."
+ XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
+ if [ -n "${XENSTORED_TRACE}" ]; then
+ XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
+ fi
+ ${SBINDIR}/xenstored ${XENSTORED_ARGS}
+ while [ $time -lt $timeout ] && ! `${BINDIR}/xenstore-read -s / >/dev/null 2>&1` ; do
+ printf "."
+ time=$(($time+1))
+ sleep 1
+ done
+ else
+ printf "Starting xenservices: xenconsoled."
+ fi
+
+ XENCONSOLED_ARGS=""
+ if [ -n "${XENCONSOLED_TRACE}" ]; then
+ XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}"
+ fi
+
+ ${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
+
+ printf "\n"
+
+ printf "Setting domain 0 name and domid.\n"
+ ${BINDIR}/xenstore-write "/local/domain/0/name" "Domain-0"
+ ${BINDIR}/xenstore-write "/local/domain/0/domid" 0
+}
+
+xen_stop()
+{
+ pids=""
+ printf "Stopping xencommons.\n"
+ printf "WARNING: Not stopping xenstored, as it cannot be restarted.\n"
+
+ rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+ pids="$pids $rc_pid"
+
+ kill -${sig_stop:-TERM} $pids
+ wait_for_pids $pids
+}
+
+xen_status()
+{
+ xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+ if test -n ${xenstored_pid}; then
+ pids="$pids $xenstored_pid"
+ fi
+
+ xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+ if test -n ${xenconsoled_pid}; then
+ pids="$pids $xenconsoled_pid"
+ fi
+
+ if test -n "$xenconsoled_pid" -a -n "$xenstored_pid";
+ then
+ echo "xencommons are running as pids $pids."
+ return 0
+ fi
+ if test -z "$xenconsoled_pid" -a -z "$xenstored_pid";
+ then
+ echo "xencommons are not running."
+ return 0
+ fi
+
+ if test -n $xenstored_pid; then
+ echo "xenstored is running as pid $xenstored_pid."
+ else
+ echo "xenstored is not running."
+ fi
+ if test -n $xenconsoled_pid; then
+ echo "xenconsoled is running as pid $xenconsoled_pid."
+ else
+ echo "xenconsoled is not running."
+ fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/tools/hotplug/Makefile b/tools/hotplug/Makefile
index f147b59..14ae9a8 100644
--- a/tools/hotplug/Makefile
+++ b/tools/hotplug/Makefile
@@ -4,6 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
SUBDIRS-y := common
SUBDIRS-$(CONFIG_NetBSD) += NetBSD
SUBDIRS-$(CONFIG_Linux) += Linux
+SUBDIRS-$(CONFIG_FreeBSD) += FreeBSD
.PHONY: all clean install
all clean install: %: subdirs-%
--
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] 42+ messages in thread
* [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (9 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 10/17] init: add FreeBSD xencommons init script Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:26 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 12/17] libxl: add FreeBSD OS support Roger Pau Monne
` (6 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Add a simple vif-bridge script, that takes care of adding network
backends (tap or xnb) to a pre-configured bridge.
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 v1:
- Remove "x" prefix from variable names.
---
tools/hotplug/FreeBSD/Makefile | 2 +-
tools/hotplug/FreeBSD/vif-bridge | 41 ++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+), 1 deletions(-)
create mode 100644 tools/hotplug/FreeBSD/vif-bridge
diff --git a/tools/hotplug/FreeBSD/Makefile b/tools/hotplug/FreeBSD/Makefile
index c7ffc51..6480aa5 100644
--- a/tools/hotplug/FreeBSD/Makefile
+++ b/tools/hotplug/FreeBSD/Makefile
@@ -2,7 +2,7 @@ XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/Rules.mk
# Xen script dir and scripts to go there.
-XEN_SCRIPTS =
+XEN_SCRIPTS = vif-bridge
XEN_SCRIPT_DATA =
diff --git a/tools/hotplug/FreeBSD/vif-bridge b/tools/hotplug/FreeBSD/vif-bridge
new file mode 100644
index 0000000..fa7570d
--- /dev/null
+++ b/tools/hotplug/FreeBSD/vif-bridge
@@ -0,0 +1,41 @@
+#!/bin/sh -e
+#
+# FreeBSD hotplug script for attaching xnb* interfaces to bridges
+#
+# Parameters:
+# $1: xenstore backend path of the vif
+# $2: action, either "add" or "remove"
+#
+# Environment variables:
+# $iface_dev: name of the backend device (xnb<domid>.<handle>)
+#
+
+DIR=$(dirname "$0")
+. "${DIR}/hotplugpath.sh"
+
+PATH=${BINDIR}:${SBINDIR}:${LIBEXEC}:${PRIVATE_BINDIR}:/bin:/usr/bin:/sbin:/usr/sbin
+export PATH
+
+path=$1
+action=$2
+
+case $action in
+add)
+ bridge=$(xenstore-read "$path/bridge")
+ ifconfig $bridge addm $iface_dev
+ ifconfig $iface_dev up
+ exit 0
+ ;;
+remove)
+ if [ "$emulated" -eq 1 ]; then
+ bridge=$(xenstore-read "$path/bridge")
+ ifconfig $iface_dev down
+ ifconfig $bridge deletem $iface_dev
+ ifconfig $iface_dev destroy
+ fi
+ exit 0
+ ;;
+*)
+ exit 0
+ ;;
+esac
--
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] 42+ messages in thread
* [PATCH v2 12/17] libxl: add FreeBSD OS support
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (10 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:33 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
` (5 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Create a new libxl_freebsd.c file that contains OS-specific bits used
by libxl.
This currently defines which backend to use to handle disks, and
which hotplug scripts to execute.
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/libxl/Makefile | 4 +
tools/libxl/libxl_freebsd.c | 133 +++++++++++++++++++++++++++++++++++++++++++
tools/libxl/libxl_osdeps.h | 5 ++
3 files changed, 142 insertions(+), 0 deletions(-)
create mode 100644 tools/libxl/libxl_freebsd.c
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 4cfa275..7fc42c8 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -52,10 +52,14 @@ else
ifeq ($(CONFIG_Linux),y)
LIBXL_OBJS-y += libxl_linux.o
else
+ifeq ($(CONFIG_FreeBSD),y)
+LIBXL_OBJS-y += libxl_freebsd.o
+else
$(error Your Operating System is not supported by libxenlight, \
please check libxl_linux.c and libxl_netbsd.c to see how to get it ported)
endif
endif
+endif
ifeq ($(FLEX),)
%.c %.h:: %.l
diff --git a/tools/libxl/libxl_freebsd.c b/tools/libxl/libxl_freebsd.c
new file mode 100644
index 0000000..c131e7a
--- /dev/null
+++ b/tools/libxl/libxl_freebsd.c
@@ -0,0 +1,133 @@
+/*
+ * Copyright (C) 2014
+ * Author Roger Pau Monne <roger.pau@entel.upc.edu>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * 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. See the
+ * GNU Lesser General Public License for more details.
+ */
+
+#include "libxl_osdeps.h" /* must come before any other headers */
+
+#include "libxl_internal.h"
+
+int libxl__try_phy_backend(mode_t st_mode)
+{
+ if (S_ISREG(st_mode) || S_ISBLK(st_mode) || S_ISCHR(st_mode))
+ return 1;
+
+ return 0;
+}
+
+char *libxl__devid_to_localdev(libxl__gc *gc, int devid)
+{
+ /* TODO */
+ return NULL;
+}
+
+/* Hotplug scripts caller functions */
+static int libxl__hotplug_env_nic(libxl__gc *gc, libxl__device *dev, char ***env,
+ int num_exec)
+{
+ int nr = 0;
+ const int arraysize = 5;
+ libxl_nic_type type;
+
+ assert(dev->backend_kind == LIBXL__DEVICE_KIND_VIF);
+
+ /*
+ * On the first pass the PV interface is added to the bridge,
+ * on the second pass the tap interface will also be added.
+ */
+ type = num_exec == 0 ? LIBXL_NIC_TYPE_VIF : LIBXL_NIC_TYPE_VIF_IOEMU;
+
+ GCNEW_ARRAY(*env, arraysize);
+ (*env)[nr++] = "iface_dev";
+ (*env)[nr++] = (char *) libxl__device_nic_devname(gc, dev->domid,
+ dev->devid, type);
+ (*env)[nr++] = "emulated";
+ (*env)[nr++] = type == LIBXL_NIC_TYPE_VIF_IOEMU ? "1" : "0";
+ (*env)[nr++] = NULL;
+ assert(nr == arraysize);
+
+ return 0;
+}
+
+static int libxl__hotplug_nic(libxl__gc *gc, libxl__device *dev, char ***args,
+ libxl__device_action action)
+{
+ char *be_path = libxl__device_backend_path(gc, dev);
+ char *script;
+ int nr = 0, rc = 0, arraysize = 4;
+
+ assert(dev->backend_kind == LIBXL__DEVICE_KIND_VIF);
+
+ script = libxl__xs_read(gc, XBT_NULL,
+ GCSPRINTF("%s/%s", be_path, "script"));
+ if (!script) {
+ LOGEV(ERROR, errno, "unable to read script from %s", be_path);
+ rc = ERROR_FAIL;
+ goto out;
+ }
+
+ GCNEW_ARRAY(*args, arraysize);
+ (*args)[nr++] = script;
+ (*args)[nr++] = be_path;
+ (*args)[nr++] = GCSPRINTF("%s", action == LIBXL__DEVICE_ACTION_ADD ?
+ "add" : "remove");
+ (*args)[nr++] = NULL;
+ assert(nr == arraysize);
+
+out:
+ return rc;
+}
+
+int libxl__get_hotplug_script_info(libxl__gc *gc, libxl__device *dev,
+ char ***args, char ***env,
+ libxl__device_action action,
+ int num_exec)
+{
+ libxl_nic_type nictype;
+ int rc;
+
+ if (dev->backend_kind != LIBXL__DEVICE_KIND_VIF || num_exec == 2)
+ return 0;
+
+ rc = libxl__nic_type(gc, dev, &nictype);
+ if (rc) {
+ LOG(ERROR, "error when fetching nic type");
+ rc = ERROR_FAIL;
+ goto out;
+ }
+
+ /*
+ * For PV domains only one pass is needed (because there's no emulated
+ * interface). For HVM domains two passes are needed in order to add
+ * both the PV and the tap interfaces to the bridge.
+ */
+ if (nictype == LIBXL_NIC_TYPE_VIF && num_exec != 0) {
+ rc = 0;
+ goto out;
+ }
+
+ rc = libxl__hotplug_env_nic(gc, dev, env, num_exec);
+ if (rc)
+ goto out;
+
+ rc = libxl__hotplug_nic(gc, dev, args, action);
+ if (!rc) rc = 1;
+
+out:
+ return rc;
+}
+
+libxl_device_model_version libxl__default_device_model(libxl__gc *gc)
+{
+ return LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN;
+}
diff --git a/tools/libxl/libxl_osdeps.h b/tools/libxl/libxl_osdeps.h
index aea83ee..08eaf0c 100644
--- a/tools/libxl/libxl_osdeps.h
+++ b/tools/libxl/libxl_osdeps.h
@@ -37,6 +37,11 @@
#include <pty.h>
#elif defined(__sun__)
#include <stropts.h>
+#elif defined(__FreeBSD__)
+#define SYSFS_PCI_DEV "/dev/null"
+#define SYSFS_PCIBACK_DRIVER "/dev/null"
+#define NETBACK_NIC_NAME "xnb%u.%d"
+#include <libutil.h>
#endif
#ifndef SYSFS_PCIBACK_DRIVER
--
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] 42+ messages in thread
* [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (11 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 12/17] libxl: add FreeBSD OS support Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:39 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 14/17] libxl: only include utmp.h if it's present Roger Pau Monne
` (4 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 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>
---
tools/libxl/libxl_internal.h | 4 +++
tools/libxl/libxl_uuid.c | 51 ++++++++++++++++++++++++++++++++++++++++++
tools/libxl/libxl_uuid.h | 12 ++++++++++
3 files changed, 67 insertions(+), 0 deletions(-)
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index c2b73c4..9f8ab49 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -3085,6 +3085,10 @@ void libxl__numa_candidate_put_nodemap(libxl__gc *gc,
*/
#define CTYPE(isfoo,c) (isfoo((unsigned char)(c)))
+/*
+ * 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 ecc29c7..4b35e88 100644
--- a/tools/libxl/libxl_uuid.c
+++ b/tools/libxl/libxl_uuid.c
@@ -102,6 +102,57 @@ uint8_t *libxl_uuid_bytearray(libxl_uuid *uuid)
return uuid->uuid;
}
+#elif defined(__FreeBSD__)
+
+int libxl_uuid_is_nil(libxl_uuid *uuid)
+{
+
+ return uuid_is_nil(&uuid->uuid, NULL);
+}
+
+void libxl_uuid_generate(libxl_uuid *uuid)
+{
+ uint32_t status;
+
+ BUILD_BUG_ON(sizeof(libxl_uuid) != sizeof(uuid_t));
+ uuid_create(&uuid->uuid, &status);
+ assert(status == uuid_s_ok);
+}
+
+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;
+}
+
+void libxl_uuid_copy(libxl_uuid *dst, const libxl_uuid *src)
+{
+
+ memcpy(&dst->uuid, &src->uuid, sizeof(dst->uuid));
+}
+
+void libxl_uuid_clear(libxl_uuid *uuid)
+{
+
+ memset(&uuid->uuid, 0, sizeof(uuid->uuid));
+}
+
+int libxl_uuid_compare(libxl_uuid *uuid1, libxl_uuid *uuid2)
+{
+
+ return uuid_compare(&uuid1->uuid, &uuid2->uuid, NULL);
+}
+
+uint8_t *libxl_uuid_bytearray(libxl_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 93c65a7..3604180 100644
--- a/tools/libxl/libxl_uuid.h
+++ b/tools/libxl/libxl_uuid.h
@@ -47,6 +47,18 @@ typedef struct {
uint8_t uuid[16];
} libxl_uuid;
+#elif defined(__FreeBSD__)
+
+#include <uuid.h>
+#include <stdint.h>
+
+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] 42+ messages in thread
* [PATCH v2 14/17] libxl: only include utmp.h if it's present
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (12 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 15/17] libxl: allow usage of char devices as block backends Roger Pau Monne
` (3 subsequent siblings)
17 siblings, 0 replies; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
Add a configure check for utmp.h presence, and gate the usage of
utmp.h in libxl to the result of the test.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
tools/config.h.in | 3 +++
tools/configure.ac | 2 +-
tools/libxl/libxl_bootloader.c | 2 ++
3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/tools/config.h.in b/tools/config.h.in
index 015f2a1..e29985d 100644
--- a/tools/config.h.in
+++ b/tools/config.h.in
@@ -51,6 +51,9 @@
/* Define to 1 if you have the <yajl/yajl_version.h> header file. */
#undef HAVE_YAJL_YAJL_VERSION_H
+/* Define to 1 if you have the <utmp.h> header file. */
+#undef HAVE_UTMP_H
+
/* Define curses header to use */
#undef INCLUDE_CURSES_H
diff --git a/tools/configure.ac b/tools/configure.ac
index 9dcfe81..61e19ac 100644
--- a/tools/configure.ac
+++ b/tools/configure.ac
@@ -267,7 +267,7 @@ AC_CHECK_LIB([fdt], [fdt_create], [], [AC_MSG_ERROR([Could not find libfdt])])
esac
# Checks for header files.
-AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h])
+AC_CHECK_HEADERS([yajl/yajl_version.h sys/eventfd.h utmp.h])
AC_OUTPUT()
diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c
index 3287bf7..c3ec782 100644
--- a/tools/libxl/libxl_bootloader.c
+++ b/tools/libxl/libxl_bootloader.c
@@ -15,7 +15,9 @@
#include "libxl_osdeps.h" /* must come before any other headers */
#include <termios.h>
+#ifdef HAVE_UTMP_H
#include <utmp.h>
+#endif
#ifdef INCLUDE_LIBUTIL_H
#include INCLUDE_LIBUTIL_H
--
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] 42+ messages in thread
* [PATCH v2 15/17] libxl: allow usage of char devices as block backends
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (13 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 14/17] libxl: only include utmp.h if it's present Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:41 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 16/17] hvmloader: remove size_t typedef and include stddef.h Roger Pau Monne
` (2 subsequent siblings)
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 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.
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/libxl/libxl_device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index fa99f77..7dd359c 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -266,7 +266,8 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
return ERROR_INVAL;
}
if (!S_ISBLK(a.stab.st_mode) &
- !S_ISREG(a.stab.st_mode)) {
+ !S_ISREG(a.stab.st_mode) &
+ !S_ISCHR(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;
--
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] 42+ messages in thread
* [PATCH v2 16/17] hvmloader: remove size_t typedef and include stddef.h
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (14 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 15/17] libxl: allow usage of char devices as block backends Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS Roger Pau Monne
2014-06-18 16:41 ` [PATCH v2 00/17] tools: add support for FreeBSD Ian Campbell
17 siblings, 0 replies; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
The open coded typedef of size_t was clashing with the typedef in
FreeBSD headers. Remove the typedef and include the proper header
where size_t is defined (stddef.h).
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
tools/firmware/hvmloader/util.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h
index 9ccb905..46d32b9 100644
--- a/tools/firmware/hvmloader/util.h
+++ b/tools/firmware/hvmloader/util.h
@@ -3,6 +3,7 @@
#include <stdarg.h>
#include <stdint.h>
+#include <stddef.h>
#include <xen/xen.h>
#include <xen/hvm/hvm_info_table.h>
@@ -174,7 +175,6 @@ int printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
int vprintf(const char *fmt, va_list ap);
/* Buffer output */
-typedef unsigned long size_t;
int snprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
/* Populate specified memory hole with RAM. */
--
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] 42+ messages in thread
* [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (15 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 16/17] hvmloader: remove size_t typedef and include stddef.h Roger Pau Monne
@ 2014-06-02 15:08 ` Roger Pau Monne
2014-06-05 15:42 ` Ian Campbell
2014-06-18 16:41 ` [PATCH v2 00/17] tools: add support for FreeBSD Ian Campbell
17 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monne @ 2014-06-02 15:08 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson, Ian Campbell, Roger Pau Monne
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 v1:
- Rework LD32BIT-y to only be defined on FreeBSD.
---
tools/firmware/Makefile | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index dcb56e5..bdd0d55 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -17,6 +17,8 @@ SUBDIRS-$(CONFIG_ROMBIOS) += vgabios
SUBDIRS-$(CONFIG_ROMBIOS) += etherboot
SUBDIRS-y += hvmloader
+LD32BIT-$(CONFIG_FreeBSD) := LD32BIT_FLAG=-melf_i386_fbsd
+
ovmf-dir:
GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(OVMF_UPSTREAM_URL) $(OVMF_UPSTREAM_REVISION) ovmf-dir
cp ovmf-makefile ovmf-dir/Makefile;
@@ -36,7 +38,7 @@ ifeq ($(CONFIG_ROMBIOS),y)
false ; \
fi
endif
- $(MAKE) CC=$(CC) PYTHON=$(PYTHON) subdirs-$@
+ $(MAKE) $(LD32BIT-y) CC=$(CC) PYTHON=$(PYTHON) subdirs-$@
.PHONY: install
--
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] 42+ messages in thread
* Re: [PATCH v2 01/17] configure: make the libaio test conditional on blktap1
2014-06-02 15:08 ` [PATCH v2 01/17] configure: make the libaio test conditional on blktap1 Roger Pau Monne
@ 2014-06-05 15:06 ` Ian Campbell
2014-06-05 15:49 ` Roger Pau Monné
0 siblings, 1 reply; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:06 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> libaio is only required for blktap1, so make the check conditional on
> whether the user has requested blktap1 or not.
I think it is used for blktap2 as well.
I thought blktap2 was Linux specific (and hence that the libaio could be
too) but, from tools/Makefile:
SUBDIRS-$(CONFIG_Linux) += blktap2
SUBDIRS-$(CONFIG_NetBSD) += blktap2
I'm totally surprised by that! And TBH I find it a little hard to
believe...
Ian.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by default
2014-06-02 15:08 ` [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by default Roger Pau Monne
@ 2014-06-05 15:07 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:07 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled
2014-06-02 15:08 ` [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled Roger Pau Monne
@ 2014-06-05 15:09 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:09 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> ROMBIOS only works with qemu-traditional, so if it is disabled,
> disable ROMBIOS also.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 05/17] libxc: add support for FreeBSD
2014-06-02 15:08 ` [PATCH v2 05/17] libxc: add support for FreeBSD Roger Pau Monne
@ 2014-06-05 15:11 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:11 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> Add the FreeBSD implementation of the privcmd and evtchn devices
> interface.
>
> The evtchn device interface is the same as the Linux one, while the
> privcmd map interface is simplified because FreeBSD only supports
> IOCTL_PRIVCMD_MMAPBATCH.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Given that this is mostly a clone and hack of the existing support for
other OSes and that it's unfir to ask you to cleanup that mess:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 06/17] libxc: remove broken endianess gate on lz4 decompressor
2014-06-02 15:08 ` [PATCH v2 06/17] libxc: remove broken endianess gate on lz4 decompressor Roger Pau Monne
@ 2014-06-05 15:14 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:14 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> The lz4 decompressor had wrongly implemented a gate between
> little-endian and big-endian versions of get_unaligned_le{16/32},
> which turns out to be broken on all architectures supported by Xen,
> because __LITTLE_ENDIAN is not defined. Instead of trying to fix
> this, just implement the little-endian version and remove the switch.
AFAICT the so called "little endian" versions are perfectly fine for be
too -- since they use le32_to_cpup.
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits
2014-06-02 15:08 ` [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits Roger Pau Monne
@ 2014-06-05 15:19 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:19 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> The Solaris implementation seems too different, so this patch only
> folds both the Linux and NetBSD implementations.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
git am whinges about some new trailing whitespace though if you end up
needing to resend for some other reason.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths
2014-06-02 15:08 ` [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths Roger Pau Monne
@ 2014-06-05 15:20 ` Ian Campbell
2014-06-06 9:15 ` Roger Pau Monné
0 siblings, 1 reply; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:20 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> +#elif defined(__FreeBSD__)
> +#define XENSTORED_KVA_DEV "/dev/xen/xenstored"
> +#define XENSTORED_PORT_DEV "/dev/xen/xenstored"
Assuming these are really both supposed to be the same:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Ian.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 09/17] console: add FreeBSD includes
2014-06-02 15:08 ` [PATCH v2 09/17] console: add FreeBSD includes Roger Pau Monne
@ 2014-06-05 15:20 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:20 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> Add FreeBSD specific includes to the console daemon.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 10/17] init: add FreeBSD xencommons init script
2014-06-02 15:08 ` [PATCH v2 10/17] init: add FreeBSD xencommons init script Roger Pau Monne
@ 2014-06-05 15:24 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:24 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> This is a clone of the NetBSD xencommons init script with some minor
> modifications.
On that basis:
Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
2014-06-02 15:08 ` [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge Roger Pau Monne
@ 2014-06-05 15:26 ` Ian Campbell
2014-06-05 15:32 ` Roger Pau Monné
0 siblings, 1 reply; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:26 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> +# Parameters:
> +# $1: xenstore backend path of the vif
> +# $2: action, either "add" or "remove"
On Linux path ($1) is in $XENBUS_PATH and action ($2) is the first
parameter. Does libxl really call the hotplug scripts in a platform
specific manner?
Ian.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
2014-06-05 15:26 ` Ian Campbell
@ 2014-06-05 15:32 ` Roger Pau Monné
2014-06-05 15:34 ` Ian Campbell
0 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monné @ 2014-06-05 15:32 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Ian Jackson
On 05/06/14 17:26, Ian Campbell wrote:
> On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
>> +# Parameters:
>> +# $1: xenstore backend path of the vif
>> +# $2: action, either "add" or "remove"
>
> On Linux path ($1) is in $XENBUS_PATH and action ($2) is the first
> parameter. Does libxl really call the hotplug scripts in a platform
> specific manner?
Yes, hotplug scripts are platform dependant, the arguments/env variables
are set in libxl_{linux/netbsd/freebsd}.c, although I wouldn't mind
changing the order, it seems more natural to have the action first and
then the backend path IMHO.
Roger.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 12/17] libxl: add FreeBSD OS support
2014-06-02 15:08 ` [PATCH v2 12/17] libxl: add FreeBSD OS support Roger Pau Monne
@ 2014-06-05 15:33 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:33 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> Create a new libxl_freebsd.c file that contains OS-specific bits used
> by libxl.
>
> This currently defines which backend to use to handle disks, and
> which hotplug scripts to execute.
This answers my question about the per-platform hotplug script
interfaces. Since this is consistent with NetBSD for both this and the
vif-bridge patch: Acked-by: Ian Campbell <ian.campbell@citrix.com>
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
2014-06-05 15:32 ` Roger Pau Monné
@ 2014-06-05 15:34 ` Ian Campbell
2014-06-05 15:36 ` Roger Pau Monné
0 siblings, 1 reply; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:34 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: xen-devel, Ian Jackson
On Thu, 2014-06-05 at 17:32 +0200, Roger Pau Monné wrote:
> On 05/06/14 17:26, Ian Campbell wrote:
> > On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> >> +# Parameters:
> >> +# $1: xenstore backend path of the vif
> >> +# $2: action, either "add" or "remove"
> >
> > On Linux path ($1) is in $XENBUS_PATH and action ($2) is the first
> > parameter. Does libxl really call the hotplug scripts in a platform
> > specific manner?
>
> Yes, hotplug scripts are platform dependant, the arguments/env variables
> are set in libxl_{linux/netbsd/freebsd}.c,
so I (now) see :-/
> although I wouldn't mind
> changing the order, it seems more natural to have the action first and
> then the backend path IMHO.
I think consistency with *bsd is more important. having three different
ways of doing this would be madness ;-)
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
2014-06-05 15:34 ` Ian Campbell
@ 2014-06-05 15:36 ` Roger Pau Monné
0 siblings, 0 replies; 42+ messages in thread
From: Roger Pau Monné @ 2014-06-05 15:36 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Ian Jackson
On 05/06/14 17:34, Ian Campbell wrote:
> On Thu, 2014-06-05 at 17:32 +0200, Roger Pau Monné wrote:
>> On 05/06/14 17:26, Ian Campbell wrote:
>>> On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
>>>> +# Parameters:
>>>> +# $1: xenstore backend path of the vif
>>>> +# $2: action, either "add" or "remove"
>>>
>>> On Linux path ($1) is in $XENBUS_PATH and action ($2) is the first
>>> parameter. Does libxl really call the hotplug scripts in a platform
>>> specific manner?
>>
>> Yes, hotplug scripts are platform dependant, the arguments/env variables
>> are set in libxl_{linux/netbsd/freebsd}.c,
>
> so I (now) see :-/
>
>> although I wouldn't mind
>> changing the order, it seems more natural to have the action first and
>> then the backend path IMHO.
>
> I think consistency with *bsd is more important. having three different
> ways of doing this would be madness ;-)
OK, now I see why I've done it this way, because the vif-bridge script
is a clone of the NetBSD one and follows the same order, so yes, for
consistency this should be kept as-is.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation
2014-06-02 15:08 ` [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
@ 2014-06-05 15:39 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:39 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, 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.
This is incredibly similar to the FreeBS version, could this not be done
with a few choice || defined(__FreeBSD__) (adding the union you've got
here or not as you choose)?
Ian.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 15/17] libxl: allow usage of char devices as block backends
2014-06-02 15:08 ` [PATCH v2 15/17] libxl: allow usage of char devices as block backends Roger Pau Monne
@ 2014-06-05 15:41 ` Ian Campbell
2014-06-05 15:44 ` Roger Pau Monné
0 siblings, 1 reply; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:41 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> On FreeBSD ZVOLs/disks/partitions are char devices, so libxl must
> allow it's usage.
Are they really, how... interesting...
Do we think this should be made platform specific?
> 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/libxl/libxl_device.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index fa99f77..7dd359c 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -266,7 +266,8 @@ int libxl__device_disk_set_backend(libxl__gc *gc, libxl_device_disk *disk) {
> return ERROR_INVAL;
> }
> if (!S_ISBLK(a.stab.st_mode) &
> - !S_ISREG(a.stab.st_mode)) {
> + !S_ISREG(a.stab.st_mode) &
> + !S_ISCHR(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;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS
2014-06-02 15:08 ` [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS Roger Pau Monne
@ 2014-06-05 15:42 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:42 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 15/17] libxl: allow usage of char devices as block backends
2014-06-05 15:41 ` Ian Campbell
@ 2014-06-05 15:44 ` Roger Pau Monné
2014-06-05 15:45 ` Ian Campbell
0 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monné @ 2014-06-05 15:44 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Ian Jackson
On 05/06/14 17:41, Ian Campbell wrote:
> On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
>> On FreeBSD ZVOLs/disks/partitions are char devices, so libxl must
>> allow it's usage.
>
> Are they really, how... interesting...
>
> Do we think this should be made platform specific?
This is already platform specific, see libxl__try_phy_backend in
libxl_{linux/netbsd}.c, the problem is that we had this generic gate in
libxl_device.c that only allows block or regular files to be tested for
'phy' support. If it's more suitable, I think we can get rid of this
gate in libxl_device and rely on the OS specific version of
libxl__try_phy_backend to do the checking.
Roger.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 15/17] libxl: allow usage of char devices as block backends
2014-06-05 15:44 ` Roger Pau Monné
@ 2014-06-05 15:45 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-05 15:45 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: xen-devel, Ian Jackson
On Thu, 2014-06-05 at 17:44 +0200, Roger Pau Monné wrote:
> On 05/06/14 17:41, Ian Campbell wrote:
> > On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> >> On FreeBSD ZVOLs/disks/partitions are char devices, so libxl must
> >> allow it's usage.
> >
> > Are they really, how... interesting...
> >
> > Do we think this should be made platform specific?
>
> This is already platform specific, see libxl__try_phy_backend in
> libxl_{linux/netbsd}.c, the problem is that we had this generic gate in
> libxl_device.c that only allows block or regular files to be tested for
> 'phy' support. If it's more suitable, I think we can get rid of this
> gate in libxl_device and rely on the OS specific version of
> libxl__try_phy_backend to do the checking.
>
That does sound more sensible -- Ian (J) do you remember how we ended up
with it like this?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 01/17] configure: make the libaio test conditional on blktap1
2014-06-05 15:06 ` Ian Campbell
@ 2014-06-05 15:49 ` Roger Pau Monné
2014-06-06 9:35 ` Ian Campbell
0 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monné @ 2014-06-05 15:49 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Ian Jackson
On 05/06/14 17:06, Ian Campbell wrote:
> On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
>> libaio is only required for blktap1, so make the check conditional on
>> whether the user has requested blktap1 or not.
>
> I think it is used for blktap2 as well.
OK, I have such a mess with blktap versions and which ones are inside of
the tree. Right now configure only allows enabling/disabling blktap1,
and blktap2 is compiled depending on the host OS version. Should I
change blktap2 to be selected on configure and disabled by default?
(just like blktap1)
> I thought blktap2 was Linux specific (and hence that the libaio could be
> too) but, from tools/Makefile:
> SUBDIRS-$(CONFIG_Linux) += blktap2
> SUBDIRS-$(CONFIG_NetBSD) += blktap2
>
> I'm totally surprised by that! And TBH I find it a little hard to
> believe...
Yes, this is certainly a mistake, NetBSD never had anything similar to
blktap2 AFAIK.
Roger.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths
2014-06-05 15:20 ` Ian Campbell
@ 2014-06-06 9:15 ` Roger Pau Monné
2014-06-06 9:36 ` Ian Campbell
0 siblings, 1 reply; 42+ messages in thread
From: Roger Pau Monné @ 2014-06-06 9:15 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, Ian Jackson
On 05/06/14 17:20, Ian Campbell wrote:
> On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
>> +#elif defined(__FreeBSD__)
>> +#define XENSTORED_KVA_DEV "/dev/xen/xenstored"
>> +#define XENSTORED_PORT_DEV "/dev/xen/xenstored"
>
> Assuming these are really both supposed to be the same:
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Yes, it's the same device:
http://xenbits.xen.org/gitweb/?p=people/royger/freebsd.git;a=patch;h=d4add101f0846c064001037d14c185dfe6d2f50e
In fact I don't really understand why Linux has two different devices,
probably a legacy issue?
Roger.
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 01/17] configure: make the libaio test conditional on blktap1
2014-06-05 15:49 ` Roger Pau Monné
@ 2014-06-06 9:35 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-06 9:35 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: xen-devel, Ian Jackson
On Thu, 2014-06-05 at 17:49 +0200, Roger Pau Monné wrote:
> On 05/06/14 17:06, Ian Campbell wrote:
> > On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> >> libaio is only required for blktap1, so make the check conditional on
> >> whether the user has requested blktap1 or not.
> >
> > I think it is used for blktap2 as well.
>
> OK, I have such a mess with blktap versions and which ones are inside of
> the tree. Right now configure only allows enabling/disabling blktap1,
> and blktap2 is compiled depending on the host OS version. Should I
> change blktap2 to be selected on configure and disabled by default?
> (just like blktap1)
That might be an interesting change but I wouldn't want to intertwine it
with the FreeBSD support for fear that someone objects.
Less controversial would be to move the host OS version check for
blktap2 into configure and use it as the default, and then base the
libaio check on that?
> > I thought blktap2 was Linux specific (and hence that the libaio could be
> > too) but, from tools/Makefile:
> > SUBDIRS-$(CONFIG_Linux) += blktap2
> > SUBDIRS-$(CONFIG_NetBSD) += blktap2
> >
> > I'm totally surprised by that! And TBH I find it a little hard to
> > believe...
>
> Yes, this is certainly a mistake, NetBSD never had anything similar to
> blktap2 AFAIK.
Looking at tools/blktap2/Makefile it looks like the lvm and vhd bits
would be build on BSD but not drivers or control. I've no idea how
useful the lvm and vhd stuff is on NetBSD...
However: the aio stuff is strictly in the drivers subtree. So I think
you can just make the libaio check conditional on Linux only. If you
also want to improve the situation around blktap2 configuration then I
think that would be wonderful, but not required for this series.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths
2014-06-06 9:15 ` Roger Pau Monné
@ 2014-06-06 9:36 ` Ian Campbell
0 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-06 9:36 UTC (permalink / raw)
To: Roger Pau Monné; +Cc: xen-devel, Ian Jackson
On Fri, 2014-06-06 at 11:15 +0200, Roger Pau Monné wrote:
> On 05/06/14 17:20, Ian Campbell wrote:
> > On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> >> +#elif defined(__FreeBSD__)
> >> +#define XENSTORED_KVA_DEV "/dev/xen/xenstored"
> >> +#define XENSTORED_PORT_DEV "/dev/xen/xenstored"
> >
> > Assuming these are really both supposed to be the same:
> > Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> Yes, it's the same device:
>
> http://xenbits.xen.org/gitweb/?p=people/royger/freebsd.git;a=patch;h=d4add101f0846c064001037d14c185dfe6d2f50e
>
> In fact I don't really understand why Linux has two different devices,
> probably a legacy issue?
They used to be /proc/xen/foo which contained the raw numbers rather
than having ioctls done etc. Might be somethign to do with that.
>
> Roger.
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 42+ messages in thread
* Re: [PATCH v2 00/17] tools: add support for FreeBSD
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
` (16 preceding siblings ...)
2014-06-02 15:08 ` [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS Roger Pau Monne
@ 2014-06-18 16:41 ` Ian Campbell
17 siblings, 0 replies; 42+ messages in thread
From: Ian Campbell @ 2014-06-18 16:41 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: xen-devel
On Mon, 2014-06-02 at 17:08 +0200, Roger Pau Monne wrote:
> This patch series adds support for using the tools on FreeBSD. The
> series can also be found on my git repo:
>
> git://xenbits.xen.org/people/royger/xen.git branch freebsd_tools_v2
> http://xenbits.xen.org/gitweb/?p=people/royger/xen.git;a=shortlog;h=refs/heads/freebsd_tools_v2
>
> Some of the patches have already been acked, and they are marked with
> a * in the following list:
I just applied:
> [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by
> [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled
> *[PATCH v2 04/17] include: import FreeBSD headers for evtchn and
> [PATCH v2 05/17] libxc: add support for FreeBSD
> [PATCH v2 06/17] libxc: remove broken endianess gate on lz4
> [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits
> [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths
> [PATCH v2 09/17] console: add FreeBSD includes
> [PATCH v2 10/17] init: add FreeBSD xencommons init script
> [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge
> [PATCH v2 12/17] libxl: add FreeBSD OS support
> *[PATCH v2 14/17] libxl: only include utmp.h if it's present
> *[PATCH v2 16/17] hvmloader: remove size_t typedef and include
> [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS
But not yet:
> [PATCH v2 01/17] configure: make the libaio test conditional on
> [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation
> [PATCH v2 15/17] libxl: allow usage of char devices as block
All had comments I think
^ permalink raw reply [flat|nested] 42+ messages in thread
end of thread, other threads:[~2014-06-18 16:41 UTC | newest]
Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-02 15:08 [PATCH v2 00/17] tools: add support for FreeBSD Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 01/17] configure: make the libaio test conditional on blktap1 Roger Pau Monne
2014-06-05 15:06 ` Ian Campbell
2014-06-05 15:49 ` Roger Pau Monné
2014-06-06 9:35 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 02/17] configure: disable qemu-trad on FreeBSD systems by default Roger Pau Monne
2014-06-05 15:07 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 03/17] configure: disable ROMBIOS if qemu-trad is disabled Roger Pau Monne
2014-06-05 15:09 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 04/17] include: import FreeBSD headers for evtchn and privcmd devices Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 05/17] libxc: add support for FreeBSD Roger Pau Monne
2014-06-05 15:11 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 06/17] libxc: remove broken endianess gate on lz4 decompressor Roger Pau Monne
2014-06-05 15:14 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 07/17] xenstored: unify xenstored OS-specific bits Roger Pau Monne
2014-06-05 15:19 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 08/17] xenstored: add FreeBSD xenstored device paths Roger Pau Monne
2014-06-05 15:20 ` Ian Campbell
2014-06-06 9:15 ` Roger Pau Monné
2014-06-06 9:36 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 09/17] console: add FreeBSD includes Roger Pau Monne
2014-06-05 15:20 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 10/17] init: add FreeBSD xencommons init script Roger Pau Monne
2014-06-05 15:24 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 11/17] hotplug: add FreeBSD vif-bridge Roger Pau Monne
2014-06-05 15:26 ` Ian Campbell
2014-06-05 15:32 ` Roger Pau Monné
2014-06-05 15:34 ` Ian Campbell
2014-06-05 15:36 ` Roger Pau Monné
2014-06-02 15:08 ` [PATCH v2 12/17] libxl: add FreeBSD OS support Roger Pau Monne
2014-06-05 15:33 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 13/17] libxl: add support for FreeBSD uuid implementation Roger Pau Monne
2014-06-05 15:39 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 14/17] libxl: only include utmp.h if it's present Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 15/17] libxl: allow usage of char devices as block backends Roger Pau Monne
2014-06-05 15:41 ` Ian Campbell
2014-06-05 15:44 ` Roger Pau Monné
2014-06-05 15:45 ` Ian Campbell
2014-06-02 15:08 ` [PATCH v2 16/17] hvmloader: remove size_t typedef and include stddef.h Roger Pau Monne
2014-06-02 15:08 ` [PATCH v2 17/17] build: export linker emulation parameter to SeaBIOS Roger Pau Monne
2014-06-05 15:42 ` Ian Campbell
2014-06-18 16:41 ` [PATCH v2 00/17] tools: add support for FreeBSD Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).