vhost: Only align sections for vhost-user
commit76525114736e8f669766e69b715fa59ce8648aae
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 16 Jan 2020 20:24:14 +0000 (16 20:24 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 22 Jan 2020 05:50:03 +0000 (22 00:50 -0500)
tree41b24153bb9b882e39e79ccfa04c44d4ae39b1e3
parentff4776147e960b128ee68f94c728659f662f4378
vhost: Only align sections for vhost-user

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, and
with HyperV synic pages tend to sit around there - again splitting
it up.  The alignment code complains with a 'Section rounded to ...'
error and gives up.

Since vhost-user already filters out devices without an fd
(see vhost-user.c vhost_user_mem_section_filter) it shouldn't be
affected by those overlaps.

Turn the alignment off on vhost-kernel so that it doesn't try
and align, and thus won't hit the rounding issues.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20200116202414.157959-3-dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
hw/virtio/vhost.c