linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/4] Enable async page faults on s390
@ 2013-07-05 20:55 Dominik Dingel
  2013-07-05 20:55 ` [PATCH 1/4] PF: Add FAULT_FLAG_RETRY_NOWAIT for guest fault Dominik Dingel
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Dominik Dingel @ 2013-07-05 20:55 UTC (permalink / raw)
  To: Gleb Natapov, Paolo Bonzini
  Cc: Christian Borntraeger, Heiko Carstens, Martin Schwidefsky,
	Xiantao Zhang, Alexander Graf, Christoffer Dall, Marc Zyngier,
	Ralf Baechle, kvm, linux-s390, linux-mm, linux-kernel,
	Dominik Dingel

Gleb, Paolo, 

based on the work from Martin and Carsten, this implementation enables async page faults.
To the guest it will provide the pfault interface, but internally it uses the
async page fault common code. 

The inital submission and it's discussion can be followed on http://www.mail-archive.com/kvm@vger.kernel.org/msg63359.html .

There is a slight modification for common code to move from a pull to a push based approch on s390. 
As s390 we don't want to wait till we leave the guest state to queue the notification interrupts.

To use this feature the controlling userspace hase to enable the capability.
With that knob we can later on disable this feature for live migration.

v1 -> v2:
 - Adding other architecture backends
 - Adding documentation for the ioctl
 - Improving the overall error handling
 - Reducing the needed modifications on the common code

Dominik Dingel (4):
  PF: Add FAULT_FLAG_RETRY_NOWAIT for guest fault
  PF: Move architecture specifics to the backends
  PF: Provide additional direct page notification
  PF: Async page fault support on s390

 Documentation/s390/kvm.txt          |  24 ++++++++
 arch/arm/include/asm/kvm_host.h     |   8 +++
 arch/ia64/include/asm/kvm_host.h    |   3 +
 arch/mips/include/asm/kvm_host.h    |   6 ++
 arch/powerpc/include/asm/kvm_host.h |   8 +++
 arch/s390/include/asm/kvm_host.h    |  34 +++++++++++
 arch/s390/include/asm/pgtable.h     |   2 +
 arch/s390/include/asm/processor.h   |   1 +
 arch/s390/include/uapi/asm/kvm.h    |  10 ++++
 arch/s390/kvm/Kconfig               |   2 +
 arch/s390/kvm/Makefile              |   2 +-
 arch/s390/kvm/diag.c                |  57 ++++++++++++++++++
 arch/s390/kvm/interrupt.c           |  38 +++++++++---
 arch/s390/kvm/kvm-s390.c            | 111 ++++++++++++++++++++++++++++++++++++
 arch/s390/kvm/kvm-s390.h            |   4 ++
 arch/s390/kvm/sigp.c                |   2 +
 arch/s390/mm/fault.c                |  26 +++++++--
 arch/x86/include/asm/kvm_host.h     |   8 +++
 arch/x86/kvm/mmu.c                  |   2 +-
 include/linux/kvm_host.h            |  10 +---
 include/uapi/linux/kvm.h            |   2 +
 virt/kvm/Kconfig                    |   4 ++
 virt/kvm/async_pf.c                 |  22 ++++++-
 23 files changed, 361 insertions(+), 25 deletions(-)

-- 
1.8.2.2

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH 2/4] PF: Move architecture specifics to the backends
@ 2013-07-08 11:50 Marc Zyngier
  0 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2013-07-08 11:50 UTC (permalink / raw)
  To: Dominik Dingel
  Cc: Gleb Natapov, Paolo Bonzini, Christian Borntraeger,
	Heiko Carstens, Martin Schwidefsky, Xiantao Zhang, Alexander Graf,
	Christoffer Dall, Ralf Baechle, kvm, linux-s390, linux-mm,
	linux-kernel

On 2013-07-05 21:55, Dominik Dingel wrote:
> Current common codes uses PAGE_OFFSET to indicate a bad host virtual 
> address.
> As this check won't work on architectures that don't map kernel and
> user memory
> into the same address space (e.g. s390), it is moved into architcture
> specific
> code.
>
> Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
> ---
>  arch/arm/include/asm/kvm_host.h     |  8 ++++++++
>  arch/ia64/include/asm/kvm_host.h    |  3 +++
>  arch/mips/include/asm/kvm_host.h    |  6 ++++++
>  arch/powerpc/include/asm/kvm_host.h |  8 ++++++++
>  arch/s390/include/asm/kvm_host.h    | 12 ++++++++++++
>  arch/x86/include/asm/kvm_host.h     |  8 ++++++++
>  include/linux/kvm_host.h            |  8 --------
>  7 files changed, 45 insertions(+), 8 deletions(-)

[...]

> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> index a63d83e..210f493 100644
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -85,14 +85,6 @@ static inline bool is_noslot_pfn(pfn_t pfn)
>  	return pfn == KVM_PFN_NOSLOT;
>  }
>
> -#define KVM_HVA_ERR_BAD		(PAGE_OFFSET)
> -#define KVM_HVA_ERR_RO_BAD	(PAGE_OFFSET + PAGE_SIZE)
> -
> -static inline bool kvm_is_error_hva(unsigned long addr)
> -{
> -	return addr >= PAGE_OFFSET;
> -}
> -
>  #define KVM_ERR_PTR_BAD_PAGE	(ERR_PTR(-ENOENT))
>
>  static inline bool is_error_page(struct page *page)

Nit: This breaks arm64. I suppose the patches have been created before 
the arm64 code got merged, so I'd expect the next version of this series 
to deal with arm64 as well.

Thanks,

         M.
-- 
Fast, cheap, reliable. Pick two.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [RFC PATCH 0/4] Enable async page faults on s390
@ 2013-06-10 12:03 Dominik Dingel
  2013-06-10 12:03 ` [PATCH 2/4] PF: Move architecture specifics to the backends Dominik Dingel
  0 siblings, 1 reply; 9+ messages in thread
From: Dominik Dingel @ 2013-06-10 12:03 UTC (permalink / raw)
  To: Gleb Natapov, Paolo Bonzini
  Cc: Christian Borntraeger, Heiko Carstens, Martin Schwidefsky, kvm,
	linux-s390, linux-mm, linux-kernel, Dominik Dingel

Gleb, Paolo, 

based on the work from Martin and Carsten, this implementation enables async page faults.
To the guest it will provide the pfault interface, but internally it uses the
async page fault common code. 

The inital submission and it's discussion can be followed on http://www.mail-archive.com/kvm@vger.kernel.org/msg63359.html .

There is a slight modification for common code to move from a pull to a push based approch on s390. 
As s390 we don't want to wait till we leave the guest state to queue the notification interrupts.

To use this feature the controlling userspace hase to enable the capability.
With that knob we can later on disable this feature for live migration.

Dominik Dingel (4):
  PF: Add FAULT_FLAG_RETRY_NOWAIT for guest fault
  PF: Move architecture specifics to the backends
  PF: Additional flag for direct page fault inject
  PF: Intial async page fault support on s390x

 arch/s390/include/asm/kvm_host.h  |  34 +++++++++++++
 arch/s390/include/asm/processor.h |   7 +++
 arch/s390/include/uapi/asm/kvm.h  |  10 ++++
 arch/s390/kvm/Kconfig             |   1 +
 arch/s390/kvm/Makefile            |   2 +-
 arch/s390/kvm/diag.c              |  46 +++++++++++++++++
 arch/s390/kvm/interrupt.c         |  40 ++++++++++++---
 arch/s390/kvm/kvm-s390.c          | 101 ++++++++++++++++++++++++++++++++++++++
 arch/s390/kvm/kvm-s390.h          |   4 ++
 arch/s390/mm/fault.c              |  29 +++++++++--
 arch/s390/mm/pgtable.c            |   1 +
 arch/x86/include/asm/kvm_host.h   |   8 +++
 arch/x86/kvm/mmu.c                |   2 +-
 include/linux/kvm_host.h          |  11 +----
 include/uapi/linux/kvm.h          |   2 +
 virt/kvm/async_pf.c               |  33 ++++++++++---
 16 files changed, 303 insertions(+), 28 deletions(-)

-- 
1.8.1.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-08 11:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 20:55 [RFC PATCH v2 0/4] Enable async page faults on s390 Dominik Dingel
2013-07-05 20:55 ` [PATCH 1/4] PF: Add FAULT_FLAG_RETRY_NOWAIT for guest fault Dominik Dingel
2013-07-05 20:55 ` [PATCH 2/4] PF: Move architecture specifics to the backends Dominik Dingel
2013-07-07  9:20   ` Gleb Natapov
2013-07-05 20:55 ` [PATCH 3/4] PF: Provide additional direct page notification Dominik Dingel
2013-07-07  9:28   ` Gleb Natapov
2013-07-05 20:55 ` [PATCH 4/4] PF: Async page fault support on s390 Dominik Dingel
  -- strict thread matches above, loose matches on Subject: below --
2013-07-08 11:50 [PATCH 2/4] PF: Move architecture specifics to the backends Marc Zyngier
2013-06-10 12:03 [RFC PATCH 0/4] Enable async page faults on s390 Dominik Dingel
2013-06-10 12:03 ` [PATCH 2/4] PF: Move architecture specifics to the backends Dominik Dingel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).