libvirt and nested pagind

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

 



 Good afternoon!

Searching on the web, I joint some codes and produced those patches.
Now I have a server running perfectly with the following scenario:

AMD Phenom 8400 x3;
Slackware64 13.1 on a slim and custom 2.6.35.2 Linux;
qemu-kvm 0.12.5;
libvirt 0.8.4.

Patch of libvirt 0.8.3:

diff -Naur ../libvirt-0.8.3//docs/schemas/domain.rng ./docs/schemas/domain.rng --- ../libvirt-0.8.3//docs/schemas/domain.rng 2010-07-29 06:48:30.000000000 -0300
+++ ./docs/schemas/domain.rng   2010-09-01 16:51:57.710851479 -0300
@@ -1595,6 +1595,11 @@
<empty/>
</element>
</optional>
+ <optional>
+ <element name="nesting">
+ <empty/>
+ </element>
+ </optional>
</interleave>
</element>
</optional>
diff -Naur ../libvirt-0.8.3//src/conf/domain_conf.c ./src/conf/domain_conf.c
--- ../libvirt-0.8.3//src/conf/domain_conf.c 2010-08-02 16:16:42.000000000 -0300
+++ ./src/conf/domain_conf.c    2010-09-01 16:51:57.710851479 -0300
@@ -75,7 +75,8 @@
 VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
               "acpi",
               "apic",
-              "pae")
+              "pae",
+             "nesting")

 VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST,
               "destroy",
diff -Naur ../libvirt-0.8.3//src/conf/domain_conf.h ./src/conf/domain_conf.h
--- ../libvirt-0.8.3//src/conf/domain_conf.h 2010-07-29 06:48:30.000000000 -0300
+++ ./src/conf/domain_conf.h    2010-09-01 16:51:57.710851479 -0300
@@ -649,6 +649,7 @@
     VIR_DOMAIN_FEATURE_ACPI,
     VIR_DOMAIN_FEATURE_APIC,
     VIR_DOMAIN_FEATURE_PAE,
+    VIR_DOMAIN_FEATURE_NESTING,

     VIR_DOMAIN_FEATURE_LAST
 };
diff -Naur ../libvirt-0.8.3//src/qemu/qemu_conf.c ./src/qemu/qemu_conf.c
--- ../libvirt-0.8.3//src/qemu/qemu_conf.c 2010-08-04 09:21:27.000000000 -0300
+++ ./src/qemu/qemu_conf.c      2010-09-01 16:57:47.485469640 -0300
@@ -1190,6 +1190,8 @@
         flags |= QEMUD_CMD_FLAG_MEM_PATH;
     if (strstr(help, "-chardev"))
         flags |= QEMUD_CMD_FLAG_CHARDEV;
+    if (strstr(help, "-enable-nesting"))
+        flags |= QEMUD_CMD_FLAG_NESTING;
     if (strstr(help, "-balloon"))
         flags |= QEMUD_CMD_FLAG_BALLOON;
     if (strstr(help, "-device"))
@@ -3907,6 +3909,9 @@
             goto error;
         }
     }
+    if ((qemuCmdFlags & QEMUD_CMD_FLAG_NESTING) &&
+        (def->features & (1 << VIR_DOMAIN_FEATURE_NESTING)))
+        ADD_ARG_LIT("-enable-nesting");

     /*
      * NB, -nographic *MUST* come before any serial, or monitor
@@ -6265,6 +6270,8 @@
             fullscreen = 1;
         } else if (STREQ(arg, "-localtime")) {
             def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
+        } else if (STREQ(arg, "-enable-nesting")) {
+            def->features |= (1 << VIR_DOMAIN_FEATURE_NESTING);
         } else if (STREQ(arg, "-kernel")) {
             WANT_VALUE();
             if (!(def->os.kernel = strdup(val)))
diff -Naur ../libvirt-0.8.3//src/qemu/qemu_conf.h ./src/qemu/qemu_conf.h
--- ../libvirt-0.8.3//src/qemu/qemu_conf.h 2010-07-28 11:18:15.000000000 -0300
+++ ./src/qemu/qemu_conf.h      2010-09-01 16:58:29.900876561 -0300
@@ -92,6 +92,7 @@
     QEMUD_CMD_FLAG_PCI_CONFIGFD  = (1LL << 36), /* pci-assign.configfd */
     QEMUD_CMD_FLAG_NODEFCONFIG   = (1LL << 37), /* -nodefconfig */
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on support */ + QEMUD_CMD_FLAG_NESTING = (1LL << 39), /* Is the -enable-nesting flag available */
 };

 /* Main driver state */

Patch of libvirt 0.8.4:

diff -Naur libvirt-0.8.4/docs/schemas/domain.rng libvirt-0.8.4.edu/docs/schemas/domain.rng --- libvirt-0.8.4/docs/schemas/domain.rng 2010-08-31 10:44:13.000000000 -0300 +++ libvirt-0.8.4.edu/docs/schemas/domain.rng 2010-09-28 14:34:40.626234752 -0300
@@ -1619,6 +1619,11 @@
<empty/>
</element>
</optional>
+ <optional>
+ <element name="nesting">
+ <empty/>
+ </element>
+ </optional>
</interleave>
</element>
</optional>
diff -Naur libvirt-0.8.4/src/conf/domain_conf.c libvirt-0.8.4.edu/src/conf/domain_conf.c --- libvirt-0.8.4/src/conf/domain_conf.c 2010-08-31 10:44:13.000000000 -0300 +++ libvirt-0.8.4.edu/src/conf/domain_conf.c 2010-09-28 14:35:36.069149447 -0300
@@ -75,7 +75,8 @@
 VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
               "acpi",
               "apic",
-              "pae")
+              "pae",
+             "nesting")

 VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_LAST,
               "destroy",
diff -Naur libvirt-0.8.4/src/conf/domain_conf.h libvirt-0.8.4.edu/src/conf/domain_conf.h --- libvirt-0.8.4/src/conf/domain_conf.h 2010-08-31 10:44:13.000000000 -0300 +++ libvirt-0.8.4.edu/src/conf/domain_conf.h 2010-09-28 14:36:11.931054102 -0300
@@ -650,6 +650,7 @@
     VIR_DOMAIN_FEATURE_ACPI,
     VIR_DOMAIN_FEATURE_APIC,
     VIR_DOMAIN_FEATURE_PAE,
+    VIR_DOMAIN_FEATURE_NESTING,

     VIR_DOMAIN_FEATURE_LAST
 };
diff -Naur libvirt-0.8.4/src/qemu/qemu_conf.c libvirt-0.8.4.edu/src/qemu/qemu_conf.c
--- libvirt-0.8.4/src/qemu/qemu_conf.c  2010-09-10 09:38:13.000000000 -0300
+++ libvirt-0.8.4.edu/src/qemu/qemu_conf.c 2010-09-28 14:38:36.218612249 -0300
@@ -1192,6 +1192,8 @@
         flags |= QEMUD_CMD_FLAG_MEM_PATH;
     if (strstr(help, "-chardev"))
         flags |= QEMUD_CMD_FLAG_CHARDEV;
+    if (strstr(help, "-enable-nesting"))
+        flags |= QEMUD_CMD_FLAG_NESTING;
     if (strstr(help, "-balloon"))
         flags |= QEMUD_CMD_FLAG_BALLOON;
     if (strstr(help, "-device"))
@@ -3944,6 +3946,9 @@
             goto error;
         }
     }
+    if ((qemuCmdFlags & QEMUD_CMD_FLAG_NESTING) &&
+        (def->features & (1 << VIR_DOMAIN_FEATURE_NESTING)))
+        ADD_ARG_LIT("-enable-nesting");

     /*
      * NB, -nographic *MUST* come before any serial, or monitor
@@ -6303,6 +6308,8 @@
             fullscreen = 1;
         } else if (STREQ(arg, "-localtime")) {
             def->clock.offset = VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME;
+        } else if (STREQ(arg, "-enable-nesting")) {
+            def->features |= (1 << VIR_DOMAIN_FEATURE_NESTING);
         } else if (STREQ(arg, "-kernel")) {
             WANT_VALUE();
             if (!(def->os.kernel = strdup(val)))
diff -Naur libvirt-0.8.4/src/qemu/qemu_conf.h libvirt-0.8.4.edu/src/qemu/qemu_conf.h
--- libvirt-0.8.4/src/qemu/qemu_conf.h  2010-08-31 10:44:13.000000000 -0300
+++ libvirt-0.8.4.edu/src/qemu/qemu_conf.h 2010-09-28 14:38:58.739788135 -0300
@@ -93,6 +93,8 @@
     QEMUD_CMD_FLAG_NODEFCONFIG   = (1LL << 37), /* -nodefconfig */
QEMUD_CMD_FLAG_BOOT_MENU = (1LL << 38), /* -boot menu=on support */
     QEMUD_CMD_FLAG_ENABLE_KQEMU  = (1LL << 39), /* -enable-kqemu flag */
+ QEMUD_CMD_FLAG_NESTING = (1LL << 39), /* Is the -enable-nesting flag available */
+
 };

 /* Main driver state */

--
*Eduardo Ramos*
www.freedominterface.org
+55 12 91051687
exten=>eduardo,1,hangup()

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]