qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Avi Kivity <avi@redhat.com>
Cc: Cam Macdonell <cam@cs.ualberta.ca>,
	Paul Brook <paul@codesourcery.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device
Date: Wed, 10 Mar 2010 11:13:45 -0600	[thread overview]
Message-ID: <4B97D349.1030105@codemonkey.ws> (raw)
In-Reply-To: <4B97659E.2090603@redhat.com>

On 03/10/2010 03:25 AM, Avi Kivity wrote:
> On 03/09/2010 11:44 PM, Anthony Liguori wrote:
>>> Ah yes.  For cross tcg environments you can map the memory using 
>>> mmio callbacks instead of directly, and issue the appropriate 
>>> barriers there.
>>
>>
>> Not good enough unless you want to severely restrict the use of 
>> shared memory within the guest.
>>
>> For instance, it's going to be useful to assume that you atomic 
>> instructions remain atomic.  Crossing architecture boundaries here 
>> makes these assumptions invalid.  A barrier is not enough.
>
> You could make the mmio callbacks flow to the shared memory server 
> over the unix-domain socket, which would then serialize them.  Still 
> need to keep RMWs as single operations.  When the host supports it, 
> implement the operation locally (you can't render cmpxchg16b on i386, 
> for example).

But now you have a requirement that the shmem server runs in lock-step 
with the guest VCPU which has to happen for every single word of data 
transferred.

You're much better off using a bulk-data transfer API that relaxes 
coherency requirements.  IOW, shared memory doesn't make sense for TCG :-)

Regards,

Anthony Liguori

  reply	other threads:[~2010-03-10 17:14 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 23:52 [Qemu-devel] [PATCH] Support adding a file to qemu's ram allocation Cam Macdonell
2010-03-05 23:52 ` [Qemu-devel] [PATCH] Inter-VM shared memory PCI device Cam Macdonell
2010-03-07 22:53   ` Paul Brook
2010-03-08  1:45     ` Jamie Lokier
2010-03-08  9:48       ` Alexander Graf
2010-03-08  9:54         ` Jamie Lokier
2010-03-08 10:57           ` Alexander Graf
2010-03-09 21:41           ` Anthony Liguori
2010-03-08 13:04       ` Paul Brook
2010-03-09 19:00         ` Jamie Lokier
2010-03-08  9:52     ` Avi Kivity
2010-03-08 13:03       ` Paul Brook
2010-03-08 13:16         ` Avi Kivity
2010-03-09 20:11           ` Jamie Lokier
2010-03-09 21:44           ` Anthony Liguori
2010-03-10  9:25             ` Avi Kivity
2010-03-10 17:13               ` Anthony Liguori [this message]
2010-03-10 17:30                 ` Avi Kivity
2010-03-10 17:41                   ` Paul Brook
2010-03-11  6:33                     ` Avi Kivity
2010-03-11 12:21                       ` Paul Brook
2010-03-09 20:12         ` Jamie Lokier
2010-03-10  0:03           ` Paul Brook
2010-03-10  4:38             ` Cam Macdonell
2010-03-10  9:29               ` Avi Kivity
2010-03-10 11:13                 ` Paul Brook
2010-03-11  3:10             ` Jamie Lokier
2010-03-11  4:37               ` Nick Piggin
2010-03-11 14:38                 ` malc
2010-03-08  9:56   ` [Qemu-devel] " Avi Kivity
2010-03-08 17:57     ` Cam Macdonell
2010-03-09 10:29       ` Avi Kivity
     [not found]         ` <8286e4ee1003090724m1ef0b571g8b705a24e36e1753@mail.gmail.com>
2010-03-09 15:27           ` [Qemu-devel] " Cam Macdonell
2010-03-09 17:28             ` [Qemu-devel] " Avi Kivity
2010-03-09 17:34               ` Anthony Liguori
2010-03-09 18:34               ` Cam Macdonell
2010-03-10  9:21                 ` Avi Kivity
2010-03-10 16:36                   ` Cam Macdonell
2010-03-11  6:49                     ` Avi Kivity
2010-03-09 12:49       ` Arnd Bergmann
2010-03-09 13:03         ` Avi Kivity
2010-03-09 16:44           ` Cam Macdonell
2010-03-10 14:04             ` Arnd Bergmann
2010-03-11  6:50               ` Avi Kivity
2010-03-11 12:57                 ` Arnd Bergmann
2010-03-11 13:07                   ` Avi Kivity
2010-03-11 14:32                     ` Arnd Bergmann
2010-03-08  9:53 ` [Qemu-devel] Re: [PATCH] Support adding a file to qemu's ram allocation Avi Kivity

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=4B97D349.1030105@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=cam@cs.ualberta.ca \
    --cc=kvm@vger.kernel.org \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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).