aboutsummaryrefslogtreecommitdiff
path: root/hw/remote/mpqemu-link.c
diff options
context:
space:
mode:
authorElena Ufimtseva <elena.ufimtseva@oracle.com>2021-01-29 11:46:16 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2021-02-10 09:23:28 +0000
commit11ab872588335918ddc83c73957077bb85a38a6d (patch)
treecded7359c1b1b5493739e1485ef91d9c49de0ebe /hw/remote/mpqemu-link.c
parente7b2c9eaa258f9ba647fa81aaab344ddd82d0ecc (diff)
downloadqemu-11ab872588335918ddc83c73957077bb85a38a6d.zip
qemu-11ab872588335918ddc83c73957077bb85a38a6d.tar.gz
qemu-11ab872588335918ddc83c73957077bb85a38a6d.tar.bz2
multi-process: Forward PCI config space acceses to the remote process
The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Signed-off-by: John G Johnson <john.g.johnson@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: d3c94f4618813234655356c60e6f0d0362ff42d6.1611938319.git.jag.raman@oracle.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/remote/mpqemu-link.c')
-rw-r--r--hw/remote/mpqemu-link.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/hw/remote/mpqemu-link.c b/hw/remote/mpqemu-link.c
index f5e9e01..b45f325 100644
--- a/hw/remote/mpqemu-link.c
+++ b/hw/remote/mpqemu-link.c
@@ -207,7 +207,7 @@ uint64_t mpqemu_msg_send_and_await_reply(MPQemuMsg *msg, PCIProxyDev *pdev,
return ret;
}
- if (!mpqemu_msg_valid(&msg_reply)) {
+ if (!mpqemu_msg_valid(&msg_reply) || msg_reply.cmd != MPQEMU_CMD_RET) {
error_setg(errp, "ERROR: Invalid reply received for command %d",
msg->cmd);
return ret;
@@ -242,6 +242,12 @@ bool mpqemu_msg_valid(MPQemuMsg *msg)
return false;
}
break;
+ case MPQEMU_CMD_PCI_CFGWRITE:
+ case MPQEMU_CMD_PCI_CFGREAD:
+ if (msg->size != sizeof(PciConfDataMsg)) {
+ return false;
+ }
+ break;
default:
break;
}