summaryrefslogtreecommitdiffstats
path: root/include/hw/remote
diff options
context:
space:
mode:
authorJagannathan Raman2021-01-29 17:46:13 +0100
committerStefan Hajnoczi2021-02-10 10:23:28 +0100
commited5d001916dd46ceed6d8850e453bcd7b5db2acb (patch)
tree3ed54d07ea3667e4d86101d6aa33e5df510d2f7e /include/hw/remote
parentmulti-process: Associate fd of a PCIDevice with its object (diff)
downloadqemu-ed5d001916dd46ceed6d8850e453bcd7b5db2acb.tar.gz
qemu-ed5d001916dd46ceed6d8850e453bcd7b5db2acb.tar.xz
qemu-ed5d001916dd46ceed6d8850e453bcd7b5db2acb.zip
multi-process: setup memory manager for remote device
SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John G Johnson <john.g.johnson@oracle.com> Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 7d2d1831d812e85f681e7a8ab99e032cf4704689.1611938319.git.jag.raman@oracle.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/hw/remote')
-rw-r--r--include/hw/remote/memory.h19
-rw-r--r--include/hw/remote/mpqemu-link.h10
2 files changed, 29 insertions, 0 deletions
diff --git a/include/hw/remote/memory.h b/include/hw/remote/memory.h
new file mode 100644
index 0000000000..bc2e30945f
--- /dev/null
+++ b/include/hw/remote/memory.h
@@ -0,0 +1,19 @@
+/*
+ * Memory manager for remote device
+ *
+ * Copyright © 2018, 2021 Oracle and/or its affiliates.
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef REMOTE_MEMORY_H
+#define REMOTE_MEMORY_H
+
+#include "exec/hwaddr.h"
+#include "hw/remote/mpqemu-link.h"
+
+void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp);
+
+#endif
diff --git a/include/hw/remote/mpqemu-link.h b/include/hw/remote/mpqemu-link.h
index cac699cb42..6ee5bc5751 100644
--- a/include/hw/remote/mpqemu-link.h
+++ b/include/hw/remote/mpqemu-link.h
@@ -14,6 +14,7 @@
#include "qom/object.h"
#include "qemu/thread.h"
#include "io/channel.h"
+#include "exec/hwaddr.h"
#define REMOTE_MAX_FDS 8
@@ -30,9 +31,16 @@
*
*/
typedef enum {
+ MPQEMU_CMD_SYNC_SYSMEM,
MPQEMU_CMD_MAX,
} MPQemuCmd;
+typedef struct {
+ hwaddr gpas[REMOTE_MAX_FDS];
+ uint64_t sizes[REMOTE_MAX_FDS];
+ off_t offsets[REMOTE_MAX_FDS];
+} SyncSysmemMsg;
+
/**
* MPQemuMsg:
* @cmd: The remote command
@@ -43,12 +51,14 @@ typedef enum {
* MPQemuMsg Format of the message sent to the remote device from QEMU.
*
*/
+
typedef struct {
int cmd;
size_t size;
union {
uint64_t u64;
+ SyncSysmemMsg sync_sysmem;
} data;
int fds[REMOTE_MAX_FDS];