* [Qemu-devel] [PATCH 1/2] xen: Reorganize includes of Xen headers.
2012-06-15 11:17 [Qemu-devel] [PATCH 0/2] xen: Deprecation of <xs.h> Anthony PERARD
@ 2012-06-15 11:17 ` Anthony PERARD
2012-06-15 11:17 ` [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h> Anthony PERARD
2012-06-15 12:25 ` [Qemu-devel] [PATCH 0/2] xen: Deprecation of <xs.h> Stefano Stabellini
2 siblings, 0 replies; 7+ messages in thread
From: Anthony PERARD @ 2012-06-15 11:17 UTC (permalink / raw)
To: QEMU-devel; +Cc: Anthony PERARD, Stefano Stabellini, Xen Devel
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.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
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(-)
diff --git a/hw/xen_backend.c b/hw/xen_backend.c
index 66cb144..f83a1e1 100644
--- a/hw/xen_backend.c
+++ b/hw/xen_backend.c
@@ -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 */
diff --git a/hw/xen_console.c b/hw/xen_console.c
index 3794b19..9426d73 100644
--- a/hw/xen_console.c
+++ b/hw/xen_console.c
@@ -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;
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index de7e8a4..48f99c6 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -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"
/* ------------------------------------------------------------- */
diff --git a/hw/xen_nic.c b/hw/xen_nic.c
index 9a59bda..98db9bb 100644
--- a/hw/xen_nic.c
+++ b/hw/xen_nic.c
@@ -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 {
diff --git a/hw/xenfb.c b/hw/xenfb.c
index 1bcf171..338800a 100644
--- a/hw/xenfb.c
+++ b/hw/xenfb.c
@@ -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
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>
2012-06-15 11:17 [Qemu-devel] [PATCH 0/2] xen: Deprecation of <xs.h> Anthony PERARD
2012-06-15 11:17 ` [Qemu-devel] [PATCH 1/2] xen: Reorganize includes of Xen headers Anthony PERARD
@ 2012-06-15 11:17 ` Anthony PERARD
2012-06-15 11:53 ` Juan Quintela
2012-06-15 12:25 ` [Qemu-devel] [PATCH 0/2] xen: Deprecation of <xs.h> Stefano Stabellini
2 siblings, 1 reply; 7+ messages in thread
From: Anthony PERARD @ 2012-06-15 11:17 UTC (permalink / raw)
To: QEMU-devel; +Cc: Anthony PERARD, Stefano Stabellini, Xen Devel
In the next release of Xen (4.2), xs.h became deprecated.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
configure | 2 +-
hw/xen_common.h | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index c2366ee..e7f66c9 100755
--- a/configure
+++ b/configure
@@ -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)
diff --git a/hw/xen_common.h b/hw/xen_common.h
index fe7f227..cc99204 100644
--- a/hw/xen_common.h
+++ b/hw/xen_common.h
@@ -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"
--
Anthony PERARD
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>
2012-06-15 11:17 ` [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h> Anthony PERARD
@ 2012-06-15 11:53 ` Juan Quintela
2012-06-15 12:24 ` Stefano Stabellini
2012-06-15 12:24 ` Anthony PERARD
0 siblings, 2 replies; 7+ messages in thread
From: Juan Quintela @ 2012-06-15 11:53 UTC (permalink / raw)
To: Anthony PERARD; +Cc: Stefano Stabellini, QEMU-devel, Xen Devel
Anthony PERARD <anthony.perard@citrix.com> wrote:
> In the next release of Xen (4.2), xs.h became deprecated.
>
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> configure | 2 +-
> hw/xen_common.h | 6 +++++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index c2366ee..e7f66c9 100755
> --- a/configure
> +++ b/configure
> @@ -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)
> diff --git a/hw/xen_common.h b/hw/xen_common.h
> index fe7f227..cc99204 100644
> --- a/hw/xen_common.h
> +++ b/hw/xen_common.h
> @@ -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"
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>
2012-06-15 11:53 ` Juan Quintela
@ 2012-06-15 12:24 ` Stefano Stabellini
2012-06-15 12:24 ` Anthony PERARD
1 sibling, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2012-06-15 12:24 UTC (permalink / raw)
To: Juan Quintela; +Cc: Anthony Perard, Xen Devel, QEMU-devel, Stefano Stabellini
On Fri, 15 Jun 2012, Juan Quintela wrote:
> Anthony PERARD <anthony.perard@citrix.com> wrote:
> > In the next release of Xen (4.2), xs.h became deprecated.
> >
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> > ---
> > configure | 2 +-
> > hw/xen_common.h | 6 +++++-
> > 2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/configure b/configure
> > index c2366ee..e7f66c9 100755
> > --- a/configure
> > +++ b/configure
> > @@ -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)
> > diff --git a/hw/xen_common.h b/hw/xen_common.h
> > index fe7f227..cc99204 100644
> > --- a/hw/xen_common.h
> > +++ b/hw/xen_common.h
> > @@ -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"
>
> 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 *)$
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h>
2012-06-15 11:53 ` Juan Quintela
2012-06-15 12:24 ` Stefano Stabellini
@ 2012-06-15 12:24 ` Anthony PERARD
1 sibling, 0 replies; 7+ messages in thread
From: Anthony PERARD @ 2012-06-15 12:24 UTC (permalink / raw)
To: quintela@redhat.com; +Cc: Xen Devel, QEMU-devel, Stefano Stabellini
On 15/06/12 12:53, Juan Quintela wrote:
> Anthony PERARD<anthony.perard@citrix.com> wrote:
>> In the next release of Xen (4.2), xs.h became deprecated.
>>
>> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
>> ---
>> configure | 2 +-
>> hw/xen_common.h | 6 +++++-
>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> index c2366ee..e7f66c9 100755
>> --- a/configure
>> +++ b/configure
>> @@ -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)
>> diff --git a/hw/xen_common.h b/hw/xen_common.h
>> index fe7f227..cc99204 100644
>> --- a/hw/xen_common.h
>> +++ b/hw/xen_common.h
>> @@ -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"
>
> 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,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 0/2] xen: Deprecation of <xs.h>.
2012-06-15 11:17 [Qemu-devel] [PATCH 0/2] xen: Deprecation of <xs.h> Anthony PERARD
2012-06-15 11:17 ` [Qemu-devel] [PATCH 1/2] xen: Reorganize includes of Xen headers Anthony PERARD
2012-06-15 11:17 ` [Qemu-devel] [PATCH 2/2] xenstore: Use <xenstore.h> Anthony PERARD
@ 2012-06-15 12:25 ` Stefano Stabellini
2 siblings, 0 replies; 7+ messages in thread
From: Stefano Stabellini @ 2012-06-15 12:25 UTC (permalink / raw)
To: Anthony PERARD; +Cc: Stefano Stabellini, QEMU-devel, Xen Devel
On Fri, 15 Jun 2012, Anthony PERARD wrote:
> 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(-)
both patches are fine.
^ permalink raw reply [flat|nested] 7+ messages in thread