All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 for-4.7 0/6] xSplice fixes (+1)
@ 2016-05-03 10:55 Roger Pau Monne
  2016-05-03 10:55 ` [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD Roger Pau Monne
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel

Hello,

This series contains bugfixes for xSplice, that popped up when testing it on
OSes != Linux. Patch 6/6 is a bugfix for the migration code, that was 
incorrectly using a XEN_E* value.

I think they should all go into 4.7 on the basis that they are bugfixes.

Roger.


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

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

* [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD
  2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
@ 2016-05-03 10:55 ` Roger Pau Monne
  2016-05-03 11:30   ` Wei Liu
  2016-05-03 10:55 ` [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno Roger Pau Monne
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson, Roger Pau Monne

Currently FreeBSD lacks the ENODATA errno value, so the privcmd driver
always translates ENODATA to ENOENT, add a define to libxl in order to
correctly match ENODATA with ENOENT on FreeBSD.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/libxl_osdeps.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/libxl/libxl_osdeps.h b/tools/libxl/libxl_osdeps.h
index 10ce703..a40d620 100644
--- a/tools/libxl/libxl_osdeps.h
+++ b/tools/libxl/libxl_osdeps.h
@@ -52,6 +52,13 @@
 #include <libutil.h>
 #include <sys/endian.h>
 #include <uuid.h>
+/*
+ * FreeBSD doesn't have ENODATA errno ATM, so privcmd always translates
+ * ENODATA into ENOENT.
+ */
+#ifndef ENODATA
+#define ENODATA ENOENT
+#endif
 #endif
 
 #ifndef SYSFS_USBBACK_DRIVER
-- 
2.6.4 (Apple Git-63)


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

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

* [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno
  2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
  2016-05-03 10:55 ` [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD Roger Pau Monne
@ 2016-05-03 10:55 ` Roger Pau Monne
  2016-05-03 11:30   ` Wei Liu
  2016-05-03 10:55 ` [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones Roger Pau Monne
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Ross Lagerwall, Ian Jackson, Wei Liu, Roger Pau Monne

Some error paths incorrectly used rc instead of errno.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
 - Fix error message.
---
 tools/misc/xen-xsplice.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
index 0f1ab5a..598e492 100644
--- a/tools/misc/xen-xsplice.c
+++ b/tools/misc/xen-xsplice.c
@@ -272,8 +272,8 @@ int action_func(int argc, char *argv[], unsigned int idx)
     rc = xc_xsplice_get(xch, name, &status);
     if ( rc )
     {
-        fprintf(stderr, "%s failed to get status (rc=%d, %s)!\n",
-                name, -rc, strerror(-rc));
+        fprintf(stderr, "%s failed to get status %d(%s)!\n",
+                name, errno, strerror(errno));
         return -1;
     }
     if ( status.rc == -EAGAIN )
@@ -295,7 +295,8 @@ int action_func(int argc, char *argv[], unsigned int idx)
         rc = action_options[idx].function(xch, name, 0);
         if ( rc )
         {
-            fprintf(stderr, "%s failed with %d(%s)\n", name, -rc, strerror(-rc));
+            fprintf(stderr, "%s failed with %d(%s)\n", name, errno,
+                    strerror(errno));
             return -1;
         }
     }
-- 
2.6.4 (Apple Git-63)


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

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

* [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
  2016-05-03 10:55 ` [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD Roger Pau Monne
  2016-05-03 10:55 ` [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno Roger Pau Monne
@ 2016-05-03 10:55 ` Roger Pau Monne
  2016-05-03 11:30   ` Wei Liu
  2016-05-03 13:27   ` Konrad Rzeszutek Wilk
  2016-05-03 10:55 ` [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV Roger Pau Monne
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Ross Lagerwall, Ian Jackson, Wei Liu, Roger Pau Monne

Avoid using system errno values when comparing with Xen errno values.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Using errno values inside of hypercall structs is not right IMHO, but there
are already several occurrences of this. Although I'm adding the correct XEN_
prefixes here, it's very likely that new additions/modifications to this
file will not take this into account, breaking it for OSes != Linux.
---
 tools/misc/xen-xsplice.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
index 598e492..81e422e 100644
--- a/tools/misc/xen-xsplice.c
+++ b/tools/misc/xen-xsplice.c
@@ -13,6 +13,8 @@
 #include <xenctrl.h>
 #include <xenstore.h>
 
+#include <xen/errno.h>
+
 static xc_interface *xch;
 
 void show_help(void)
@@ -233,7 +235,7 @@ struct {
         .function = xc_xsplice_revert,
     },
     {   .allow = XSPLICE_STATE_CHECKED,
-        .expected = -ENOENT,
+        .expected = -XEN_ENOENT,
         .name = "unload",
         .function = xc_xsplice_unload,
     },
@@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
                 name, errno, strerror(errno));
         return -1;
     }
-    if ( status.rc == -EAGAIN )
+    if ( status.rc == -XEN_EAGAIN )
     {
         fprintf(stderr, "%s failed. Operation already in progress\n", name);
         return -1;
@@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
 
         if ( status.state != original_state )
             break;
-        if ( status.rc && status.rc != -EAGAIN )
+        if ( status.rc && status.rc != -XEN_EAGAIN )
         {
             rc = status.rc;
             break;
-- 
2.6.4 (Apple Git-63)


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

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

* [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
  2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
                   ` (2 preceding siblings ...)
  2016-05-03 10:55 ` [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones Roger Pau Monne
@ 2016-05-03 10:55 ` Roger Pau Monne
  2016-05-03 12:22   ` Andrew Cooper
                     ` (2 more replies)
  2016-05-03 10:55 ` [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads Roger Pau Monne
  2016-05-03 10:55 ` [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP Roger Pau Monne
  5 siblings, 3 replies; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Ross Lagerwall, Roger Pau Monne

They are equivalent, but using ELFOSABI_NONE is more correct in this
context.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 xen/common/xsplice_elf.c     | 2 +-
 xen/include/xen/elfstructs.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
index e403a0e..1e1f167 100644
--- a/xen/common/xsplice_elf.c
+++ b/xen/common/xsplice_elf.c
@@ -397,7 +397,7 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
     if ( hdr->e_version != EV_CURRENT ||
          hdr->e_ident[EI_VERSION] != EV_CURRENT ||
          hdr->e_ident[EI_ABIVERSION] != 0 ||
-         hdr->e_ident[EI_OSABI] != ELFOSABI_SYSV ||
+         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
          hdr->e_type != ET_REL ||
          hdr->e_phnum != 0 )
     {
diff --git a/xen/include/xen/elfstructs.h b/xen/include/xen/elfstructs.h
index 615eb06..68954b0 100644
--- a/xen/include/xen/elfstructs.h
+++ b/xen/include/xen/elfstructs.h
@@ -81,6 +81,7 @@ typedef uint64_t	Elf64_Xword;
 
 /* e_ident[] Operating System/ABI */
 #define ELFOSABI_SYSV		0	/* UNIX System V ABI */
+#define ELFOSABI_NONE		0	/* Same as ELFOSABI_SYSV */
 #define ELFOSABI_HPUX		1	/* HP-UX operating system */
 #define ELFOSABI_NETBSD		2	/* NetBSD */
 #define ELFOSABI_LINUX		3	/* GNU/Linux */
-- 
2.6.4 (Apple Git-63)


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

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

* [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
                   ` (3 preceding siblings ...)
  2016-05-03 10:55 ` [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV Roger Pau Monne
@ 2016-05-03 10:55 ` Roger Pau Monne
  2016-05-03 12:21   ` Andrew Cooper
                     ` (2 more replies)
  2016-05-03 10:55 ` [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP Roger Pau Monne
  5 siblings, 3 replies; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Ross Lagerwall, Roger Pau Monne

The calling convention used by the FreeBSD ELF OSABI is exactly the same as
the the one defined by System V, so payloads with a FreeBSD OSABI should be
accepted by the xsplice machinery.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 xen/common/xsplice_elf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
index 1e1f167..918a1bf 100644
--- a/xen/common/xsplice_elf.c
+++ b/xen/common/xsplice_elf.c
@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
     if ( hdr->e_version != EV_CURRENT ||
          hdr->e_ident[EI_VERSION] != EV_CURRENT ||
          hdr->e_ident[EI_ABIVERSION] != 0 ||
-         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
+         (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE &&
+         hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||
          hdr->e_type != ET_REL ||
          hdr->e_phnum != 0 )
     {
-- 
2.6.4 (Apple Git-63)


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

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

* [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP
  2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
                   ` (4 preceding siblings ...)
  2016-05-03 10:55 ` [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads Roger Pau Monne
@ 2016-05-03 10:55 ` Roger Pau Monne
  2016-05-03 11:31   ` Wei Liu
  5 siblings, 1 reply; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-03 10:55 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Ian Jackson, Roger Pau Monne

The errno values returned by libxc are already translated into the
underlying OS error space, so it's wrong to compare them against Xen error
codes.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/libxl_dom_save.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_dom_save.c b/tools/libxl/libxl_dom_save.c
index 076be04..579039f 100644
--- a/tools/libxl/libxl_dom_save.c
+++ b/tools/libxl/libxl_dom_save.c
@@ -386,7 +386,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss)
      */
     ret = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges,
                              &nr_vcpus, NULL, NULL, NULL);
-    if (ret != -1 || errno != XEN_EOPNOTSUPP) {
+    if (ret != -1 || errno != EOPNOTSUPP) {
         LOG(ERROR, "Cannot save a guest with vNUMA configured");
         rc = ERROR_FAIL;
         goto out;
-- 
2.6.4 (Apple Git-63)


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

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

* Re: [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD
  2016-05-03 10:55 ` [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD Roger Pau Monne
@ 2016-05-03 11:30   ` Wei Liu
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Liu @ 2016-05-03 11:30 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Wei Liu

On Tue, May 03, 2016 at 12:55:05PM +0200, Roger Pau Monne wrote:
> Currently FreeBSD lacks the ENODATA errno value, so the privcmd driver
> always translates ENODATA to ENOENT, add a define to libxl in order to
> correctly match ENODATA with ENOENT on FreeBSD.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

As a related note, I guess the long term plan is to add ENODATA to
FreeBSD?

> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
>  tools/libxl/libxl_osdeps.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tools/libxl/libxl_osdeps.h b/tools/libxl/libxl_osdeps.h
> index 10ce703..a40d620 100644
> --- a/tools/libxl/libxl_osdeps.h
> +++ b/tools/libxl/libxl_osdeps.h
> @@ -52,6 +52,13 @@
>  #include <libutil.h>
>  #include <sys/endian.h>
>  #include <uuid.h>
> +/*
> + * FreeBSD doesn't have ENODATA errno ATM, so privcmd always translates
> + * ENODATA into ENOENT.
> + */
> +#ifndef ENODATA
> +#define ENODATA ENOENT
> +#endif
>  #endif
>  
>  #ifndef SYSFS_USBBACK_DRIVER
> -- 
> 2.6.4 (Apple Git-63)
> 

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

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

* Re: [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno
  2016-05-03 10:55 ` [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno Roger Pau Monne
@ 2016-05-03 11:30   ` Wei Liu
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Liu @ 2016-05-03 11:30 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ross Lagerwall, Ian Jackson, Wei Liu

On Tue, May 03, 2016 at 12:55:06PM +0200, Roger Pau Monne wrote:
> Some error paths incorrectly used rc instead of errno.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Changes since v1:
>  - Fix error message.
> ---
>  tools/misc/xen-xsplice.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
> index 0f1ab5a..598e492 100644
> --- a/tools/misc/xen-xsplice.c
> +++ b/tools/misc/xen-xsplice.c
> @@ -272,8 +272,8 @@ int action_func(int argc, char *argv[], unsigned int idx)
>      rc = xc_xsplice_get(xch, name, &status);
>      if ( rc )
>      {
> -        fprintf(stderr, "%s failed to get status (rc=%d, %s)!\n",
> -                name, -rc, strerror(-rc));
> +        fprintf(stderr, "%s failed to get status %d(%s)!\n",
> +                name, errno, strerror(errno));
>          return -1;
>      }
>      if ( status.rc == -EAGAIN )
> @@ -295,7 +295,8 @@ int action_func(int argc, char *argv[], unsigned int idx)
>          rc = action_options[idx].function(xch, name, 0);
>          if ( rc )
>          {
> -            fprintf(stderr, "%s failed with %d(%s)\n", name, -rc, strerror(-rc));
> +            fprintf(stderr, "%s failed with %d(%s)\n", name, errno,
> +                    strerror(errno));
>              return -1;
>          }
>      }
> -- 
> 2.6.4 (Apple Git-63)
> 

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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 10:55 ` [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones Roger Pau Monne
@ 2016-05-03 11:30   ` Wei Liu
  2016-05-03 13:27   ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 28+ messages in thread
From: Wei Liu @ 2016-05-03 11:30 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ross Lagerwall, Ian Jackson, Wei Liu

On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> Avoid using system errno values when comparing with Xen errno values.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Using errno values inside of hypercall structs is not right IMHO, but there
> are already several occurrences of this. Although I'm adding the correct XEN_
> prefixes here, it's very likely that new additions/modifications to this
> file will not take this into account, breaking it for OSes != Linux.
> ---
>  tools/misc/xen-xsplice.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
> index 598e492..81e422e 100644
> --- a/tools/misc/xen-xsplice.c
> +++ b/tools/misc/xen-xsplice.c
> @@ -13,6 +13,8 @@
>  #include <xenctrl.h>
>  #include <xenstore.h>
>  
> +#include <xen/errno.h>
> +
>  static xc_interface *xch;
>  
>  void show_help(void)
> @@ -233,7 +235,7 @@ struct {
>          .function = xc_xsplice_revert,
>      },
>      {   .allow = XSPLICE_STATE_CHECKED,
> -        .expected = -ENOENT,
> +        .expected = -XEN_ENOENT,
>          .name = "unload",
>          .function = xc_xsplice_unload,
>      },
> @@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
>                  name, errno, strerror(errno));
>          return -1;
>      }
> -    if ( status.rc == -EAGAIN )
> +    if ( status.rc == -XEN_EAGAIN )
>      {
>          fprintf(stderr, "%s failed. Operation already in progress\n", name);
>          return -1;
> @@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
>  
>          if ( status.state != original_state )
>              break;
> -        if ( status.rc && status.rc != -EAGAIN )
> +        if ( status.rc && status.rc != -XEN_EAGAIN )
>          {
>              rc = status.rc;
>              break;
> -- 
> 2.6.4 (Apple Git-63)
> 

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

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

* Re: [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP
  2016-05-03 10:55 ` [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP Roger Pau Monne
@ 2016-05-03 11:31   ` Wei Liu
  0 siblings, 0 replies; 28+ messages in thread
From: Wei Liu @ 2016-05-03 11:31 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Wei Liu

On Tue, May 03, 2016 at 12:55:10PM +0200, Roger Pau Monne wrote:
> The errno values returned by libxc are already translated into the
> underlying OS error space, so it's wrong to compare them against Xen error
> codes.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

Ian, this should be backported to 4.6.

Wei.

> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
>  tools/libxl/libxl_dom_save.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libxl/libxl_dom_save.c b/tools/libxl/libxl_dom_save.c
> index 076be04..579039f 100644
> --- a/tools/libxl/libxl_dom_save.c
> +++ b/tools/libxl/libxl_dom_save.c
> @@ -386,7 +386,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss)
>       */
>      ret = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges,
>                               &nr_vcpus, NULL, NULL, NULL);
> -    if (ret != -1 || errno != XEN_EOPNOTSUPP) {
> +    if (ret != -1 || errno != EOPNOTSUPP) {
>          LOG(ERROR, "Cannot save a guest with vNUMA configured");
>          rc = ERROR_FAIL;
>          goto out;
> -- 
> 2.6.4 (Apple Git-63)
> 

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-03 10:55 ` [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads Roger Pau Monne
@ 2016-05-03 12:21   ` Andrew Cooper
  2016-05-03 14:17   ` Jan Beulich
  2016-05-06 12:48   ` Ross Lagerwall
  2 siblings, 0 replies; 28+ messages in thread
From: Andrew Cooper @ 2016-05-03 12:21 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Ross Lagerwall

On 03/05/16 11:55, Roger Pau Monne wrote:
> The calling convention used by the FreeBSD ELF OSABI is exactly the same as
> the the one defined by System V, so payloads with a FreeBSD OSABI should be
> accepted by the xsplice machinery.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> ---
>  xen/common/xsplice_elf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
> index 1e1f167..918a1bf 100644
> --- a/xen/common/xsplice_elf.c
> +++ b/xen/common/xsplice_elf.c
> @@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
>      if ( hdr->e_version != EV_CURRENT ||
>           hdr->e_ident[EI_VERSION] != EV_CURRENT ||
>           hdr->e_ident[EI_ABIVERSION] != 0 ||
> -         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
> +         (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE &&
> +         hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||

You should have an extra space of indentation here.

Other than that, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

>           hdr->e_type != ET_REL ||
>           hdr->e_phnum != 0 )
>      {


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

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

* Re: [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
  2016-05-03 10:55 ` [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV Roger Pau Monne
@ 2016-05-03 12:22   ` Andrew Cooper
  2016-05-03 14:13   ` Jan Beulich
  2016-05-04  7:50   ` Jan Beulich
  2 siblings, 0 replies; 28+ messages in thread
From: Andrew Cooper @ 2016-05-03 12:22 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel; +Cc: Ross Lagerwall

On 03/05/16 11:55, Roger Pau Monne wrote:
> They are equivalent, but using ELFOSABI_NONE is more correct in this
> context.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 10:55 ` [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones Roger Pau Monne
  2016-05-03 11:30   ` Wei Liu
@ 2016-05-03 13:27   ` Konrad Rzeszutek Wilk
  2016-05-03 13:29     ` Wei Liu
  1 sibling, 1 reply; 28+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-03 13:27 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson, Wei Liu, Ross Lagerwall

On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> Avoid using system errno values when comparing with Xen errno values.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

And since Wei acked it I may as well put it in now after some tests.

> ---
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Using errno values inside of hypercall structs is not right IMHO, but there
> are already several occurrences of this. Although I'm adding the correct XEN_
> prefixes here, it's very likely that new additions/modifications to this
> file will not take this into account, breaking it for OSes != Linux.
> ---
>  tools/misc/xen-xsplice.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c
> index 598e492..81e422e 100644
> --- a/tools/misc/xen-xsplice.c
> +++ b/tools/misc/xen-xsplice.c
> @@ -13,6 +13,8 @@
>  #include <xenctrl.h>
>  #include <xenstore.h>
>  
> +#include <xen/errno.h>
> +
>  static xc_interface *xch;
>  
>  void show_help(void)
> @@ -233,7 +235,7 @@ struct {
>          .function = xc_xsplice_revert,
>      },
>      {   .allow = XSPLICE_STATE_CHECKED,
> -        .expected = -ENOENT,
> +        .expected = -XEN_ENOENT,
>          .name = "unload",
>          .function = xc_xsplice_unload,
>      },
> @@ -276,7 +278,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
>                  name, errno, strerror(errno));
>          return -1;
>      }
> -    if ( status.rc == -EAGAIN )
> +    if ( status.rc == -XEN_EAGAIN )
>      {
>          fprintf(stderr, "%s failed. Operation already in progress\n", name);
>          return -1;
> @@ -319,7 +321,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
>  
>          if ( status.state != original_state )
>              break;
> -        if ( status.rc && status.rc != -EAGAIN )
> +        if ( status.rc && status.rc != -XEN_EAGAIN )
>          {
>              rc = status.rc;
>              break;
> -- 
> 2.6.4 (Apple Git-63)
> 

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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 13:27   ` Konrad Rzeszutek Wilk
@ 2016-05-03 13:29     ` Wei Liu
  2016-05-03 13:37       ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 28+ messages in thread
From: Wei Liu @ 2016-05-03 13:29 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: xen-devel, Ross Lagerwall, Ian Jackson, Wei Liu, Roger Pau Monne

On Tue, May 03, 2016 at 09:27:23AM -0400, Konrad Rzeszutek Wilk wrote:
> On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> > Avoid using system errno values when comparing with Xen errno values.
> > 
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> 
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> And since Wei acked it I may as well put it in now after some tests.
> 

I don't expect it would make a difference on Linux, but more testing
wouldn't hurt.

Wei.

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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 13:29     ` Wei Liu
@ 2016-05-03 13:37       ` Konrad Rzeszutek Wilk
  2016-05-04 15:26         ` Wei Liu
  2016-05-06  8:54         ` Roger Pau Monne
  0 siblings, 2 replies; 28+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-03 13:37 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Ross Lagerwall, Ian Jackson, Roger Pau Monne

On Tue, May 03, 2016 at 02:29:20PM +0100, Wei Liu wrote:
> On Tue, May 03, 2016 at 09:27:23AM -0400, Konrad Rzeszutek Wilk wrote:
> > On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> > > Avoid using system errno values when comparing with Xen errno values.
> > > 
> > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > 
> > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > 
> > And since Wei acked it I may as well put it in now after some tests.
> > 
> 
> I don't expect it would make a difference on Linux, but more testing
> wouldn't hurt.

Right. I stuck 'Reviewed-by' on all of them except the
"libxl: fix usage of XEN_EOPNOTSUPP"

And they are ready to be checked in (after I test them)- so just give me
the heads up when you would like that.


> 
> Wei.

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

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

* Re: [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
  2016-05-03 10:55 ` [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV Roger Pau Monne
  2016-05-03 12:22   ` Andrew Cooper
@ 2016-05-03 14:13   ` Jan Beulich
  2016-05-04  7:50   ` Jan Beulich
  2 siblings, 0 replies; 28+ messages in thread
From: Jan Beulich @ 2016-05-03 14:13 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Ross Lagerwall, xen-devel

>>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> They are equivalent, but using ELFOSABI_NONE is more correct in this
> context.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Pick one of
{Acked,Suggested}-by: Jan Beulich <jbeulich@suse.com>

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-03 10:55 ` [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads Roger Pau Monne
  2016-05-03 12:21   ` Andrew Cooper
@ 2016-05-03 14:17   ` Jan Beulich
  2016-05-04  9:48     ` Roger Pau Monne
  2016-05-06 12:48   ` Ross Lagerwall
  2 siblings, 1 reply; 28+ messages in thread
From: Jan Beulich @ 2016-05-03 14:17 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Ross Lagerwall, xen-devel

>>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> The calling convention used by the FreeBSD ELF OSABI is exactly the same as
> the the one defined by System V, so payloads with a FreeBSD OSABI should be
> accepted by the xsplice machinery.

Well, you realize that the ABI is more than just the calling convention?
I.e. your patch basically says ELFOSABI_NONE == ELFOSABI_FREEBSD,
in which case I wonder why the latter exists in the first place. Is there
a proper document somewhere describing everything the latter implies,
so that one can check whether for xSplice purposes such similar
treatment is indeed okay? Until then I'm afraid I'm opposed to this going
in.

Jan


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

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

* Re: [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV
  2016-05-03 10:55 ` [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV Roger Pau Monne
  2016-05-03 12:22   ` Andrew Cooper
  2016-05-03 14:13   ` Jan Beulich
@ 2016-05-04  7:50   ` Jan Beulich
  2 siblings, 0 replies; 28+ messages in thread
From: Jan Beulich @ 2016-05-04  7:50 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Ross Lagerwall, Wei Liu, xen-devel

>>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> They are equivalent, but using ELFOSABI_NONE is more correct in this
> context.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

I've committed this as benign to the resulting binary and obvious
improvement to the source, without waiting for further acks.

Roger - please try to remember to Cc Wei on patches you want to
go into 4.7.

Jan

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-03 14:17   ` Jan Beulich
@ 2016-05-04  9:48     ` Roger Pau Monne
  2016-05-04 10:34       ` Jan Beulich
  0 siblings, 1 reply; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-04  9:48 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ross Lagerwall, xen-devel

On Tue, May 03, 2016 at 08:17:15AM -0600, Jan Beulich wrote:
> >>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> > The calling convention used by the FreeBSD ELF OSABI is exactly the same as
> > the the one defined by System V, so payloads with a FreeBSD OSABI should be
> > accepted by the xsplice machinery.
> 
> Well, you realize that the ABI is more than just the calling convention?
> I.e. your patch basically says ELFOSABI_NONE == ELFOSABI_FREEBSD,
> in which case I wonder why the latter exists in the first place. Is there
> a proper document somewhere describing everything the latter implies,
> so that one can check whether for xSplice purposes such similar
> treatment is indeed okay? Until then I'm afraid I'm opposed to this going
> in.

The FreeBSD elf OSABI only has a meaning for userspace applications, it's 
used by FreeBSD in order to detect if an application is native or if it 
needs to be run in the linuxator (the Linux emulator, or any other emulator 
that is available and matches the ELF OSABI specified in the binary FWIW).

THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's 
selected inside of the FreeBSD kernel (the ABI between the kernel and the 
user-space application), but of course this doesn't apply to kernel code, 
which is what Xen and the xsplice payloads are. Sadly this is not written 
anywhere.

Roger.

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-04  9:48     ` Roger Pau Monne
@ 2016-05-04 10:34       ` Jan Beulich
  2016-05-05 16:35         ` Roger Pau Monne
  0 siblings, 1 reply; 28+ messages in thread
From: Jan Beulich @ 2016-05-04 10:34 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Ross Lagerwall, xen-devel

>>> On 04.05.16 at 11:48, <roger.pau@citrix.com> wrote:
> On Tue, May 03, 2016 at 08:17:15AM -0600, Jan Beulich wrote:
>> >>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
>> > The calling convention used by the FreeBSD ELF OSABI is exactly the same as
>> > the the one defined by System V, so payloads with a FreeBSD OSABI should be
>> > accepted by the xsplice machinery.
>> 
>> Well, you realize that the ABI is more than just the calling convention?
>> I.e. your patch basically says ELFOSABI_NONE == ELFOSABI_FREEBSD,
>> in which case I wonder why the latter exists in the first place. Is there
>> a proper document somewhere describing everything the latter implies,
>> so that one can check whether for xSplice purposes such similar
>> treatment is indeed okay? Until then I'm afraid I'm opposed to this going
>> in.
> 
> The FreeBSD elf OSABI only has a meaning for userspace applications, it's 
> used by FreeBSD in order to detect if an application is native or if it 
> needs to be run in the linuxator (the Linux emulator, or any other emulator 
> that is available and matches the ELF OSABI specified in the binary FWIW).
> 
> THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's 
> selected inside of the FreeBSD kernel (the ABI between the kernel and the 
> user-space application), but of course this doesn't apply to kernel code, 
> which is what Xen and the xsplice payloads are. Sadly this is not written 
> anywhere.

Well, okay, in that case I agree the patch should be fine.

Jan


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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 13:37       ` Konrad Rzeszutek Wilk
@ 2016-05-04 15:26         ` Wei Liu
  2016-05-04 15:57           ` Konrad Rzeszutek Wilk
  2016-05-06  8:54         ` Roger Pau Monne
  1 sibling, 1 reply; 28+ messages in thread
From: Wei Liu @ 2016-05-04 15:26 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: xen-devel, Ross Lagerwall, Wei Liu, Ian Jackson, Roger Pau Monne

On Tue, May 03, 2016 at 09:37:01AM -0400, Konrad Rzeszutek Wilk wrote:
> On Tue, May 03, 2016 at 02:29:20PM +0100, Wei Liu wrote:
> > On Tue, May 03, 2016 at 09:27:23AM -0400, Konrad Rzeszutek Wilk wrote:
> > > On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> > > > Avoid using system errno values when comparing with Xen errno values.
> > > > 
> > > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > 
> > > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > 
> > > And since Wei acked it I may as well put it in now after some tests.
> > > 
> > 
> > I don't expect it would make a difference on Linux, but more testing
> > wouldn't hurt.
> 
> Right. I stuck 'Reviewed-by' on all of them except the
> "libxl: fix usage of XEN_EOPNOTSUPP"
> 

I stuck your reviewed-by to the 3 xsplice patches in my branch and 
queued up all 4 patches for committing.

Wei.

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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-04 15:26         ` Wei Liu
@ 2016-05-04 15:57           ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-04 15:57 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Ross Lagerwall, Ian Jackson, Roger Pau Monne

On Wed, May 04, 2016 at 04:26:31PM +0100, Wei Liu wrote:
> On Tue, May 03, 2016 at 09:37:01AM -0400, Konrad Rzeszutek Wilk wrote:
> > On Tue, May 03, 2016 at 02:29:20PM +0100, Wei Liu wrote:
> > > On Tue, May 03, 2016 at 09:27:23AM -0400, Konrad Rzeszutek Wilk wrote:
> > > > On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> > > > > Avoid using system errno values when comparing with Xen errno values.
> > > > > 
> > > > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > > 
> > > > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > > 
> > > > And since Wei acked it I may as well put it in now after some tests.
> > > > 
> > > 
> > > I don't expect it would make a difference on Linux, but more testing
> > > wouldn't hurt.
> > 
> > Right. I stuck 'Reviewed-by' on all of them except the
> > "libxl: fix usage of XEN_EOPNOTSUPP"
> > 
> 
> I stuck your reviewed-by to the 3 xsplice patches in my branch and 
> queued up all 4 patches for committing.

Thanks. They are all tested from me as well.

> 
> Wei.

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-04 10:34       ` Jan Beulich
@ 2016-05-05 16:35         ` Roger Pau Monne
  2016-05-06  6:51           ` Jan Beulich
  0 siblings, 1 reply; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-05 16:35 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Ross Lagerwall, xen-devel

On Wed, May 04, 2016 at 04:34:26AM -0600, Jan Beulich wrote:
> >>> On 04.05.16 at 11:48, <roger.pau@citrix.com> wrote:
> > On Tue, May 03, 2016 at 08:17:15AM -0600, Jan Beulich wrote:
> >> >>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> >> > The calling convention used by the FreeBSD ELF OSABI is exactly the same as
> >> > the the one defined by System V, so payloads with a FreeBSD OSABI should be
> >> > accepted by the xsplice machinery.
> >> 
> >> Well, you realize that the ABI is more than just the calling convention?
> >> I.e. your patch basically says ELFOSABI_NONE == ELFOSABI_FREEBSD,
> >> in which case I wonder why the latter exists in the first place. Is there
> >> a proper document somewhere describing everything the latter implies,
> >> so that one can check whether for xSplice purposes such similar
> >> treatment is indeed okay? Until then I'm afraid I'm opposed to this going
> >> in.
> > 
> > The FreeBSD elf OSABI only has a meaning for userspace applications, it's 
> > used by FreeBSD in order to detect if an application is native or if it 
> > needs to be run in the linuxator (the Linux emulator, or any other emulator 
> > that is available and matches the ELF OSABI specified in the binary FWIW).
> > 
> > THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's 
> > selected inside of the FreeBSD kernel (the ABI between the kernel and the 
> > user-space application), but of course this doesn't apply to kernel code, 
> > which is what Xen and the xsplice payloads are. Sadly this is not written 
> > anywhere.
> 
> Well, okay, in that case I agree the patch should be fine.

Would you like me to resend this with a more expanded commit message, or are 
you going to squash my explanation in the commit message?

Thanks, Roger.

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-05 16:35         ` Roger Pau Monne
@ 2016-05-06  6:51           ` Jan Beulich
  0 siblings, 0 replies; 28+ messages in thread
From: Jan Beulich @ 2016-05-06  6:51 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: Ross Lagerwall, xen-devel

>>> On 05.05.16 at 18:35, <roger.pau@citrix.com> wrote:
> On Wed, May 04, 2016 at 04:34:26AM -0600, Jan Beulich wrote:
>> >>> On 04.05.16 at 11:48, <roger.pau@citrix.com> wrote:
>> > On Tue, May 03, 2016 at 08:17:15AM -0600, Jan Beulich wrote:
>> >> >>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
>> >> > The calling convention used by the FreeBSD ELF OSABI is exactly the same 
> as
>> >> > the the one defined by System V, so payloads with a FreeBSD OSABI should 
> be
>> >> > accepted by the xsplice machinery.
>> >> 
>> >> Well, you realize that the ABI is more than just the calling convention?
>> >> I.e. your patch basically says ELFOSABI_NONE == ELFOSABI_FREEBSD,
>> >> in which case I wonder why the latter exists in the first place. Is there
>> >> a proper document somewhere describing everything the latter implies,
>> >> so that one can check whether for xSplice purposes such similar
>> >> treatment is indeed okay? Until then I'm afraid I'm opposed to this going
>> >> in.
>> > 
>> > The FreeBSD elf OSABI only has a meaning for userspace applications, it's 
>> > used by FreeBSD in order to detect if an application is native or if it 
>> > needs to be run in the linuxator (the Linux emulator, or any other emulator 
> 
>> > that is available and matches the ELF OSABI specified in the binary FWIW).
>> > 
>> > THe only difference from SYSV to FreeBSD OSABI is the sysentvec that's 
>> > selected inside of the FreeBSD kernel (the ABI between the kernel and the 
>> > user-space application), but of course this doesn't apply to kernel code, 
>> > which is what Xen and the xsplice payloads are. Sadly this is not written 
>> > anywhere.
>> 
>> Well, okay, in that case I agree the patch should be fine.
> 
> Would you like me to resend this with a more expanded commit message, or are 
> you going to squash my explanation in the commit message?

I'd be fine folding it in, but I may not be the one ending up
committing it - it needs an xSplice maintainer's ack first, and
it may well be that Konrad then would apply it.

Jan


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

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

* Re: [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones.
  2016-05-03 13:37       ` Konrad Rzeszutek Wilk
  2016-05-04 15:26         ` Wei Liu
@ 2016-05-06  8:54         ` Roger Pau Monne
  1 sibling, 0 replies; 28+ messages in thread
From: Roger Pau Monne @ 2016-05-06  8:54 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel, Wei Liu, Ian Jackson, Ross Lagerwall

On Tue, May 03, 2016 at 09:37:01AM -0400, Konrad Rzeszutek Wilk wrote:
> On Tue, May 03, 2016 at 02:29:20PM +0100, Wei Liu wrote:
> > On Tue, May 03, 2016 at 09:27:23AM -0400, Konrad Rzeszutek Wilk wrote:
> > > On Tue, May 03, 2016 at 12:55:07PM +0200, Roger Pau Monne wrote:
> > > > Avoid using system errno values when comparing with Xen errno values.
> > > > 
> > > > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > > 
> > > Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > > 
> > > And since Wei acked it I may as well put it in now after some tests.
> > > 
> > 
> > I don't expect it would make a difference on Linux, but more testing
> > wouldn't hurt.
> 
> Right. I stuck 'Reviewed-by' on all of them except the
> "libxl: fix usage of XEN_EOPNOTSUPP"

I think you missed patch 5/6 (xen/xsplice: add ELFOSABI_FREEBSD as a 
supported OSABI for payloads), which also needs you reviewed-by.

Thanks, Roger.

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-03 10:55 ` [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads Roger Pau Monne
  2016-05-03 12:21   ` Andrew Cooper
  2016-05-03 14:17   ` Jan Beulich
@ 2016-05-06 12:48   ` Ross Lagerwall
  2016-05-06 16:34     ` Konrad Rzeszutek Wilk
  2 siblings, 1 reply; 28+ messages in thread
From: Ross Lagerwall @ 2016-05-06 12:48 UTC (permalink / raw)
  To: Roger Pau Monne, xen-devel

On 05/03/2016 11:55 AM, Roger Pau Monne wrote:
> The calling convention used by the FreeBSD ELF OSABI is exactly the same as
> the the one defined by System V, so payloads with a FreeBSD OSABI should be
> accepted by the xsplice machinery.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> ---
>   xen/common/xsplice_elf.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
> index 1e1f167..918a1bf 100644
> --- a/xen/common/xsplice_elf.c
> +++ b/xen/common/xsplice_elf.c
> @@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
>       if ( hdr->e_version != EV_CURRENT ||
>            hdr->e_ident[EI_VERSION] != EV_CURRENT ||
>            hdr->e_ident[EI_ABIVERSION] != 0 ||
> -         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
> +         (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE &&
> +         hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||
>            hdr->e_type != ET_REL ||
>            hdr->e_phnum != 0 )
>       {
>

Acked-by: Ross Lagerwall <ross.lagerwall@citrix.com>

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

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

* Re: [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
  2016-05-06 12:48   ` Ross Lagerwall
@ 2016-05-06 16:34     ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 28+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-06 16:34 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: xen-devel, Roger Pau Monne

On Fri, May 06, 2016 at 01:48:08PM +0100, Ross Lagerwall wrote:
> On 05/03/2016 11:55 AM, Roger Pau Monne wrote:
> >The calling convention used by the FreeBSD ELF OSABI is exactly the same as
> >the the one defined by System V, so payloads with a FreeBSD OSABI should be
> >accepted by the xsplice machinery.
> >
> >Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> >---
> >Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> >Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
> >---
> >  xen/common/xsplice_elf.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> >diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
> >index 1e1f167..918a1bf 100644
> >--- a/xen/common/xsplice_elf.c
> >+++ b/xen/common/xsplice_elf.c
> >@@ -397,7 +397,8 @@ static int xsplice_header_check(const struct xsplice_elf *elf)
> >      if ( hdr->e_version != EV_CURRENT ||
> >           hdr->e_ident[EI_VERSION] != EV_CURRENT ||
> >           hdr->e_ident[EI_ABIVERSION] != 0 ||
> >-         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
> >+         (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE &&
> >+         hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||
> >           hdr->e_type != ET_REL ||
> >           hdr->e_phnum != 0 )
> >      {
> >
> 
> Acked-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Applied with the change log change and an extra space.

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

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

end of thread, other threads:[~2016-05-06 16:34 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-03 10:55 [PATCH v2 for-4.7 0/6] xSplice fixes (+1) Roger Pau Monne
2016-05-03 10:55 ` [PATCH v2 for-4.7 1/6] libxl: add a define for equivalent ENODATA errno on FreeBSD Roger Pau Monne
2016-05-03 11:30   ` Wei Liu
2016-05-03 10:55 ` [PATCH v2 for-4.7 2/6] tools/xsplice: corrently use errno Roger Pau Monne
2016-05-03 11:30   ` Wei Liu
2016-05-03 10:55 ` [PATCH v2 for-4.7 3/6] tools/xsplice: fix mixing system errno values with Xen ones Roger Pau Monne
2016-05-03 11:30   ` Wei Liu
2016-05-03 13:27   ` Konrad Rzeszutek Wilk
2016-05-03 13:29     ` Wei Liu
2016-05-03 13:37       ` Konrad Rzeszutek Wilk
2016-05-04 15:26         ` Wei Liu
2016-05-04 15:57           ` Konrad Rzeszutek Wilk
2016-05-06  8:54         ` Roger Pau Monne
2016-05-03 10:55 ` [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV Roger Pau Monne
2016-05-03 12:22   ` Andrew Cooper
2016-05-03 14:13   ` Jan Beulich
2016-05-04  7:50   ` Jan Beulich
2016-05-03 10:55 ` [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads Roger Pau Monne
2016-05-03 12:21   ` Andrew Cooper
2016-05-03 14:17   ` Jan Beulich
2016-05-04  9:48     ` Roger Pau Monne
2016-05-04 10:34       ` Jan Beulich
2016-05-05 16:35         ` Roger Pau Monne
2016-05-06  6:51           ` Jan Beulich
2016-05-06 12:48   ` Ross Lagerwall
2016-05-06 16:34     ` Konrad Rzeszutek Wilk
2016-05-03 10:55 ` [PATCH v2 for-4.7 6/6] libxl: fix usage of XEN_EOPNOTSUPP Roger Pau Monne
2016-05-03 11:31   ` Wei Liu

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