Re: [PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-17 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 17/01/20 14:40, Michael S. Tsirkin wrote: > > We don't really need v2 just to add a field. Compatibility is maintained > > using feature bits. Adding that is a subject for another patch. > > But I'm not sure I understand why does remote need to know

Re: [PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-17 Thread Paolo Bonzini
On 17/01/20 15:25, Michael S. Tsirkin wrote: > On Fri, Jan 17, 2020 at 02:58:47PM +0100, Paolo Bonzini wrote: >> On 17/01/20 14:40, Michael S. Tsirkin wrote: >>> We don't really need v2 just to add a field. Compatibility is maintained >>> using feature bits. Adding that is a subject for another pat

Re: [PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-17 Thread Michael S. Tsirkin
On Fri, Jan 17, 2020 at 02:58:47PM +0100, Paolo Bonzini wrote: > On 17/01/20 14:40, Michael S. Tsirkin wrote: > > We don't really need v2 just to add a field. Compatibility is maintained > > using feature bits. Adding that is a subject for another patch. > > But I'm not sure I understand why does r

Re: [PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-17 Thread Paolo Bonzini
On 17/01/20 14:40, Michael S. Tsirkin wrote: > We don't really need v2 just to add a field. Compatibility is maintained > using feature bits. Adding that is a subject for another patch. > But I'm not sure I understand why does remote need to know about alignment. > This patch seems to handle it loc

Re: [PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-17 Thread Michael S. Tsirkin
On Fri, Jan 17, 2020 at 01:52:44PM +0100, Paolo Bonzini wrote: > On 16/01/20 21:24, Dr. David Alan Gilbert (git) wrote: > > +if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) { > > +/* Round the section to it's page size */ > > +/* First align the start down to a p

Re: [PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-17 Thread Paolo Bonzini
On 16/01/20 21:24, Dr. David Alan Gilbert (git) wrote: > +if (dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER) { > +/* Round the section to it's page size */ > +/* First align the start down to a page boundary */ > +size_t mrs_page = qemu_ram_pagesize(mrs_rb);

[PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I added hugepage alignment code in c1ece84e7c9 to deal with vhost-user + postcopy which needs aligned pages when using userfault. However, on x86 the lower 2MB of address space tends to be shotgun'd with small fragments around the 512-640k range - e.g. video RAM, an