On 10/23/20 6:59 PM, Philippe Mathieu-Daudé wrote:
On 10/15/20 8:05 PM, Jagannathan Raman wrote:
From: Elena Ufimtseva <elena.ufimts...@oracle.com>

The Proxy Object sends the PCI config space accesses as messages
to the remote process over the communication channel
...

+static void process_config_read(QIOChannel *ioc, PCIDevice *dev,
+                                MPQemuMsg *msg)
+{
+    ConfDataMsg *conf = (ConfDataMsg *)&msg->data.conf_data;
+    MPQemuMsg ret = { 0 };
+    Error *local_err = NULL;
+
+    if ((conf->addr + sizeof(conf->val)) > pci_config_size(dev)) {
+        error_report("Bad address received when reading PCI config, pid %d",
+                     getpid());
+        ret.data.u64 = UINT64_MAX;
+    } else {
+        ret.data.u64 = pci_default_read_config(dev, conf->addr, conf->l);

Isn't it endianess issue here? It might makes sense to
declare ConfDataMsg and PCI_CONFIG_READ/PCI_CONFIG_WRITE
packets in little endian.

Bah Stefan told me to look at the specs which are included in
the latest patch (docs/multi-process.rst). As I process patches
of this series in order I haven't looked at it yet. Still,
why not put it first in your series?

Regards,

Phil.


Reply via email to