All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>, KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH 1/2] KVM: X86: remove read buffer for mmio read
Date: Tue, 10 Jul 2012 13:48:47 +0300	[thread overview]
Message-ID: <20120710104847.GD23898@redhat.com> (raw)
In-Reply-To: <4FFC07BB.8080802@redhat.com>

On Tue, Jul 10, 2012 at 01:45:15PM +0300, Avi Kivity wrote:
> On 07/10/2012 01:36 PM, Gleb Natapov wrote:
> > On Mon, Jul 09, 2012 at 04:34:50PM +0300, Avi Kivity wrote:
> > > On 07/09/2012 04:23 PM, Xiao Guangrong wrote:
> > > > On 07/09/2012 08:49 PM, Avi Kivity wrote:
> > > >> On 07/09/2012 02:23 PM, Gleb Natapov wrote:
> > > >>>
> > > >>>> kvm-unit-tests.git has a test for xchg to mmio.  Does it still work?
> > > >>>>
> > > >>>> I agree this code has to go, but it needs to be replaced by something.
> > > >>>> Maybe a .valid flag in struct operand.
> > > >>>>
> > > >>> Valid will not enough for that.
> > > >> 
> > > >> If we make everything go through operands, any reason why not?
> > > >> 
> > > > 
> > > > I noticed some instructions need to read ESP for many times (e.g, iret_real),
> > > > maybe .valid flag is not enough for this case if the stack is in MMIO, yes?
> > > 
> > > Good catch.  We either have to fix it or to restrict stack operations to
> > > regular memory (->read_std).
> > > 
> > > > IIUC, I also noticed ESP is not reset back if it is emulated fail (mmio is needed).
> > > > If the stack located in mmio region, this kind of instruct will be broken, i know no
> > > > guest will use mmio as stack but SDM does not limit it, is it valid?
> > > 
> > > Stack in mmio (or task switch in mmio) is architecturally valid.  We
> > > don't have to support it if no guests do it.
> > > 
> > But the code is already here, why drop it?
> 
> The read cache is not effective for multiple disjunct reads.
What do you mean?

>                                                                The
> splitting into 8-byte groups is unneeded.
> 
Agree. Easy to fix.

--
			Gleb.

  reply	other threads:[~2012-07-10 10:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09  9:02 [PATCH 1/2] KVM: X86: remove read buffer for mmio read Xiao Guangrong
2012-07-09  9:03 ` [PATCH 2/2] KVM: X86: introduce set_mmio_exit_info Xiao Guangrong
2012-07-09 11:15 ` [PATCH 1/2] KVM: X86: remove read buffer for mmio read Avi Kivity
2012-07-09 11:23   ` Gleb Natapov
2012-07-09 12:48     ` Avi Kivity
2012-07-09 12:49     ` Avi Kivity
2012-07-09 13:23       ` Xiao Guangrong
2012-07-09 13:26         ` Gleb Natapov
2012-07-09 13:34         ` Avi Kivity
2012-07-10 10:36           ` Gleb Natapov
2012-07-10 10:45             ` Avi Kivity
2012-07-10 10:48               ` Gleb Natapov [this message]
2012-07-10 12:50                 ` Avi Kivity
2012-07-10 13:01                   ` Gleb Natapov
2012-07-10 16:04                     ` Avi Kivity
2012-07-09 13:26       ` Gleb Natapov

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=20120710104847.GD23898@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@linux.vnet.ibm.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.