All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Jordan Justen <jljusten@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Patch Tracking <patches@linaro.org>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	Juan Quintela <quintela@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] Use of flash for x86 BIOS
Date: Mon, 8 Apr 2013 11:43:11 +0300	[thread overview]
Message-ID: <20130408084311.GE17919@redhat.com> (raw)
In-Reply-To: <CAFe8ug_fBOt0kKi=cTLhWe3+v2S9Ooo1OjPS1A6FwjJv9aVdGg@mail.gmail.com>

On Mon, Apr 08, 2013 at 01:18:10AM -0700, Jordan Justen wrote:
> On Sun, Apr 7, 2013 at 11:06 PM, Xiao Guangrong
> <xiaoguangrong@linux.vnet.ibm.com> wrote:
> > On 03/23/2013 03:09 AM, Jordan Justen wrote:
> >
> >> Admittedly, I've been completely ineffectual in resolving the kvm
> >> portion. More recently I tried to make use of KVM_MEM_READONLY to
> >> address this. I was able to get an VM exit on writes to flash, but not
> >> able to get the memory region to convert to full device mode so VM
> >> exits would occur on reads as well. I am once again stalled...
> >
> > Hi Jordan,
> >
> > What's memory region you want to get? I should admit that I do not
> > have enough background of flash, could you please explain this
> > requirement more detail?
> 
> The flash memory requires two modes.
> 
> Read/Execute mode:
> * Initial state
> * Writes will trap to QEMU, and may transition to Device mode based on
> QEMU device emulation
> 
> Device mode:
> * Region is not executable
> * All reads & writes will trap to QEMU
> * May transition back to Read/Execute mode based on QEMU device emulation
> 
> Using KVM_MEM_READONLY I was able to get Read/Execute mode to work,
> but I was not able to get the memory region to transition to Device
> mode. (I couldn't get reads to trap to QEMU.)
> 
You need to drop memslot when you transition to Device mode.

--
			Gleb.

  reply	other threads:[~2013-04-08  8:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 18:24 [Qemu-devel] [PATCH 0/2] Implement migration support for pflash_cfi01 Peter Maydell
2013-03-19 18:24 ` [Qemu-devel] [PATCH 1/2] pflash_cfi01: Drop unused 'bypass' field Peter Maydell
2013-03-19 18:24 ` [Qemu-devel] [PATCH 2/2] pflash_cfi01: Implement migration support Peter Maydell
2013-03-26 13:32   ` Peter Maydell
2013-03-21  7:45 ` [Qemu-devel] Use of flash for x86 BIOS (was: [PATCH 0/2] Implement migration support for pflash_cfi01) Markus Armbruster
2013-03-22 16:42   ` Peter Maydell
2013-03-22 18:51     ` [Qemu-devel] Use of flash for x86 BIOS Markus Armbruster
2013-03-22 19:09   ` [Qemu-devel] Use of flash for x86 BIOS (was: [PATCH 0/2] Implement migration support for pflash_cfi01) Jordan Justen
2013-03-22 19:48     ` [Qemu-devel] Use of flash for x86 BIOS Markus Armbruster
2013-04-03 13:48       ` Laszlo Ersek
2013-04-03 18:38       ` Jordan Justen
2013-04-12 15:33         ` Markus Armbruster
2013-04-08  6:06     ` Xiao Guangrong
2013-04-08  8:18       ` Jordan Justen
2013-04-08  8:43         ` Gleb Natapov [this message]
2013-04-08  9:19           ` 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=20130408084311.GE17919@redhat.com \
    --to=gleb@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=jljusten@gmail.com \
    --cc=jordan.l.justen@intel.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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.