Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-30 Thread Tang Chen
Hi Gleb, On 06/30/2014 02:00 PM, Gleb Natapov wrote: On Mon, Jun 30, 2014 at 09:45:32AM +0800, Tang Chen wrote: On 06/21/2014 04:39 AM, Marcelo Tosatti wrote: On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote: IIRC your shadow page pinning patch series support flushing of ptes b

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-29 Thread Gleb Natapov
On Mon, Jun 30, 2014 at 09:45:32AM +0800, Tang Chen wrote: > On 06/21/2014 04:39 AM, Marcelo Tosatti wrote: > >On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote: > >>>IIRC your shadow page pinning patch series support flushing of ptes > >>>by mmu notifier by forcing MMU reload and, as

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-29 Thread Tang Chen
On 06/21/2014 04:39 AM, Marcelo Tosatti wrote: On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote: IIRC your shadow page pinning patch series support flushing of ptes by mmu notifier by forcing MMU reload and, as a result, faulting in of pinned pages during next entry. Your patch s

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-22 Thread Tang Chen
Hi Marcelo, Gleb, Sorry for the delayed reply and thanks for the advices. On 06/21/2014 04:39 AM, Marcelo Tosatti wrote: On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote: IIRC your shadow page pinning patch series support flushing of ptes by mmu notifier by forcing MMU reload an

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-22 Thread Gleb Natapov
On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote: > > > Same with the APIC access page. > > APIC page is always mapped into guest's APIC base address 0xfee0. > > The way it works is that when vCPU accesses page at 0xfee0 the access > > is translated to APIC access page physic

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-20 Thread Marcelo Tosatti
On Fri, Jun 20, 2014 at 05:31:46PM -0300, Marcelo Tosatti wrote: > > IIRC your shadow page pinning patch series support flushing of ptes > > by mmu notifier by forcing MMU reload and, as a result, faulting in of > > pinned pages during next entry. Your patch series does not pin pages > > by elevat

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-20 Thread Marcelo Tosatti
On Fri, Jun 20, 2014 at 05:26:22PM +0300, Gleb Natapov wrote: > On Fri, Jun 20, 2014 at 09:53:26AM -0300, Marcelo Tosatti wrote: > > On Fri, Jun 20, 2014 at 02:15:10PM +0300, Gleb Natapov wrote: > > > On Thu, Jun 19, 2014 at 04:00:24PM -0300, Marcelo Tosatti wrote: > > > > On Thu, Jun 19, 2014 at 1

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-20 Thread Gleb Natapov
On Fri, Jun 20, 2014 at 09:53:26AM -0300, Marcelo Tosatti wrote: > On Fri, Jun 20, 2014 at 02:15:10PM +0300, Gleb Natapov wrote: > > On Thu, Jun 19, 2014 at 04:00:24PM -0300, Marcelo Tosatti wrote: > > > On Thu, Jun 19, 2014 at 12:20:32PM +0300, Gleb Natapov wrote: > > > > CCing Marcelo, > > > > >

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-20 Thread Marcelo Tosatti
On Fri, Jun 20, 2014 at 02:15:10PM +0300, Gleb Natapov wrote: > On Thu, Jun 19, 2014 at 04:00:24PM -0300, Marcelo Tosatti wrote: > > On Thu, Jun 19, 2014 at 12:20:32PM +0300, Gleb Natapov wrote: > > > CCing Marcelo, > > > > > > On Wed, Jun 18, 2014 at 02:50:44PM +0800, Tang Chen wrote: > > > > Hi

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-20 Thread Gleb Natapov
On Thu, Jun 19, 2014 at 04:00:24PM -0300, Marcelo Tosatti wrote: > On Thu, Jun 19, 2014 at 12:20:32PM +0300, Gleb Natapov wrote: > > CCing Marcelo, > > > > On Wed, Jun 18, 2014 at 02:50:44PM +0800, Tang Chen wrote: > > > Hi Gleb, > > > > > > Thanks for the quick reply. Please see below. > > > >

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-19 Thread Tang Chen
Hi Marcelo, Thanks for your reply. Please see below. On 06/20/2014 03:00 AM, Marcelo Tosatti wrote: .. Remove pinning is preferable. In fact looks like for identity pagetable it should be trivial, just don't pin. APIC access page is a little bit more complicated since its physical address n

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-19 Thread Marcelo Tosatti
On Thu, Jun 19, 2014 at 12:20:32PM +0300, Gleb Natapov wrote: > CCing Marcelo, > > On Wed, Jun 18, 2014 at 02:50:44PM +0800, Tang Chen wrote: > > Hi Gleb, > > > > Thanks for the quick reply. Please see below. > > > > On 06/18/2014 02:12 PM, Gleb Natapov wrote: > > >On Wed, Jun 18, 2014 at 01:50:

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-19 Thread Gleb Natapov
CCing Marcelo, On Wed, Jun 18, 2014 at 02:50:44PM +0800, Tang Chen wrote: > Hi Gleb, > > Thanks for the quick reply. Please see below. > > On 06/18/2014 02:12 PM, Gleb Natapov wrote: > >On Wed, Jun 18, 2014 at 01:50:00PM +0800, Tang Chen wrote: > >>[Questions] > >>And by the way, would you guys

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-17 Thread Tang Chen
Hi Gleb, Thanks for the quick reply. Please see below. On 06/18/2014 02:12 PM, Gleb Natapov wrote: On Wed, Jun 18, 2014 at 01:50:00PM +0800, Tang Chen wrote: [Questions] And by the way, would you guys please answer the following questions for me ? 1. What's the ept identity pagetable for ? O

Re: [RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-17 Thread Gleb Natapov
On Wed, Jun 18, 2014 at 01:50:00PM +0800, Tang Chen wrote: > [Questions] > And by the way, would you guys please answer the following questions for me ? > > 1. What's the ept identity pagetable for ? Only one page is enough ? > > 2. Is the ept identity pagetable only used in realmode ? >Can

[RFC PATCH 1/1] Move two pinned pages to non-movable node in kvm.

2014-06-17 Thread Tang Chen
Hi, I met a problem when offlining memory with a kvm guest running. [Problem] When qemu creates vpus, it will call the following two functions to allocate two pages: 1. alloc_apic_access_page(): allocate apic access page for FlexPriority in intel cpu. 2. alloc_identity_pagetable(): allocate ept