kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
To: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH v2 3/3] KVM: remove dummy pages
Date: Thu, 26 Jul 2012 17:35:13 +0800	[thread overview]
Message-ID: <50110F51.3050903@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120726182033.e127e9e6.yoshikawa.takuya@oss.ntt.co.jp>

On 07/26/2012 05:20 PM, Takuya Yoshikawa wrote:
> On Thu, 26 Jul 2012 11:56:15 +0300
> Avi Kivity <avi@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 it possible to conflict with valid pfns?
> 

See IS_ERR_VALUE():

#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.


  reply	other threads:[~2012-07-26  9:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26  3:56 [PATCH v2 0/3] KVM: remove dummy pages Xiao Guangrong
2012-07-26  3:57 ` [PATCH v2 1/3] KVM: MMU: use kvm_release_pfn_clean to release pfn Xiao Guangrong
2012-07-26  3:58 ` [PATCH v2 2/3] KVM: use kvm_release_page_clean to release the page Xiao Guangrong
2012-07-26  3:58 ` [PATCH v2 3/3] KVM: remove dummy pages Xiao Guangrong
2012-07-26  8:56   ` Avi Kivity
2012-07-26  9:20     ` Takuya Yoshikawa
2012-07-26  9:35       ` Xiao Guangrong [this message]
2012-07-26  9:52         ` Takuya Yoshikawa
2012-07-26  9:25     ` Xiao Guangrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50110F51.3050903@linux.vnet.ibm.com \
    --to=xiaoguangrong@linux.vnet.ibm.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).