From: Baptiste Reynal <b.reynal@virtualopensystems.com>
To: qemu-devel@nongnu.org
Cc: b.reynal@virtualopensystems.com,
Eduardo Habkost <ehabkost@redhat.com>,
Claudio.Fontana@huawei.com, pbonzini@redhat.com,
Jani.Kokkonen@huawei.com, tech@virtualopensystems.com
Subject: [Qemu-devel] [RFC 0/4] QEMU shared-memory over network
Date: Thu, 24 Mar 2016 14:16:38 +0100 [thread overview]
Message-ID: <1458825402-9592-1-git-send-email-b.reynal@virtualopensystems.com> (raw)
This patch series is an extension to "[RFC v2 0/6] QEMU shared-memory backend",
and allows two instances of QEMU to share a memory over the network.
Instead of allocating the memory using hugetlbfs, the
memory is allocated as a simple ram pointer, and when
a slave connects a new mmio region is created in the
master main memory so that each access is trapped and
forwarded over the network.
The slave has direct access to its memory (no performance
loss) while master accesses (which are less frequent) go
over a network socket.
To test those patches modules and test application are
available on https://git.virtualopensystems.com/dev/qemu-het-tools.
- SDM Platform module on branch sdm_test_mod_v1
- Test application on branch sdm_test_app
- Slave files on branch demo_slaves_sdm
QEMU code is available here https://git.virtualopensystems.com/dev/qemu on branch network-extension-v1.
Run QEMU master instance:
./qemu-system-arm -nographic \
-kernel zImage \
-M virt -m 1G \
-initrd busybox.cpio \
-object multi-socket-backend,id=sock,listen,host="127.0.0.1",port="1234" \
-object memory-backend-network,id=mem,size=1G,shared-size=512M,socket=sock,master \
-object sdm-communication-socket,id=scomm,socket=sock \
-device sdm-platform,comm=scomm,master,num-slaves=2 \
-append "mem=512M memmap=512M$0x60000000" \
-numa node,memdev=mem -m 1G
Run QEMU slave instance:
./qemu-system-arm -nographic \
-M virt,slave \
-object multi-socket-backend,id=sock,host="127.0.0.1",port="1234" \
-object memory-backend-network,id=mem,size=512M,socket=sock \
-object sdm-signal-nboot,id=boot,nhm=mem \
-object sdm-communication-socket,id=scomm,socket=sock \
-device sdm-platform,comm=scomm,len-signals=1,signals[0]="boot" \
-incoming "shared:mem" \
-numa node,memdev=mem -m 512M
On the master, load the SDM module (insmod sdm_test_mod.ko) and trigger the boot
with the following command:
./sdm-test -b 0 1 zImage slave.dtb
zImage and slave.dtb are available on branch demo_slaves_sdm.
This patch serie depends on:
- [RFC v2 0/6] SDM Interface
- [RFC v2 1/1] backend: multi-client-socket
This work has been sponsored by Huawei Technologies Duesseldorf GmbH.
Baptiste Reynal (4):
backend: multi-client-socket
backend: shared memory over network backend
migration: extend shared migration type
hw/misc: sdm signal nboot
backends/Makefile.objs | 2 +-
backends/hostmem-network.c | 301 ++++++++++++++++++++++++++
backends/multi-socket.c | 420 +++++++++++++++++++++++++------------
hw/misc/Makefile.objs | 1 +
hw/misc/sdm-signal-nboot.c | 62 ++++++
include/hw/misc/sdm-signal-nboot.h | 28 +++
include/qemu/multi-socket.h | 57 ++++-
include/sysemu/hostmem-network.h | 79 +++++++
migration/shared.c | 20 +-
9 files changed, 823 insertions(+), 147 deletions(-)
create mode 100644 backends/hostmem-network.c
create mode 100644 hw/misc/sdm-signal-nboot.c
create mode 100644 include/hw/misc/sdm-signal-nboot.h
create mode 100644 include/sysemu/hostmem-network.h
--
2.7.4
next reply other threads:[~2016-03-24 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 13:16 Baptiste Reynal [this message]
2016-03-24 13:16 ` [Qemu-devel] [RFC 1/4] backend: multi-client-socket Baptiste Reynal
2016-03-24 13:16 ` [Qemu-devel] [RFC 2/4] backend: shared memory over network backend Baptiste Reynal
2016-03-24 13:16 ` [Qemu-devel] [RFC 3/4] migration: extend shared migration type Baptiste Reynal
2016-03-24 13:16 ` [Qemu-devel] [RFC 4/4] hw/misc: sdm signal nboot Baptiste Reynal
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=1458825402-9592-1-git-send-email-b.reynal@virtualopensystems.com \
--to=b.reynal@virtualopensystems.com \
--cc=Claudio.Fontana@huawei.com \
--cc=Jani.Kokkonen@huawei.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tech@virtualopensystems.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).