> Alan, I'm not sure how many ports at a time people would want to use so > allocating one major device for this seems OK? We have very large minor number ranges now so one dynamic major should do you for a while yet. Probably forever but thats always asking for a "640K.." moment ;) > +static ssize_t fill_readbuf(struct virtio_console_port *port, > + char *out_buf, size_t out_count, bool to_user) > +{ Save yourself serious grief - and the FIXME pain noted below - unless you are shipping huge objects use a bounce buffer and kill off the to_user stuff - modern CPUs are so fast doing cache transfers it really isn't worth the suffering for small stuff. > + ret = copy_to_user(out_buf + out_offset, > + buf->buf + buf->offset, > + copy_size); > + /* FIXME: Deal with ret != 0 */ _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/virtualization