On Wed, 6 Sep 2017 14:49:52 +0200 Halil Pasic <pa...@linux.vnet.ibm.com> wrote:
> On 09/06/2017 02:42 PM, Cornelia Huck wrote: > > On Tue, 5 Sep 2017 13:16:43 +0200 > > Halil Pasic <pa...@linux.vnet.ibm.com> wrote: > >> @@ -488,7 +446,8 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) > >> } else { > >> virtio_bus_get_vdev_config(&dev->bus, vdev->config); > >> /* XXX config space endianness */ > > > > Unrelated: That should be fine, I guess? > > > >> - cpu_physical_memory_write(ccw.cda, vdev->config, len); > >> + /* TODO we may have made -EINVAL out of -EFAULT */ > > > > Eek. > > > > Actually I wanted to send a patch which gets rid of the -EFAULT case > in sch_handle_start_func_virtual. > > IMHO a program check is more appropriate here. We did the EFAULT if > cpu_physical_memory_map failed, but we don't have that any more. OK, such a patch would make this easier to figure out.