From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Paul Mackerras <paulus@samba.org>,
Andrew Morton <akpm@linux-foundation.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Prepare to support kernel handling of IOMMU map/unmap
Date: Thu, 25 Jul 2013 20:33:24 +1000 [thread overview]
Message-ID: <51F0FEF4.9030309@ozlabs.ru> (raw)
In-Reply-To: <1374747961-28501-1-git-send-email-aik@ozlabs.ru>
On 07/25/2013 08:26 PM, Alexey Kardashevskiy wrote:
> The current VFIO-on-POWER implementation supports only user mode
> driven mapping, i.e. QEMU is sending requests to map/unmap pages.
> However this approach is really slow, so we want to move that to KVM.
> Since H_PUT_TCE can be extremely performance sensitive (especially with
> network adapters where each packet needs to be mapped/unmapped) we chose
> to implement that as a "fast" hypercall directly in "real
> mode" (processor still in the guest context but MMU off).
>
> To be able to do that, we need to provide some facilities to
> access the struct page count within that real mode environment as things
> like the sparsemem vmemmap mappings aren't accessible.
>
> This adds an API to get page struct when MMU is off.
>
> This adds to MM a new function put_page_unless_one() which drops a page
> if counter is bigger than 1. It is going to be used when MMU is off
> (real mode on PPC64 is the first user) and we want to make sure that page
> release will not happen in real mode as it may crash the kernel in
> a horrible way.
Yes, my english needs to be polished, I even know where :)
--
Alexey
WARNING: multiple messages have this Message-ID (diff)
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] powerpc: Prepare to support kernel handling of IOMMU map/unmap
Date: Thu, 25 Jul 2013 20:33:24 +1000 [thread overview]
Message-ID: <51F0FEF4.9030309@ozlabs.ru> (raw)
In-Reply-To: <1374747961-28501-1-git-send-email-aik@ozlabs.ru>
On 07/25/2013 08:26 PM, Alexey Kardashevskiy wrote:
> The current VFIO-on-POWER implementation supports only user mode
> driven mapping, i.e. QEMU is sending requests to map/unmap pages.
> However this approach is really slow, so we want to move that to KVM.
> Since H_PUT_TCE can be extremely performance sensitive (especially with
> network adapters where each packet needs to be mapped/unmapped) we chose
> to implement that as a "fast" hypercall directly in "real
> mode" (processor still in the guest context but MMU off).
>
> To be able to do that, we need to provide some facilities to
> access the struct page count within that real mode environment as things
> like the sparsemem vmemmap mappings aren't accessible.
>
> This adds an API to get page struct when MMU is off.
>
> This adds to MM a new function put_page_unless_one() which drops a page
> if counter is bigger than 1. It is going to be used when MMU is off
> (real mode on PPC64 is the first user) and we want to make sure that page
> release will not happen in real mode as it may crash the kernel in
> a horrible way.
Yes, my english needs to be polished, I even know where :)
--
Alexey
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: linuxppc-dev@lists.ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] powerpc: Prepare to support kernel handling of IOMMU map/unmap
Date: Thu, 25 Jul 2013 20:33:24 +1000 [thread overview]
Message-ID: <51F0FEF4.9030309@ozlabs.ru> (raw)
In-Reply-To: <1374747961-28501-1-git-send-email-aik@ozlabs.ru>
On 07/25/2013 08:26 PM, Alexey Kardashevskiy wrote:
> The current VFIO-on-POWER implementation supports only user mode
> driven mapping, i.e. QEMU is sending requests to map/unmap pages.
> However this approach is really slow, so we want to move that to KVM.
> Since H_PUT_TCE can be extremely performance sensitive (especially with
> network adapters where each packet needs to be mapped/unmapped) we chose
> to implement that as a "fast" hypercall directly in "real
> mode" (processor still in the guest context but MMU off).
>
> To be able to do that, we need to provide some facilities to
> access the struct page count within that real mode environment as things
> like the sparsemem vmemmap mappings aren't accessible.
>
> This adds an API to get page struct when MMU is off.
>
> This adds to MM a new function put_page_unless_one() which drops a page
> if counter is bigger than 1. It is going to be used when MMU is off
> (real mode on PPC64 is the first user) and we want to make sure that page
> release will not happen in real mode as it may crash the kernel in
> a horrible way.
Yes, my english needs to be polished, I even know where :)
--
Alexey
next prev parent reply other threads:[~2013-07-25 10:33 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-16 0:53 [PATCH 00/10 v6] KVM: PPC: IOMMU in-kernel handling Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` [PATCH 01/10] KVM: PPC: reserve a capability number for multitce support Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` [PATCH 02/10] KVM: PPC: reserve a capability and ioctl numbers for realmode VFIO Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` [PATCH 03/10] vfio: add external user support Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-23 2:23 ` Alex Williamson
2013-07-23 2:23 ` Alex Williamson
2013-07-23 2:23 ` Alex Williamson
2013-07-23 9:07 ` Alexey Kardashevskiy
2013-07-23 9:07 ` Alexey Kardashevskiy
2013-07-23 9:07 ` Alexey Kardashevskiy
2013-08-05 17:18 ` Alex Williamson
2013-08-05 17:18 ` Alex Williamson
2013-08-05 17:18 ` Alex Williamson
2013-07-16 0:53 ` [PATCH 04/10] powerpc: Prepare to support kernel handling of IOMMU map/unmap Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-16 0:53 ` Alexey Kardashevskiy
2013-07-23 2:22 ` Alexey Kardashevskiy
2013-07-23 2:22 ` Alexey Kardashevskiy
2013-07-23 2:22 ` Alexey Kardashevskiy
2013-07-23 2:22 ` Alexey Kardashevskiy
2013-07-24 22:43 ` Andrew Morton
2013-07-24 22:43 ` Andrew Morton
2013-07-24 22:43 ` Andrew Morton
2013-07-24 22:43 ` Andrew Morton
2013-07-24 23:13 ` Benjamin Herrenschmidt
2013-07-24 23:13 ` Benjamin Herrenschmidt
2013-07-24 23:13 ` Benjamin Herrenschmidt
2013-07-24 23:13 ` Benjamin Herrenschmidt
2013-07-25 10:26 ` [PATCH] " Alexey Kardashevskiy
2013-07-25 10:26 ` Alexey Kardashevskiy
2013-07-25 10:26 ` Alexey Kardashevskiy
2013-07-25 10:33 ` Alexey Kardashevskiy [this message]
2013-07-25 10:33 ` Alexey Kardashevskiy
2013-07-25 10:33 ` Alexey Kardashevskiy
2013-07-16 0:54 ` [PATCH 05/10] powerpc: add real mode support for dma operations on powernv Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` [PATCH 06/10] KVM: PPC: enable IOMMU_API for KVM_BOOK3S_64 permanently Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` [PATCH 07/10] KVM: PPC: Add support for multiple-TCE hcalls Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` [PATCH 08/10] powerpc/iommu: rework to support realmode Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` [PATCH 09/10] KVM: PPC: Add support for IOMMU in-kernel handling Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` [PATCH 10/10] KVM: PPC: Add hugepage " Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-16 0:54 ` Alexey Kardashevskiy
2013-07-19 4:13 ` [PATCH 00/10 v6] KVM: PPC: " Alexey Kardashevskiy
2013-07-19 4:13 ` Alexey Kardashevskiy
2013-07-19 4:13 ` Alexey Kardashevskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F0FEF4.9030309@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.