Re: [PATCH RFC] vhost: add ioctl to query nregions upper limit

2015-06-25 Thread Igor Mammedov
On Wed, 24 Jun 2015 17:08:56 +0200 "Michael S. Tsirkin" wrote: > On Wed, Jun 24, 2015 at 04:52:29PM +0200, Igor Mammedov wrote: > > On Wed, 24 Jun 2015 16:17:46 +0200 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Jun 24, 2015 at 04:07:27PM +0200, Igor Mammedov wrote: > > > > On Wed, 24 Jun

Re: [PATCH RFC] vhost: add ioctl to query nregions upper limit

2015-06-24 Thread Michael S. Tsirkin
On Wed, Jun 24, 2015 at 04:52:29PM +0200, Igor Mammedov wrote: > On Wed, 24 Jun 2015 16:17:46 +0200 > "Michael S. Tsirkin" wrote: > > > On Wed, Jun 24, 2015 at 04:07:27PM +0200, Igor Mammedov wrote: > > > On Wed, 24 Jun 2015 15:49:27 +0200 > > > "Michael S. Tsirkin" wrote: > > > > > > > Userspa

Re: [PATCH RFC] vhost: add ioctl to query nregions upper limit

2015-06-24 Thread Igor Mammedov
On Wed, 24 Jun 2015 16:17:46 +0200 "Michael S. Tsirkin" wrote: > On Wed, Jun 24, 2015 at 04:07:27PM +0200, Igor Mammedov wrote: > > On Wed, 24 Jun 2015 15:49:27 +0200 > > "Michael S. Tsirkin" wrote: > > > > > Userspace currently simply tries to give vhost as many regions > > > as it happens to

Re: [PATCH RFC] vhost: add ioctl to query nregions upper limit

2015-06-24 Thread Michael S. Tsirkin
On Wed, Jun 24, 2015 at 04:07:27PM +0200, Igor Mammedov wrote: > On Wed, 24 Jun 2015 15:49:27 +0200 > "Michael S. Tsirkin" wrote: > > > Userspace currently simply tries to give vhost as many regions > > as it happens to have, but you only have the mem table > > when you have initialized a large p

Re: [PATCH RFC] vhost: add ioctl to query nregions upper limit

2015-06-24 Thread Igor Mammedov
On Wed, 24 Jun 2015 15:49:27 +0200 "Michael S. Tsirkin" wrote: > Userspace currently simply tries to give vhost as many regions > as it happens to have, but you only have the mem table > when you have initialized a large part of VM, so graceful > failure is very hard to support. > > The result i

[PATCH RFC] vhost: add ioctl to query nregions upper limit

2015-06-24 Thread Michael S. Tsirkin
Userspace currently simply tries to give vhost as many regions as it happens to have, but you only have the mem table when you have initialized a large part of VM, so graceful failure is very hard to support. The result is that userspace tends to fail catastrophically. Instead, add a new ioctl so