Cole Robinson 8910e063db caps: Fix regression defaulting to host arch
My commit 747761a79 (v1.2.15 only) dropped this bit of logic when filling
in a default arch in the XML:

-    /* First try to find one matching host arch */
-    for (i = 0; i < caps->nguests; i++) {
-        if (caps->guests[i]->ostype == ostype) {
-            for (j = 0; j < caps->guests[i]->arch.ndomains; j++) {
-                if (caps->guests[i]->arch.domains[j]->type == domain &&
-                    caps->guests[i]->arch.id == caps->host.arch)
-                    return caps->guests[i]->arch.id;
-            }
-        }
-    }

That attempt to match host.arch is important, otherwise we end up
defaulting to i686 on x86_64 host for KVM, which is not intended.
Duplicate it in the centralized CapsLookup function.

Additionally add some testcases that would have caught this.

https://bugzilla.redhat.com/show_bug.cgi?id=1219191
2015-05-08 11:11:32 -04:00
..
2014-09-03 09:36:13 -06:00
2014-01-01 16:34:13 +00:00
2015-04-24 19:54:12 +03:00
2015-04-23 17:08:48 -04:00
2015-04-23 17:08:48 -04:00
2015-04-23 17:08:48 -04:00
2015-04-27 16:03:31 +02:00
2014-09-04 15:18:43 -06:00
2015-04-02 10:27:56 +02:00
2015-04-23 17:08:48 -04:00
2015-05-04 15:01:27 +02:00
2015-04-23 17:08:48 -04:00
2015-02-20 16:17:19 +01:00
2014-11-25 08:47:12 -07:00
2013-10-14 10:31:01 +01:00
2015-04-14 19:33:02 +02:00
2015-04-14 19:33:02 +02:00
2014-04-08 11:15:55 +01:00
2015-04-23 17:08:48 -04:00
2015-04-23 17:08:48 -04:00
2015-04-23 17:08:48 -04:00