Re: [PATCH v2] caps: Fix regression defaulting to host arch

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

 



On 05/08/2015 04:06 AM, Richard W.M. Jones wrote:
> On Thu, May 07, 2015 at 11:15:55AM -0400, Cole Robinson wrote:
>> 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
>> ---
>> v2:
>>     Tweak subject
>>     add test case for type=qemu as well
> 
> I didn't specifically test this patch, but I compared it to the
> previous patch and all it does is to add / change the test suite.
> Since the code is the same as before, and I tested the code in V1:
> 
> ACK.
> 

Thanks, pushed now

- Cole

--
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]