Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Takuya Yoshikawa
On Thu, 26 Jul 2012 17:35:13 +0800 Xiao Guangrong wrote: > > 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? > > > > See IS_ERR_VALUE(): > > #define

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Xiao Guangrong
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

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Xiao Guangrong
On 07/26/2012 04:56 PM, Avi Kivity wrote: > On 07/26/2012 06:58 AM, Xiao Guangrong wrote: >> Currently, kvm allocates some pages and use them as error indicators, >> it wastes memory and is not good for scalability >> >> Base on Avi's suggestion, we use the error codes instead of these pages >> to

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Takuya Yoshikawa
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

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Avi Kivity
On 07/26/2012 06:58 AM, Xiao Guangrong wrote: > Currently, kvm allocates some pages and use them as error indicators, > it wastes memory and is not good for scalability > > Base on Avi's suggestion, we use the error codes instead of these pages > to indicate the error conditions > > > +static

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Avi Kivity
On 07/26/2012 06:58 AM, Xiao Guangrong wrote: Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate the error conditions +static pfn_t

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Takuya Yoshikawa
On Thu, 26 Jul 2012 11:56:15 +0300 Avi Kivity a...@redhat.com 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

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Xiao Guangrong
On 07/26/2012 04:56 PM, Avi Kivity wrote: On 07/26/2012 06:58 AM, Xiao Guangrong wrote: Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Xiao Guangrong
On 07/26/2012 05:20 PM, Takuya Yoshikawa wrote: On Thu, 26 Jul 2012 11:56:15 +0300 Avi Kivity a...@redhat.com 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

Re: [PATCH v2 3/3] KVM: remove dummy pages

2012-07-26 Thread Takuya Yoshikawa
On Thu, 26 Jul 2012 17:35:13 +0800 Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: 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? See IS_ERR_VALUE():

[PATCH v2 3/3] KVM: remove dummy pages

2012-07-25 Thread Xiao Guangrong
Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate the error conditions Signed-off-by: Xiao Guangrong --- include/linux/kvm_host.h |3 +-

[PATCH v2 3/3] KVM: remove dummy pages

2012-07-25 Thread Xiao Guangrong
Currently, kvm allocates some pages and use them as error indicators, it wastes memory and is not good for scalability Base on Avi's suggestion, we use the error codes instead of these pages to indicate the error conditions Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com ---