Skip to contentSkip to conversation

xen: Deprecation of <xs.h>.

PATCH In review Anthony PERARD 3 participants 13 messages Jun 15, 2012

lore
Share & tools
lore
#0 lore raw

cover xen: Deprecation of <xs.h>.

Considering that <xs.h> will be deprecated in the next release of Xen, this two patches clean a bit the inclusion of xs.h and changes it in a single place.

Anthony PERARD (2):
xen: Reorganize includes of Xen headers.
xenstore: Use <xenstore.h>

 configure        |    2 +-
 hw/xen_backend.c |    6 ++----
 hw/xen_common.h  |    6 +++++-
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 7 files changed, 18 insertions(+), 27 deletions(-)
Signature · 1 line
Anthony PERARD
#1 lore raw

PATCH 1/2 xen: Reorganize includes of Xen headers.

Because xs.h will be remove in future release of Xen, this patch removes the extra includes of this headers.

Also, it removes the extra includes of xenctrl.h and xen/io/xenbus.h as there already are in xen_common.h.

---
 hw/xen_backend.c |    6 ++----
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 5 files changed, 12 insertions(+), 25 deletions(-)
hw/xen_backend.c +2 -4
index 66cb144..f83a1e1 100644
@@ -34,15 +34,13 @@
 #include <sys/mman.h>
 #include <sys/signal.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/grant_table.h>
-
 #include "hw.h"
 #include "qemu-char.h"
 #include "qemu-log.h"
 #include "xen_backend.h"
 
+#include <xen/grant_table.h>
+
 /* ------------------------------------------------------------- */
 
 /* public */
hw/xen_console.c +2 -3
index 3794b19..9426d73 100644
@@ -28,14 +28,13 @@
 #include <termios.h>
 #include <stdarg.h>
 #include <sys/mman.h>
-#include <xs.h>
-#include <xen/io/console.h>
-#include <xenctrl.h>
 
 #include "hw.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/console.h>
+
 struct buffer {
     uint8_t *data;
     size_t consumed;
hw/xen_disk.c +1 -5
index de7e8a4..48f99c6 100644
@@ -35,15 +35,11 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-
 #include "hw.h"
 #include "block_int.h"
 #include "qemu-char.h"
-#include "xen_blkif.h"
 #include "xen_backend.h"
+#include "xen_blkif.h"
 #include "blockdev.h"
 
 /* ------------------------------------------------------------- */
hw/xen_nic.c +2 -5
index 9a59bda..98db9bb 100644
@@ -35,11 +35,6 @@
 #include <sys/mman.h>
 #include <sys/wait.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/netif.h>
-
 #include "hw.h"
 #include "net.h"
 #include "net/checksum.h"
@@ -47,6 +42,8 @@
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/netif.h>
+
 /* ------------------------------------------------------------- */
 
 struct XenNetDev {
hw/xenfb.c +5 -8
index 1bcf171..338800a 100644
@@ -35,19 +35,16 @@
 #include <string.h>
 #include <time.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/event_channel.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/fbif.h>
-#include <xen/io/kbdif.h>
-#include <xen/io/protocols.h>
-
 #include "hw.h"
 #include "console.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/event_channel.h>
+#include <xen/io/fbif.h>
+#include <xen/io/kbdif.h>
+#include <xen/io/protocols.h>
+
 #ifndef BTN_LEFT
 #define BTN_LEFT 0x110 /* from <linux/input.h> */
 #endif
Signature · 1 line
Anthony PERARD
#2 lore raw

PATCH 1/2 xen: Reorganize includes of Xen headers.

In reply to Anthony PERARD

Because xs.h will be remove in future release of Xen, this patch removes the extra includes of this headers.

Also, it removes the extra includes of xenctrl.h and xen/io/xenbus.h as there already are in xen_common.h.

---
 hw/xen_backend.c |    6 ++----
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 5 files changed, 12 insertions(+), 25 deletions(-)
hw/xen_backend.c +2 -4
index 66cb144..f83a1e1 100644
@@ -34,15 +34,13 @@
 #include <sys/mman.h>
 #include <sys/signal.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/grant_table.h>
-
 #include "hw.h"
 #include "qemu-char.h"
 #include "qemu-log.h"
 #include "xen_backend.h"
 
+#include <xen/grant_table.h>
+
 /* ------------------------------------------------------------- */
 
 /* public */
hw/xen_console.c +2 -3
index 3794b19..9426d73 100644
@@ -28,14 +28,13 @@
 #include <termios.h>
 #include <stdarg.h>
 #include <sys/mman.h>
-#include <xs.h>
-#include <xen/io/console.h>
-#include <xenctrl.h>
 
 #include "hw.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/console.h>
+
 struct buffer {
     uint8_t *data;
     size_t consumed;
hw/xen_disk.c +1 -5
index de7e8a4..48f99c6 100644
@@ -35,15 +35,11 @@
 #include <sys/mman.h>
 #include <sys/uio.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-
 #include "hw.h"
 #include "block_int.h"
 #include "qemu-char.h"
-#include "xen_blkif.h"
 #include "xen_backend.h"
+#include "xen_blkif.h"
 #include "blockdev.h"
 
 /* ------------------------------------------------------------- */
hw/xen_nic.c +2 -5
index 9a59bda..98db9bb 100644
@@ -35,11 +35,6 @@
 #include <sys/mman.h>
 #include <sys/wait.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/netif.h>
-
 #include "hw.h"
 #include "net.h"
 #include "net/checksum.h"
@@ -47,6 +42,8 @@
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/io/netif.h>
+
 /* ------------------------------------------------------------- */
 
 struct XenNetDev {
hw/xenfb.c +5 -8
index 1bcf171..338800a 100644
@@ -35,19 +35,16 @@
 #include <string.h>
 #include <time.h>
 
-#include <xs.h>
-#include <xenctrl.h>
-#include <xen/event_channel.h>
-#include <xen/io/xenbus.h>
-#include <xen/io/fbif.h>
-#include <xen/io/kbdif.h>
-#include <xen/io/protocols.h>
-
 #include "hw.h"
 #include "console.h"
 #include "qemu-char.h"
 #include "xen_backend.h"
 
+#include <xen/event_channel.h>
+#include <xen/io/fbif.h>
+#include <xen/io/kbdif.h>
+#include <xen/io/protocols.h>
+
 #ifndef BTN_LEFT
 #define BTN_LEFT 0x110 /* from <linux/input.h> */
 #endif
Signature · 1 line
Anthony PERARD
#3 lore raw

PATCH 2/2 xenstore: Use <xenstore.h>

In reply to Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +5 -1
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"
Signature · 1 line
Anthony PERARD
#4 lore raw

PATCH 2/2 xenstore: Use <xenstore.h>

In reply to Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +5 -1
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"
Signature · 1 line
Anthony PERARD
#5 lore raw

Re: [PATCH 2/2] xenstore: Use <xenstore.h>

Quoted 28 lines · Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +0 -0
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 

hw/xen_common.h line 17

Quoted 10 lines
hw/xen_common.h +5 -1
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"

Shouldn't we need the ifdef also in configure? On my system xenstore.h still don't exist.

(master *)$ rpm -qa xen-devel xen-devel-4.1.2-17.fc17.x86_64
(master *)$ ls /usr/include/xs.h
/usr/include/xs.h
(master *)$ ls /usr/include/xenstore.h
ls: cannot access /usr/include/xenstore.h: No such file or directory (master *)$

Later, Juan.

#6 lore raw

Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>

In reply to Anthony PERARD
Quoted 28 lines · Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +0 -0
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 

hw/xen_common.h line 17

Quoted 10 lines
hw/xen_common.h +5 -1
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"

Shouldn't we need the ifdef also in configure? On my system xenstore.h still don't exist.

(master *)$ rpm -qa xen-devel xen-devel-4.1.2-17.fc17.x86_64
(master *)$ ls /usr/include/xs.h
/usr/include/xs.h
(master *)$ ls /usr/include/xenstore.h
ls: cannot access /usr/include/xenstore.h: No such file or directory (master *)$

Later, Juan.

#7 lore raw

Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>

Quoted 43 lines · Juan Quintela
Quoted 28 lines · Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +0 -0
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 

hw/xen_common.h line 17

Quoted 10 lines
hw/xen_common.h +5 -1
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"

Shouldn't we need the ifdef also in configure? On my system xenstore.h still don't exist.

Quoted 7 lines

(master *)$ rpm -qa xen-devel xen-devel-4.1.2-17.fc17.x86_64
(master *)$ ls /usr/include/xs.h
/usr/include/xs.h
(master *)$ ls /usr/include/xenstore.h
ls: cannot access /usr/include/xenstore.h: No such file or directory (master *)$

configure is already testing for a number of specific xen versions, this patch is only changing the xen-unstable test, but all the other tests for older xen versions still use xs.h.

#8 lore raw

Re: [PATCH 2/2] xenstore: Use <xenstore.h>

In reply to Juan Quintela
Quoted 38 lines · Juan Quintela
Quoted 37 lines · Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
  configure       |    2 +-
  hw/xen_common.h |    6 +++++-
  2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
    elif (
        cat>  $TMPC<<EOF
  #include<xenctrl.h>
-#include<xs.h>
+#include<xenstore.h>
  #include<stdint.h>
  #include<xen/hvm/hvm_info_table.h>
  #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +5 -1
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
  #include<inttypes.h>
 
  #include<xenctrl.h>
-#include<xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION<  420
+#  include<xs.h>
+#else
+#  include<xenstore.h>
+#endif
  #include<xen/io/xenbus.h>
 
Quoted 4 lines

hw/xen_common.h line 17

Quoted 1 line
hw/xen_common.h +0 -0
  #include "hw.h"

Shouldn't we need the ifdef also in configure? On my system xenstore.h still don't exist.

No, configure does not need it. In the configure, I just change the header in the test for the next version of Xen. Also the define is defined by configure.

Regards,

Signature · 1 line
Anthony PERARD
#9 lore raw

Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>

In reply to Juan Quintela
Quoted 38 lines · Juan Quintela
Quoted 37 lines · Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
  configure       |    2 +-
  hw/xen_common.h |    6 +++++-
  2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
    elif (
        cat>  $TMPC<<EOF
  #include<xenctrl.h>
-#include<xs.h>
+#include<xenstore.h>
  #include<stdint.h>
  #include<xen/hvm/hvm_info_table.h>
  #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +5 -1
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
  #include<inttypes.h>
 
  #include<xenctrl.h>
-#include<xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION<  420
+#  include<xs.h>
+#else
+#  include<xenstore.h>
+#endif
  #include<xen/io/xenbus.h>
 
Quoted 4 lines

hw/xen_common.h line 17

Quoted 1 line
hw/xen_common.h +0 -0
  #include "hw.h"

Shouldn't we need the ifdef also in configure? On my system xenstore.h still don't exist.

No, configure does not need it. In the configure, I just change the header in the test for the next version of Xen. Also the define is defined by configure.

Regards,

Signature · 1 line
Anthony PERARD
#10 lore raw

Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>

In reply to Juan Quintela
Quoted 43 lines · Juan Quintela
Quoted 28 lines · Anthony PERARD

In the next release of Xen (4.2), xs.h became deprecated.

---
 configure       |    2 +-
 hw/xen_common.h |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
configure +1 -1
index c2366ee..e7f66c9 100755
@@ -1382,7 +1382,7 @@ EOF
   elif (
       cat > $TMPC <<EOF
 #include <xenctrl.h>
-#include <xs.h>
+#include <xenstore.h>
 #include <stdint.h>
 #include <xen/hvm/hvm_info_table.h>
 #if !defined(HVM_MAX_VCPUS)
hw/xen_common.h +0 -0
index fe7f227..cc99204 100644
@@ -7,7 +7,11 @@
 #include <inttypes.h>
 

hw/xen_common.h line 17

Quoted 10 lines
hw/xen_common.h +5 -1
 #include <xenctrl.h>
-#include <xs.h>
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 420
+#  include <xs.h>
+#else
+#  include <xenstore.h>
+#endif
 #include <xen/io/xenbus.h>
 
 #include "hw.h"

Shouldn't we need the ifdef also in configure? On my system xenstore.h still don't exist.

Quoted 7 lines

(master *)$ rpm -qa xen-devel xen-devel-4.1.2-17.fc17.x86_64
(master *)$ ls /usr/include/xs.h
/usr/include/xs.h
(master *)$ ls /usr/include/xenstore.h
ls: cannot access /usr/include/xenstore.h: No such file or directory (master *)$

configure is already testing for a number of specific xen versions, this patch is only changing the xen-unstable test, but all the other tests for older xen versions still use xs.h.

#11 lore raw
In reply to Anthony PERARD
Quoted 7 lines · Anthony PERARD

Considering that <xs.h> will be deprecated in the next release of Xen, this two patches clean a bit the inclusion of xs.h and changes it in a single place.

Anthony PERARD (2):
xen: Reorganize includes of Xen headers.
xenstore: Use <xenstore.h>

Quoted 8 lines
 configure        |    2 +-
 hw/xen_backend.c |    6 ++----
 hw/xen_common.h  |    6 +++++-
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 7 files changed, 18 insertions(+), 27 deletions(-)

both patches are fine.

#12 lore raw
In reply to Anthony PERARD
Quoted 7 lines · Anthony PERARD

Considering that <xs.h> will be deprecated in the next release of Xen, this two patches clean a bit the inclusion of xs.h and changes it in a single place.

Anthony PERARD (2):
xen: Reorganize includes of Xen headers.
xenstore: Use <xenstore.h>

Quoted 8 lines
 configure        |    2 +-
 hw/xen_backend.c |    6 ++----
 hw/xen_common.h  |    6 +++++-
 hw/xen_console.c |    5 ++---
 hw/xen_disk.c    |    6 +-----
 hw/xen_nic.c     |    7 ++-----
 hw/xenfb.c       |   13 +++++--------
 7 files changed, 18 insertions(+), 27 deletions(-)

both patches are fine.