All of lore.kernel.org
 help / color / mirror / Atom feed
From: geoff@hostfission.com
To: qemu-devel@nongnu.org
Subject: Re: RFC: New device for zero-copy VM memory access
Date: Wed, 30 Oct 2019 19:10:13 +1100	[thread overview]
Message-ID: <7d2b69593ebeff8238e5f642ca58661f@hostfission.com> (raw)
In-Reply-To: <028c23b219913d1f734d95a05d2b5809@hostfission.com>

The windows driver source is now available also.

https://github.com/gnif/Porthole-Guest-Driver

I have also opted to rename the device to 'porthole', hopefully this 
name is
acceptable.

On 2019-10-30 09:53, geoff@hostfission.com wrote:
> Just to follow this up, here is a sample client application for this 
> device
> 
> https://gist.github.com/gnif/77e7fb54604b42a1a98ecb8bf3d2cf46
> 
> -Geoff
> 
> On 2019-10-30 01:31, geoff@hostfission.com wrote:
>> Hi All,
>> 
>> Over the past week, I have been working to come up with a solution to 
>> the
>> memory transfer performance issues that hinder the Looking Glass 
>> Project.
>> 
>> Currently Looking Glass works by using the IVSHMEM shared memory 
>> device which
>> is fed by an application that captures the guest's video output. While 
>> this
>> works it is sub-optimal because we first have to perform a CPU copy of 
>> the
>> captured frame into shared RAM, and then back out again for display. 
>> Because
>> the destination buffers are allocated by closed proprietary code 
>> (DirectX, or
>> NVidia NvFBC) there is no way to have the frame placed directly into 
>> the
>> IVSHMEM shared ram.
>> 
>> This new device, currently named `introspection` (which needs a more 
>> suitable
>> name, porthole perhaps?), provides a means of translating guest 
>> physical
>> addresses to host virtual addresses, and finally to the host offsets 
>> in RAM for
>> file-backed memory guests. It does this by means of a simple protocol 
>> over a
>> unix socket (chardev) which is supplied the appropriate fd for the 
>> VM's system
>> RAM. The guest (in this case, Windows), when presented with the 
>> address of a
>> userspace buffer and size, will mlock the appropriate pages into RAM 
>> and pass
>> guest physical addresses to the virtual device.
>> 
>> This device and the windows driver have been designed in such a way 
>> that it's a
>> utility device for any project and/or application that could make use 
>> of it.
>> The PCI subsystem vendor and device ID are used to provide a means of 
>> device
>> identification in cases where multiple devices may be in use for 
>> differing
>> applications. This also allows one common driver to be used for any 
>> other
>> projects wishing to build on this device.
>> 
>> My ultimate goal is to get this to a state where it could be accepted 
>> upstream
>> into Qemu at which point Looking Glass would be modified to use it 
>> instead of
>> the IVSHMEM device.
>> 
>> My git repository with the new device can be found at:
>> https://github.com/gnif/qemu
>> 
>> The new device is:
>> https://github.com/gnif/qemu/blob/master/hw/misc/introspection.c
>> 
>> Looking Glass:
>> https://looking-glass.hostfission.com/
>> 
>> The windows driver, while working, needs some cleanup before the 
>> source is
>> published. I intend to maintain both this device and the windows 
>> driver
>> including producing a signed Windows 10 driver if Redhat are unwilling 
>> or
>> unable.
>> 
>> Kind Regards,
>> Geoffrey McRae
>> 
>> HostFission
>> https://hostfission.com


  reply	other threads:[~2019-10-30  8:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 14:31 RFC: New device for zero-copy VM memory access geoff
2019-10-29 22:53 ` geoff
2019-10-30  8:10   ` geoff [this message]
2019-10-30 18:52 ` Dr. David Alan Gilbert
2019-10-31  2:55   ` geoff
2019-10-31 11:52     ` geoff
2019-10-31 12:36     ` Peter Maydell
2019-10-31 13:24     ` Dr. David Alan Gilbert
2019-10-31 14:18       ` geoff
2019-10-31 14:52         ` Peter Maydell
2019-10-31 15:21           ` geoff
2019-10-31 15:52             ` Dr. David Alan Gilbert
2019-11-03 10:10               ` geoff
2019-11-03 11:03                 ` geoff
2019-11-04 11:55                   ` Dr. David Alan Gilbert
2019-11-04 12:05                     ` geoff
2019-11-04 16:35                       ` Dr. David Alan Gilbert
2019-11-05 10:05                       ` Marc-André Lureau
2019-11-26 18:25                         ` Dr. David Alan Gilbert
2019-11-04 10:26 ` Gerd Hoffmann
2019-11-04 10:31   ` geoff
2019-11-05  9:38     ` Gerd Hoffmann

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=7d2b69593ebeff8238e5f642ca58661f@hostfission.com \
    --to=geoff@hostfission.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.