From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: linux-kernel@vger.kernel.org, slp@redhat.com, bhe@redhat.com,
somlo@cmu.edu, xiaolong.ye@intel.com
Subject: Re: [PATCH v11 2/4] fw_cfg: do DMA read operation
Date: Fri, 2 Feb 2018 04:47:54 +0200 [thread overview]
Message-ID: <20180202044433-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20180201130300.9962-3-marcandre.lureau@redhat.com>
On Thu, Feb 01, 2018 at 02:02:58PM +0100, Marc-André Lureau wrote:
> Modify fw_cfg_read_blob() to use DMA if the device supports it.
> Return errors, because the operation may fail.
>
> The DMA operation is expected to run synchronously with today qemu,
> but the specification states that it may become async, so we run
> "control" field check in a loop for eventual changes.
>
> We may want to switch all the *buf addresses to use only kmalloc'ed
> buffers (instead of using stack/image addresses with dma=false).
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This seems to cause no end of pain. I see no reason to keep
pushing this patch until it's all much more stable.
Something like the below would disable it temporarily.
commit 05054fca8b96900f6b54ab0056458f92b616d74c
Author: Michael S. Tsirkin <mst@redhat.com>
Date: Fri Feb 2 04:29:59 2018 +0200
fixup! fw_cfg: do DMA read operation
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c
index d86ad92..33e0256 100644
--- a/drivers/firmware/qemu_fw_cfg.c
+++ b/drivers/firmware/qemu_fw_cfg.c
@@ -41,6 +41,9 @@ MODULE_AUTHOR("Gabriel L. Somlo <somlo@cmu.edu>");
MODULE_DESCRIPTION("QEMU fw_cfg sysfs support");
MODULE_LICENSE("GPL");
+/* enable DMA for all accesses */
+#define FW_CFG_DMA_READ_ENABLE 0
+
/* selector key values for "well-known" fw_cfg entries */
#define FW_CFG_SIGNATURE 0x00
#define FW_CFG_ID 0x01
@@ -171,7 +174,7 @@ static ssize_t fw_cfg_read_blob(struct device *dev, u16 key,
}
mutex_lock(&fw_cfg_dev_lock);
- if (dma && fw_cfg_dma_enabled()) {
+ if (FW_CFG_DMA_READ_ENABLE && dma && fw_cfg_dma_enabled()) {
if (pos == 0) {
ret = fw_cfg_dma_transfer(dev, buf, count, key << 16
| FW_CFG_DMA_CTL_SELECT
next prev parent reply other threads:[~2018-02-02 2:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 13:02 [PATCH v11 0/4] fw_cfg: add DMA operations & etc/vmcoreinfo support Marc-André Lureau
2018-02-01 13:02 ` [PATCH v11 1/4] fw_cfg: add DMA register Marc-André Lureau
2018-02-01 13:02 ` [PATCH v11 2/4] fw_cfg: do DMA read operation Marc-André Lureau
2018-02-02 2:47 ` Michael S. Tsirkin [this message]
2018-02-01 13:02 ` [PATCH v11 3/4] crash: export paddr_vmcoreinfo_note() Marc-André Lureau
2018-02-01 13:03 ` [PATCH v11 4/4] fw_cfg: write vmcoreinfo details Marc-André Lureau
2018-02-02 2:44 ` Michael S. Tsirkin
2018-02-02 9:43 ` Marc-Andre Lureau
2018-02-02 2:50 ` [PATCH v11 0/4] fw_cfg: add DMA operations & etc/vmcoreinfo support Michael S. Tsirkin
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=20180202044433-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=bhe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcandre.lureau@redhat.com \
--cc=slp@redhat.com \
--cc=somlo@cmu.edu \
--cc=xiaolong.ye@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome