From: Paolo Bonzini <pbonzini@redhat.com>
To: Catalin Vasile <catalinvasile92@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] physical memory address in guest (from his point of view)
Date: Fri, 24 Apr 2015 12:52:59 +0200 [thread overview]
Message-ID: <553A208B.7090505@redhat.com> (raw)
In-Reply-To: <CAOMf8tqkyKbBevMDn8AwsyaaY8JtFojsVD7KjagXtZ7PU18RyQ@mail.gmail.com>
On 24/04/2015 12:22, Catalin Vasile wrote:
> > > Does a physical memory address in a guest points to the same memory as qemu?
> > > For example: if I have a physical pointer 0x34 in the guest, does it
> > > point to the same location that qemu points with 0x34 address?
> >
> > No. QEMU converts guest pointers (which are just uint64_t) to host
> > pointers using address_space_map/address_space_unmap.
>
> That being said. Does a message that passes from guest to a backend
> need to pass through qemu everytime?
> I'm trying to understand how virtio virtqueues work. Namely I'm trying
> to pass as data itself a pointer in which the backend will write,
> namely use copy_to_user() if the backend is a kernel module.
vhost provides the infrastructure to do the same thing as
address_space_map/unmap.
Passing pointers inside a data buffer would be very weird for virtio
devices. The way you do it typically, is that you pass a one descriptor
corresponding to a request or response header, and one or more
descriptors for the data buffers.
Paolo
next prev parent reply other threads:[~2015-04-24 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 8:46 [Qemu-devel] physical memory address in guest (from his point of view) Catalin Vasile
2015-04-24 9:05 ` Paolo Bonzini
2015-04-24 10:22 ` Catalin Vasile
2015-04-24 10:52 ` Paolo Bonzini [this message]
2015-04-24 9:36 ` Peter Maydell
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=553A208B.7090505@redhat.com \
--to=pbonzini@redhat.com \
--cc=catalinvasile92@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.