qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PULL 2/3] ahci: Force ICC bits in PxCMD to zero


From: Eric Blake
Subject: Re: [Qemu-devel] [PULL 2/3] ahci: Force ICC bits in PxCMD to zero
Date: Tue, 21 Jul 2015 06:55:42 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 07/21/2015 05:38 AM, Peter Maydell wrote:
> On 20 July 2015 at 19:29, John Snow <address@hidden> wrote:
>> From: Stefan Fritsch <address@hidden>
>>
>> The AHCI spec requires that the HBA sets the ICC bits to zero after the
>> ICC change is done. Since we don't do any ICC change, force the bits to
>> zero all the time.
>>
>> This fixes delays with some OSs (e.g. OpenBSD) waiting for the ICC bits
>> to change to 0.
> 
> This change provokes a lot of clang sanitizer warnings:
> 
> /home/petmay01/linaro/qemu-for-merges/hw/ide/ahci.c:288:49: runtime
> error: left shift of 15 by 28 places cannot be represented in type
> 'int'
> 
> PORT_CMD_ICC_MASK is defined as
> 
>  #define PORT_CMD_ICC_MASK         (0xf << 28) /* i/f ICC state mask */
> 
> which shifts into the sign bit of a signed integer.

Should be fixable by using (0xfU << 28), right?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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