Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-10 Thread Gleb Natapov
On Sat, Oct 09, 2010 at 08:42:00PM +0200, Avi Kivity wrote: > On 10/07/2010 07:21 PM, Gleb Natapov wrote: > >On Thu, Oct 07, 2010 at 02:29:07PM +0200, Avi Kivity wrote: > >> On 10/04/2010 05:56 PM, Gleb Natapov wrote: > >> >When page is swapped in it is mapped into guest memory only after guest

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-09 Thread Avi Kivity
On 10/07/2010 07:21 PM, Gleb Natapov wrote: On Thu, Oct 07, 2010 at 02:29:07PM +0200, Avi Kivity wrote: > On 10/04/2010 05:56 PM, Gleb Natapov wrote: > >When page is swapped in it is mapped into guest memory only after guest > >tries to access it again and generate another fault. To save thi

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-08 Thread Marcelo Tosatti
On Thu, Oct 07, 2010 at 08:44:57PM +0200, Gleb Natapov wrote: > On Wed, Oct 06, 2010 at 11:20:50AM -0300, Marcelo Tosatti wrote: > > On Wed, Oct 06, 2010 at 01:07:04PM +0200, Gleb Natapov wrote: > > > > Can't you set a bit in vcpu->requests instead, and handle it in "out:" > > > > at the end of vcp

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-07 Thread Gleb Natapov
On Wed, Oct 06, 2010 at 11:20:50AM -0300, Marcelo Tosatti wrote: > On Wed, Oct 06, 2010 at 01:07:04PM +0200, Gleb Natapov wrote: > > > Can't you set a bit in vcpu->requests instead, and handle it in "out:" > > > at the end of vcpu_enter_guest? > > > > > > To have a single entry point for pagefaul

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-07 Thread Gleb Natapov
On Thu, Oct 07, 2010 at 02:29:07PM +0200, Avi Kivity wrote: > On 10/04/2010 05:56 PM, Gleb Natapov wrote: > >When page is swapped in it is mapped into guest memory only after guest > >tries to access it again and generate another fault. To save this fault > >we can map it immediately since we know

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-07 Thread Avi Kivity
On 10/04/2010 05:56 PM, Gleb Natapov wrote: When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. Do it only when tdp is enabl

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-06 Thread Marcelo Tosatti
On Wed, Oct 06, 2010 at 01:07:04PM +0200, Gleb Natapov wrote: > > Can't you set a bit in vcpu->requests instead, and handle it in "out:" > > at the end of vcpu_enter_guest? > > > > To have a single entry point for pagefaults, after vmexit handling. > Jumping to "out:" will skip vmexit handling an

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-06 Thread Gleb Natapov
On Tue, Oct 05, 2010 at 12:54:09PM -0300, Marcelo Tosatti wrote: > On Mon, Oct 04, 2010 at 05:56:25PM +0200, Gleb Natapov wrote: > > When page is swapped in it is mapped into guest memory only after guest > > tries to access it again and generate another fault. To save this fault > > we can map it

Re: [PATCH v6 03/12] Retry fault before vmentry

2010-10-05 Thread Marcelo Tosatti
On Mon, Oct 04, 2010 at 05:56:25PM +0200, Gleb Natapov wrote: > When page is swapped in it is mapped into guest memory only after guest > tries to access it again and generate another fault. To save this fault > we can map it immediately since we know that guest is going to access > the page. Do it

[PATCH v6 03/12] Retry fault before vmentry

2010-10-04 Thread Gleb Natapov
When page is swapped in it is mapped into guest memory only after guest tries to access it again and generate another fault. To save this fault we can map it immediately since we know that guest is going to access the page. Do it only when tdp is enabled for now. Shadow paging case is more complica