qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v11 8/9] Add set_cachesize command


From: Orit Wasserman
Subject: Re: [Qemu-devel] [PATCH v11 8/9] Add set_cachesize command
Date: Wed, 06 Jun 2012 05:14:11 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/01/2012 02:19 PM, Juan Quintela wrote:
> Orit Wasserman <address@hidden> wrote:
>> Change XBZRLE cache size in bytes (the size should be a power of 2).
>> If XBZRLE cache size is too small there will be many cache miss.
>>
>> Signed-off-by: Benoit Hudzia <address@hidden>
>> Signed-off-by: Petter Svard <address@hidden>
>> Signed-off-by: Aidan Shribman <address@hidden>
>> Signed-off-by: Orit Wasserman <address@hidden>
> 
>> +void qmp_migrate_set_cachesize(int64_t value, Error **errp)
>> +{
>> +    MigrationState *s = migrate_get_current();
>> +
>> +    /* Check for truncation */
>> +    if (value != (size_t)value) {
>> +        error_set(errp, QERR_INVALID_PARAMETER_VALUE, "cache size",
>> +                  "exceeding address space");
>> +        return;
>> +    }
>> +
>> +    value = MIN(UINT64_MAX, value);
> 
> This looks fishy to say the least.  value is signed.  Is there any way
> that UINT64_MAX is going to be smaller than value?
> 
You are right.
I will remove it.

Orit



reply via email to

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