LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: Huang Ying <ying.huang@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Avi Kivity <avi@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Andi Kleen <andi@firstfloor.org>,
"Luck, Tony" <tony.luck@intel.com>,
Dean Nelson <dnelson@redhat.com>
Subject: Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally
Date: Thu, 20 Jan 2011 13:50:21 -0200 [thread overview]
Message-ID: <20110120155021.GA5996@amt.cnet> (raw)
In-Reply-To: <1295225259.10748.3.camel@yhuang-dev>
On Mon, Jan 17, 2011 at 08:47:39AM +0800, Huang Ying wrote:
> Hi, Andrew,
>
> On Sun, 2011-01-16 at 23:35 +0800, Avi Kivity wrote:
> > On 01/14/2011 03:37 AM, Huang Ying wrote:
> > > On Thu, 2011-01-13 at 18:43 +0800, Avi Kivity wrote:
> > > > On 01/13/2011 10:42 AM, Huang Ying wrote:
> > > > > Make __get_user_pages return -EHWPOISON for HWPOISON page only if
> > > > > FOLL_HWPOISON is specified. With this patch, the interested callers
> > > > > can distinguish HWPOISON page from general FAULT page, while other
> > > > > callers will still get -EFAULT for pages, so the user space interface
> > > > > need not to be changed.
> > > > >
> > > > > get_user_pages_hwpoison is added as a variant of get_user_pages that
> > > > > can return -EHWPOISON for HWPOISON page.
> > > > >
> > > > > This feature is needed by KVM, where UCR MCE should be relayed to
> > > > > guest for HWPOISON page, while instruction emulation and MMIO will be
> > > > > tried for general FAULT page.
> > > > >
> > > > > The idea comes from Andrew Morton.
> > > > >
> > > > > Signed-off-by: Huang Ying<ying.huang@intel.com>
> > > > > Cc: Andrew Morton<akpm@linux-foundation.org>
> > > > >
> > > > > +#ifdef CONFIG_MEMORY_FAILURE
> > > > > +int get_user_pages_hwpoison(struct task_struct *tsk, struct mm_struct *mm,
> > > > > + unsigned long start, int nr_pages, int write,
> > > > > + int force, struct page **pages,
> > > > > + struct vm_area_struct **vmas);
> > > > > +#else
> > > >
> > > > Since we'd also like to add get_user_pages_noio(), perhaps adding a
> > > > flags field to get_user_pages() is better.
> > >
> > > Or export __get_user_pages()?
> >
> > That's better, yes.
>
> Do you think it is a good idea to export __get_user_pages() instead of
> adding get_user_pages_noio() and get_user_pages_hwpoison()?
Better Andrew and/or Linus should decide it.
next prev parent reply other threads:[~2011-01-20 22:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-13 8:42 Huang Ying
2011-01-13 10:43 ` Avi Kivity
2011-01-14 1:37 ` Huang Ying
2011-01-16 15:35 ` Avi Kivity
2011-01-17 0:47 ` Huang Ying
2011-01-20 15:50 ` Marcelo Tosatti [this message]
2011-01-27 7:29 ` Huang Ying
2011-01-27 23:07 ` Andrew Morton
2011-01-28 0:57 ` Andi Kleen
2011-01-28 1:12 ` Andrew Morton
2011-01-28 7:39 ` Andi Kleen
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=20110120155021.GA5996@amt.cnet \
--to=mtosatti@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=avi@redhat.com \
--cc=dnelson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=torvalds@osdl.org \
--cc=ying.huang@intel.com \
--subject='Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally' \
/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
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).