From: Gleb Natapov <gleb@redhat.com>
To: "Richard W.M. Jones" <rjones@redhat.com>
Cc: qemu-devel@nongnu.org, agraf@suse.de
Subject: [Qemu-devel] Re: [PATCH 0/2 version 2] fw_cfg: Implement fast "DMA"-type operation for rapidly copying in kernel, initrd [etc] into the guest
Date: Mon, 19 Jul 2010 13:45:00 +0300 [thread overview]
Message-ID: <20100719104500.GS4689@redhat.com> (raw)
In-Reply-To: <20100719101504.GA5216@amd.home.annexia.org>
On Mon, Jul 19, 2010 at 11:15:04AM +0100, Richard W.M. Jones wrote:
>
> This is the second version of the patch.
>
> We don't use the word "blit" any more, instead this is replaced with
> "DMA", even though it's not quite like a DMA operation on physical
> hardware.
>
You ignored the whole discussion above. Calling things DMA will not make
them so. You haven't event implemented Alexander's suggestion to poll
for DMA completion which will at lease make the interface to the guest
palatable.
> The guest writes the physical address and size to two 32 bit fw_cfg
> variables. Then when the guest issues an ordinary read operation with
> the extra FW_CFG_DMA flag set, instead of returning a single byte,
> qemu "DMA"s the requested data into the guest memory.
>
> The guest shouldn't be able to request a dma_size larger than the
> amount of data in the entry. The patch checks this and adjusts
> dma_size.
>
> The guest might select a dma_addr which does not correspond to
> physical memory (or dma_addr + dma_size). Reading the code it seems
> to be that cpu_physical_memory_write catches this case and will
> abort() (so the guest is only harming itself). However I'd quite like
> an expert opinion on this ...
>
> Rich.
>
> --
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> virt-top is 'top' for virtual machines. Tiny program with many
> powerful monitoring features, net stats, disk stats, logging, etc.
> http://et.redhat.com/~rjones/virt-top
--
Gleb.
next prev parent reply other threads:[~2010-07-19 10:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-17 13:39 [Qemu-devel] [PATCH 0/2] fw_cfg: Implement fast "blit" operation for rapidly copying in kernel, initrd [etc] into the guest Richard W.M. Jones
2010-07-17 13:40 ` [Qemu-devel] [PATCH 1/2] Don't call fw_cfg e->callback if e->callback is NULL Richard W.M. Jones
2010-07-17 13:41 ` [Qemu-devel] [PATCH 2/2] fw_cfg: Add blit operation for copying kernel, initrd, Richard W.M. Jones
2010-07-18 20:47 ` Alexander Graf
2010-07-18 21:12 ` Richard W.M. Jones
2010-07-18 21:13 ` Alexander Graf
2010-07-18 23:59 ` Aurelien Jarno
2010-07-19 7:23 ` Richard W.M. Jones
2010-07-19 9:19 ` Aurelien Jarno
2010-07-19 10:15 ` [Qemu-devel] [PATCH 0/2 version 2] fw_cfg: Implement fast "DMA"-type operation for rapidly copying in kernel, initrd [etc] into the guest Richard W.M. Jones
2010-07-19 10:15 ` [Qemu-devel] [PATCH 1/2 version 2] Don't call fw_cfg e->callback if e->callback is NULL Richard W.M. Jones
2010-07-19 10:16 ` [Qemu-devel] [PATCH 2/2 version 2] fw_cfg: Allow guest to read kernel etc via fast, synchronous "DMA"-type operation Richard W.M. Jones
2010-07-19 10:45 ` Gleb Natapov [this message]
2010-07-19 10:49 ` [Qemu-devel] Re: [PATCH 0/2 version 2] fw_cfg: Implement fast "DMA"-type operation for rapidly copying in kernel, initrd [etc] into the guest Richard W.M. Jones
2010-07-19 10:56 ` Gleb Natapov
2010-07-19 11:30 ` [Qemu-devel] [PATCH 2/2 version 3] " Richard W.M. Jones
2010-07-20 14:41 ` [Qemu-devel] [PATCH 2/2 version 4] " Richard W.M. Jones
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=20100719104500.GS4689@redhat.com \
--to=gleb@redhat.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=rjones@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).