On Wed, Sep 08, 2021 at 10:51:11AM +0100, Stefan Hajnoczi wrote:

> > +
> > +    buf = g_malloc0(size);
> > +    memcpy(buf, msg, sizeof(*msg));
> > +
> > +    pci_dma_read(pdev, msg->offset, buf + sizeof(*msg), msg->count);
> 
> The vfio-user spec doesn't go into errors but pci_dma_read() can return
> errors. Hmm...

It's certainly under-specified in the spec, but in terms of the library, we do
return EINVAL if we decide something invalid happened...

regards
john

Reply via email to