[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [XEN][RFC PATCH V2 14/17] xl-parsing: Parse new device_models option



On 08/23/2012 02:35 PM, Ian Campbell wrote:
On Wed, 2012-08-22 at 13:32 +0100, Julien Grall wrote:
Add new option "device_models". The user can specify the capability of the
QEMU (ui, vifs, ...). This option only works with QEMU upstream (qemu-xen).

For instance:
device_models= [ 'name=all,vifs=nic1', 'name=qvga,ui', 'name=qide,ide' ]
iirc you can give multiple vifs -- what does that syntax look like?

vifs=nic1;nic2

I didn't ask before -- what does naming the dm give you? Is it just used
for ui things like logging or can you cross reference this in some way?

It's used for logging and in qemu log filename. It's not a mandatory.
Signed-off-by: Julien Grall<julien.grall@xxxxxxxxxx>
---
  tools/libxl/Makefile     |    2 +-
  tools/libxl/libxlu_dm.c  |   96 ++++++++++++++++++++++++++++++++++++++++++++++
  tools/libxl/libxlutil.h  |    5 ++
  tools/libxl/xl_cmdimpl.c |   29 +++++++++++++-
  4 files changed, 130 insertions(+), 2 deletions(-)
  create mode 100644 tools/libxl/libxlu_dm.c

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 47fb110..2b58721 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -79,7 +79,7 @@ AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h _libxl_list.h 
_paths.h \
  AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
  AUTOSRCS += _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c
  LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o \
-       libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o
+       libxlu_disk_l.o libxlu_disk.o libxlu_vif.o libxlu_pci.o libxlu_dm.o
  $(LIBXLU_OBJS): CFLAGS += $(CFLAGS_libxenctrl) # For xentoollog.h

  CLIENTS = xl testidl libxl-save-helper
diff --git a/tools/libxl/libxlu_dm.c b/tools/libxl/libxlu_dm.c
new file mode 100644
index 0000000..9f0a347
--- /dev/null
+++ b/tools/libxl/libxlu_dm.c
@@ -0,0 +1,96 @@
+#include "libxl_osdeps.h" /* must come before any other headers */
+#include<stdlib.h>
+#include "libxlu_internal.h"
+#include "libxlu_cfg_i.h"
+
+static void split_string_into_string_list(const char *str,
+                                          const char *delim,
+                                          libxl_string_list *psl)
Is this a cut-n-paste of the one in xl_cmdimpl.c or did it change?

Probably better to add this as a common utility function somewhere.
It's nearly the same, except it's skip blank at the beginning
of a value.
For instance if we have 'foo;   bar', the function will return
['foo', 'bar'].

--
Julien

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.