Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-07-07 Thread Paolo Bonzini
On 09/01/20 16:40, Vitaly Kuznetsov wrote: > Do we want a new memory_region_init for that or just to be able to add > a flag? > I think a flag API is preferable since this can apply to any kind of region. But can go either way, Paolo's the maintainer there. >>> (Copying Paolo

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Roman Kagan
On Thu, Jan 09, 2020 at 04:27:45PM +, Dr. David Alan Gilbert wrote: > * Roman Kagan (rka...@virtuozzo.com) wrote: > > On Thu, Jan 09, 2020 at 01:28:21PM +, Dr. David Alan Gilbert wrote: > > > * Roman Kagan (rka...@virtuozzo.com) wrote: > > > > On Thu, Jan 09, 2020 at 02:00:00PM +0100, Vital

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Roman Kagan (rka...@virtuozzo.com) wrote: > On Thu, Jan 09, 2020 at 01:28:21PM +, Dr. David Alan Gilbert wrote: > > * Roman Kagan (rka...@virtuozzo.com) wrote: > > > On Thu, Jan 09, 2020 at 02:00:00PM +0100, Vitaly Kuznetsov wrote: > > > > "Dr. David Alan Gilbert" writes: > > > > > > > > >

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Roman Kagan
On Thu, Jan 09, 2020 at 01:28:21PM +, Dr. David Alan Gilbert wrote: > * Roman Kagan (rka...@virtuozzo.com) wrote: > > On Thu, Jan 09, 2020 at 02:00:00PM +0100, Vitaly Kuznetsov wrote: > > > "Dr. David Alan Gilbert" writes: > > > > > > > And I think vhost-user will fail if you have too many se

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 09/01/20 14:22, Dr. David Alan Gilbert wrote: >> * Michael S. Tsirkin (m...@redhat.com) wrote: >>> On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: Do we want a new memory_region_init for that or just to be able to add a flag? >>> I

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 09/01/20 14:22, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > >> On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: > >>> Do we want a new memory_region_init for that or just to be able to add

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Paolo Bonzini
On 09/01/20 14:22, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: >> On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: >>> Do we want a new memory_region_init for that or just to be able to add >>> a flag? >>> >> I think a flag API is preferable

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Thu, Jan 09, 2020 at 08:28:00AM -0500, Michael S. Tsirkin wrote: > > On Thu, Jan 09, 2020 at 01:22:42PM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. D

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Michael S. Tsirkin
On Thu, Jan 09, 2020 at 08:28:00AM -0500, Michael S. Tsirkin wrote: > On Thu, Jan 09, 2020 at 01:22:42PM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: > > > > * Michael S. Tsirkin

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Roman Kagan (rka...@virtuozzo.com) wrote: > On Thu, Jan 09, 2020 at 02:00:00PM +0100, Vitaly Kuznetsov wrote: > > "Dr. David Alan Gilbert" writes: > > > > > And I think vhost-user will fail if you have too many sections - and > > > the 16 sections from synic I think will blow the slots availabl

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Michael S. Tsirkin
On Thu, Jan 09, 2020 at 01:22:42PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Thu, Jan 09, 2020 at 12:08:20PM +, D

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Roman Kagan
On Thu, Jan 09, 2020 at 02:00:00PM +0100, Vitaly Kuznetsov wrote: > "Dr. David Alan Gilbert" writes: > > > And I think vhost-user will fail if you have too many sections - and > > the 16 sections from synic I think will blow the slots available. > > > > SynIC is percpu, it will allocate two 4k p

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Thu, Jan 09, 2020 at 12:08:20PM +, Dr. David Alan Gilbert wrote: > > > > * Michael S. Tsirkin (m...@redhat.com) wrot

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Roman Kagan (rka...@virtuozzo.com) wrote: > On Wed, Jan 08, 2020 at 01:53:53PM +, Dr. David Alan Gilbert (git) wrote: > > Mark the synic pages as ram_device so that they won't be visible > > to vhost. > > Unless I'm misreading the code this also makes them invisible to > migration. > > I ne

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Roman Kagan
On Wed, Jan 08, 2020 at 01:53:53PM +, Dr. David Alan Gilbert (git) wrote: > Mark the synic pages as ram_device so that they won't be visible > to vhost. Unless I'm misreading the code this also makes them invisible to migration. I need some more reading on the ram_device region behavior to be

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Michael S. Tsirkin
On Thu, Jan 09, 2020 at 12:22:37PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Thu, Jan 09, 2020 at 12:08:20PM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > On Wed, Jan 08, 2020 at 01:53:53PM +, D

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Vitaly Kuznetsov
"Dr. David Alan Gilbert" writes: > And I think vhost-user will fail if you have too many sections - and > the 16 sections from synic I think will blow the slots available. > SynIC is percpu, it will allocate two 4k pages for every vCPU the guest has so we're potentially looking at hundreds of su

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Thu, Jan 09, 2020 at 12:08:20PM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > On Wed, Jan 08, 2020 at 01:53:53PM +, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: "Dr. David Alan Gilbert"

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Michael S. Tsirkin
On Thu, Jan 09, 2020 at 12:08:20PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Wed, Jan 08, 2020 at 01:53:53PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Mark the synic pages as ram_device so tha

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Wed, Jan 08, 2020 at 01:53:53PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Mark the synic pages as ram_device so that they won't be visible > > to vhost. > > > > Signed-off-by: Dr. David Alan Gilbert >

Re: [PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-09 Thread Michael S. Tsirkin
On Wed, Jan 08, 2020 at 01:53:53PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Mark the synic pages as ram_device so that they won't be visible > to vhost. > > Signed-off-by: Dr. David Alan Gilbert I think I disagree with this one. * A RAM device represent

[PATCH 2/2] hyperv/synic: Allocate as ram_device

2020-01-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Mark the synic pages as ram_device so that they won't be visible to vhost. Signed-off-by: Dr. David Alan Gilbert --- hw/hyperv/hyperv.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c inde