aboutsummaryrefslogtreecommitdiffstats
path: root/hw/goldfish_pipe.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix snapshot crashDavid 'Digit' Turner2011-11-081-15/+217
| | | | | | | | | | | | | | | - Add snapshot load/save support to QEMU Pipes This adds the ability to save and load QEMU Pipe connections with snapshots. Note that by default, all loaded pipe client connections are force-fully closed on load. We don't have a good way to save the state of network connections to persistent storage. Properly implements snapshot save / load for qemu pipe clients. Change-Id: Ie5767f8ce40c8341b958cc5844e724dd4fc1ed2b
* Use different macro for KVMVladimir Chtchetkine2011-09-271-3/+3
| | | | Change-Id: I62a2d54562ac043a5513585a2e86aa01038fdc29
* Fix QEMU pipe on KVMVladimir Chtchetkine2011-09-271-2/+17
| | | | | | | | | The issue was that CPU registers (CR3 in particular) in QEMU were out of sync with KVM at the time when virtual address to physical address translation was performed. This caused translation failure, and the subsequent crash. The fix was to explicitly sync QEMU registers with KVM registers just before calling VA->PA translation. Change-Id: I1ff4ed2cfddd77e6889bb645f08db442f119049a
* Fix qemu pipe's 'poll' callbacksVladimir Chtchetkine2011-08-251-6/+6
| | | | | | | | | Throughout emulator's code pipe's 'poll' callback was returning PIPE_WAKE_XXX, instead of PIPE_POLL_XXX flags. This created whole sort of issues with the qemu pipe service <-> client communications. This is also a fix for http://b/issue?id=5196348 Change-Id: I92202cf4ef4554559eb022c4410ee93923edec1b
* Disable trace.Vladimir Chtchetkine2011-08-121-1/+1
| | | | Change-Id: I7130b7f82dec493fb893acf2527755398104cde3
* qemu-timer.c: rename qemu_timer_new_scale()David 'Digit' Turner2011-06-011-1/+1
| | | | | | | | | | | Get rid of qemu_timer_new() implementation, and update all callers to use qemu_timer_new_ms() or qemu_timer_new_ns() instead. Rename qemu_new_timer_scale() to qemu_new_timer() to follow upstream conventions. Change-Id: Id2c04f8597ec5026e02f87b3e2c5507920eb688e
* New goldfish_pipe virtual device.David 'Digit' Turner2011-04-281-531/+857
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new virtual hardware device named "goldfish_pipe" used to implement a very fast communication channel between the guest system and the emulator. IMPORTANT: This depends on a special kernel driver, see: https://review.source.android.com/#change,22496 Usage from the guest is simply the following: fd = open("/dev/qemu_pipe", O_RDWR); const char* pipename = "pipe:<name>"; ret = write(fd, pipename, strlen(pipename)+1); if (ret < 0) { /* could not connect to service named <name> */ } /* now you can read()/write()/close() as a normal * file descriptor to exchange data with the service. */ In addition, this implements the following pipe services in the emulator: tcp:<port> tcp:<hostname>:<port> unix:<path> opengles The 'tcp:' and 'unix:' services simply redirect to a TCP or Unix socket on the host with minimal The 'opengles' service simply connects to tcp:locahost:22468 for now. We may change this to be more configurable in the future, but that's the port number used by the current experimental OpenGL ES hardware emulation host libraries / programs. Benchmarking with a simple ping-pong program shows that the guest <-> emulator can achieve a roundtrip bandwidth of 192 MB/s (on a 2.7 Ghz Xeon PC). Using the tcp: service to talk to a ping-pong server listening on localhost reaches 102 MB/s on the same machine, using a Unix socket reaches 140 MB/s. By contrast, using standard sockets in the guest reaches only 3.8 MB/s on the same machine (and requires special privileges from the application anyway).
* hw/goldfish_pipe.c: New support code for QEMUD fast-pipes.David 'Digit' Turner2011-04-111-0/+740
Change-Id: I338334d53fa9bc52c87e9da18341d0cb94fd4269