All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Marcelo Tosatti <mtosatti@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>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally
Date: Sun, 16 Jan 2011 17:35:48 +0200	[thread overview]
Message-ID: <4D331054.4030206@redhat.com> (raw)
In-Reply-To: <1294969036.4596.67.camel@yhuang-dev>

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.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2011-01-16 15:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13  8:42 [PATCH 1/2] mm, Make __get_user_pages return -EHWPOISON for HWPOISON page optionally Huang Ying
2011-01-13 10:43 ` Avi Kivity
2011-01-14  1:37   ` Huang Ying
2011-01-16 15:35     ` Avi Kivity [this message]
2011-01-17  0:47       ` Huang Ying
2011-01-20 15:50         ` Marcelo Tosatti
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=4D331054.4030206@redhat.com \
    --to=avi@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=dnelson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=tony.luck@intel.com \
    --cc=ying.huang@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.