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

[Xen-devel] [XEN][RFC PATCH 12/15] xl: Add interface to handle multiple device models



This patch add a structure with contain all informations about
a device model.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 tools/libxl/libxl.h          |    4 ++--
 tools/libxl/libxl_internal.h |    1 +
 tools/libxl/libxl_types.idl  |   11 +++++++++++
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 6b69030..a347a34 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -357,9 +357,9 @@ typedef struct {
 typedef struct {
     libxl_domain_create_info c_info;
     libxl_domain_build_info b_info;
-
     int num_disks, num_vifs, num_pcidevs, num_vfbs, num_vkbs;
-
+    int num_dms;
+    libxl_dm *dms;
     libxl_device_disk *disks;
     libxl_device_nic *vifs;
     libxl_device_pci *pcidevs;
diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
index e0a1070..247bdb9 100644
--- a/tools/libxl/libxl_internal.h
+++ b/tools/libxl/libxl_internal.h
@@ -767,6 +767,7 @@ typedef struct {
     char *dom_path; /* from libxl_malloc, only for libxl_spawner_record_pid */
     const char *pid_path; /* only for libxl_spawner_record_pid */
     int domid;
+    uint32_t dmid;
     libxl__spawn_starting *for_spawn;
 } libxl__spawner_starting;
 
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 413a1a6..7e48817 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -37,6 +37,7 @@ libxl_domain_type = Enumeration("domain_type", [
 libxl_device_model_version = Enumeration("device_model_version", [
     (1, "QEMU_XEN_TRADITIONAL"), # Historical qemu-xen device model (qemu-dm)
     (2, "QEMU_XEN"),             # Upstream based qemu-xen device model
+    (3, "MULTIPLE_QEMU_XEN"),    # Handle multiple dm
     ])
 
 libxl_console_type = Enumeration("console_type", [
@@ -224,6 +225,15 @@ libxl_domain_create_info = Struct("domain_create_info",[
 
 MemKB = UInt(64, init_val = "LIBXL_MEMKB_DEFAULT")
 
+libxl_dm = Struct("dm", [
+    ("id",           uint32),
+    ("name",         string),
+    ("path",         string),
+    ("pcis",         libxl_string_list),
+    ("mmios",        libxl_string_list),
+    ("pios",         libxl_string_list),
+    ])
+
 # Instances of libxl_file_reference contained in this struct which
 # have been mapped (with libxl_file_reference_map) will be unmapped
 # by libxl_domain_build/restore. If either of these are never called
@@ -289,6 +299,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
                                        ("usbdevice",        string),
                                        ("soundhw",          string),
                                        ("xen_platform_pci", libxl_defbool),
+                                       ("max_servers",     integer),
                                        ])),
                  ("pv", Struct(None, [("kernel", libxl_file_reference),
                                       ("slack_memkb", MemKB),
-- 
Julien Grall


_______________________________________________
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®.