[lkml]   [2012]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 3/3] KVM: remove dummy pages
On 07/26/2012 05:20 PM, Takuya Yoshikawa wrote:
> On Thu, 26 Jul 2012 11:56:15 +0300
> Avi Kivity <> wrote:
>> Since my comments are better done as a separate patch, I applied all
>> three patches. Thanks!
> Is this patch really safe for all architectures?
> IS_ERR_VALUE() casts -MAX_ERRNO to unsigned long and then does comparison.
> Isn't it possible to conflict with valid pfns?


#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)

The minimal value of the error code is:
0xffff f001 on 32-bit and 0x ffff ffff ffff f001 on 64-bit,
it is fair larger that a valid pfn (for the pfn, the most top of 12 bits
are always 0).

Note, PAE is a special case, but only 64G physical memory is valid,
0xffff f001 is also suitable for that.

 \ /
  Last update: 2012-07-26 12:21    [W:0.057 / U:3.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site