qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v2] Use ffs in favor of ffsll


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH v2] Use ffs in favor of ffsll
Date: Thu, 02 Jul 2009 00:24:25 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Nathan Froyd wrote:
> On Wed, Jul 01, 2009 at 10:55:02PM +0200, Jan Kiszka wrote:
>> Jan Kiszka wrote:
>>> Blue Swirl wrote:
>>>> I think this will not work on a big endian host.
>>> Right, may theoretically bite us once we are able to migrate between kvm
>>> and tcg. Will send a better version nevertheless.
>>>
>> -    for (i = 0; i < ARRAY_SIZE(env->interrupt_bitmap); i++) {
>> -        bit = ffsll(env->interrupt_bitmap[i]);
>> +    for (i = 0; i < sizeof(env->interrupt_bitmap) / sizeof(int); i++) {
>> +        /* Note: This assumes little endian host, which is true in KVM mode.
>> +           In TCG mode it must be zero anyway. */
>> +        bit = ffs(((int *)env->interrupt_bitmap)[i]);
> 
> ISTR that some PPC hosts support KVM...
> 

...but not for x86 guests. :)

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]