Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 35073)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 35074)
@@ -4436,8 +4436,19 @@
     }
 
-    // Settings version 1.11 is required if more than one controller of each type
-    // is present.
+    // settings version 1.9 is required if there is not exactly one DVD
+    // or more than one floppy drive present or the DVD is not at the secondary
+    // master; this check is a bit more complicated
+    //
+    // settings version 1.10 is required if the host cache should be disabled
+    //
+    // settings version 1.11 is required for bandwidth limits and if more than
+    // one controller of each type is present.
     if (m->sv < SettingsVersion_v1_11)
     {
+        // count attached DVDs and floppies (only if < v1.9)
+        size_t cDVDs = 0;
+        size_t cFloppies = 0;
+
+        // count storage controllers (if < v1.11)
         size_t cSata = 0;
         size_t cScsiLsi = 0;
@@ -4447,9 +4458,14 @@
         size_t cFloppy = 0;
 
+        // need to run thru all the storage controllers and attached devices to figure this out
         for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin();
              it != storageMachine.llStorageControllers.end();
              ++it)
         {
-            switch ((*it).storageBus)
+            const StorageController &sctl = *it;
+
+            // count storage controllers of each type; 1.11 is required if more than one
+            // controller of one type is present
+            switch (sctl.storageBus)
             {
                 case StorageBus_IDE:
@@ -4463,5 +4479,5 @@
                     break;
                 case StorageBus_SCSI:
-                    if ((*it).controllerType == StorageControllerType_LsiLogic)
+                    if (sctl.controllerType == StorageControllerType_LsiLogic)
                         cScsiLsi++;
                     else
@@ -4482,35 +4498,9 @@
                 || cIde > 1
                 || cFloppy > 1)
+            {
                 m->sv = SettingsVersion_v1_11;
-        }
-    }
-
-    // Settings version 1.11 is required if Readonly/MultiAttach media
-    // are present.
-    if (m->sv < SettingsVersion_v1_11)
-    {
-        /// @todo add code going over all medium attachments and check if
-        // they are of type Readonly or MultiAttach.
-    }
-
-    // settings version 1.9 is required if there is not exactly one DVD
-    // or more than one floppy drive present or the DVD is not at the secondary
-    // master; this check is a bit more complicated
-    //
-    // settings version 1.10 is required if the host cache should be disabled
-    //
-    // settings version 1.11 is required for bandwidth limits
-    if (m->sv < SettingsVersion_v1_11)
-    {
-        // count attached DVDs and floppies (only if < v1.9)
-        size_t cDVDs = 0;
-        size_t cFloppies = 0;
-
-        // need to run thru all the storage controllers and attached devices to figure this out
-        for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin();
-             it != storageMachine.llStorageControllers.end();
-             ++it)
-        {
-            const StorageController &sctl = *it;
+                break; // abort the loop -- we will not raise the version further
+            }
+
             for (AttachedDevicesList::const_iterator it2 = sctl.llAttachedDevices.begin();
                  it2 != sctl.llAttachedDevices.end();
@@ -4520,10 +4510,11 @@
 
                 // Bandwidth limitations are new in VirtualBox 4.0 (1.11)
-                if (    (m->sv < SettingsVersion_v1_11)
-                     && (att.strBwGroup.length() != 0)
-                   )
+                if (m->sv < SettingsVersion_v1_11)
                 {
-                    m->sv = SettingsVersion_v1_11;
-                    break; /* abort the loop -- we will not raise the version further */
+                    if (att.strBwGroup.length() != 0)
+                    {
+                        m->sv = SettingsVersion_v1_11;
+                        break; // abort the loop -- we will not raise the version further
+                    }
                 }
 
@@ -4556,4 +4547,7 @@
                 }
             }
+
+            if (m->sv >= SettingsVersion_v1_11)
+                break;  // abort the loop -- we will not raise the version further
         }
 
