qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com,
	John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, stefanha@redhat.com
Subject: [Qemu-devel] [PATCH v2 0/2] AHCI: avoid mapping stale guest memory
Date: Fri, 13 Mar 2015 17:50:52 -0400	[thread overview]
Message-ID: <1426283454-15590-1-git-send-email-jsnow@redhat.com> (raw)

Currently, the AHCI device tries to re-map guest memory every time
the low or high address registers are written to, whether or not the
AHCI device is currently active. If the other register has stale
information in it, this may lead to runtime failures.

Reconfigure the AHCI device to ignore writes to these registers while
the device is active, and otherwise postpone the dma memory map until
the device becomes active.

If the mappings should for whatever reason fail, do not activate the
bits that tell the user the device has been started successfully.

v2:
 - ahci_map_[clb|fis]_address now returns true on success
 - PORT_CMD_LIST_ON and PORT_CMD_FIS_ON only turn on if the map succeeds
 - Fix compiler warning due to changing context.

John Snow (2):
  AHCI: Do not (re)map FB/CLB buffers while not running
  AHCI: Protect cmd register

 hw/ide/ahci.c | 76 +++++++++++++++++++++++++++++++++++++++++++++--------------
 hw/ide/ahci.h |  2 ++
 2 files changed, 60 insertions(+), 18 deletions(-)

-- 
1.9.3

             reply	other threads:[~2015-03-13 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 21:50 John Snow [this message]
2015-03-13 21:50 ` [Qemu-devel] [PATCH v2 1/2] AHCI: Do not (re)map FB/CLB buffers while not running John Snow
2015-03-13 21:50 ` [Qemu-devel] [PATCH v2 2/2] AHCI: Protect cmd register John Snow
2015-03-25 12:57 ` [Qemu-devel] [PATCH v2 0/2] AHCI: avoid mapping stale guest memory Stefan Hajnoczi

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=1426283454-15590-1-git-send-email-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).