public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Huang Ying <ying.huang@intel.com>
To: Avi Kivity <avi@redhat.com>
Cc: Anthony Liguori <aliguori@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Andi Kleen <andi@firstfloor.org>,
	Dean Nelson <dnelson@redhat.com>,
	Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [PATCH  -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address
Date: Mon, 15 Nov 2010 09:46:13 +0800	[thread overview]
Message-ID: <1289785573.8719.1097.camel@yhuang-dev> (raw)
In-Reply-To: <4CDFC348.5050400@redhat.com>

On Sun, 2010-11-14 at 19:08 +0800, Avi Kivity wrote:
> On 11/12/2010 03:16 AM, Huang Ying wrote:
> > On Thu, 2010-11-11 at 17:39 +0800, Avi Kivity wrote:
> > >  On 11/11/2010 02:56 AM, Huang Ying wrote:
> > >  >  On Thu, 2010-11-11 at 00:49 +0800, Anthony Liguori wrote:
> > >  >  >   On 11/10/2010 02:34 AM, Avi Kivity wrote:
> > >  >  >   >>   Why the gpa ->    hva mapping is not
> > >  >  >   >>   consistent for RAM if -mempath is not used?
> > >  >  >   >
> > >  >  >   >   Video RAM in the range a0000-bffff and PCI mapped RAM can change gpas
> > >  >  >   >   (while remaining in the same hva).
> > >  >  >   >
> > >  >  >   >   Even for ordinary RAM, which doesn't normally change gpa/hva, I'm not
> > >  >  >   >   sure we want to guarantee that it won't.
> > >  >  >
> > >  >  >   We can't universally either.  Memory hot remove potentially breaks the
> > >  >  >   mapping and some non-x86 architectures (like ARM) can alias RAM via a
> > >  >  >   guest triggered mechanism.
> > >  >
> > >  >  Thanks for clarification. Now I think we have two options.
> > >  >
> > >  >  1) Clearly mark gpa2hva (pfa2hva now, should renamed to gpa2hva) as a
> > >  >  testing only interface, and should be used only on restricted
> > >  >  environment (normal memory, without hot-remove, maybe only on x86).
> > >  >
> > >  >  2) Find some way to lock the gpa ->   hva mapping during operating. Such
> > >  >  as gpa2hva_begin and gpa2hva_end and lock the mapping in between.
> > >  >
> > >  >  I think 2) may be possible. But if there are no other users, why do that
> > >  >  for a test case? So I think 1) may be the better option.
> > >  >
> > >
> > >  3) Move the poisoning code into qemu, so the command becomes
> > >
> > >      posison-address<addr>
> > >
> > >  (though physical addresses aren't stable either)
> >
> > Poisoning includes:
> >
> > a) gva ->  gpa
> > b) gpa ->  hva
> > c) hva ->  hpa
> > d) inject the MCE into host via some external tool
> >
> > poison-address need to do b, c, d. Do you think it is good to do all
> > these inside qemu?
> 
> If d is not too complicated (an ioctl?), we might to it in qemu.

The issue of d) is that there are multiple ways to inject MCE. Now one
software based, one APEI based, and maybe some others in the future.
They all use different interfaces. And as debug interface, there are not
considered kernel ABI too (some are in debugfs). So I think it is better
to use these ABI only in some test suite.

Best Regards,
Huang Ying



  parent reply	other threads:[~2010-11-15  1:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26  2:39 [PATCH -v2] Monitor command: pfa2hva, translate guest physical address to host virtual address Huang Ying
2010-11-01 16:09 ` Marcelo Tosatti
2010-11-01 18:49   ` Anthony Liguori
2010-11-01 19:20     ` Huang Ying
2010-11-01 19:22       ` Anthony Liguori
2010-11-04 16:53         ` Luiz Capitulino
2010-11-06 16:24         ` Avi Kivity
2010-11-08  1:29           ` Huang Ying
2010-11-08  3:39             ` Anthony Liguori
2010-11-08 20:46               ` Huang Ying
2010-11-09  3:06               ` Huang Ying
2010-11-10  6:56               ` Avi Kivity
2010-11-10  6:59                 ` Avi Kivity
2010-11-10  7:41                   ` Huang Ying
2010-11-10  8:28                     ` Avi Kivity
2010-11-10  8:38                       ` Huang Ying
2010-11-10  8:48                         ` Avi Kivity
2010-11-10 16:42                         ` Andi Kleen
2010-11-10 17:08                           ` Avi Kivity
2010-11-10 17:44                             ` Andi Kleen
2010-11-10 17:47                               ` Avi Kivity
2010-11-10 19:16                                 ` Andi Kleen
2010-11-10 20:58                                   ` Avi Kivity
2010-11-10  8:21                 ` Huang Ying
2010-11-10  8:34                   ` Avi Kivity
2010-11-10 16:49                     ` Anthony Liguori
2010-11-11  0:56                       ` Huang Ying
2010-11-11  9:39                         ` Avi Kivity
2010-11-12  1:16                           ` Huang Ying
2010-11-14 11:08                             ` Avi Kivity
2010-11-14 11:09                               ` Avi Kivity
2010-11-15  1:46                               ` Huang Ying [this message]
2010-11-15 10:02                                 ` Andi Kleen
2010-11-08  3:37           ` Anthony Liguori

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=1289785573.8719.1097.camel@yhuang-dev \
    --to=ying.huang@intel.com \
    --cc=aliguori@linux.vnet.ibm.com \
    --cc=andi@firstfloor.org \
    --cc=avi@redhat.com \
    --cc=dnelson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=lcapitulino@redhat.com \
    --cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox