qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-03 19:24 [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format Stefan Weil
@ 2009-07-03 19:29 ` Stefan Weil
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Weil @ 2009-07-03 19:29 UTC (permalink / raw)
  To: QEMU Developers

The Universally Unique Identifier library will be used
for the new vdi block driver and maybe other parts of QEMU.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 Makefile        |    1 +
 Makefile.target |    2 ++
 configure       |   21 +++++++++++++++++++++
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 66c28e5..b6bb41a 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ else
 DOCS=
 endif
 
+LIBS+=$(CONFIG_UUID_LIBS)
 LIBS+=$(PTHREADLIBS)
 LIBS+=$(CLOCKLIBS)
 
diff --git a/Makefile.target b/Makefile.target
index a593503..21f9b3e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -541,6 +541,8 @@ ifdef CONFIG_BLUEZ
 LIBS += $(CONFIG_BLUEZ_LIBS)
 endif
 
+LIBS += $(CONFIG_UUID_LIBS)
+
 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
 ifeq ($(CONFIG_XEN), yes)
diff --git a/configure b/configure
index 73cc6b1..aab2c33 100755
--- a/configure
+++ b/configure
@@ -972,6 +972,22 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
 fi
 
 ##########################################
+# uuid_generate() probe, used for vdi block driver
+uuid="no"
+cat > $TMPC << EOF
+#include <uuid/uuid.h>
+int main(void)
+{
+    uuid_t my_uuid;
+    uuid_generate(my_uuid);
+    return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC -luuid >/dev/null 2>&1; then
+   uuid="yes"
+fi
+
+##########################################
 # vde libraries probe
 if test "$vde" = "yes" ; then
   cat > $TMPC << EOF
@@ -1453,6 +1469,7 @@ echo "Install blobs     $blobs"
 echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
+echo "uuid support      $uuid"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1697,6 +1714,10 @@ fi
 if test "$fnmatch" = "yes" ; then
   echo "#define HAVE_FNMATCH_H 1" >> $config_h
 fi
+if test "$uuid" = "yes" ; then
+  echo "#define HAVE_UUID_H 1" >> $config_h
+  echo "CONFIG_UUID_LIBS=-luuid" >> $config_mak
+fi
 qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_mak
 echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
-- 
1.5.6.5

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

* [Qemu-devel] [PATCH] Check availability of uuid header / lib
       [not found] <m3my7lv954.fsf@neno.mitica>
@ 2009-07-03 21:11 ` Stefan Weil
  2009-07-22 20:43   ` Stefan Weil
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Weil @ 2009-07-03 21:11 UTC (permalink / raw)
  To: QEMU Developers; +Cc: quintela

The Universally Unique Identifier library will be used
for the new vdi block driver and maybe other parts of QEMU.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 Makefile        |    1 +
 Makefile.target |    2 ++
 configure       |   21 +++++++++++++++++++++
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 66c28e5..ffa9c44 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ else
 DOCS=
 endif
 
+LIBS+=$(UUID_LIBS)
 LIBS+=$(PTHREADLIBS)
 LIBS+=$(CLOCKLIBS)
 
diff --git a/Makefile.target b/Makefile.target
index a593503..3b469e0 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -541,6 +541,8 @@ ifdef CONFIG_BLUEZ
 LIBS += $(CONFIG_BLUEZ_LIBS)
 endif
 
+LIBS += $(UUID_LIBS)
+
 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
 ifeq ($(CONFIG_XEN), yes)
diff --git a/configure b/configure
index 73cc6b1..fc4c5b4 100755
--- a/configure
+++ b/configure
@@ -972,6 +972,22 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
 fi
 
 ##########################################
+# uuid_generate() probe, used for vdi block driver
+uuid="no"
+cat > $TMPC << EOF
+#include <uuid/uuid.h>
+int main(void)
+{
+    uuid_t my_uuid;
+    uuid_generate(my_uuid);
+    return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC -luuid >/dev/null 2>&1; then
+   uuid="yes"
+fi
+
+##########################################
 # vde libraries probe
 if test "$vde" = "yes" ; then
   cat > $TMPC << EOF
@@ -1453,6 +1469,7 @@ echo "Install blobs     $blobs"
 echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
+echo "uuid support      $uuid"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1697,6 +1714,10 @@ fi
 if test "$fnmatch" = "yes" ; then
   echo "#define HAVE_FNMATCH_H 1" >> $config_h
 fi
+if test "$uuid" = "yes" ; then
+  echo "#define HAVE_UUID_H 1" >> $config_h
+  echo "UUID_LIBS=-luuid" >> $config_mak
+fi
 qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_mak
 echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_h
-- 
1.5.6.5

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

* Re: [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-03 21:11 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil
@ 2009-07-22 20:43   ` Stefan Weil
  2009-07-22 21:41     ` Anthony Liguori
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Weil @ 2009-07-22 20:43 UTC (permalink / raw)
  To: QEMU Developers

Stefan Weil schrieb:
> The Universally Unique Identifier library will be used
> for the new vdi block driver and maybe other parts of QEMU.
>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> Makefile | 1 +
> Makefile.target | 2 ++
> configure | 21 +++++++++++++++++++++
> 3 files changed, 24 insertions(+), 0 deletions(-)
...


That patch no longer applies without merge conflicts.

I just noticed that there was a discussion a year ago
when other developers suggested to use libuuid.

We can see the result of that discussion in the current code:
QEMU does not use libuuid, not even functions with the
same interface. Nor does it include a function to generate
a new UUID value.

There were arguments why QEMU would not need
UUID generation in its code. The VDI block driver
needs UUID generation unless we are satisfied with
dummy or zero values.

My personal preference is using libuuid and the functions
included. For systems without libuuid, a minimalistic
implementation could be provided.

Before I send an update of my patch, I'd like to hear
the opinion of others, especially of the QEMU maintainers.

Regards,
Stefan Weil

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

* Re: [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-22 20:43   ` Stefan Weil
@ 2009-07-22 21:41     ` Anthony Liguori
  2009-07-23 15:49       ` Stefan Weil
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony Liguori @ 2009-07-22 21:41 UTC (permalink / raw)
  To: Stefan Weil; +Cc: QEMU Developers

Stefan Weil wrote:
> That patch no longer applies without merge conflicts.
>
> I just noticed that there was a discussion a year ago
> when other developers suggested to use libuuid.
>
> We can see the result of that discussion in the current code:
> QEMU does not use libuuid, not even functions with the
> same interface. Nor does it include a function to generate
> a new UUID value.
>
> There were arguments why QEMU would not need
> UUID generation in its code. The VDI block driver
> needs UUID generation unless we are satisfied with
> dummy or zero values.
>   

I don't mind linking against libuuid.

However, I think the VDI block driver has to support AIO before it can 
be merged into the tree.

Regards,

Anthony Liguori

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

* Re: [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-22 21:41     ` Anthony Liguori
@ 2009-07-23 15:49       ` Stefan Weil
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Weil @ 2009-07-23 15:49 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: QEMU Developers

Anthony Liguori schrieb:
> Stefan Weil wrote:
>> That patch no longer applies without merge conflicts.
>>
>> I just noticed that there was a discussion a year ago
>> when other developers suggested to use libuuid.
>>
>> We can see the result of that discussion in the current code:
>> QEMU does not use libuuid, not even functions with the
>> same interface. Nor does it include a function to generate
>> a new UUID value.
>>
>> There were arguments why QEMU would not need
>> UUID generation in its code. The VDI block driver
>> needs UUID generation unless we are satisfied with
>> dummy or zero values.
>>   
>
> I don't mind linking against libuuid.
>
> However, I think the VDI block driver has to support AIO before it can
> be merged into the tree.
>
> Regards,
>
> Anthony Liguori
>

AIO code is available now. See separate mail.

Regards,

Stefan Weil

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

* [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-23 15:58 [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format (aio version) Stefan Weil
@ 2009-07-23 20:27 ` Stefan Weil
  2009-07-24  6:32   ` Christoph Egger
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Weil @ 2009-07-23 20:27 UTC (permalink / raw)
  To: QEMU Developers

The Universally Unique Identifier library will be used
for the new vdi block driver and maybe other parts of QEMU.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 Makefile        |    1 +
 Makefile.target |    2 ++
 configure       |   21 +++++++++++++++++++++
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index dc95869..d8fa730 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ else
 DOCS=
 endif
 
+LIBS+=$(UUID_LIBS)
 LIBS+=$(PTHREADLIBS)
 LIBS+=$(CLOCKLIBS)
 
diff --git a/Makefile.target b/Makefile.target
index f9cd42a..4a01e96 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -469,6 +469,8 @@ ifdef CONFIG_BLUEZ
 LIBS += $(CONFIG_BLUEZ_LIBS)
 endif
 
+LIBS += $(UUID_LIBS)
+
 # xen backend driver support
 obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
 ifeq ($(CONFIG_XEN), y)
diff --git a/configure b/configure
index 39bed79..28a9c48 100755
--- a/configure
+++ b/configure
@@ -995,6 +995,22 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
 fi
 
 ##########################################
+# uuid_generate() probe, used for vdi block driver
+uuid="no"
+cat > $TMPC << EOF
+#include <uuid/uuid.h>
+int main(void)
+{
+    uuid_t my_uuid;
+    uuid_generate(my_uuid);
+    return 0;
+}
+EOF
+if $cc $ARCH_CFLAGS -o $TMPE $TMPC -luuid >/dev/null 2>&1; then
+   uuid="yes"
+fi
+
+##########################################
 # vde libraries probe
 if test "$vde" = "yes" ; then
   cat > $TMPC << EOF
@@ -1473,6 +1489,7 @@ echo "Install blobs     $blobs"
 echo -e "KVM support       $kvm"
 echo "fdt support       $fdt"
 echo "preadv support    $preadv"
+echo "uuid support      $uuid"
 
 if test $sdl_too_old = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1655,6 +1672,10 @@ fi
 if test "$fnmatch" = "yes" ; then
   echo "#define HAVE_FNMATCH_H 1" >> $config_host_h
 fi
+if test "$uuid" = "yes" ; then
+  echo "#define HAVE_UUID_H 1" >> $config_host_h
+  echo "UUID_LIBS=-luuid" >> $config_host_mak
+fi
 qemu_version=`head $source_path/VERSION`
 echo "VERSION=$qemu_version" >>$config_host_mak
 echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_host_h
-- 
1.5.6.5

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

* Re: [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-23 20:27 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil
@ 2009-07-24  6:32   ` Christoph Egger
  2009-10-01 18:13     ` Stefan Weil
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Egger @ 2009-07-24  6:32 UTC (permalink / raw)
  To: qemu-devel

On Thursday 23 July 2009 22:27:54 Stefan Weil wrote:
> The Universally Unique Identifier library will be used
> for the new vdi block driver and maybe other parts of QEMU.

This is very Linux specific.
On NetBSD, the header is in <sys/uuid.h> and part of libc.
The API implements DCE 1.1 RPC specification which is
very different from Linux uuid.

Christoph


>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
>  Makefile        |    1 +
>  Makefile.target |    2 ++
>  configure       |   21 +++++++++++++++++++++
>  3 files changed, 24 insertions(+), 0 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index dc95869..d8fa730 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -29,6 +29,7 @@ else
>  DOCS=
>  endif
>
> +LIBS+=$(UUID_LIBS)
>  LIBS+=$(PTHREADLIBS)
>  LIBS+=$(CLOCKLIBS)
>
> diff --git a/Makefile.target b/Makefile.target
> index f9cd42a..4a01e96 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -469,6 +469,8 @@ ifdef CONFIG_BLUEZ
>  LIBS += $(CONFIG_BLUEZ_LIBS)
>  endif
>
> +LIBS += $(UUID_LIBS)
> +
>  # xen backend driver support
>  obj-$(CONFIG_XEN) += xen_machine_pv.o xen_domainbuild.o
>  ifeq ($(CONFIG_XEN), y)
> diff --git a/configure b/configure
> index 39bed79..28a9c48 100755
> --- a/configure
> +++ b/configure
> @@ -995,6 +995,22 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC > /dev/null 2>
> /dev/null ; then fi
>
>  ##########################################
> +# uuid_generate() probe, used for vdi block driver
> +uuid="no"
> +cat > $TMPC << EOF
> +#include <uuid/uuid.h>
> +int main(void)
> +{
> +    uuid_t my_uuid;
> +    uuid_generate(my_uuid);
> +    return 0;
> +}
> +EOF
> +if $cc $ARCH_CFLAGS -o $TMPE $TMPC -luuid >/dev/null 2>&1; then
> +   uuid="yes"
> +fi
> +
> +##########################################
>  # vde libraries probe
>  if test "$vde" = "yes" ; then
>    cat > $TMPC << EOF
> @@ -1473,6 +1489,7 @@ echo "Install blobs     $blobs"
>  echo -e "KVM support       $kvm"
>  echo "fdt support       $fdt"
>  echo "preadv support    $preadv"
> +echo "uuid support      $uuid"
>
>  if test $sdl_too_old = "yes"; then
>  echo "-> Your SDL version is too old - please upgrade to have SDL support"
> @@ -1655,6 +1672,10 @@ fi
>  if test "$fnmatch" = "yes" ; then
>    echo "#define HAVE_FNMATCH_H 1" >> $config_host_h
>  fi
> +if test "$uuid" = "yes" ; then
> +  echo "#define HAVE_UUID_H 1" >> $config_host_h
> +  echo "UUID_LIBS=-luuid" >> $config_host_mak
> +fi
>  qemu_version=`head $source_path/VERSION`
>  echo "VERSION=$qemu_version" >>$config_host_mak
>  echo "#define QEMU_VERSION \"$qemu_version\"" >> $config_host_h



-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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

* Re: [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-07-24  6:32   ` Christoph Egger
@ 2009-10-01 18:13     ` Stefan Weil
  2009-10-02  8:32       ` Christoph Egger
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Weil @ 2009-10-01 18:13 UTC (permalink / raw)
  To: Christoph Egger; +Cc: qemu-devel

Christoph Egger schrieb:
> On Thursday 23 July 2009 22:27:54 Stefan Weil wrote:
>   
>> The Universally Unique Identifier library will be used
>> for the new vdi block driver and maybe other parts of QEMU.
>>     
>
> This is very Linux specific.
> On NetBSD, the header is in <sys/uuid.h> and part of libc.
> The API implements DCE 1.1 RPC specification which is
> very different from Linux uuid.
>
> Christoph
>
>   


The Linux implementation claims to conform to OSF DCE 1.1,
see manpages of libuuid.

Do you think that we need a QEMU wrapper to handle different
implementations?

Stefan

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

* Re: [Qemu-devel] [PATCH] Check availability of uuid header / lib
  2009-10-01 18:13     ` Stefan Weil
@ 2009-10-02  8:32       ` Christoph Egger
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Egger @ 2009-10-02  8:32 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-devel

On Thursday 01 October 2009 20:13:25 Stefan Weil wrote:
> Christoph Egger schrieb:
> > On Thursday 23 July 2009 22:27:54 Stefan Weil wrote:
> >> The Universally Unique Identifier library will be used
> >> for the new vdi block driver and maybe other parts of QEMU.
> >
> > This is very Linux specific.
> > On NetBSD, the header is in <sys/uuid.h> and part of libc.
> > The API implements DCE 1.1 RPC specification which is
> > very different from Linux uuid.
> >
> > Christoph
>
> The Linux implementation claims to conform to OSF DCE 1.1,
> see manpages of libuuid.
>
> Do you think that we need a QEMU wrapper to handle different
> implementations?

Yes. This has already been abstracted in Xen's blktap2 implementation.
You can adapt it to QEMU.

Christoph


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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

end of thread, other threads:[~2009-10-02  8:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m3my7lv954.fsf@neno.mitica>
2009-07-03 21:11 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil
2009-07-22 20:43   ` Stefan Weil
2009-07-22 21:41     ` Anthony Liguori
2009-07-23 15:49       ` Stefan Weil
2009-07-23 15:58 [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format (aio version) Stefan Weil
2009-07-23 20:27 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil
2009-07-24  6:32   ` Christoph Egger
2009-10-01 18:13     ` Stefan Weil
2009-10-02  8:32       ` Christoph Egger
  -- strict thread matches above, loose matches on Subject: below --
2009-07-03 19:24 [Qemu-devel] [PATCH] RFC: Add new block driver for the VDI format Stefan Weil
2009-07-03 19:29 ` [Qemu-devel] [PATCH] Check availability of uuid header / lib Stefan Weil

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).