qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, gleb@redhat.com,
	Jes Sorensen <Jes.Sorensen@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	qemu-devel@nongnu.org, armbru@redhat.com,
	Christoph Hellwig <hch@infradead.org>,
	Alex Williamson <alex.williamson@redhat.com>,
	Amit Shah <amit.shah@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] vhost: roll our own cpu map variant
Date: Wed, 30 Mar 2011 18:09:53 +0200	[thread overview]
Message-ID: <20110330160953.GB26439@redhat.com> (raw)
In-Reply-To: <AANLkTi=0o7HsKmLEOENdRcEO28nKFNHfm8JVQpz4QWNS@mail.gmail.com>

On Tue, Mar 29, 2011 at 11:53:54AM +0100, Stefan Hajnoczi wrote:
> On Mon, Mar 28, 2011 at 10:14 PM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > vhost used cpu_physical_memory_map to get the
> > virtual address for the ring, however,
> > this will exit on an illegal RAM address.
> > Since the addresses are guest-controlled, we
> > shouldn't do that.
> >
> > Switch to our own variant that uses the vhost
> > tables and returns an error instead of exiting.
> 
> We should make all of QEMU more robust instead of just vhost.  Perhaps
> introduce cpu_physical_memory_map_nofail(...) that aborts like the
> current cpu_physical_memory_map() implementation and then make non-hw/
> users call that one.  hw/ users should check for failure.
> 
> Stefan

Yea, well ... at least vhost-net wants to also check
it is given a ram address, not some other physical address.
We could generally replace the memory management in vhost-net
by some other logic, when that's done this one can
go away as well.

-- 
MST

  reply	other threads:[~2011-03-30 16:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-28 21:13 [Qemu-devel] [PATCH 0/3] virtio and vhost error handling Michael S. Tsirkin
2011-03-28 21:14 ` [Qemu-devel] [PATCH 1/3] virtio: don't exit on guest errors Michael S. Tsirkin
2011-03-29 10:33   ` Amit Shah
2011-03-28 21:14 ` [Qemu-devel] [PATCH 2/3] vhost: don't exit on memory errors Michael S. Tsirkin
2011-03-28 21:14 ` [Qemu-devel] [PATCH 3/3] vhost: roll our own cpu map variant Michael S. Tsirkin
2011-03-29 10:53   ` Stefan Hajnoczi
2011-03-30 16:09     ` Michael S. Tsirkin [this message]
2011-03-30 16:26       ` Stefan Hajnoczi
2011-03-30 16:59         ` Michael S. Tsirkin
2011-03-30 17:59           ` 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=20110330160953.GB26439@redhat.com \
    --to=mst@redhat.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=gleb@redhat.com \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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).