This makes mm_iommu_lookup() able to work in realmode by replacing
list_for_each_entry_rcu() (which can do debug stuff which can fail in
real mode) with list_for_each_entry_lockless().
This adds realmode version of mm_iommu_ua_to_hpa() which adds
explicit vmalloc'd-to-linear address conversion.
Un
This adds a capability number for in-kernel support for VFIO on
SPAPR platform.
The capability will tell the user space whether in-kernel handlers of
H_PUT_TCE can handle VFIO-targeted requests or not. If not, the user space
must not attempt allocating a TCE table in the host kernel via
the KVM_CR
It does not make much sense to have KVM in book3s-64 and
not to have IOMMU bits for PCI pass through support as it costs little
and allows VFIO to function on book3s KVM.
Having IOMMU_API always enabled makes it unnecessary to have a lot of
"#ifdef IOMMU_API" in arch/powerpc/kvm/book3s_64_vio*. Wi
This reworks helpers for checking TCE update parameters in way they
can be used in KVM.
This should cause no behavioral change.
Signed-off-by: Alexey Kardashevskiy
---
Changes:
v6:
* s/tce/gpa/ as TCE without permission bits is a GPA and this is what is
passed everywhere
---
arch/powerpc/includ
This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT
and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO
without passing them to user space which saves time on switching
to user space and back.
This adds H_PUT_TCE/H_PUT_TCE_INDIRECT/H_STUFF_TCE handlers to KVM.
KVM tr
This is my current queue of patches to add acceleration of TCE
updates in KVM.
This is based on Linus'es tree sha1 4977ab6e92e2.
Please comment. Thanks.
Changes:
v6:
* reworked the last patch in terms of error handling and parameters checking
v5:
* replaced "KVM: PPC: Separate TCE validation fr
In real mode, TCE tables are invalidated using special
cache-inhibited store instructions which are not available in
virtual mode
This defines and implements exchange_rm() callback. This does not
define set_rm/clear_rm/flush_rm callbacks as there is no user for those -
exchange/exchange_rm are onl
At the moment iommu_table can be disposed by either calling
iommu_table_free() directly or it_ops::free(); the only implementation
of free() is in IODA2 - pnv_ioda2_table_free() - and it calls
iommu_table_free() anyway.
As we are going to have reference counting on tables, we need an unified
way o
So far iommu_table obejcts were only used in virtual mode and had
a single owner. We are going to change this by implementing in-kernel
acceleration of DMA mapping requests. The proposed acceleration
will handle requests in real mode and KVM will keep references to tables.
This adds a kref to iomm
The guest view TCE tables are per KVM anyway (not per VCPU) so pass kvm*
there. This will be used in the following patches where we will be
attaching VFIO containers to LIOBNs via ioctl() to KVM (rather than
to VCPU).
Signed-off-by: Alexey Kardashevskiy
Reviewed-by: David Gibson
---
arch/powerp
VFIO on sPAPR already implements guest memory pre-registration
when the entire guest RAM gets pinned. This can be used to translate
the physical address of a guest page containing the TCE list
from H_PUT_TCE_INDIRECT.
This makes use of the pre-registrered memory API to access TCE list
pages in ord
Steven Rostedt writes:
> On Tue, 28 Feb 2017 15:04:15 +1100
> Michael Ellerman wrote:
>
> kernel/trace/ftrace.c more obvious.
>>
>> I don't know if it's really worth keeping the names the same across
>> arches, especially as we already have:
>>
>> arch/arm64/kernel/entry-ftrace.S
>> arch/a
On 02/03/17 11:49, Oliver O'Halloran wrote:
> In previous generations of Power processors each core had a private L2
> cache. The Power9 processor has a slightly different architecture where
> the L2 cache is shared among pairs of cores rather than being completely
> private.
>
> Making the sche
David Daney writes:
> For powerpc the __jump_table section in modules is not aligned, this
> causes a WARN_ON() splat when loading a module containing a __jump_table.
Thanks for doing the patch.
If it helps:
Acked-by: Michael Ellerman (powerpc)
> Strict alignment became necessary with commit
On Wed, Mar 01, 2017 at 11:00:00AM -0300, Paulo Flabiano Smorigo wrote:
> Signed-off-by: Paulo Flabiano Smorigo
Patch applied. Thanks.
--
Email: Herbert Xu
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
On Wed, Mar 01, 2017 at 10:58:20AM -0300, Paulo Flabiano Smorigo wrote:
> Signed-off-by: Paulo Flabiano Smorigo
> ---
Patch applied. Thanks.
--
Email: Herbert Xu
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Michael Ellerman writes:
> David Daney writes:
>> Strict alignment became necessary with commit 3821fd35b58d
>> ("jump_label: Reduce the size of struct static_key"), currently in
>> linux-next, which uses the two least significant bits of pointers to
>> __jump_table elements.
>
> It would obvious
Le 17/02/2017 à 07:32, Michael Ellerman a écrit :
Now that we have 4xx platform directory we can move the 4xx machine
check handler in there. Again we drop get_mc_reason() and replace it
with regs->dsisr directly (which is actually SPRN_ESR).
The same can also be done for the 8xx.
I can propo
Kindly ping...
On 14/02/2017 17:45, Laurent Dufour wrote:
> This series attempts to clean the page fault handler in the way it has
> been done previously for the x86 architecture [1].
>
> The goal is to manage the mmap_sem earlier and only in
> do_page_fault(). This done by handling the retry cas
Hi Stewart/Michael,
Thanks!! for review.
Responses as below:
On Wednesday 01 March 2017 02:38 AM, Stewart Smith wrote:
Vipin K Parashar writes:
Added check for OPAL_WRONG_STATE error code returned from OPAL.
Currently Linux flashes "unexpected error" over console for this
error. This will a
On Thu, Mar 2, 2017 at 1:46 AM, Dmitry V. Levin wrote:
> Replace size_t with __kernel_size_t to fix asm/shmbuf.h userspace
> compilation errors like this:
>
> /usr/include/asm-generic/shmbuf.h:28:2: error: unknown type name 'size_t'
> size_t shm_segsz; /* size of segment (bytes) */
>
> x32 is
On Thu, Mar 2, 2017 at 1:22 AM, Dmitry V. Levin wrote:
> Include to fix asm/shmbuf.h userspace compilation errors
> like this:
>
> /usr/include/asm-generic/shmbuf.h:26:20: error: field 'shm_perm' has
> incomplete type
> struct ipc64_perm shm_perm; /* operation perms */
> /usr/include/asm-gener
Hi Michael and Bamovar,
On 03/01/2017 11:43 PM, Michael Ellerman wrote:
> Shuah Khan writes:
>> Hi Bamovar,
>>
>> Your original series badly broke the selftest build. I can no longer
>> build individual tests. For example:
>>
>> cd breakpoints/
>> shuah@shuah-XPS-13-9350:/lkml/linux_4.11/tools/te
On 03/01/2017 05:04 PM, David Daney wrote:
For powerpc the __jump_table section in modules is not aligned, this
causes a WARN_ON() splat when loading a module containing a __jump_table.
Strict alignment became necessary with commit 3821fd35b58d
("jump_label: Reduce the size of struct static_key"
On Thu, Mar 02, 2017 at 10:22:18AM -0500, Carlos O'Donell wrote:
> On Wed, Mar 1, 2017 at 11:20 AM, Arnd Bergmann wrote:
> > On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin wrote:
> >> Include (guarded by #ifndef __KERNEL__) to fix asm/signal.h
> >> userspace compilation errors like this:
> >>
On Thu, 02 Mar 2017 22:18:30 +1100
Michael Ellerman wrote:
> Michael Ellerman writes:
> > David Daney writes:
> >> Strict alignment became necessary with commit 3821fd35b58d
> >> ("jump_label: Reduce the size of struct static_key"), currently in
> >> linux-next, which uses the two least signi
On 2017/02/24 05:11PM, Arnaldo Carvalho de Melo wrote:
> Em Sat, Feb 25, 2017 at 02:29:17AM +0900, Masami Hiramatsu escreveu:
> > On Fri, 24 Feb 2017 00:46:08 +0530
> > "Naveen N. Rao" wrote:
> > > Thanks. I hope that's an Ack for this patchset?
> >
> > OK, for 1/5, 2/5, 3/5, and 5/5;
> >
> > Ac
Simplify and separate out the ftrace README scanning logic into a
separate helper. This is used subsequently to scan for all patterns of
interest and to cache the result.
Since we are only interested in availability of probe argument type x,
we will only scan for that.
Signed-off-by: Naveen N. Ra
We indicate support for accepting sym+offset with kretprobes through a
line in ftrace README. Parse the same to identify support and choose the
appropriate format for kprobe_events.
Signed-off-by: Naveen N. Rao
---
tools/perf/util/probe-event.c | 12 +---
tools/perf/util/probe-file.c |
perf now uses an offset from _text/_stext for kretprobes if the kernel
supports it, rather than the actual function name. As such, let's choose
the LEP for powerpc ABIv2 so as to ensure the probe gets hit. Do it only
if the kernel supports specifying offsets with kretprobes.
Signed-off-by: Naveen
Can I get an Ack from a module maintainer?
Thanks!
-- Steve
On Wed, 1 Mar 2017 14:04:53 -0800
David Daney wrote:
> For powerpc the __jump_table section in modules is not aligned, this
> causes a WARN_ON() splat when loading a module containing a __jump_table.
>
> Strict alignment became ne
+++ Steven Rostedt [02/03/17 13:11 -0500]:
Can I get an Ack from a module maintainer?
Acked-by: Jessica Yu
Thanks!
Jessica
On Wed, 1 Mar 2017 14:04:53 -0800
David Daney wrote:
For powerpc the __jump_table section in modules is not aligned, this
causes a WARN_ON() splat when loading a
Em Thu, Mar 02, 2017 at 11:25:04PM +0530, Naveen N. Rao escreveu:
> On 2017/02/24 05:11PM, Arnaldo Carvalho de Melo wrote:
> > Em Sat, Feb 25, 2017 at 02:29:17AM +0900, Masami Hiramatsu escreveu:
> > > On Fri, 24 Feb 2017 00:46:08 +0530
> > > "Naveen N. Rao" wrote:
> > > > Thanks. I hope that's an
On 03/02/2017 10:26 AM, Jessica Yu wrote:
+++ Steven Rostedt [02/03/17 13:11 -0500]:
Can I get an Ack from a module maintainer?
Acked-by: Jessica Yu
Thanks!
Jessica
Thanks Jessica,
Can you also add scripts/module-common.lds to MAINTAINERS so that
get_maintainers.pl will indicate that J
On Wed, Mar 1, 2017 at 11:20 AM, Arnd Bergmann wrote:
> On Sun, Feb 26, 2017 at 2:01 AM, Dmitry V. Levin wrote:
>> Include (guarded by #ifndef __KERNEL__) to fix asm/signal.h
>> userspace compilation errors like this:
>>
>> /usr/include/asm/signal.h:126:2: error: unknown type name 'size_t'
>>
On Thu, 2017-03-02 at 17:41 +1100, Alexey Kardashevskiy wrote:
> With CONFIG_DEBUG_INFO_SPLIT=y, the makefile adds "-gsplit-dwarf" which
> somehow makes the scripts/gcc-goto.sh test fail and not have
> CC_HAVE_ASM_GOTO defined so the alternative OPAL_BRANCH() is used
This needs to be fixed too tho
+++ David Daney [02/03/17 11:24 -0800]:
On 03/02/2017 10:26 AM, Jessica Yu wrote:
+++ Steven Rostedt [02/03/17 13:11 -0500]:
Can I get an Ack from a module maintainer?
Acked-by: Jessica Yu
Thanks!
Jessica
Thanks Jessica,
Can you also add scripts/module-common.lds to MAINTAINERS so that
On 03/02/2017 12:33 AM, Michael Ellerman wrote:
Paul Clarke writes:
On 02/02/2017 12:22 AM, Benjamin Herrenschmidt wrote:
This adds AUX vectors for the L1I,D, L2 and L3 cache levels
providing for each cache level the size of the cache in bytes
and the geometry (line size and number of ways).
On 03/03/17 08:37, Benjamin Herrenschmidt wrote:
> On Thu, 2017-03-02 at 17:41 +1100, Alexey Kardashevskiy wrote:
>> With CONFIG_DEBUG_INFO_SPLIT=y, the makefile adds "-gsplit-dwarf" which
>> somehow makes the scripts/gcc-goto.sh test fail and not have
>> CC_HAVE_ASM_GOTO defined so the alternative
CPPR (Current Processor Priority Register) emulation on icp-opal
uses a single priority in the backend and that can cause CPU
hotplug to be affected when we try to send an IPI to it.
The fix is in migrate_irqs_away, the fix does the following:
1. It moves the setting of CPPR to after all IRQ migr
Steven Rostedt writes:
> On Thu, 02 Mar 2017 22:18:30 +1100
> Michael Ellerman wrote:
>> Michael Ellerman writes:
>> > David Daney writes:
>> >> Strict alignment became necessary with commit 3821fd35b58d
>> >> ("jump_label: Reduce the size of struct static_key"), currently in
>> >> linux-next
On Sat, Feb 04, 2017 at 05:03:40PM +0800, Shile Zhang wrote:
> fix the missed point in Paul's patch:
> "powerpc/64: Fix checksum folding in csum_tcpudp_nofold and
> ip_fast_csum_nofold"
>
> Signed-off-by: Shile Zhang
Acked-by: Paul Mackerras
Paul Clarke writes:
> On 03/02/2017 12:33 AM, Michael Ellerman wrote:
>> Paul Clarke writes:
>>> On 02/02/2017 12:22 AM, Benjamin Herrenschmidt wrote:
This adds AUX vectors for the L1I,D, L2 and L3 cache levels
providing for each cache level the size of the cache in bytes
and the
Hi Russell,
Vaibhav Jain writes:
> This patch introduces function eeh_pe_reset_freeze_counter() which can
> be used to reset the PE's freeze count variable outside eeh code. This
> is useful for devices that can acquire a different personality after
> a PERST event (e.g FPGA Adapters). Presently
On Fri, 2017-03-03 at 09:51 +0530, Vaibhav Jain wrote:
> Hi Russell,
>
> Vaibhav Jain writes:
>
> > This patch introduces function eeh_pe_reset_freeze_counter() which can
> > be used to reset the PE's freeze count variable outside eeh code. This
> > is useful for devices that can acquire a diffe
On 03/03/17 15:21, Vaibhav Jain wrote:
Had a short chat discussion with Gavin Shan on this patchset and he
preffers restoring the freeze_count on the eeh_pe once FRESET is done.
He expects a the flow to be similar to one below
1. module caches the value of freeze_count and resets it
2. Issue war
On 03/03/17 15:35, Russell Currey wrote:
I thought about this but figured it didn't really make sense from a CAPI
perspective. If you're flashing the device, it is going to have different
behaviour to before it was flashed, and that it should be treated differently as
a result (and thus restorin
eeh_handle_special_event() is called when an EEH event is detected but
can't be narrowed down to a specific PE. This function looks through
every PE to find one in an erroneous state, then calls the regular event
handler eeh_handle_normal_event() once it knows which PE has an error.
However, if e
On Fri, Mar 03, 2017 at 03:35:05PM +1100, Russell Currey wrote:
>On Fri, 2017-03-03 at 09:51 +0530, Vaibhav Jain wrote:
>> Hi Russell,
>>
>> Vaibhav Jain writes:
>>
>> > This patch introduces function eeh_pe_reset_freeze_counter() which can
>> > be used to reset the PE's freeze count variable ou
On Fri, Mar 03, 2017 at 03:47:18PM +1100, Russell Currey wrote:
>eeh_handle_special_event() is called when an EEH event is detected but
>can't be narrowed down to a specific PE. This function looks through
>every PE to find one in an erroneous state, then calls the regular event
>handler eeh_handl
On 03/03/17 15:47, Russell Currey wrote:
> eeh_handle_special_event() is called when an EEH event is detected but
> can't be narrowed down to a specific PE. This function looks through
> every PE to find one in an erroneous state, then calls the regular event
> handler eeh_handle_normal_event() on
On Thu, Mar 02, 2017 at 07:56:44PM +1100, Alexey Kardashevskiy wrote:
> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT
> and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO
> without passing them to user space which saves time on switching
> to user space and bac
On Thu, Mar 02, 2017 at 07:56:43PM +1100, Alexey Kardashevskiy wrote:
> This reworks helpers for checking TCE update parameters in way they
> can be used in KVM.
>
> This should cause no behavioral change.
>
> Signed-off-by: Alexey Kardashevskiy
Reviewed-by: David Gibson
> ---
> Changes:
> v6
On 03/03/17 16:55, Gavin Shan wrote:
> On Fri, Mar 03, 2017 at 03:47:18PM +1100, Russell Currey wrote:
>> eeh_handle_special_event() is called when an EEH event is detected but
>> can't be narrowed down to a specific PE. This function looks through
>> every PE to find one in an erroneous state, th
Turning on crypto self-tests on a POWER8 shows:
alg: hash: Test 1 failed for crc32c-vpmsum
: ff ff ff ff
Comparing the code with the Intel CRC32c implementation on which
ours is based shows that we are doing an init with 0, not ~0
as CRC32c requires.
This probably wasn't caught b
On 02/02/17 04:30, Christophe Lombard wrote:
Point out the specific Coherent Accelerator Interface Architecture,
level 1, registers.
Code and functions specific to PSL8 (CAIA1) must be framed.
Signed-off-by: Christophe Lombard
Haven't examined this in enough detail to give my Reviewed-by: jus
On 03/03/17 16:59, David Gibson wrote:
> On Thu, Mar 02, 2017 at 07:56:44PM +1100, Alexey Kardashevskiy wrote:
>> This allows the host kernel to handle H_PUT_TCE, H_PUT_TCE_INDIRECT
>> and H_STUFF_TCE requests targeted an IOMMU TCE table used for VFIO
>> without passing them to user space which sav
On 02/02/17 04:30, Christophe Lombard wrote:
The new Coherent Accelerator Interface Architecture, level 2, for the
IBM POWER9 brings new content and features:
- POWER9 Service Layer
- Registers
- Radix mode
- Process element entry
- Dedicated-Shared Process Programming Model
- Translation Fault H
58 matches
Mail list logo